diff --git a/.github/workflows/gh-release.yaml b/.github/workflows/gh-release.yaml index 08ed28e..81d5cb6 100644 --- a/.github/workflows/gh-release.yaml +++ b/.github/workflows/gh-release.yaml @@ -1,10 +1,10 @@ -name: 'Github release' +name: "Github release" on: workflow_dispatch: push: tags: - - '*' + - "*" jobs: gh-release: @@ -12,5 +12,5 @@ jobs: with: # If enabled, respects commits between SemVer tag build num iterations instead of previous commited tag (eg: X.X.X-y_2 -> X.X.X-y_3) tag_num: false - fetch_depth: '30' - changelog_file: 'CHANGELOG.md' + fetch_depth: "30" + changelog_file: "CHANGELOG.md" diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 8f68c10..32b73d5 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -19,10 +19,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Use Node.js 14.x - uses: actions/setup-node@v2.1.5 + - name: Use Node.js 20.x + uses: actions/setup-node@v4.0.2 with: - node-version: 14.x + node-version: 20.x - name: Get yarn cache directory path id: yarn-cache-dir-path @@ -181,7 +181,7 @@ jobs: uses: ./install with: before_install: echo asdf nodejs import-keyring - tool_versions: direnv 2.20.0 + tool_versions: direnv 2.33.0 - run: direnv version diff --git a/.tool-versions b/.tool-versions index 01dd94a..7dd4a6b 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -nodejs 16.19.1 +nodejs 20.9.0 yarn 1.22.19 diff --git a/current/action.yaml b/current/action.yaml index 5029b13..3294264 100644 --- a/current/action.yaml +++ b/current/action.yaml @@ -2,7 +2,7 @@ name: asdf current description: Get current tools versions author: Tomas Hulata runs: - using: node16 + using: node20 main: main.js inputs: directory: diff --git a/current/main.js b/current/main.js index 975ba80..94305dc 100644 --- a/current/main.js +++ b/current/main.js @@ -5,33 +5,48 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; -var __esm = (fn, res) => function __init() { - return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; -}; -var __commonJS = (cb, mod) => function __require() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; -}; +var __esm = (fn, res) => + function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])((fn = 0))), res; + }; +var __commonJS = (cb, mod) => + function __require() { + return ( + mod || + (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), + mod.exports + ); + }; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { + if ((from && typeof from === "object") || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + __defProp(to, key, { + get: () => from[key], + enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable, + }); } return to; }; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var __toESM = (mod, isNodeMode, target) => ( + (target = mod != null ? __create(__getProtoOf(mod)) : {}), + __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule + ? __defProp(target, "default", { value: mod, enumerable: true }) + : target, + mod + ) +); +var __toCommonJS = (mod) => + __copyProps(__defProp({}, "__esModule", { value: true }), mod); // node_modules/@actions/core/lib/utils.js var require_utils = __commonJS({ @@ -58,45 +73,55 @@ var require_utils = __commonJS({ line: annotationProperties.startLine, endLine: annotationProperties.endLine, col: annotationProperties.startColumn, - endColumn: annotationProperties.endColumn + endColumn: annotationProperties.endColumn, }; } exports.toCommandProperties = toCommandProperties; - } + }, }); // node_modules/@actions/core/lib/command.js var require_command = __commonJS({ "node_modules/@actions/core/lib/command.js"(exports) { "use strict"; - var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar = exports && exports.__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 __createBinding = + (exports && exports.__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 = + (exports && exports.__setModuleDefault) || + (Object.create + ? function (o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } + : function (o, v) { + o["default"] = v; + }); + var __importStar = + (exports && exports.__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; + }; Object.defineProperty(exports, "__esModule", { value: true }); exports.issue = exports.issueCommand = void 0; var os2 = __importStar(require("os")); @@ -144,12 +169,22 @@ var require_command = __commonJS({ } }; function escapeData(s) { - return utils_1.toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + return utils_1 + .toCommandValue(s) + .replace(/%/g, "%25") + .replace(/\r/g, "%0D") + .replace(/\n/g, "%0A"); } function escapeProperty(s) { - return utils_1.toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + return utils_1 + .toCommandValue(s) + .replace(/%/g, "%25") + .replace(/\r/g, "%0D") + .replace(/\n/g, "%0A") + .replace(/:/g, "%3A") + .replace(/,/g, "%2C"); } - } + }, }); // node_modules/uuid/dist/esm-node/rng.js @@ -158,7 +193,7 @@ function rng() { import_crypto.default.randomFillSync(rnds8Pool); poolPtr = 0; } - return rnds8Pool.slice(poolPtr, poolPtr += 16); + return rnds8Pool.slice(poolPtr, (poolPtr += 16)); } var import_crypto, rnds8Pool, poolPtr; var init_rng = __esm({ @@ -166,15 +201,16 @@ var init_rng = __esm({ import_crypto = __toESM(require("crypto")); rnds8Pool = new Uint8Array(256); poolPtr = rnds8Pool.length; - } + }, }); // node_modules/uuid/dist/esm-node/regex.js var regex_default; var init_regex = __esm({ "node_modules/uuid/dist/esm-node/regex.js"() { - regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; - } + regex_default = + /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; + }, }); // node_modules/uuid/dist/esm-node/validate.js @@ -186,12 +222,33 @@ var init_validate = __esm({ "node_modules/uuid/dist/esm-node/validate.js"() { init_regex(); validate_default = validate; - } + }, }); // node_modules/uuid/dist/esm-node/stringify.js function stringify(arr, offset = 0) { - const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); + const uuid = ( + byteToHex[arr[offset + 0]] + + byteToHex[arr[offset + 1]] + + byteToHex[arr[offset + 2]] + + byteToHex[arr[offset + 3]] + + "-" + + byteToHex[arr[offset + 4]] + + byteToHex[arr[offset + 5]] + + "-" + + byteToHex[arr[offset + 6]] + + byteToHex[arr[offset + 7]] + + "-" + + byteToHex[arr[offset + 8]] + + byteToHex[arr[offset + 9]] + + "-" + + byteToHex[arr[offset + 10]] + + byteToHex[arr[offset + 11]] + + byteToHex[arr[offset + 12]] + + byteToHex[arr[offset + 13]] + + byteToHex[arr[offset + 14]] + + byteToHex[arr[offset + 15]] + ).toLowerCase(); if (!validate_default(uuid)) { throw TypeError("Stringified UUID is invalid"); } @@ -206,12 +263,12 @@ var init_stringify = __esm({ byteToHex.push((i + 256).toString(16).substr(1)); } stringify_default = stringify; - } + }, }); // node_modules/uuid/dist/esm-node/v1.js function v1(options, buf, offset) { - let i = buf && offset || 0; + let i = (buf && offset) || 0; const b = buf || new Array(16); options = options || {}; let node = options.node || _nodeId; @@ -219,17 +276,24 @@ function v1(options, buf, offset) { if (node == null || clockseq == null) { const seedBytes = options.random || (options.rng || rng)(); if (node == null) { - node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + node = _nodeId = [ + seedBytes[0] | 1, + seedBytes[1], + seedBytes[2], + seedBytes[3], + seedBytes[4], + seedBytes[5], + ]; } if (clockseq == null) { - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383; + clockseq = _clockseq = ((seedBytes[6] << 8) | seedBytes[7]) & 16383; } } let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1; const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4; if (dt < 0 && options.clockseq === void 0) { - clockseq = clockseq + 1 & 16383; + clockseq = (clockseq + 1) & 16383; } if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) { nsecs = 0; @@ -242,16 +306,16 @@ function v1(options, buf, offset) { _clockseq = clockseq; msecs += 122192928e5; const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; - b[i++] = tl >>> 24 & 255; - b[i++] = tl >>> 16 & 255; - b[i++] = tl >>> 8 & 255; + b[i++] = (tl >>> 24) & 255; + b[i++] = (tl >>> 16) & 255; + b[i++] = (tl >>> 8) & 255; b[i++] = tl & 255; - const tmh = msecs / 4294967296 * 1e4 & 268435455; - b[i++] = tmh >>> 8 & 255; + const tmh = ((msecs / 4294967296) * 1e4) & 268435455; + b[i++] = (tmh >>> 8) & 255; b[i++] = tmh & 255; - b[i++] = tmh >>> 24 & 15 | 16; - b[i++] = tmh >>> 16 & 255; - b[i++] = clockseq >>> 8 | 128; + b[i++] = ((tmh >>> 24) & 15) | 16; + b[i++] = (tmh >>> 16) & 255; + b[i++] = (clockseq >>> 8) | 128; b[i++] = clockseq & 255; for (let n = 0; n < 6; ++n) { b[i + n] = node[n]; @@ -266,7 +330,7 @@ var init_v1 = __esm({ _lastMSecs = 0; _lastNSecs = 0; v1_default = v1; - } + }, }); // node_modules/uuid/dist/esm-node/parse.js @@ -277,8 +341,8 @@ function parse(uuid) { let v; const arr = new Uint8Array(16); arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 255; - arr[2] = v >>> 8 & 255; + arr[1] = (v >>> 16) & 255; + arr[2] = (v >>> 8) & 255; arr[3] = v & 255; arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; arr[5] = v & 255; @@ -286,11 +350,11 @@ function parse(uuid) { arr[7] = v & 255; arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; arr[9] = v & 255; - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; - arr[11] = v / 4294967296 & 255; - arr[12] = v >>> 24 & 255; - arr[13] = v >>> 16 & 255; - arr[14] = v >>> 8 & 255; + arr[10] = ((v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776) & 255; + arr[11] = (v / 4294967296) & 255; + arr[12] = (v >>> 24) & 255; + arr[13] = (v >>> 16) & 255; + arr[14] = (v >>> 8) & 255; arr[15] = v & 255; return arr; } @@ -299,7 +363,7 @@ var init_parse = __esm({ "node_modules/uuid/dist/esm-node/parse.js"() { init_validate(); parse_default = parse; - } + }, }); // node_modules/uuid/dist/esm-node/v35.js @@ -320,14 +384,16 @@ function v35_default(name, version2, hashfunc) { namespace = parse_default(namespace); } if (namespace.length !== 16) { - throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); + throw TypeError( + "Namespace must be array-like (16 iterable integer values, 0-255)" + ); } let bytes = new Uint8Array(16 + value.length); bytes.set(namespace); bytes.set(value, namespace.length); bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 15 | version2; - bytes[8] = bytes[8] & 63 | 128; + bytes[6] = (bytes[6] & 15) | version2; + bytes[8] = (bytes[8] & 63) | 128; if (buf) { offset = offset || 0; for (let i = 0; i < 16; ++i) { @@ -339,8 +405,7 @@ function v35_default(name, version2, hashfunc) { } try { generateUUID.name = name; - } catch (err) { - } + } catch (err) {} generateUUID.DNS = DNS; generateUUID.URL = URL2; return generateUUID; @@ -352,7 +417,7 @@ var init_v35 = __esm({ init_parse(); DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; - } + }, }); // node_modules/uuid/dist/esm-node/md5.js @@ -369,7 +434,7 @@ var init_md5 = __esm({ "node_modules/uuid/dist/esm-node/md5.js"() { import_crypto2 = __toESM(require("crypto")); md5_default = md5; - } + }, }); // node_modules/uuid/dist/esm-node/v3.js @@ -380,15 +445,15 @@ var init_v3 = __esm({ init_md5(); v3 = v35_default("v3", 48, md5_default); v3_default = v3; - } + }, }); // node_modules/uuid/dist/esm-node/v4.js function v4(options, buf, offset) { options = options || {}; const rnds = options.random || (options.rng || rng)(); - rnds[6] = rnds[6] & 15 | 64; - rnds[8] = rnds[8] & 63 | 128; + rnds[6] = (rnds[6] & 15) | 64; + rnds[8] = (rnds[8] & 63) | 128; if (buf) { offset = offset || 0; for (let i = 0; i < 16; ++i) { @@ -404,7 +469,7 @@ var init_v4 = __esm({ init_rng(); init_stringify(); v4_default = v4; - } + }, }); // node_modules/uuid/dist/esm-node/sha1.js @@ -421,7 +486,7 @@ var init_sha1 = __esm({ "node_modules/uuid/dist/esm-node/sha1.js"() { import_crypto3 = __toESM(require("crypto")); sha1_default = sha1; - } + }, }); // node_modules/uuid/dist/esm-node/v5.js @@ -432,7 +497,7 @@ var init_v5 = __esm({ init_sha1(); v5 = v35_default("v5", 80, sha1_default); v5_default = v5; - } + }, }); // node_modules/uuid/dist/esm-node/nil.js @@ -440,7 +505,7 @@ var nil_default; var init_nil = __esm({ "node_modules/uuid/dist/esm-node/nil.js"() { nil_default = "00000000-0000-0000-0000-000000000000"; - } + }, }); // node_modules/uuid/dist/esm-node/version.js @@ -455,7 +520,7 @@ var init_version = __esm({ "node_modules/uuid/dist/esm-node/version.js"() { init_validate(); version_default = version; - } + }, }); // node_modules/uuid/dist/esm-node/index.js @@ -469,7 +534,7 @@ __export(esm_node_exports, { v4: () => v4_default, v5: () => v5_default, validate: () => validate_default, - version: () => version_default + version: () => version_default, }); var init_esm_node = __esm({ "node_modules/uuid/dist/esm-node/index.js"() { @@ -482,41 +547,51 @@ var init_esm_node = __esm({ init_validate(); init_stringify(); init_parse(); - } + }, }); // node_modules/@actions/core/lib/file-command.js var require_file_command = __commonJS({ "node_modules/@actions/core/lib/file-command.js"(exports) { "use strict"; - var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar = exports && exports.__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 __createBinding = + (exports && exports.__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 = + (exports && exports.__setModuleDefault) || + (Object.create + ? function (o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } + : function (o, v) { + o["default"] = v; + }); + var __importStar = + (exports && exports.__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; + }; Object.defineProperty(exports, "__esModule", { value: true }); exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; var fs3 = __importStar(require("fs")); @@ -526,29 +601,39 @@ var require_file_command = __commonJS({ function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; if (!filePath) { - throw new Error(`Unable to find environment variable for file command ${command}`); + throw new Error( + `Unable to find environment variable for file command ${command}` + ); } if (!fs3.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs3.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os2.EOL}`, { - encoding: "utf8" - }); + fs3.appendFileSync( + filePath, + `${utils_1.toCommandValue(message)}${os2.EOL}`, + { + encoding: "utf8", + } + ); } exports.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { const delimiter = `ghadelimiter_${uuid_1.v4()}`; const convertedValue = utils_1.toCommandValue(value); if (key.includes(delimiter)) { - throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + throw new Error( + `Unexpected input: name should not contain the delimiter "${delimiter}"` + ); } if (convertedValue.includes(delimiter)) { - throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + throw new Error( + `Unexpected input: value should not contain the delimiter "${delimiter}"` + ); } return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; } exports.prepareKeyValueMessage = prepareKeyValueMessage; - } + }, }); // node_modules/@actions/http-client/lib/proxy.js @@ -600,8 +685,20 @@ var require_proxy = __commonJS({ 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}`))) { + 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; } } @@ -610,9 +707,14 @@ var require_proxy = __commonJS({ exports.checkBypass = checkBypass; function isLoopbackAddress(host) { const hostLower = host.toLowerCase(); - return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); + return ( + hostLower === "localhost" || + hostLower.startsWith("127.") || + hostLower.startsWith("[::1]") || + hostLower.startsWith("[0:0:0:0:0:0:0:1]") + ); } - } + }, }); // node_modules/tunnel/lib/tunnel.js @@ -665,7 +767,10 @@ var require_tunnel = __commonJS({ var options2 = toOptions(host, port, localAddress); for (var i = 0, len = self.requests.length; i < len; ++i) { var pending = self.requests[i]; - if (pending.host === options2.host && pending.port === options2.port) { + if ( + pending.host === options2.host && + pending.port === options2.port + ) { self.requests.splice(i, 1); pending.request.onSocket(socket); return; @@ -676,14 +781,23 @@ var require_tunnel = __commonJS({ }); } util.inherits(TunnelingAgent, events.EventEmitter); - TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + TunnelingAgent.prototype.addRequest = function addRequest( + req, + host, + port, + localAddress + ) { var self = this; - var options = mergeOptions({ request: req }, self.options, toOptions(host, port, localAddress)); + var options = mergeOptions( + { request: req }, + self.options, + toOptions(host, port, localAddress) + ); if (self.sockets.length >= this.maxSockets) { self.requests.push(options); return; } - self.createSocket(options, function(socket) { + self.createSocket(options, function (socket) { socket.on("free", onFree); socket.on("close", onCloseOrRemove); socket.on("agentRemove", onCloseOrRemove); @@ -708,15 +822,16 @@ var require_tunnel = __commonJS({ path: options.host + ":" + options.port, agent: false, headers: { - host: options.host + ":" + options.port - } + host: options.host + ":" + options.port, + }, }); if (options.localAddress) { connectOptions.localAddress = options.localAddress; } if (connectOptions.proxyAuth) { connectOptions.headers = connectOptions.headers || {}; - connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); + connectOptions.headers["Proxy-Authorization"] = + "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); } debug("making CONNECT request"); var connectReq = self.request(connectOptions); @@ -730,7 +845,7 @@ var require_tunnel = __commonJS({ res.upgrade = true; } function onUpgrade(res, socket, head) { - process.nextTick(function() { + process.nextTick(function () { onConnect(res, socket, head); }); } @@ -743,7 +858,10 @@ var require_tunnel = __commonJS({ res.statusCode ); socket.destroy(); - var error = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + var error = new Error( + "tunneling socket could not be established, statusCode=" + + res.statusCode + ); error.code = "ECONNRESET"; options.request.emit("error", error); self.removeSocket(placeholder); @@ -769,7 +887,9 @@ var require_tunnel = __commonJS({ cause.message, cause.stack ); - var error = new Error("tunneling socket could not be established, cause=" + cause.message); + var error = new Error( + "tunneling socket could not be established, cause=" + cause.message + ); error.code = "ECONNRESET"; options.request.emit("error", error); self.removeSocket(placeholder); @@ -783,30 +903,36 @@ var require_tunnel = __commonJS({ this.sockets.splice(pos, 1); var pending = this.requests.shift(); if (pending) { - this.createSocket(pending, function(socket2) { + this.createSocket(pending, function (socket2) { pending.request.onSocket(socket2); }); } }; function createSecureSocket(options, cb) { var self = this; - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - var hostHeader = options.request.getHeader("host"); - var tlsOptions = mergeOptions({}, self.options, { - socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, "") : options.host - }); - var secureSocket = tls.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); + TunnelingAgent.prototype.createSocket.call( + self, + options, + function (socket) { + var hostHeader = options.request.getHeader("host"); + var tlsOptions = mergeOptions({}, self.options, { + socket, + servername: hostHeader + ? hostHeader.replace(/:.*$/, "") + : options.host, + }); + var secureSocket = tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + } + ); } function toOptions(host, port, localAddress) { if (typeof host === "string") { return { host, port, - localAddress + localAddress, }; } return host; @@ -828,7 +954,7 @@ var require_tunnel = __commonJS({ } var debug; if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { + debug = function () { var args = Array.prototype.slice.call(arguments); if (typeof args[0] === "string") { args[0] = "TUNNEL: " + args[0]; @@ -838,124 +964,150 @@ var require_tunnel = __commonJS({ console.error.apply(console, args); }; } else { - debug = function() { - }; + debug = function () {}; } exports.debug = debug; - } + }, }); // node_modules/tunnel/index.js var require_tunnel2 = __commonJS({ "node_modules/tunnel/index.js"(exports, module2) { module2.exports = require_tunnel(); - } + }, }); // node_modules/@actions/http-client/lib/index.js var require_lib = __commonJS({ "node_modules/@actions/http-client/lib/index.js"(exports) { "use strict"; - var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar = exports && exports.__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 __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + var __createBinding = + (exports && exports.__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 rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + : function (o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = + (exports && exports.__setModuleDefault) || + (Object.create + ? function (o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); } + : function (o, v) { + o["default"] = v; + }); + var __importStar = + (exports && exports.__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 __awaiter = + (exports && exports.__awaiter) || + function (thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P + ? value + : new P(function (resolve) { + resolve(value); + }); } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; + return new (P || (P = Promise))(function (resolve, 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 + ? resolve(result.value) + : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports, "__esModule", { value: true }); - exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; + exports.HttpClient = + exports.isHttps = + exports.HttpClientResponse = + exports.HttpClientError = + exports.getProxyUrl = + exports.MediaTypes = + exports.Headers = + exports.HttpCodes = + void 0; var http = __importStar(require("http")); var https = __importStar(require("https")); var pm = __importStar(require_proxy()); var tunnel = __importStar(require_tunnel2()); var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); + (function (HttpCodes2) { + HttpCodes2[(HttpCodes2["OK"] = 200)] = "OK"; + HttpCodes2[(HttpCodes2["MultipleChoices"] = 300)] = "MultipleChoices"; + HttpCodes2[(HttpCodes2["MovedPermanently"] = 301)] = "MovedPermanently"; + HttpCodes2[(HttpCodes2["ResourceMoved"] = 302)] = "ResourceMoved"; + HttpCodes2[(HttpCodes2["SeeOther"] = 303)] = "SeeOther"; + HttpCodes2[(HttpCodes2["NotModified"] = 304)] = "NotModified"; + HttpCodes2[(HttpCodes2["UseProxy"] = 305)] = "UseProxy"; + HttpCodes2[(HttpCodes2["SwitchProxy"] = 306)] = "SwitchProxy"; + HttpCodes2[(HttpCodes2["TemporaryRedirect"] = 307)] = "TemporaryRedirect"; + HttpCodes2[(HttpCodes2["PermanentRedirect"] = 308)] = "PermanentRedirect"; + HttpCodes2[(HttpCodes2["BadRequest"] = 400)] = "BadRequest"; + HttpCodes2[(HttpCodes2["Unauthorized"] = 401)] = "Unauthorized"; + HttpCodes2[(HttpCodes2["PaymentRequired"] = 402)] = "PaymentRequired"; + HttpCodes2[(HttpCodes2["Forbidden"] = 403)] = "Forbidden"; + HttpCodes2[(HttpCodes2["NotFound"] = 404)] = "NotFound"; + HttpCodes2[(HttpCodes2["MethodNotAllowed"] = 405)] = "MethodNotAllowed"; + HttpCodes2[(HttpCodes2["NotAcceptable"] = 406)] = "NotAcceptable"; + HttpCodes2[(HttpCodes2["ProxyAuthenticationRequired"] = 407)] = + "ProxyAuthenticationRequired"; + HttpCodes2[(HttpCodes2["RequestTimeout"] = 408)] = "RequestTimeout"; + HttpCodes2[(HttpCodes2["Conflict"] = 409)] = "Conflict"; + HttpCodes2[(HttpCodes2["Gone"] = 410)] = "Gone"; + HttpCodes2[(HttpCodes2["TooManyRequests"] = 429)] = "TooManyRequests"; + HttpCodes2[(HttpCodes2["InternalServerError"] = 500)] = + "InternalServerError"; + HttpCodes2[(HttpCodes2["NotImplemented"] = 501)] = "NotImplemented"; + HttpCodes2[(HttpCodes2["BadGateway"] = 502)] = "BadGateway"; + HttpCodes2[(HttpCodes2["ServiceUnavailable"] = 503)] = + "ServiceUnavailable"; + HttpCodes2[(HttpCodes2["GatewayTimeout"] = 504)] = "GatewayTimeout"; + })((HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}))); var Headers; - (function(Headers2) { + (function (Headers2) { Headers2["Accept"] = "accept"; Headers2["ContentType"] = "content-type"; - })(Headers = exports.Headers || (exports.Headers = {})); + })((Headers = exports.Headers || (exports.Headers = {}))); var MediaTypes; - (function(MediaTypes2) { + (function (MediaTypes2) { MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); + })((MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}))); function getProxyUrl(serverUrl) { const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); return proxyUrl ? proxyUrl.href : ""; @@ -966,12 +1118,12 @@ var require_lib = __commonJS({ HttpCodes.ResourceMoved, HttpCodes.SeeOther, HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect + HttpCodes.PermanentRedirect, ]; var HttpResponseRetryCodes = [ HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout + HttpCodes.GatewayTimeout, ]; var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; var ExponentialBackoffCeiling = 10; @@ -991,15 +1143,17 @@ var require_lib = __commonJS({ } readBody() { return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(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", () => { - resolve(output.toString()); - }); - })); + return new Promise((resolve) => + __awaiter(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", () => { + resolve(output.toString()); + }); + }) + ); }); } }; @@ -1031,7 +1185,8 @@ var require_lib = __commonJS({ this._allowRedirects = requestOptions.allowRedirects; } if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + this._allowRedirectDowngrade = + requestOptions.allowRedirectDowngrade; } if (requestOptions.maxRedirects != null) { this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); @@ -1049,7 +1204,12 @@ var require_lib = __commonJS({ } options(requestUrl, additionalHeaders) { return __awaiter(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + return this.request( + "OPTIONS", + requestUrl, + null, + additionalHeaders || {} + ); }); } get(requestUrl, additionalHeaders) { @@ -1059,17 +1219,32 @@ var require_lib = __commonJS({ } del(requestUrl, additionalHeaders) { return __awaiter(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + return this.request( + "DELETE", + requestUrl, + null, + additionalHeaders || {} + ); }); } post(requestUrl, data, additionalHeaders) { return __awaiter(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); + return this.request( + "POST", + requestUrl, + data, + additionalHeaders || {} + ); }); } patch(requestUrl, data, additionalHeaders) { return __awaiter(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + return this.request( + "PATCH", + requestUrl, + data, + additionalHeaders || {} + ); }); } put(requestUrl, data, additionalHeaders) { @@ -1079,7 +1254,12 @@ var require_lib = __commonJS({ } head(requestUrl, additionalHeaders) { return __awaiter(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + return this.request( + "HEAD", + requestUrl, + null, + additionalHeaders || {} + ); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { @@ -1093,7 +1273,11 @@ var require_lib = __commonJS({ */ getJson(requestUrl, additionalHeaders = {}) { return __awaiter(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader( + additionalHeaders, + Headers.Accept, + MediaTypes.ApplicationJson + ); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); @@ -1101,8 +1285,17 @@ var require_lib = __commonJS({ postJson(requestUrl, obj, additionalHeaders = {}) { return __awaiter(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader( + additionalHeaders, + Headers.Accept, + MediaTypes.ApplicationJson + ); + additionalHeaders[Headers.ContentType] = + this._getExistingOrDefaultHeader( + additionalHeaders, + Headers.ContentType, + MediaTypes.ApplicationJson + ); const res = yield this.post(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); @@ -1110,8 +1303,17 @@ var require_lib = __commonJS({ putJson(requestUrl, obj, additionalHeaders = {}) { return __awaiter(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader( + additionalHeaders, + Headers.Accept, + MediaTypes.ApplicationJson + ); + additionalHeaders[Headers.ContentType] = + this._getExistingOrDefaultHeader( + additionalHeaders, + Headers.ContentType, + MediaTypes.ApplicationJson + ); const res = yield this.put(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); @@ -1119,8 +1321,17 @@ var require_lib = __commonJS({ patchJson(requestUrl, obj, additionalHeaders = {}) { return __awaiter(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader( + additionalHeaders, + Headers.Accept, + MediaTypes.ApplicationJson + ); + additionalHeaders[Headers.ContentType] = + this._getExistingOrDefaultHeader( + additionalHeaders, + Headers.ContentType, + MediaTypes.ApplicationJson + ); const res = yield this.patch(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); @@ -1137,12 +1348,19 @@ var require_lib = __commonJS({ } const parsedUrl = new URL(requestUrl); let info3 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + const maxTries = + this._allowRetries && RetryableHttpVerbs.includes(verb) + ? this._maxRetries + 1 + : 1; let numTries = 0; let response; do { response = yield this.requestRaw(info3, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + if ( + response && + response.message && + response.message.statusCode === HttpCodes.Unauthorized + ) { let authenticationHandler; for (const handler of this.handlers) { if (handler.canHandleAuthentication(response)) { @@ -1151,20 +1369,35 @@ var require_lib = __commonJS({ } } if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info3, data); + return authenticationHandler.handleAuthentication( + this, + info3, + data + ); } else { return response; } } let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + while ( + response.message.statusCode && + HttpRedirectCodes.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."); + 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) { @@ -1178,7 +1411,10 @@ var require_lib = __commonJS({ response = yield this.requestRaw(info3, data); redirectsRemaining--; } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + if ( + !response.message.statusCode || + !HttpResponseRetryCodes.includes(response.message.statusCode) + ) { return response; } numTries += 1; @@ -1231,7 +1467,10 @@ var require_lib = __commonJS({ if (!info3.options.headers) { info3.options.headers = {}; } - info3.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + info3.options.headers["Content-Length"] = Buffer.byteLength( + data, + "utf8" + ); } let callbackCalled = false; function handleResult(err, res) { @@ -1254,14 +1493,14 @@ var require_lib = __commonJS({ } handleResult(new Error(`Request timeout: ${info3.options.path}`)); }); - req.on("error", function(err) { + 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() { + data.on("close", function () { req.end(); }); data.pipe(req); @@ -1286,8 +1525,11 @@ var require_lib = __commonJS({ const defaultPort = usingSsl ? 443 : 80; info3.options = {}; info3.options.host = info3.parsedUrl.hostname; - info3.options.port = info3.parsedUrl.port ? parseInt(info3.parsedUrl.port) : defaultPort; - info3.options.path = (info3.parsedUrl.pathname || "") + (info3.parsedUrl.search || ""); + info3.options.port = info3.parsedUrl.port + ? parseInt(info3.parsedUrl.port) + : defaultPort; + info3.options.path = + (info3.parsedUrl.pathname || "") + (info3.parsedUrl.search || ""); info3.options.method = method; info3.options.headers = this._mergeHeaders(headers); if (this.userAgent != null) { @@ -1303,7 +1545,11 @@ var require_lib = __commonJS({ } _mergeHeaders(headers) { if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + return Object.assign( + {}, + lowercaseKeys(this.requestOptions.headers), + lowercaseKeys(headers || {}) + ); } return lowercaseKeys(headers || {}); } @@ -1330,22 +1576,33 @@ var require_lib = __commonJS({ const usingSsl = parsedUrl.protocol === "https:"; let maxSockets = 100; if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + maxSockets = + this.requestOptions.maxSockets || http.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 }) + 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 ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + tunnelAgent = overHttps + ? tunnel.httpsOverHttps + : tunnel.httpsOverHttp; } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + tunnelAgent = overHttps + ? tunnel.httpOverHttps + : tunnel.httpOverHttp; } agent = tunnelAgent(agentOptions); this._proxyAgent = agent; @@ -1360,7 +1617,7 @@ var require_lib = __commonJS({ } if (usingSsl && this._ignoreSslError) { agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false + rejectUnauthorized: false, }); } return agent; @@ -1374,97 +1631,108 @@ var require_lib = __commonJS({ } _processResponse(res, options) { return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; + return new Promise((resolve, reject) => + __awaiter(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {}, + }; + if (statusCode === HttpCodes.NotFound) { + resolve(response); + } + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } } + return value; } - 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); + 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 { - obj = JSON.parse(contents); + msg = `Failed request: (${statusCode})`; } - 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; + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); } else { - msg = `Failed request: (${statusCode})`; + resolve(response); } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve(response); - } - })); + }) + ); }); } }; exports.HttpClient = HttpClient; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } + var lowercaseKeys = (obj) => + Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); + }, }); // node_modules/@actions/http-client/lib/auth.js var require_auth = __commonJS({ "node_modules/@actions/http-client/lib/auth.js"(exports) { "use strict"; - var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } + var __awaiter = + (exports && exports.__awaiter) || + function (thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P + ? value + : new P(function (resolve) { + resolve(value); + }); } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done + ? resolve(result.value) + : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports, "__esModule", { value: true }); - exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; + exports.PersonalAccessTokenCredentialHandler = + exports.BearerCredentialHandler = + exports.BasicCredentialHandler = + void 0; var BasicCredentialHandler = class { constructor(username, password) { this.username = username; @@ -1474,7 +1742,9 @@ var require_auth = __commonJS({ if (!options.headers) { throw Error("The request has no headers"); } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + options.headers["Authorization"] = `Basic ${Buffer.from( + `${this.username}:${this.password}` + ).toString("base64")}`; } // This handler cannot handle 401 canHandleAuthentication() { @@ -1520,7 +1790,9 @@ var require_auth = __commonJS({ if (!options.headers) { throw Error("The request has no headers"); } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + options.headers["Authorization"] = `Basic ${Buffer.from( + `PAT:${this.token}` + ).toString("base64")}`; } // This handler cannot handle 401 canHandleAuthentication() { @@ -1532,41 +1804,48 @@ var require_auth = __commonJS({ }); } }; - exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } + exports.PersonalAccessTokenCredentialHandler = + PersonalAccessTokenCredentialHandler; + }, }); // node_modules/@actions/core/lib/oidc-utils.js var require_oidc_utils = __commonJS({ "node_modules/@actions/core/lib/oidc-utils.js"(exports) { "use strict"; - var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } + var __awaiter = + (exports && exports.__awaiter) || + function (thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P + ? value + : new P(function (resolve) { + resolve(value); + }); } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done + ? resolve(result.value) + : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports, "__esModule", { value: true }); exports.OidcClient = void 0; var http_client_1 = require_lib(); @@ -1576,21 +1855,29 @@ var require_oidc_utils = __commonJS({ static createHttpClient(allowRetry = true, maxRetry = 10) { const requestOptions = { allowRetries: allowRetry, - maxRetries: maxRetry + maxRetries: maxRetry, }; - return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); + 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"); + 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"); + throw new Error( + "Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable" + ); } return runtimeUrl; } @@ -1605,7 +1892,8 @@ var require_oidc_utils = __commonJS({ Error Message: ${error.result.message}`); }); - const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + 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"); } @@ -1631,47 +1919,58 @@ var require_oidc_utils = __commonJS({ } }; exports.OidcClient = OidcClient; - } + }, }); // node_modules/@actions/core/lib/summary.js var require_summary = __commonJS({ "node_modules/@actions/core/lib/summary.js"(exports) { "use strict"; - var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } + var __awaiter = + (exports && exports.__awaiter) || + function (thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P + ? value + : new P(function (resolve) { + resolve(value); + }); } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done + ? resolve(result.value) + : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports, "__esModule", { value: true }); - exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; + exports.summary = + exports.markdownSummary = + exports.SUMMARY_DOCS_URL = + exports.SUMMARY_ENV_VAR = + void 0; var os_1 = require("os"); var fs_1 = require("fs"); var { access, appendFile, writeFile } = fs_1.promises; exports.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; - exports.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + exports.SUMMARY_DOCS_URL = + "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; var Summary = class { constructor() { this._buffer = ""; @@ -1689,12 +1988,19 @@ var require_summary = __commonJS({ } const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; if (!pathFromEnv) { - throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + throw new Error( + `Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.` + ); } try { - yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + yield access( + 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.`); + throw new Error( + `Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.` + ); } this._filePath = pathFromEnv; return this._filePath; @@ -1710,7 +2016,9 @@ var require_summary = __commonJS({ * @returns {string} content wrapped in HTML element */ wrap(tag, content, attrs = {}) { - const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + const htmlAttrs = Object.entries(attrs) + .map(([key, value]) => ` ${key}="${value}"`) + .join(""); if (!content) { return `<${tag}${htmlAttrs}>`; } @@ -1725,7 +2033,9 @@ var require_summary = __commonJS({ */ write(options) { return __awaiter(this, void 0, void 0, function* () { - const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const overwrite = !!(options === null || options === void 0 + ? void 0 + : options.overwrite); const filePath = yield this.filePath(); const writeFunc = overwrite ? writeFile : appendFile; yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); @@ -1822,18 +2132,25 @@ var require_summary = __commonJS({ * @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 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(); } @@ -1846,7 +2163,10 @@ var require_summary = __commonJS({ * @returns {Summary} summary instance */ addDetails(label, content) { - const element = this.wrap("details", this.wrap("summary", label) + content); + const element = this.wrap( + "details", + this.wrap("summary", label) + content + ); return this.addRaw(element).addEOL(); } /** @@ -1860,8 +2180,15 @@ var require_summary = __commonJS({ */ 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)); + 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(); } /** @@ -1874,7 +2201,9 @@ var require_summary = __commonJS({ */ addHeading(text, level) { const tag = `h${level}`; - const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) + ? tag + : "h1"; const element = this.wrap(allowedTag, text); return this.addRaw(element).addEOL(); } @@ -1925,41 +2254,51 @@ var require_summary = __commonJS({ var _summary = new Summary(); exports.markdownSummary = _summary; exports.summary = _summary; - } + }, }); // node_modules/@actions/core/lib/path-utils.js var require_path_utils = __commonJS({ "node_modules/@actions/core/lib/path-utils.js"(exports) { "use strict"; - var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar = exports && exports.__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 __createBinding = + (exports && exports.__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 = + (exports && exports.__setModuleDefault) || + (Object.create + ? function (o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } + : function (o, v) { + o["default"] = v; + }); + var __importStar = + (exports && exports.__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; + }; Object.defineProperty(exports, "__esModule", { value: true }); exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; var path2 = __importStar(require("path")); @@ -1975,70 +2314,108 @@ var require_path_utils = __commonJS({ return pth.replace(/[/\\]/g, path2.sep); } exports.toPlatformPath = toPlatformPath; - } + }, }); // node_modules/@actions/core/lib/core.js var require_core = __commonJS({ "node_modules/@actions/core/lib/core.js"(exports) { "use strict"; - var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar = exports && exports.__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 __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + var __createBinding = + (exports && exports.__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 rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + : function (o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = + (exports && exports.__setModuleDefault) || + (Object.create + ? function (o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); } + : function (o, v) { + o["default"] = v; + }); + var __importStar = + (exports && exports.__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 __awaiter = + (exports && exports.__awaiter) || + function (thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P + ? value + : new P(function (resolve) { + resolve(value); + }); } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; + return new (P || (P = Promise))(function (resolve, 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 + ? resolve(result.value) + : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports, "__esModule", { value: true }); - exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; + exports.getIDToken = + exports.getState = + exports.saveState = + exports.group = + exports.endGroup = + exports.startGroup = + exports.info = + exports.notice = + exports.warning = + exports.error = + exports.debug = + exports.isDebug = + exports.setFailed = + exports.setCommandEcho = + exports.setOutput = + exports.getBooleanInput = + exports.getMultilineInput = + exports.getInput = + exports.addPath = + exports.setSecret = + exports.exportVariable = + exports.ExitCode = + void 0; var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); @@ -2046,16 +2423,19 @@ var require_core = __commonJS({ var path2 = __importStar(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; - (function(ExitCode2) { - ExitCode2[ExitCode2["Success"] = 0] = "Success"; - ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; - })(ExitCode = exports.ExitCode || (exports.ExitCode = {})); + (function (ExitCode2) { + ExitCode2[(ExitCode2["Success"] = 0)] = "Success"; + ExitCode2[(ExitCode2["Failure"] = 1)] = "Failure"; + })((ExitCode = exports.ExitCode || (exports.ExitCode = {}))); function exportVariable2(name, val) { const convertedVal = utils_1.toCommandValue(val); process.env[name] = convertedVal; const filePath = process.env["GITHUB_ENV"] || ""; if (filePath) { - return file_command_1.issueFileCommand("ENV", file_command_1.prepareKeyValueMessage(name, val)); + return file_command_1.issueFileCommand( + "ENV", + file_command_1.prepareKeyValueMessage(name, val) + ); } command_1.issueCommand("set-env", { name }, convertedVal); } @@ -2071,11 +2451,14 @@ var require_core = __commonJS({ } else { command_1.issueCommand("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; + process.env[ + "PATH" + ] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; } exports.addPath = addPath2; function getInput4(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + const val = + process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); } @@ -2086,7 +2469,9 @@ var require_core = __commonJS({ } exports.getInput = getInput4; function getMultilineInput(name, options) { - const inputs = getInput4(name, options).split("\n").filter((x) => x !== ""); + const inputs = getInput4(name, options) + .split("\n") + .filter((x) => x !== ""); if (options && options.trimWhitespace === false) { return inputs; } @@ -2097,10 +2482,8 @@ var require_core = __commonJS({ const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; const val = getInput4(name, options); - if (trueValue.includes(val)) - return true; - if (falseValue.includes(val)) - return false; + 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\``); } @@ -2108,10 +2491,17 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); function setOutput2(name, value) { const filePath = process.env["GITHUB_OUTPUT"] || ""; if (filePath) { - return file_command_1.issueFileCommand("OUTPUT", file_command_1.prepareKeyValueMessage(name, value)); + return file_command_1.issueFileCommand( + "OUTPUT", + file_command_1.prepareKeyValueMessage(name, value) + ); } process.stdout.write(os2.EOL); - command_1.issueCommand("set-output", { name }, utils_1.toCommandValue(value)); + command_1.issueCommand( + "set-output", + { name }, + utils_1.toCommandValue(value) + ); } exports.setOutput = setOutput2; function setCommandEcho(enabled) { @@ -2132,15 +2522,27 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports.debug = debug; function error(message, properties = {}) { - command_1.issueCommand("error", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); + command_1.issueCommand( + "error", + utils_1.toCommandProperties(properties), + message instanceof Error ? message.toString() : message + ); } exports.error = error; function warning(message, properties = {}) { - command_1.issueCommand("warning", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); + command_1.issueCommand( + "warning", + utils_1.toCommandProperties(properties), + message instanceof Error ? message.toString() : message + ); } exports.warning = warning; function notice(message, properties = {}) { - command_1.issueCommand("notice", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); + command_1.issueCommand( + "notice", + utils_1.toCommandProperties(properties), + message instanceof Error ? message.toString() : message + ); } exports.notice = notice; function info3(message) { @@ -2171,9 +2573,16 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); function saveState(name, value) { const filePath = process.env["GITHUB_STATE"] || ""; if (filePath) { - return file_command_1.issueFileCommand("STATE", file_command_1.prepareKeyValueMessage(name, value)); + return file_command_1.issueFileCommand( + "STATE", + file_command_1.prepareKeyValueMessage(name, value) + ); } - command_1.issueCommand("save-state", { name }, utils_1.toCommandValue(value)); + command_1.issueCommand( + "save-state", + { name }, + utils_1.toCommandValue(value) + ); } exports.saveState = saveState; function getState(name) { @@ -2187,63 +2596,97 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports.getIDToken = getIDToken; var summary_1 = require_summary(); - Object.defineProperty(exports, "summary", { enumerable: true, get: function() { - return summary_1.summary; - } }); + Object.defineProperty(exports, "summary", { + enumerable: true, + get: function () { + return summary_1.summary; + }, + }); var summary_2 = require_summary(); - Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function() { - return summary_2.markdownSummary; - } }); + Object.defineProperty(exports, "markdownSummary", { + enumerable: true, + get: function () { + return summary_2.markdownSummary; + }, + }); var path_utils_1 = require_path_utils(); - Object.defineProperty(exports, "toPosixPath", { enumerable: true, get: function() { - return path_utils_1.toPosixPath; - } }); - Object.defineProperty(exports, "toWin32Path", { enumerable: true, get: function() { - return path_utils_1.toWin32Path; - } }); - Object.defineProperty(exports, "toPlatformPath", { enumerable: true, get: function() { - return path_utils_1.toPlatformPath; - } }); - } + Object.defineProperty(exports, "toPosixPath", { + enumerable: true, + get: function () { + return path_utils_1.toPosixPath; + }, + }); + Object.defineProperty(exports, "toWin32Path", { + enumerable: true, + get: function () { + return path_utils_1.toWin32Path; + }, + }); + Object.defineProperty(exports, "toPlatformPath", { + enumerable: true, + get: function () { + return path_utils_1.toPlatformPath; + }, + }); + }, }); // node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"( + exports + ) { "use strict"; - var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } + var __awaiter = + (exports && exports.__awaiter) || + function (thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P + ? value + : new P(function (resolve) { + resolve(value); + }); } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done + ? resolve(result.value) + : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; var _a; Object.defineProperty(exports, "__esModule", { value: true }); var assert_1 = require("assert"); var fs3 = require("fs"); var path2 = require("path"); - _a = fs3.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; + (_a = fs3.promises), + (exports.chmod = _a.chmod), + (exports.copyFile = _a.copyFile), + (exports.lstat = _a.lstat), + (exports.mkdir = _a.mkdir), + (exports.readdir = _a.readdir), + (exports.readlink = _a.readlink), + (exports.rename = _a.rename), + (exports.rmdir = _a.rmdir), + (exports.stat = _a.stat), + (exports.symlink = _a.symlink), + (exports.unlink = _a.unlink); exports.IS_WINDOWS = process.platform === "win32"; function exists(fsPath) { return __awaiter(this, void 0, void 0, function* () { @@ -2261,7 +2704,9 @@ var require_io_util = __commonJS({ exports.exists = exists; function isDirectory(fsPath, useStat = false) { return __awaiter(this, void 0, void 0, function* () { - const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath); + const stats = useStat + ? yield exports.stat(fsPath) + : yield exports.lstat(fsPath); return stats.isDirectory(); }); } @@ -2281,8 +2726,7 @@ var require_io_util = __commonJS({ return __awaiter(this, void 0, void 0, function* () { assert_1.ok(fsPath, "a path argument must be provided"); fsPath = path2.resolve(fsPath); - if (depth >= maxDepth) - return exports.mkdir(fsPath); + if (depth >= maxDepth) return exports.mkdir(fsPath); try { yield exports.mkdir(fsPath); return; @@ -2300,8 +2744,7 @@ var require_io_util = __commonJS({ } catch (err2) { throw err; } - if (!stats.isDirectory()) - throw err; + if (!stats.isDirectory()) throw err; } } } @@ -2315,13 +2758,17 @@ var require_io_util = __commonJS({ stats = yield exports.stat(filePath); } catch (err) { if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + console.log( + `Unexpected error attempting to determine if executable file exists '${filePath}': ${err}` + ); } } if (stats && stats.isFile()) { if (exports.IS_WINDOWS) { const upperExt = path2.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + if ( + extensions.some((validExt) => validExt.toUpperCase() === upperExt) + ) { return filePath; } } else { @@ -2338,7 +2785,9 @@ var require_io_util = __commonJS({ stats = yield exports.stat(filePath); } catch (err) { if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + console.log( + `Unexpected error attempting to determine if executable file exists '${filePath}': ${err}` + ); } } if (stats && stats.isFile()) { @@ -2353,7 +2802,9 @@ var require_io_util = __commonJS({ } } } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + console.log( + `Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}` + ); } return filePath; } else { @@ -2376,42 +2827,52 @@ var require_io_util = __commonJS({ 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(); + return ( + (stats.mode & 1) > 0 || + ((stats.mode & 8) > 0 && stats.gid === process.getgid()) || + ((stats.mode & 64) > 0 && stats.uid === process.getuid()) + ); } - } + }, }); // node_modules/@actions/exec/node_modules/@actions/io/lib/io.js var require_io = __commonJS({ "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports) { "use strict"; - var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } + var __awaiter = + (exports && exports.__awaiter) || + function (thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P + ? value + : new P(function (resolve) { + resolve(value); + }); } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done + ? resolve(result.value) + : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports, "__esModule", { value: true }); var childProcess = require("child_process"); var path2 = require("path"); @@ -2421,18 +2882,25 @@ var require_io = __commonJS({ function cp(source, dest, options = {}) { return __awaiter(this, void 0, void 0, function* () { const { force, recursive } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + const destStat = (yield ioUtil.exists(dest)) + ? yield ioUtil.stat(dest) + : null; if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() ? path2.join(dest, path2.basename(source)) : dest; + const newDest = + destStat && destStat.isDirectory() + ? path2.join(dest, path2.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.`); + throw new Error( + `Failed to copy. ${source} is a directory, but tried to copy without recursive flag.` + ); } else { yield cpDirRecursive(source, newDest, 0, force); } @@ -2476,22 +2944,19 @@ var require_io = __commonJS({ yield exec7(`del /f /a "${inputPath}"`); } } catch (err) { - if (err.code !== "ENOENT") - throw err; + if (err.code !== "ENOENT") throw err; } try { yield ioUtil.unlink(inputPath); } catch (err) { - if (err.code !== "ENOENT") - throw err; + if (err.code !== "ENOENT") throw err; } } else { let isDir = false; try { isDir = yield ioUtil.isDirectory(inputPath); } catch (err) { - if (err.code !== "ENOENT") - throw err; + if (err.code !== "ENOENT") throw err; return; } if (isDir) { @@ -2518,29 +2983,41 @@ var require_io = __commonJS({ 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.`); + 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.`); + 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.` + ); } } } try { const extensions = []; if (ioUtil.IS_WINDOWS && process.env.PATHEXT) { - for (const extension of process.env.PATHEXT.split(path2.delimiter)) { + for (const extension of process.env.PATHEXT.split( + path2.delimiter + )) { if (extension) { extensions.push(extension); } } } if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + const filePath = yield ioUtil.tryGetExecutablePath( + tool, + extensions + ); if (filePath) { return filePath; } return ""; } - if (tool.includes("/") || ioUtil.IS_WINDOWS && tool.includes("\\")) { + if ( + tool.includes("/") || + (ioUtil.IS_WINDOWS && tool.includes("\\")) + ) { return ""; } const directories = []; @@ -2552,7 +3029,10 @@ var require_io = __commonJS({ } } for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(directory + path2.sep + tool, extensions); + const filePath = yield ioUtil.tryGetExecutablePath( + directory + path2.sep + tool, + extensions + ); if (filePath) { return filePath; } @@ -2571,8 +3051,7 @@ var require_io = __commonJS({ } function cpDirRecursive(sourceDir, destDir, currentDepth, force) { return __awaiter(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; + if (currentDepth >= 255) return; currentDepth++; yield mkdirP(destDir); const files = yield ioUtil.readdir(sourceDir); @@ -2602,74 +3081,94 @@ var require_io = __commonJS({ } } const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + 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"(exports) { "use strict"; - var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar = exports && exports.__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 __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + var __createBinding = + (exports && exports.__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 rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + : function (o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = + (exports && exports.__setModuleDefault) || + (Object.create + ? function (o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); } + : function (o, v) { + o["default"] = v; + }); + var __importStar = + (exports && exports.__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 __awaiter = + (exports && exports.__awaiter) || + function (thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P + ? value + : new P(function (resolve) { + resolve(value); + }); } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; + return new (P || (P = Promise))(function (resolve, 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 + ? resolve(result.value) + : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports, "__esModule", { value: true }); exports.argStringToArray = exports.ToolRunner = void 0; var os2 = __importStar(require("os")); @@ -2751,10 +3250,14 @@ var require_toolrunner = __commonJS({ _getSpawnArgs(options) { if (IS_WINDOWS) { if (this._isCmdFile()) { - let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + let argline = `/D /S /C "${this._windowsQuoteCmdArg( + this.toolPath + )}`; for (const a of this.args) { argline += " "; - argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + argline += options.windowsVerbatimArguments + ? a + : this._windowsQuoteCmdArg(a); } argline += '"'; return [argline]; @@ -2767,7 +3270,10 @@ var require_toolrunner = __commonJS({ } _isCmdFile() { const upperToolPath = this.toolPath.toUpperCase(); - return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + return ( + this._endsWith(upperToolPath, ".CMD") || + this._endsWith(upperToolPath, ".BAT") + ); } _windowsQuoteCmdArg(arg) { if (!this._isCmdFile()) { @@ -2798,7 +3304,7 @@ var require_toolrunner = __commonJS({ "|", "<", ">", - '"' + '"', ]; let needsQuotes = false; for (const char of arg) { @@ -2861,7 +3367,7 @@ var require_toolrunner = __commonJS({ windowsVerbatimArguments: options.windowsVerbatimArguments || false, failOnStdErr: options.failOnStdErr || false, ignoreReturnCode: options.ignoreReturnCode || false, - delay: options.delay || 1e4 + delay: options.delay || 1e4, }; result.outStream = options.outStream || process.stdout; result.errStream = options.errStream || process.stderr; @@ -2872,7 +3378,8 @@ var require_toolrunner = __commonJS({ const result = {}; result.cwd = options.cwd; result.env = options.env; - result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + result["windowsVerbatimArguments"] = + options.windowsVerbatimArguments || this._isCmdFile(); if (options.windowsVerbatimArguments) { result.argv0 = `"${toolPath}"`; } @@ -2889,103 +3396,148 @@ var require_toolrunner = __commonJS({ */ exec() { return __awaiter(this, void 0, void 0, function* () { - if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { - this.toolPath = path2.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + if ( + !ioUtil.isRooted(this.toolPath) && + (this.toolPath.includes("/") || + (IS_WINDOWS && this.toolPath.includes("\\"))) + ) { + this.toolPath = path2.resolve( + process.cwd(), + this.options.cwd || process.cwd(), + this.toolPath + ); } this.toolPath = yield io2.which(this.toolPath, true); - return new Promise((resolve, reject) => __awaiter(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) + os2.EOL); - } - const state = new ExecState(optionsNonNull, this.toolPath); - state.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); + return new Promise((resolve, reject) => + __awaiter(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) + os2.EOL + ); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.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) => { + state.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) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); }); - } - let errbuffer = ""; - if (cp.stderr) { - cp.stderr.on("data", (data) => { - state.processStderr = true; - if (this.options.listeners && this.options.listeners.stderr) { - this.options.listeners.stderr(data); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug( + `Exit code ${code} received from tool '${this.toolPath}'` + ); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug( + `STDIO streams have closed for tool '${this.toolPath}'` + ); + state.CheckComplete(); + }); + state.on("done", (error, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); } - if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { - const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; - s.write(data); + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error) { + reject(error); + } else { + resolve(exitCode); } - errbuffer = this._processLineBuffer(data, errbuffer, (line) => { - if (this.options.listeners && this.options.listeners.errline) { - this.options.listeners.errline(line); - } - }); }); - } - cp.on("error", (err) => { - state.processError = err.message; - state.processExited = true; - state.processClosed = true; - state.CheckComplete(); - }); - cp.on("exit", (code) => { - state.processExitCode = code; - state.processExited = true; - this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); - state.CheckComplete(); - }); - cp.on("close", (code) => { - state.processExitCode = code; - state.processExited = true; - state.processClosed = true; - this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); - state.CheckComplete(); - }); - state.on("done", (error, exitCode) => { - if (stdbuffer.length > 0) { - this.emit("stdline", stdbuffer); - } - if (errbuffer.length > 0) { - this.emit("errline", errbuffer); - } - cp.removeAllListeners(); - if (error) { - reject(error); - } else { - resolve(exitCode); - } - }); - if (this.options.input) { - if (!cp.stdin) { - throw new Error("child process missing stdin"); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); } - cp.stdin.end(this.options.input); - } - })); + }) + ); }); } }; @@ -3062,7 +3614,11 @@ var require_toolrunner = __commonJS({ if (this.processClosed) { this._setResult(); } else if (this.processExited) { - this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this); + this.timeout = timers_1.setTimeout( + ExecState.HandleTimeout, + this.delay, + this + ); } } _debug(message) { @@ -3072,11 +3628,20 @@ var require_toolrunner = __commonJS({ let error; if (this.processExited) { if (this.processError) { - error = 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) { - error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + error = 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 + ) { + error = new Error( + `The process '${this.toolPath}' failed with exit code ${this.processExitCode}` + ); } else if (this.processStderr && this.options.failOnStdErr) { - error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + error = new Error( + `The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream` + ); } } if (this.timeout) { @@ -3091,74 +3656,94 @@ var require_toolrunner = __commonJS({ return; } if (!state.processClosed && state.processExited) { - const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + const message = `The STDIO streams did not close within ${ + state.delay / 1e3 + } seconds of the exit event from process '${ + state.toolPath + }'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; state._debug(message); } state._setResult(); } }; - } + }, }); // node_modules/@actions/exec/lib/exec.js var require_exec = __commonJS({ "node_modules/@actions/exec/lib/exec.js"(exports) { "use strict"; - var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar = exports && exports.__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 __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + var __createBinding = + (exports && exports.__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 rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + : function (o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = + (exports && exports.__setModuleDefault) || + (Object.create + ? function (o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); } + : function (o, v) { + o["default"] = v; + }); + var __importStar = + (exports && exports.__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 __awaiter = + (exports && exports.__awaiter) || + function (thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P + ? value + : new P(function (resolve) { + resolve(value); + }); } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; + return new (P || (P = Promise))(function (resolve, 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 + ? resolve(result.value) + : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getExecOutput = exports.exec = void 0; var string_decoder_1 = require("string_decoder"); @@ -3183,8 +3768,20 @@ var require_exec = __commonJS({ 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 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) { @@ -3197,86 +3794,140 @@ var require_exec = __commonJS({ originalStdoutListener(data); } }; - const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); - const exitCode = yield exec7(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + const listeners = Object.assign( + Object.assign( + {}, + options === null || options === void 0 ? void 0 : options.listeners + ), + { stdout: stdOutListener, stderr: stdErrListener } + ); + const exitCode = yield exec7( + commandLine, + args, + Object.assign(Object.assign({}, options), { listeners }) + ); stdout += stdoutDecoder.end(); stderr += stderrDecoder.end(); return { exitCode, stdout, - stderr + stderr, }; }); } exports.getExecOutput = getExecOutput; - } + }, }); // node_modules/@actions/io/lib/io-util.js var require_io_util2 = __commonJS({ "node_modules/@actions/io/lib/io-util.js"(exports) { "use strict"; - var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar = exports && exports.__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 __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + var __createBinding = + (exports && exports.__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 rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + : function (o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = + (exports && exports.__setModuleDefault) || + (Object.create + ? function (o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); } + : function (o, v) { + o["default"] = v; + }); + var __importStar = + (exports && exports.__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 __awaiter = + (exports && exports.__awaiter) || + function (thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P + ? value + : new P(function (resolve) { + resolve(value); + }); } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; + return new (P || (P = Promise))(function (resolve, 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 + ? resolve(result.value) + : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; var _a; Object.defineProperty(exports, "__esModule", { value: true }); - exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rename = exports.readlink = exports.readdir = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; + exports.getCmdPath = + exports.tryGetExecutablePath = + exports.isRooted = + exports.isDirectory = + exports.exists = + exports.IS_WINDOWS = + exports.unlink = + exports.symlink = + exports.stat = + exports.rmdir = + exports.rename = + exports.readlink = + exports.readdir = + exports.mkdir = + exports.lstat = + exports.copyFile = + exports.chmod = + void 0; var fs3 = __importStar(require("fs")); var path2 = __importStar(require("path")); - _a = fs3.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; + (_a = fs3.promises), + (exports.chmod = _a.chmod), + (exports.copyFile = _a.copyFile), + (exports.lstat = _a.lstat), + (exports.mkdir = _a.mkdir), + (exports.readdir = _a.readdir), + (exports.readlink = _a.readlink), + (exports.rename = _a.rename), + (exports.rmdir = _a.rmdir), + (exports.stat = _a.stat), + (exports.symlink = _a.symlink), + (exports.unlink = _a.unlink); exports.IS_WINDOWS = process.platform === "win32"; function exists(fsPath) { return __awaiter(this, void 0, void 0, function* () { @@ -3294,7 +3945,9 @@ var require_io_util2 = __commonJS({ exports.exists = exists; function isDirectory(fsPath, useStat = false) { return __awaiter(this, void 0, void 0, function* () { - const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath); + const stats = useStat + ? yield exports.stat(fsPath) + : yield exports.lstat(fsPath); return stats.isDirectory(); }); } @@ -3317,13 +3970,17 @@ var require_io_util2 = __commonJS({ stats = yield exports.stat(filePath); } catch (err) { if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + console.log( + `Unexpected error attempting to determine if executable file exists '${filePath}': ${err}` + ); } } if (stats && stats.isFile()) { if (exports.IS_WINDOWS) { const upperExt = path2.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + if ( + extensions.some((validExt) => validExt.toUpperCase() === upperExt) + ) { return filePath; } } else { @@ -3340,7 +3997,9 @@ var require_io_util2 = __commonJS({ stats = yield exports.stat(filePath); } catch (err) { if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + console.log( + `Unexpected error attempting to determine if executable file exists '${filePath}': ${err}` + ); } } if (stats && stats.isFile()) { @@ -3355,7 +4014,9 @@ var require_io_util2 = __commonJS({ } } } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + console.log( + `Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}` + ); } return filePath; } else { @@ -3378,77 +4039,105 @@ var require_io_util2 = __commonJS({ 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(); + 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`; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 + ? _a2 + : `cmd.exe`; } exports.getCmdPath = getCmdPath; - } + }, }); // node_modules/@actions/io/lib/io.js var require_io2 = __commonJS({ "node_modules/@actions/io/lib/io.js"(exports) { "use strict"; - var __createBinding = exports && exports.__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 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar = exports && exports.__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 __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + var __createBinding = + (exports && exports.__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 rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + : function (o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = + (exports && exports.__setModuleDefault) || + (Object.create + ? function (o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); } + : function (o, v) { + o["default"] = v; + }); + var __importStar = + (exports && exports.__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 __awaiter = + (exports && exports.__awaiter) || + function (thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P + ? value + : new P(function (resolve) { + resolve(value); + }); } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; + return new (P || (P = Promise))(function (resolve, 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 + ? resolve(result.value) + : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports, "__esModule", { value: true }); - exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; + exports.findInPath = + exports.which = + exports.mkdirP = + exports.rmRF = + exports.mv = + exports.cp = + void 0; var assert_1 = require("assert"); var childProcess = __importStar(require("child_process")); var path2 = __importStar(require("path")); @@ -3458,19 +4147,27 @@ var require_io2 = __commonJS({ var execFile = util_1.promisify(childProcess.execFile); function cp(source, dest, options = {}) { return __awaiter(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + 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 ? path2.join(dest, path2.basename(source)) : dest; + const newDest = + destStat && destStat.isDirectory() && copySourceDirectory + ? path2.join(dest, path2.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.`); + throw new Error( + `Failed to copy. ${source} is a directory, but tried to copy without recursive flag.` + ); } else { yield cpDirRecursive(source, newDest, 0, force); } @@ -3508,36 +4205,35 @@ var require_io2 = __commonJS({ return __awaiter(this, void 0, void 0, function* () { if (ioUtil.IS_WINDOWS) { if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + throw new Error( + 'File path must not contain `*`, `"`, `<`, `>` or `|` on Windows' + ); } try { const cmdPath = ioUtil.getCmdPath(); if (yield ioUtil.isDirectory(inputPath, true)) { yield exec7(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, { - env: { inputPath } + env: { inputPath }, }); } else { yield exec7(`${cmdPath} /s /c "del /f /a "%inputPath%""`, { - env: { inputPath } + env: { inputPath }, }); } } catch (err) { - if (err.code !== "ENOENT") - throw err; + if (err.code !== "ENOENT") throw err; } try { yield ioUtil.unlink(inputPath); } catch (err) { - if (err.code !== "ENOENT") - throw err; + if (err.code !== "ENOENT") throw err; } } else { let isDir = false; try { isDir = yield ioUtil.isDirectory(inputPath); } catch (err) { - if (err.code !== "ENOENT") - throw err; + if (err.code !== "ENOENT") throw err; return; } if (isDir) { @@ -3565,9 +4261,13 @@ var require_io2 = __commonJS({ 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.`); + 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.`); + 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; @@ -3587,7 +4287,9 @@ var require_io2 = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + for (const extension of process.env["PATHEXT"].split( + path2.delimiter + )) { if (extension) { extensions.push(extension); } @@ -3613,7 +4315,10 @@ var require_io2 = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath( + path2.join(directory, tool), + extensions + ); if (filePath) { matches.push(filePath); } @@ -3625,13 +4330,15 @@ var require_io2 = __commonJS({ 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); + const copySourceDirectory = + options.copySourceDirectory == null + ? true + : Boolean(options.copySourceDirectory); return { force, recursive, copySourceDirectory }; } function cpDirRecursive(sourceDir, destDir, currentDepth, force) { return __awaiter(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; + if (currentDepth >= 255) return; currentDepth++; yield mkdirP(destDir); const files = yield ioUtil.readdir(sourceDir); @@ -3661,13 +4368,17 @@ var require_io2 = __commonJS({ } } const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + yield ioUtil.symlink( + symlinkFull, + destFile, + ioUtil.IS_WINDOWS ? "junction" : null + ); } else if (!(yield ioUtil.exists(destFile)) || force) { yield ioUtil.copyFile(srcFile, destFile); } }); } - } + }, }); // lib/current/main.ts @@ -3708,7 +4419,7 @@ async function setupAsdf() { "--branch", branch, "https://github.com/asdf-vm/asdf.git", - asdfDir + asdfDir, ]); } @@ -3723,8 +4434,8 @@ async function pluginList() { }, stderr: (data) => { stderr += data.toString(); - } - } + }, + }, }; try { await exec3.exec("asdf", ["plugin-list"], options); @@ -3742,14 +4453,18 @@ async function pluginsAdd() { directory = !directory.endsWith("/") ? `${directory}/` : directory; if (toolVersions) { await fs.promises.writeFile(`${directory}.tool-versions`, toolVersions, { - encoding: "utf8" + encoding: "utf8", }); } else { toolVersions = await fs.promises.readFile(`${directory}.tool-versions`, { - encoding: "utf8" + encoding: "utf8", }); } - const pluginNames = toolVersions.split("\n").map((x) => x.replace(/#.*/, "").trim()).filter((x) => x.length > 0).map((x) => x.split(" ")[0]); + const pluginNames = toolVersions + .split("\n") + .map((x) => x.replace(/#.*/, "").trim()) + .filter((x) => x.length > 0) + .map((x) => x.split(" ")[0]); const installedPluginNames = await pluginList(); for (const pluginName of pluginNames) { if (installedPluginNames.includes(pluginName)) { @@ -3777,7 +4492,7 @@ async function toolsCurrent() { }, stderr: (data) => { stdOut += data.toString(); - } + }, }; options.cwd = directory; await exec5.exec("asdf", ["current"], options); @@ -3802,7 +4517,7 @@ async function toolsCurrent() { } saveTo = !saveTo.endsWith("/") ? `${saveTo}/` : saveTo; await fs2.promises.writeFile(`${saveTo}.tool-versions`, rawOut, { - encoding: "utf8" + encoding: "utf8", }); } diff --git a/install/action.yml b/install/action.yml index 48d9a12..0547fb9 100644 --- a/install/action.yml +++ b/install/action.yml @@ -2,7 +2,7 @@ name: asdf install description: Install your versioned tools with asdf author: Victor Borja runs: - using: node16 + using: node20 main: main.js inputs: tool_versions: diff --git a/lib/plugins-add/index.ts b/lib/plugins-add/index.ts index fc12e45..799c6fb 100644 --- a/lib/plugins-add/index.ts +++ b/lib/plugins-add/index.ts @@ -32,7 +32,7 @@ export async function pluginsAdd(): Promise { await setupAsdf(); let toolVersions = core.getInput("tool_versions", { required: false }); let directory = core.getInput("directory", { required: false }); - directory = !directory.endsWith("/") ? `${directory}/` : directory + directory = !directory.endsWith("/") ? `${directory}/` : directory; if (toolVersions) { await fs.promises.writeFile(`${directory}.tool-versions`, toolVersions, { diff --git a/package.json b/package.json index dcb5622..bcb700a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asdf-vm/actions", - "version": "1.0.1", + "version": "2.1.0", "description": "asdf github actions", "repository": "https://github.com/asdf-vm/actions", "author": "Victor Borja ", diff --git a/plugin-test/action.yml b/plugin-test/action.yml index cf80143..9cb3c7e 100644 --- a/plugin-test/action.yml +++ b/plugin-test/action.yml @@ -2,7 +2,7 @@ name: Test plugin description: Test your asdf plugin author: Victor Borja runs: - using: node16 + using: node20 main: main.js inputs: command: diff --git a/plugins-add/action.yml b/plugins-add/action.yml index 40fa935..a142fc3 100644 --- a/plugins-add/action.yml +++ b/plugins-add/action.yml @@ -2,7 +2,7 @@ name: Plugins install description: Install the plugins listed on your .tool-versions file. author: Victor Borja runs: - using: node16 + using: node20 main: main.js inputs: asdf_branch: diff --git a/setup/action.yml b/setup/action.yml index 5588054..03a6519 100644 --- a/setup/action.yml +++ b/setup/action.yml @@ -2,7 +2,7 @@ name: Setup asdf description: Install tools versioned with asdf author: Victor Borja runs: - using: node16 + using: node20 main: main.js inputs: asdf_branch: