From cf0901d753db0bf4d15baf625a6fa537978b03a9 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 28 Feb 2026 22:23:19 +0100 Subject: upgrade actions/core to version 3 The relevant changes are in clean.js/restore.js. I'm very, very far away from the entire Javascript infrastructure, and absolutely don't understand why this changes were necessary. Thanks, ChatGPT! Supposedly, this has something to do with the actions/core's transition to ESM or whatever. --- node_modules/@actions/core/lib/oidc-utils.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'node_modules/@actions/core/lib/oidc-utils.js') diff --git a/node_modules/@actions/core/lib/oidc-utils.js b/node_modules/@actions/core/lib/oidc-utils.js index b666b25..17b3e90 100644 --- a/node_modules/@actions/core/lib/oidc-utils.js +++ b/node_modules/@actions/core/lib/oidc-utils.js @@ -1,4 +1,3 @@ -"use strict"; var __awaiter = (this && this.__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) { @@ -8,18 +7,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OidcClient = void 0; -const http_client_1 = require("@actions/http-client"); -const auth_1 = require("@actions/http-client/lib/auth"); -const core_1 = require("./core"); -class OidcClient { +import { HttpClient } from '@actions/http-client'; +import { BearerCredentialHandler } from '@actions/http-client/lib/auth'; +import { debug, setSecret } from './core.js'; +export class OidcClient { static createHttpClient(allowRetry = true, maxRetry = 10) { const requestOptions = { allowRetries: allowRetry, maxRetries: maxRetry }; - return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); + return new HttpClient('actions/oidc-client', [new BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); } static getRequestToken() { const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; @@ -62,9 +59,9 @@ class OidcClient { const encodedAudience = encodeURIComponent(audience); id_token_url = `${id_token_url}&audience=${encodedAudience}`; } - (0, core_1.debug)(`ID token url is ${id_token_url}`); + debug(`ID token url is ${id_token_url}`); const id_token = yield OidcClient.getCall(id_token_url); - (0, core_1.setSecret)(id_token); + setSecret(id_token); return id_token; } catch (error) { @@ -73,5 +70,4 @@ class OidcClient { }); } } -exports.OidcClient = OidcClient; //# sourceMappingURL=oidc-utils.js.map \ No newline at end of file -- cgit v1.3