build: refresh js files

This commit is contained in:
Chuan-kai Lin 2024-12-09 08:49:21 -08:00
parent 57a28594b9
commit f9b0c1f2ea
6 changed files with 46 additions and 9 deletions

10
lib/logging.js generated
View file

@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.getActionsLogger = getActionsLogger;
exports.getRunnerLogger = getRunnerLogger;
exports.withGroup = withGroup;
exports.withGroupAsync = withGroupAsync;
exports.formatDuration = formatDuration;
const core = __importStar(require("@actions/core"));
function getActionsLogger() {
@ -65,6 +66,15 @@ function withGroup(groupName, f) {
core.endGroup();
}
}
async function withGroupAsync(groupName, f) {
core.startGroup(groupName);
try {
return await f();
}
finally {
core.endGroup();
}
}
/** Format a duration for use in logs. */
function formatDuration(durationMs) {
if (durationMs < 1000) {