From 6fcddf1f2180b5a99ed5271ae499e7ef2ba91dcc Mon Sep 17 00:00:00 2001 From: andrurodr Date: Mon, 7 Mar 2022 11:12:26 -0300 Subject: [PATCH] version --- lib/main.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/main.js b/lib/main.js index ffc52e4f..94f9430a 100644 --- a/lib/main.js +++ b/lib/main.js @@ -36,7 +36,7 @@ const core_1 = require("@actions/core"); const github = __importStar(require("@actions/github")); const axios_1 = __importDefault(require("axios")); const format_1 = require("./format"); -const https_proxy_agent_1 = require("https-proxy-agent"); +const https_proxy_agent_1 = __importDefault(require("https-proxy-agent")); const input_1 = require("./input"); const utils_1 = require("./utils"); const validate_1 = require("./validate"); @@ -71,14 +71,10 @@ function wrapWebhook(webhook, payload) { const port = fullProxy ? parseInt(fullProxy.split(':')[1]) : ''; let proxy = host && port ? { proxy: { host, port } } : null; if (proxy) { - const agent = new https_proxy_agent_1.HttpsProxyAgent({ host, port, rejectUnauthorized: false }); + const agent = https_proxy_agent_1.default({ host, port, rejectUnauthorized: false }); proxy = { httpAgent: agent, httpsAgent: agent }; } const client = axios_1.default.create(Object.assign(Object.assign({}, proxy), { maxRedirects: 0, timeout: 0 })); - client.interceptors.request.use((config) => { - utils_1.logInfo(JSON.stringify(config)); - return config; - }); client.interceptors.response.use((axiosResponse) => { utils_1.logInfo(JSON.stringify(axiosResponse)); return axiosResponse;