Rebuild dist/ code

This commit is contained in:
Jozef Izso 2025-11-05 21:25:14 +01:00
parent bed521d765
commit 22dc7b52f4
Failed to extract signature

10
dist/index.js generated vendored
View file

@ -1909,6 +1909,7 @@ var __importStar = (this && this.__importStar) || (function () {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DEFAULT_OPTIONS = void 0;
exports.getReport = getReport;
exports.getBadge = getBadge;
const core = __importStar(__nccwpck_require__(7484));
const markdown_utils_1 = __nccwpck_require__(5129);
const node_utils_1 = __nccwpck_require__(5384);
@ -2022,8 +2023,10 @@ function getBadge(passed, failed, skipped, options) {
color = 'yellow';
}
const hint = failed > 0 ? 'Tests failed' : 'Tests passed successfully';
const uri = encodeURIComponent(`${options.badgeTitle}-${message}-${color}`);
return `![${hint}](https://img.shields.io/badge/${uri})`;
const encodedBadgeTitle = encodeImgShieldsURIComponent(options.badgeTitle);
const encodedMessage = encodeImgShieldsURIComponent(message);
const encodedColor = encodeImgShieldsURIComponent(color);
return `![${hint}](https://img.shields.io/badge/${encodedBadgeTitle}-${encodedMessage}-${encodedColor})`;
}
function getTestRunsReport(testRuns, options) {
const sections = [];
@ -2153,6 +2156,9 @@ function getResultIcon(result) {
return '';
}
}
function encodeImgShieldsURIComponent(component) {
return encodeURIComponent(component).replace(/-/g, '--').replace(/_/g, '__');
}
/***/ }),