From 07bdee9a57fda0e0e3dbb530e748c963c285496b Mon Sep 17 00:00:00 2001 From: Rob Herley Date: Wed, 6 Dec 2023 17:23:51 -0500 Subject: [PATCH] more debug --- action.yml | 2 +- dist/index.js | 23 +++++++++++++++++++---- src/upload-artifact.ts | 6 ++++++ 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index 18c7c26..09e3026 100644 --- a/action.yml +++ b/action.yml @@ -42,5 +42,5 @@ outputs: This ID can be used as input to other APIs to download, delete or get more information about an artifact: https://docs.github.com/en/rest/actions/artifacts runs: - using: 'node16' + using: 'node20' main: 'dist/index.js' diff --git a/dist/index.js b/dist/index.js index ac86170..fe8b0f6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -142505,7 +142505,7 @@ class HttpClient { if (this._keepAlive && useProxy) { agent = this._proxyAgent; } - if (!useProxy) { + if (this._keepAlive && !useProxy) { agent = this._agent; } // if agent is already assigned use that agent. @@ -142538,12 +142538,15 @@ class HttpClient { this._proxyAgent = agent; } // if reusing agent across request and tunneling agent isn't assigned create a new agent - if (!agent) { + if (this._keepAlive && !agent) { const options = { keepAlive: this._keepAlive, maxSockets }; agent = usingSsl ? new https.Agent(options) : new http.Agent(options); this._agent = agent; } - + // if not using private agent and tunnel agent isn't setup then use global agent + if (!agent) { + agent = usingSsl ? https.globalAgent : http.globalAgent; + } if (usingSsl && this._ignoreSslError) { // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options @@ -145192,11 +145195,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); +const log = __nccwpck_require__(43903); const core = __importStar(__nccwpck_require__(42186)); const artifact_1 = __importDefault(__nccwpck_require__(99860)); const search_1 = __nccwpck_require__(13930); const input_helper_1 = __nccwpck_require__(46455); const constants_1 = __nccwpck_require__(69042); +setTimeout(function () { + log(); +}, 1000); function run() { return __awaiter(this, void 0, void 0, function* () { try { @@ -145243,6 +145250,14 @@ function run() { run(); +/***/ }), + +/***/ 43903: +/***/ ((module) => { + +module.exports = eval("require")("why-is-node-running"); + + /***/ }), /***/ 39491: @@ -145647,4 +145662,4 @@ module.exports = JSON.parse('{"name":"@actions/artifact","version":"2.0.0","prev /******/ module.exports = __webpack_exports__; /******/ /******/ })() -; +; \ No newline at end of file diff --git a/src/upload-artifact.ts b/src/upload-artifact.ts index 3706d2f..21fd7b3 100644 --- a/src/upload-artifact.ts +++ b/src/upload-artifact.ts @@ -1,3 +1,5 @@ +const log = require('why-is-node-running') + import * as core from '../node_modules/@actions/core/' import artifact, { UploadArtifactOptions @@ -6,6 +8,10 @@ import {findFilesToUpload} from './search' import {getInputs} from './input-helper' import {NoFileOptions} from './constants' +setTimeout(function () { + log() +}, 1000) + async function run(): Promise { try { const inputs = getInputs()