@@ -32148,6 +32148,16 @@ const getCommand = (filename, generalArgs, command) => {
3214832148
3214932149;// CONCATENATED MODULE: ./src/buildExec.ts
3215032150/* eslint-disable @typescript-eslint/no-explicit-any */
32151+ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
32152+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
32153+ return new (P || (P = Promise))(function (resolve, reject) {
32154+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32155+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
32156+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
32157+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32158+ });
32159+ };
32160+
3215132161
3215232162
3215332163
@@ -32320,15 +32330,33 @@ const buildExecutionEnvironment = (token, envVars) => {
3232032330 }
3232132331 return uploadOptions;
3232232332};
32323- const buildExecutionOptions = (failCi, verbose) => {
32324- const token = core.getInput('token');
32333+ const getToken = () => __awaiter(void 0, void 0, void 0, function* () {
32334+ let token = core.getInput('token');
32335+ let url = core.getInput('url');
32336+ const useOIDC = isTrue(core.getInput('use_oidc'));
32337+ if (useOIDC) {
32338+ if (!url) {
32339+ url = 'https://codecov.io';
32340+ }
32341+ try {
32342+ token = yield core.getIDToken(url);
32343+ return Promise.resolve(token);
32344+ }
32345+ catch (err) {
32346+ setFailure(`Codecov: Failed to get OIDC token with url: ${url}. ${err.message}`, true);
32347+ }
32348+ }
32349+ return token;
32350+ });
32351+ const buildExecutionOptions = (failCi, verbose) => __awaiter(void 0, void 0, void 0, function* () {
32352+ const token = yield getToken();
3232532353 const envVars = core.getInput('env_vars');
3232632354 const cleanedEnvVars = cleanEnvVars(envVars);
3232732355 const generalArgs = buildGeneralArgs(verbose);
3232832356 const { uploadExecArgs, uploadCommand } = buildUploadArgs(token, cleanedEnvVars, failCi);
3232932357 const executionEnvironment = buildExecutionEnvironment(token, cleanedEnvVars);
3233032358 return { generalArgs, uploadCommand, uploadExecArgs, executionEnvironment };
32331- };
32359+ }) ;
3233232360
3233332361
3233432362;// CONCATENATED MODULE: external "node:child_process"
@@ -32342,7 +32370,7 @@ const external_node_path_namespaceObject = require("node:path");
3234232370// EXTERNAL MODULE: ./node_modules/undici/index.js
3234332371var undici = __nccwpck_require__(1773);
3234432372;// CONCATENATED MODULE: ./src/validate.ts
32345- var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
32373+ var validate_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
3234632374 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3234732375 return new (P || (P = Promise))(function (resolve, reject) {
3234832376 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -32358,7 +32386,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
3235832386
3235932387
3236032388
32361- const verify = (filename, platform, version, verbose, failCi) => __awaiter (void 0, void 0, void 0, function* () {
32389+ const verify = (filename, platform, version, verbose, failCi) => validate_awaiter (void 0, void 0, void 0, function* () {
3236232390 try {
3236332391 const uploaderName = getUploaderName(platform);
3236432392 // Get SHASUM and SHASUM signature files
@@ -32375,8 +32403,8 @@ const verify = (filename, platform, version, verbose, failCi) => __awaiter(void
3237532403 console.log(`Received SHA256SUM signature ${shaSig}`);
3237632404 }
3237732405 yield external_node_fs_namespaceObject.writeFileSync(external_node_path_namespaceObject.join(__dirname, `${uploaderName}.SHA256SUM.sig`), shaSig);
32378- const validateSha = () => __awaiter (void 0, void 0, void 0, function* () {
32379- const calculateHash = (filename) => __awaiter (void 0, void 0, void 0, function* () {
32406+ const validateSha = () => validate_awaiter (void 0, void 0, void 0, function* () {
32407+ const calculateHash = (filename) => validate_awaiter (void 0, void 0, void 0, function* () {
3238032408 const stream = external_node_fs_namespaceObject.createReadStream(filename);
3238132409 const uploaderSha = external_node_crypto_namespaceObject.createHash(`sha256`);
3238232410 stream.pipe(uploaderSha);
@@ -32394,7 +32422,7 @@ const verify = (filename, platform, version, verbose, failCi) => __awaiter(void
3239432422 `uploader hash: ${hash}, public hash: ${shasum}`, failCi);
3239532423 }
3239632424 });
32397- const verifySignature = () => __awaiter (void 0, void 0, void 0, function* () {
32425+ const verifySignature = () => validate_awaiter (void 0, void 0, void 0, function* () {
3239832426 const args = [
3239932427 '--logger-fd',
3240032428 '1',
@@ -32409,7 +32437,7 @@ const verify = (filename, platform, version, verbose, failCi) => __awaiter(void
3240932437 setFailure(`Codecov: Error verifying gpg signature: ${err.message}`, failCi);
3241032438 }
3241132439 });
32412- const importKey = () => __awaiter (void 0, void 0, void 0, function* () {
32440+ const importKey = () => validate_awaiter (void 0, void 0, void 0, function* () {
3241332441 const args = [
3241432442 '--logger-fd',
3241532443 '1',
@@ -32484,7 +32512,7 @@ var src_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argu
3248432512
3248532513let failCi;
3248632514const invokeCLI = (filename, failCi, verbose) => src_awaiter(void 0, void 0, void 0, function* () {
32487- const { generalArgs, uploadCommand, uploadExecArgs, executionEnvironment } = buildExecutionOptions(failCi, verbose);
32515+ const { generalArgs, uploadCommand, uploadExecArgs, executionEnvironment } = yield buildExecutionOptions(failCi, verbose);
3248832516 const doUploadTestResults = () => src_awaiter(void 0, void 0, void 0, function* () {
3248932517 yield exec.exec(getCommand(filename, generalArgs, uploadCommand).join(' '), uploadExecArgs, executionEnvironment);
3249032518 });
0 commit comments