From 85b3e26b5e3c56182763901ab74a34516c169a9b Mon Sep 17 00:00:00 2001 From: "token-generator-app[bot]" Date: Mon, 12 Sep 2022 01:46:03 +0000 Subject: [PATCH] chore: prepare dist --- dist/main.js | 1633 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 1286 insertions(+), 347 deletions(-) diff --git a/dist/main.js b/dist/main.js index 902a1070..5040ef46 100644 --- a/dist/main.js +++ b/dist/main.js @@ -1,24 +1,25 @@ +"use strict"; var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; -var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; -var __reExport = (target, module2, copyDefault, desc) => { - if (module2 && typeof module2 === "object" || typeof module2 === "function") { - for (let key of __getOwnPropNames(module2)) - if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default")) - __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); +var __copyProps = (to, from, except, desc) => { + 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 }); } - return target; -}; -var __toESM = (module2, isNodeMode) => { - return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); + return to; }; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); // node_modules/@actions/github/lib/context.js var require_context = __commonJS({ @@ -75,34 +76,36 @@ var require_context = __commonJS({ } }); -// node_modules/@actions/http-client/proxy.js +// node_modules/@actions/http-client/lib/proxy.js var require_proxy = __commonJS({ - "node_modules/@actions/http-client/proxy.js"(exports) { + "node_modules/@actions/http-client/lib/proxy.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); + exports.checkBypass = exports.getProxyUrl = void 0; function getProxyUrl(reqUrl) { - let usingSsl = reqUrl.protocol === "https:"; - let proxyUrl; + const usingSsl = reqUrl.protocol === "https:"; if (checkBypass(reqUrl)) { - return proxyUrl; - } - let proxyVar; - if (usingSsl) { - proxyVar = process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - proxyVar = process.env["http_proxy"] || process.env["HTTP_PROXY"]; + return void 0; } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); if (proxyVar) { - proxyUrl = new URL(proxyVar); + return new URL(proxyVar); + } else { + return void 0; } - return proxyUrl; } exports.getProxyUrl = getProxyUrl; function checkBypass(reqUrl) { if (!reqUrl.hostname) { return false; } - let noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; if (!noProxy) { return false; } @@ -114,11 +117,11 @@ var require_proxy = __commonJS({ } else if (reqUrl.protocol === "https:") { reqPort = 443; } - let upperReqHosts = [reqUrl.hostname.toUpperCase()]; + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; if (typeof reqPort === "number") { upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); } - for (let upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { if (upperReqHosts.some((x) => x === upperNoProxyItem)) { return true; } @@ -252,7 +255,10 @@ var require_tunnel = __commonJS({ connectReq.removeAllListeners(); socket.removeAllListeners(); if (res.statusCode !== 200) { - debug("tunneling socket could not be established, statusCode=%d", res.statusCode); + debug( + "tunneling socket could not be established, statusCode=%d", + res.statusCode + ); socket.destroy(); var error = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); error.code = "ECONNRESET"; @@ -275,7 +281,11 @@ var require_tunnel = __commonJS({ } function onError(cause) { connectReq.removeAllListeners(); - debug("tunneling socket could not be established, cause=%s\n", cause.message, cause.stack); + debug( + "tunneling socket could not be established, cause=%s\n", + cause.message, + cause.stack + ); var error = new Error("tunneling socket could not be established, cause=" + cause.message); error.code = "ECONNRESET"; options.request.emit("error", error); @@ -359,15 +369,71 @@ var require_tunnel2 = __commonJS({ } }); -// node_modules/@actions/http-client/index.js -var require_http_client = __commonJS({ - "node_modules/@actions/http-client/index.js"(exports) { +// 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); + } + } + 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 http = require("http"); - var https = require("https"); - var pm = require_proxy(); - var tunnel; + 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"; @@ -408,7 +474,7 @@ var require_http_client = __commonJS({ MediaTypes2["ApplicationJson"] = "application/json"; })(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); function getProxyUrl(serverUrl) { - let proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); return proxyUrl ? proxyUrl.href : ""; } exports.getProxyUrl = getProxyUrl; @@ -441,20 +507,22 @@ var require_http_client = __commonJS({ this.message = message; } readBody() { - return new Promise(async (resolve, reject) => { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve(output.toString()); - }); + 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()); + }); + })); }); } }; exports.HttpClientResponse = HttpClientResponse; function isHttps(requestUrl) { - let parsedUrl = new URL(requestUrl); + const parsedUrl = new URL(requestUrl); return parsedUrl.protocol === "https:"; } exports.isHttps = isHttps; @@ -497,112 +565,138 @@ var require_http_client = __commonJS({ } } options(requestUrl, additionalHeaders) { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + return __awaiter(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); } get(requestUrl, additionalHeaders) { - return this.request("GET", requestUrl, null, additionalHeaders || {}); + return __awaiter(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); } del(requestUrl, additionalHeaders) { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + return __awaiter(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); } post(requestUrl, data, additionalHeaders) { - return this.request("POST", requestUrl, data, additionalHeaders || {}); + return __awaiter(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); } patch(requestUrl, data, additionalHeaders) { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + return __awaiter(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); } put(requestUrl, data, additionalHeaders) { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); + return __awaiter(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); } head(requestUrl, additionalHeaders) { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + return __awaiter(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); } sendStream(verb, requestUrl, stream, additionalHeaders) { - return this.request(verb, requestUrl, stream, additionalHeaders); - } - async getJson(requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - let res = await this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - } - async postJson(requestUrl, obj, additionalHeaders = {}) { - let 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); - let res = await this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - } - async putJson(requestUrl, obj, additionalHeaders = {}) { - let 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); - let res = await this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - } - async patchJson(requestUrl, obj, additionalHeaders = {}) { - let 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); - let res = await this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - } - async request(verb, requestUrl, data, headers) { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - let parsedUrl = new URL(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1 ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - while (numTries < maxTries) { - response = await this.requestRaw(info, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (let i = 0; i < this.handlers.length; i++) { - if (this.handlers[i].canHandleAuthentication(response)) { - authenticationHandler = this.handlers[i]; + return __awaiter(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + 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); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + 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); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + 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); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + request(verb, requestUrl, data, headers) { + return __awaiter(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + const parsedUrl = new URL(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + 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."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info, data); + redirectsRemaining--; } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info, data); - } else { + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { return response; } - } - let redirectsRemaining = this._maxRedirects; - while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - let 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."); - } - await response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (let header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); } - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = await this.requestRaw(info, data); - redirectsRemaining--; - } - if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - await response.readBody(); - await this._performExponentialBackoff(numTries); - } - } - return response; + } while (numTries < maxTries); + return response; + }); } dispose() { if (this._agent) { @@ -611,32 +705,40 @@ var require_http_client = __commonJS({ this._disposed = true; } requestRaw(info, data) { - return new Promise((resolve, reject) => { - let callbackForResult = function(err, res) { - if (err) { - reject(err); + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve(res); + } } - resolve(res); - }; - this.requestRawWithCallback(info, data, callbackForResult); + this.requestRawWithCallback(info, data, callbackForResult); + }); }); } requestRawWithCallback(info, data, onResult) { - let socket; if (typeof data === "string") { + if (!info.options.headers) { + info.options.headers = {}; + } info.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); } let callbackCalled = false; - let handleResult = (err, res) => { + function handleResult(err, res) { if (!callbackCalled) { callbackCalled = true; onResult(err, res); } - }; - let req = info.httpModule.request(info.options, (msg) => { - let res = new HttpClientResponse(msg); - handleResult(null, res); + } + const req = info.httpModule.request(info.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); }); + let socket; req.on("socket", (sock) => { socket = sock; }); @@ -644,10 +746,10 @@ var require_http_client = __commonJS({ if (socket) { socket.end(); } - handleResult(new Error("Request timeout: " + info.options.path), null); + handleResult(new Error(`Request timeout: ${info.options.path}`)); }); req.on("error", function(err) { - handleResult(err, null); + handleResult(err); }); if (data && typeof data === "string") { req.write(data, "utf8"); @@ -662,7 +764,7 @@ var require_http_client = __commonJS({ } } getAgent(serverUrl) { - let parsedUrl = new URL(serverUrl); + const parsedUrl = new URL(serverUrl); return this._getAgent(parsedUrl); } _prepareRequest(method, requestUrl, headers) { @@ -682,21 +784,19 @@ var require_http_client = __commonJS({ } info.options.agent = this._getAgent(info.parsedUrl); if (this.handlers) { - this.handlers.forEach((handler) => { + for (const handler of this.handlers) { handler.prepareRequest(info.options); - }); + } } return info; } _mergeHeaders(headers) { - const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); 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 || {}); } _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); let clientHeader; if (this.requestOptions && this.requestOptions.headers) { clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; @@ -705,36 +805,29 @@ var require_http_client = __commonJS({ } _getAgent(parsedUrl) { let agent; - let proxyUrl = pm.getProxyUrl(parsedUrl); - let useProxy = proxyUrl && proxyUrl.hostname; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; if (this._keepAlive && useProxy) { agent = this._proxyAgent; } if (this._keepAlive && !useProxy) { agent = this._agent; } - if (!!agent) { + if (agent) { return agent; } const usingSsl = parsedUrl.protocol === "https:"; let maxSockets = 100; - if (!!this.requestOptions) { + if (this.requestOptions) { maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; } - if (useProxy) { - if (!tunnel) { - tunnel = require_tunnel2(); - } + if (proxyUrl && proxyUrl.hostname) { const agentOptions = { maxSockets, keepAlive: this._keepAlive, - proxy: { - ...(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:"; @@ -762,64 +855,69 @@ var require_http_client = __commonJS({ return agent; } _performExponentialBackoff(retryNumber) { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve) => setTimeout(() => resolve(), ms)); - } - static dateTimeDeserializer(key, value) { - if (typeof value === "string") { - let a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; + return __awaiter(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve) => setTimeout(() => resolve(), ms)); + }); } - async _processResponse(res, options) { - return new Promise(async (resolve, reject) => { - const statusCode = res.message.statusCode; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode == HttpCodes.NotFound) { - resolve(response); - } - let obj; - let contents; - try { - contents = await res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, HttpClient.dateTimeDeserializer); - } else { - obj = JSON.parse(contents); + _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; + } } - response.result = obj; + return value; } - 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; + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); } else { - msg = "Failed request: (" + statusCode + ")"; + resolve(response); } - let 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), {}); } }); @@ -857,7 +955,7 @@ var require_utils = __commonJS({ }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getApiBaseUrl = exports.getProxyAgent = exports.getAuthString = void 0; - var httpClient = __importStar(require_http_client()); + var httpClient = __importStar(require_lib()); function getAuthString(token, options) { if (!token && !options.auth) { throw new Error("Parameter token or opts.auth is required"); @@ -1362,7 +1460,7 @@ var require_dist_node2 = __commonJS({ }); // node_modules/webidl-conversions/lib/index.js -var require_lib = __commonJS({ +var require_lib2 = __commonJS({ "node_modules/webidl-conversions/lib/index.js"(exports, module2) { "use strict"; var conversions = {}; @@ -2939,7 +3037,7 @@ var require_URL_impl = __commonJS({ var require_URL = __commonJS({ "node_modules/whatwg-url/lib/URL.js"(exports, module2) { "use strict"; - var conversions = require_lib(); + var conversions = require_lib2(); var utils = require_utils2(); var Impl = require_URL_impl(); var impl = utils.implSymbol; @@ -3135,7 +3233,7 @@ var require_public_api = __commonJS({ }); // node_modules/node-fetch/lib/index.js -var require_lib2 = __commonJS({ +var require_lib3 = __commonJS({ "node_modules/node-fetch/lib/index.js"(exports, module2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -3319,11 +3417,14 @@ var require_lib2 = __commonJS({ blob() { let ct = this.headers && this.headers.get("content-type") || ""; return consumeBody.call(this).then(function(buf) { - return Object.assign(new Blob([], { - type: ct.toLowerCase() - }), { - [BUFFER]: buf - }); + return Object.assign( + new Blob([], { + type: ct.toLowerCase() + }), + { + [BUFFER]: buf + } + ); }); }, json() { @@ -4365,7 +4466,7 @@ var require_dist_node5 = __commonJS({ var endpoint = require_dist_node2(); var universalUserAgent = require_dist_node(); var isPlainObject = require_is_plain_object(); - var nodeFetch = _interopDefault(require_lib2()); + var nodeFetch = _interopDefault(require_lib3()); var requestError = require_dist_node4(); var VERSION = "5.6.3"; function getBufferResponse(response) { @@ -4380,12 +4481,15 @@ var require_dist_node5 = __commonJS({ let status; let url; const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch; - return fetch(requestOptions.url, Object.assign({ - method: requestOptions.method, - body: requestOptions.body, - headers: requestOptions.headers, - redirect: requestOptions.redirect - }, requestOptions.request)).then(async (response) => { + return fetch(requestOptions.url, Object.assign( + { + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect + }, + requestOptions.request + )).then(async (response) => { url = response.url; status = response.status; for (const keyAndValue of response.headers) { @@ -4690,7 +4794,7 @@ var require_dist_node8 = __commonJS({ } return target; } - var VERSION = "3.5.1"; + var VERSION = "3.6.0"; var _excluded = ["authStrategy"]; var Octokit = class { constructor(options = {}) { @@ -7180,10 +7284,25 @@ var require_signals2 = __commonJS({ "SIGTERM" ]; if (process.platform !== "win32") { - module2.exports.push("SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT"); + module2.exports.push( + "SIGVTALRM", + "SIGXCPU", + "SIGXFSZ", + "SIGUSR2", + "SIGTRAP", + "SIGSYS", + "SIGQUIT", + "SIGIOT" + ); } if (process.platform === "linux") { - module2.exports.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT", "SIGUNUSED"); + module2.exports.push( + "SIGIO", + "SIGPOLL", + "SIGPWR", + "SIGSTKFLT", + "SIGUNUSED" + ); } } }); @@ -7960,18 +8079,22 @@ var require_execa = __commonJS({ nodePath = process.execPath, nodeOptions = defaultExecArgv } = options; - return execa2(nodePath, [ - ...nodeOptions, - scriptPath, - ...Array.isArray(args) ? args : [] - ], { - ...options, - stdin: void 0, - stdout: void 0, - stderr: void 0, - stdio, - shell: false - }); + return execa2( + nodePath, + [ + ...nodeOptions, + scriptPath, + ...Array.isArray(args) ? args : [] + ], + { + ...options, + stdin: void 0, + stdout: void 0, + stderr: void 0, + stdio, + shell: false + } + ); }; } }); @@ -8170,7 +8293,9 @@ var require_json_parse_even_better_errors = __commonJS({ } catch (e) { if (typeof txt !== "string" && !Buffer.isBuffer(txt)) { const isEmptyArray = Array.isArray(txt) && txt.length === 0; - throw Object.assign(new TypeError(`Cannot parse ${isEmptyArray ? "an empty array" : String(txt)}`), { + throw Object.assign(new TypeError( + `Cannot parse ${isEmptyArray ? "an empty array" : String(txt)}` + ), { code: "EJSONPARSE", systemError: e }); @@ -8410,7 +8535,7 @@ var require_keyword = __commonJS({ }); // node_modules/@babel/helper-validator-identifier/lib/index.js -var require_lib3 = __commonJS({ +var require_lib4 = __commonJS({ "node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -9749,7 +9874,7 @@ var require_templates = __commonJS({ ["e", "\x1B"], ["a", "\x07"] ]); - function unescape(c) { + function unescape2(c) { if (c[0] === "u" && c.length === 5 || c[0] === "x" && c.length === 3) { return String.fromCharCode(parseInt(c.slice(1), 16)); } @@ -9763,7 +9888,7 @@ var require_templates = __commonJS({ if (!isNaN(chunk)) { results.push(Number(chunk)); } else if (matches = chunk.match(STRING_REGEX)) { - results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr)); + results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape2(escape) : chr)); } else { throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); } @@ -9813,7 +9938,7 @@ var require_templates = __commonJS({ let chunk = []; tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => { if (escapeChar) { - chunk.push(unescape(escapeChar)); + chunk.push(unescape2(escapeChar)); } else if (style) { const str = chunk.join(""); chunk = []; @@ -10008,7 +10133,7 @@ var require_chalk = __commonJS({ }); // node_modules/@babel/highlight/lib/index.js -var require_lib4 = __commonJS({ +var require_lib5 = __commonJS({ "node_modules/@babel/highlight/lib/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -10018,7 +10143,7 @@ var require_lib4 = __commonJS({ exports.getChalk = getChalk; exports.shouldHighlight = shouldHighlight; var _jsTokens = require_js_tokens(); - var _helperValidatorIdentifier = require_lib3(); + var _helperValidatorIdentifier = require_lib4(); var _chalk = require_chalk(); var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]); function getDefs(chalk) { @@ -10107,7 +10232,7 @@ var require_lib4 = __commonJS({ }); // node_modules/@babel/code-frame/lib/index.js -var require_lib5 = __commonJS({ +var require_lib6 = __commonJS({ "node_modules/@babel/code-frame/lib/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -10115,7 +10240,7 @@ var require_lib5 = __commonJS({ }); exports.codeFrameColumns = codeFrameColumns; exports.default = _default; - var _highlight = require_lib4(); + var _highlight = require_lib5(); var deprecationWarningShown = false; function getDefs(chalk) { return { @@ -10259,7 +10384,7 @@ var require_parse_json = __commonJS({ var errorEx = require_error_ex(); var fallback = require_json_parse_even_better_errors(); var { default: LinesAndColumns } = require_build(); - var { codeFrameColumns } = require_lib5(); + var { codeFrameColumns } = require_lib6(); var JSONError = errorEx("JSONError", { fileName: errorEx.append("in %s"), codeFrame: errorEx.append("\n\n%s\n") @@ -10287,7 +10412,11 @@ var require_parse_json = __commonJS({ const lines = new LinesAndColumns(string); const index = Number(indexMatch[1]); const location = lines.locationForIndex(index); - const codeFrame = codeFrameColumns(string, { start: { line: location.line + 1, column: location.column + 1 } }, { highlightCode: true }); + const codeFrame = codeFrameColumns( + string, + { start: { line: location.line + 1, column: location.column + 1 } }, + { highlightCode: true } + ); jsonError.codeFrame = codeFrame; } throw jsonError; @@ -12314,7 +12443,10 @@ var require_spdx_correct = __commonJS({ var transposition = transpositions[i]; var transposed = transposition[TRANSPOSED]; if (identifier.indexOf(transposed) > -1) { - var corrected = identifier.replace(transposed, transposition[CORRECT]); + var corrected = identifier.replace( + transposed, + transposition[CORRECT] + ); var checked = check(corrected); if (checked !== null) { return checked; @@ -12440,7 +12572,9 @@ var require_validate_npm_package_license = __commonJS({ if (argument.trim().length !== 0) { var corrected = correct(argument); if (corrected) { - result.warnings.push('license is similar to the valid expression "' + corrected + '"'); + result.warnings.push( + 'license is similar to the valid expression "' + corrected + '"' + ); } } return result; @@ -12720,7 +12854,9 @@ var require_hosted_git_info = __commonJS({ function fromUrl(giturl, opts) { if (giturl == null || giturl === "") return; - var url2 = fixupUnqualifiedGist(isGitHubShorthand(giturl) ? "github:" + giturl : giturl); + var url2 = fixupUnqualifiedGist( + isGitHubShorthand(giturl) ? "github:" + giturl : giturl + ); var parsed = parseGitUrl(url2); var shortcutMatch = url2.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/); var matches = Object.keys(gitHosts).map(function(gitHostName) { @@ -12861,7 +12997,9 @@ var require_path_parse = __commonJS({ } win32.parse = function(pathString) { if (typeof pathString !== "string") { - throw new TypeError("Parameter 'pathString' must be a string, not " + typeof pathString); + throw new TypeError( + "Parameter 'pathString' must be a string, not " + typeof pathString + ); } var allParts = win32SplitPath(pathString); if (!allParts || allParts.length !== 5) { @@ -12882,7 +13020,9 @@ var require_path_parse = __commonJS({ } posix.parse = function(pathString) { if (typeof pathString !== "string") { - throw new TypeError("Parameter 'pathString' must be a string, not " + typeof pathString); + throw new TypeError( + "Parameter 'pathString' must be a string, not " + typeof pathString + ); } var allParts = posixSplitPath(pathString); if (!allParts || allParts.length !== 5) { @@ -12932,9 +13072,14 @@ var require_node_modules_paths = __commonJS({ module2.exports = function nodeModulesPaths(start, opts, request) { var modules = opts && opts.moduleDirectory ? [].concat(opts.moduleDirectory) : ["node_modules"]; if (opts && typeof opts.paths === "function") { - return opts.paths(request, start, function() { - return getNodeModulesDirs(start, modules); - }, opts); + return opts.paths( + request, + start, + function() { + return getNodeModulesDirs(start, modules); + }, + opts + ); } var dirs = getNodeModulesDirs(start, modules); return opts && opts.paths ? dirs.concat(opts.paths) : dirs; @@ -12968,13 +13113,19 @@ var require_implementation = __commonJS({ var bound; var binder = function() { if (this instanceof bound) { - var result = target.apply(this, args.concat(slice.call(arguments))); + var result = target.apply( + this, + args.concat(slice.call(arguments)) + ); if (Object(result) === result) { return result; } return this; } else { - return target.apply(that, args.concat(slice.call(arguments))); + return target.apply( + that, + args.concat(slice.call(arguments)) + ); } }; var boundLength = Math.max(0, target.length - args.length); @@ -13340,12 +13491,17 @@ var require_async = __commonJS({ var parent = opts.filename || basedir; opts.paths = opts.paths || defaultPaths(); var absoluteStart = path.resolve(basedir); - maybeRealpath(realpath, absoluteStart, opts, function(err2, realStart) { - if (err2) - cb(err2); - else - init(realStart); - }); + maybeRealpath( + realpath, + absoluteStart, + opts, + function(err2, realStart) { + if (err2) + cb(err2); + else + init(realStart); + } + ); var res; function init(basedir2) { if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) { @@ -13428,7 +13584,11 @@ var require_async = __commonJS({ var rel = rfile.slice(0, rfile.length - exts2[0].length); var r = opts.pathFilter(pkg, x3, rel); if (r) - return load([""].concat(extensions.slice()), path.resolve(dir, r), pkg); + return load( + [""].concat(extensions.slice()), + path.resolve(dir, r), + pkg + ); } isFile(file, onex); } @@ -13554,7 +13714,10 @@ var require_async = __commonJS({ var thunk = function() { return getPackageCandidates(x2, start, opts); }; - processDirs(cb2, packageIterator ? packageIterator(x2, start, thunk, opts) : thunk()); + processDirs( + cb2, + packageIterator ? packageIterator(x2, start, thunk, opts) : thunk() + ); } }; } @@ -14772,80 +14935,614 @@ var require_file_command = __commonJS({ } }); -// node_modules/@actions/http-client/auth.js -var require_auth = __commonJS({ - "node_modules/@actions/http-client/auth.js"(exports) { +// node_modules/@actions/core/node_modules/uuid/dist/rng.js +var require_rng = __commonJS({ + "node_modules/@actions/core/node_modules/uuid/dist/rng.js"(exports) { "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - options.headers["Authorization"] = "Basic " + Buffer.from(this.username + ":" + this.password).toString("base64"); - } - canHandleAuthentication(response) { - return false; - } - handleAuthentication(httpClient, requestInfo, objs) { - return null; - } - }; - exports.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - prepareRequest(options) { - options.headers["Authorization"] = "Bearer " + this.token; - } - canHandleAuthentication(response) { - return false; - } - handleAuthentication(httpClient, requestInfo, objs) { - return null; - } - }; - exports.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - prepareRequest(options) { - options.headers["Authorization"] = "Basic " + Buffer.from("PAT:" + this.token).toString("base64"); - } - canHandleAuthentication(response) { - return false; - } - handleAuthentication(httpClient, requestInfo, objs) { - return null; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = rng; + var _crypto = _interopRequireDefault(require("crypto")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var rnds8Pool = new Uint8Array(256); + var poolPtr = rnds8Pool.length; + function rng() { + if (poolPtr > rnds8Pool.length - 16) { + _crypto.default.randomFillSync(rnds8Pool); + poolPtr = 0; } - }; - exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + return rnds8Pool.slice(poolPtr, poolPtr += 16); + } } }); -// node_modules/@actions/core/lib/oidc-utils.js -var require_oidc_utils = __commonJS({ - "node_modules/@actions/core/lib/oidc-utils.js"(exports) { +// node_modules/@actions/core/node_modules/uuid/dist/regex.js +var require_regex = __commonJS({ + "node_modules/@actions/core/node_modules/uuid/dist/regex.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); - } - } - function rejected(value) { - try { + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + var _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; + exports.default = _default; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/validate.js +var require_validate = __commonJS({ + "node_modules/@actions/core/node_modules/uuid/dist/validate.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + var _regex = _interopRequireDefault(require_regex()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + function validate(uuid) { + return typeof uuid === "string" && _regex.default.test(uuid); + } + var _default = validate; + exports.default = _default; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/stringify.js +var require_stringify = __commonJS({ + "node_modules/@actions/core/node_modules/uuid/dist/stringify.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + var _validate = _interopRequireDefault(require_validate()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var byteToHex = []; + for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 256).toString(16).substr(1)); + } + 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(); + if (!(0, _validate.default)(uuid)) { + throw TypeError("Stringified UUID is invalid"); + } + return uuid; + } + var _default = stringify; + exports.default = _default; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/v1.js +var require_v1 = __commonJS({ + "node_modules/@actions/core/node_modules/uuid/dist/v1.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + var _rng = _interopRequireDefault(require_rng()); + var _stringify = _interopRequireDefault(require_stringify()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var _nodeId; + var _clockseq; + var _lastMSecs = 0; + var _lastNSecs = 0; + function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq; + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || _rng.default)(); + if (node == null) { + 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; + } + } + 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; + } + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) { + nsecs = 0; + } + if (nsecs >= 1e4) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + _lastMSecs = msecs; + _lastNSecs = nsecs; + _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 & 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++] = clockseq & 255; + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + return buf || (0, _stringify.default)(b); + } + var _default = v1; + exports.default = _default; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/parse.js +var require_parse3 = __commonJS({ + "node_modules/@actions/core/node_modules/uuid/dist/parse.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + var _validate = _interopRequireDefault(require_validate()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + function parse(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError("Invalid 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[3] = v & 255; + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 255; + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + 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[15] = v & 255; + return arr; + } + var _default = parse; + exports.default = _default; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/v35.js +var require_v35 = __commonJS({ + "node_modules/@actions/core/node_modules/uuid/dist/v35.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = _default; + exports.URL = exports.DNS = void 0; + var _stringify = _interopRequireDefault(require_stringify()); + var _parse = _interopRequireDefault(require_parse3()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); + const bytes = []; + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + return bytes; + } + var DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; + exports.DNS = DNS; + var URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; + exports.URL = URL2; + function _default(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === "string") { + value = stringToBytes(value); + } + if (typeof namespace === "string") { + namespace = (0, _parse.default)(namespace); + } + if (namespace.length !== 16) { + 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 | version; + bytes[8] = bytes[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + return buf; + } + return (0, _stringify.default)(bytes); + } + try { + generateUUID.name = name; + } catch (err) { + } + generateUUID.DNS = DNS; + generateUUID.URL = URL2; + return generateUUID; + } + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/md5.js +var require_md5 = __commonJS({ + "node_modules/@actions/core/node_modules/uuid/dist/md5.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + var _crypto = _interopRequireDefault(require("crypto")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return _crypto.default.createHash("md5").update(bytes).digest(); + } + var _default = md5; + exports.default = _default; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/v3.js +var require_v3 = __commonJS({ + "node_modules/@actions/core/node_modules/uuid/dist/v3.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + var _v = _interopRequireDefault(require_v35()); + var _md = _interopRequireDefault(require_md5()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var v3 = (0, _v.default)("v3", 48, _md.default); + var _default = v3; + exports.default = _default; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/v4.js +var require_v4 = __commonJS({ + "node_modules/@actions/core/node_modules/uuid/dist/v4.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + var _rng = _interopRequireDefault(require_rng()); + var _stringify = _interopRequireDefault(require_stringify()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + function v4(options, buf, offset) { + options = options || {}; + const rnds = options.random || (options.rng || _rng.default)(); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + return buf; + } + return (0, _stringify.default)(rnds); + } + var _default = v4; + exports.default = _default; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/sha1.js +var require_sha1 = __commonJS({ + "node_modules/@actions/core/node_modules/uuid/dist/sha1.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + var _crypto = _interopRequireDefault(require("crypto")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return _crypto.default.createHash("sha1").update(bytes).digest(); + } + var _default = sha1; + exports.default = _default; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/v5.js +var require_v5 = __commonJS({ + "node_modules/@actions/core/node_modules/uuid/dist/v5.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + var _v = _interopRequireDefault(require_v35()); + var _sha = _interopRequireDefault(require_sha1()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var v5 = (0, _v.default)("v5", 80, _sha.default); + var _default = v5; + exports.default = _default; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/nil.js +var require_nil = __commonJS({ + "node_modules/@actions/core/node_modules/uuid/dist/nil.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + var _default = "00000000-0000-0000-0000-000000000000"; + exports.default = _default; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/version.js +var require_version = __commonJS({ + "node_modules/@actions/core/node_modules/uuid/dist/version.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + var _validate = _interopRequireDefault(require_validate()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError("Invalid UUID"); + } + return parseInt(uuid.substr(14, 1), 16); + } + var _default = version; + exports.default = _default; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/index.js +var require_dist = __commonJS({ + "node_modules/@actions/core/node_modules/uuid/dist/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + Object.defineProperty(exports, "v1", { + enumerable: true, + get: function() { + return _v.default; + } + }); + Object.defineProperty(exports, "v3", { + enumerable: true, + get: function() { + return _v2.default; + } + }); + Object.defineProperty(exports, "v4", { + enumerable: true, + get: function() { + return _v3.default; + } + }); + Object.defineProperty(exports, "v5", { + enumerable: true, + get: function() { + return _v4.default; + } + }); + Object.defineProperty(exports, "NIL", { + enumerable: true, + get: function() { + return _nil.default; + } + }); + Object.defineProperty(exports, "version", { + enumerable: true, + get: function() { + return _version.default; + } + }); + Object.defineProperty(exports, "validate", { + enumerable: true, + get: function() { + return _validate.default; + } + }); + Object.defineProperty(exports, "stringify", { + enumerable: true, + get: function() { + return _stringify.default; + } + }); + Object.defineProperty(exports, "parse", { + enumerable: true, + get: function() { + return _parse.default; + } + }); + var _v = _interopRequireDefault(require_v1()); + var _v2 = _interopRequireDefault(require_v3()); + var _v3 = _interopRequireDefault(require_v4()); + var _v4 = _interopRequireDefault(require_v5()); + var _nil = _interopRequireDefault(require_nil()); + var _version = _interopRequireDefault(require_version()); + var _validate = _interopRequireDefault(require_validate()); + var _stringify = _interopRequireDefault(require_stringify()); + var _parse = _interopRequireDefault(require_parse3()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + } +}); + +// 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); + } + } + 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; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + 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); + } + } + function rejected(value) { + try { step(generator["throw"](value)); } catch (e) { reject(e); @@ -14859,7 +15556,7 @@ var require_oidc_utils = __commonJS({ }; Object.defineProperty(exports, "__esModule", { value: true }); exports.OidcClient = void 0; - var http_client_1 = require_http_client(); + var http_client_1 = require_lib(); var auth_1 = require_auth(); var core_1 = require_core5(); var OidcClient = class { @@ -14924,6 +15621,221 @@ var require_oidc_utils = __commonJS({ } }); +// 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); + } + } + 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; + 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"; + var Summary = class { + constructor() { + this._buffer = ""; + } + filePath() { + return __awaiter(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + 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.`); + } + try { + 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.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + write(options) { + return __awaiter(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + clear() { + return __awaiter(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + stringify() { + return this._buffer; + } + isEmptyBuffer() { + return this._buffer.length === 0; + } + emptyBuffer() { + this._buffer = ""; + return this; + } + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + addEOL() { + return this.addRaw(os_1.EOL); + } + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + 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; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; + var path = __importStar(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path.sep); + } + exports.toPlatformPath = toPlatformPath; + } +}); + // node_modules/@actions/core/lib/core.js var require_core5 = __commonJS({ "node_modules/@actions/core/lib/core.js"(exports) { @@ -14990,6 +15902,7 @@ var require_core5 = __commonJS({ var utils_1 = require_utils4(); var os = __importStar(require("os")); var path = __importStar(require("path")); + var uuid_1 = require_dist(); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { @@ -15001,7 +15914,13 @@ var require_core5 = __commonJS({ process.env[name] = convertedVal; const filePath = process.env["GITHUB_ENV"] || ""; if (filePath) { - const delimiter = "_GitHubActionsFileCommandDelimeter_"; + const delimiter = `ghadelimiter_${uuid_1.v4()}`; + if (name.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedVal.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`; file_command_1.issueCommand("ENV", commandValue); } else { @@ -15124,6 +16043,24 @@ 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; + } }); + var summary_2 = require_summary(); + 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; + } }); } }); @@ -15166,7 +16103,9 @@ var getGitHubContributors = async (token) => { owner, repo }); - const contributors = await Promise.all(contributorList.filter(({ type }) => type === "User").map((user) => octokit.rest.users.getByUsername({ username: user.login }).then(({ data }) => data))); + const contributors = await Promise.all( + contributorList.filter(({ type }) => type === "User").map((user) => octokit.rest.users.getByUsername({ username: user.login }).then(({ data }) => data)) + ); const currentActor = import_process.default.env.GITHUB_ACTOR; if (!contributorList.some((user) => user.login === currentActor)) { const { data: currentUser } = await octokit.rest.users.getByUsername({ username: currentActor });