@@ -18339,7 +18339,7 @@ var require_summary = __commonJS({
1833918339 exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;
1834018340 var os_1 = __require("os");
1834118341 var fs_1 = __require("fs");
18342- var { access, appendFile, writeFile } = fs_1.promises;
18342+ var { access, appendFile: appendFile2 , writeFile } = fs_1.promises;
1834318343 exports.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY";
1834418344 exports.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";
1834518345 var Summary = class {
@@ -18375,7 +18375,7 @@ var require_summary = __commonJS({
1837518375 return __awaiter(this, void 0, void 0, function* () {
1837618376 const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);
1837718377 const filePath = yield this.filePath();
18378- const writeFunc = overwrite ? writeFile : appendFile ;
18378+ const writeFunc = overwrite ? writeFile : appendFile2 ;
1837918379 yield writeFunc(filePath, this._buffer, { encoding: "utf8" });
1838018380 return this.emptyBuffer();
1838118381 });
@@ -55959,6 +55959,7 @@ ${stderr}`);
5595955959}
5596055960
5596155961//
55962+ import { appendFile } from "fs/promises";
5596255963var LogLevel;
5596355964(function(LogLevel2) {
5596455965 LogLevel2[LogLevel2["SILENT"] = 0] = "SILENT";
@@ -56004,7 +56005,7 @@ function runConsoleCommand(loadCommand, logLevel, ...text) {
5600456005 if (getLogLevel() >= logLevel) {
5600556006 loadCommand()(...text);
5600656007 }
56007- printToLogFile (logLevel, ...text);
56008+ appendToLogFile (logLevel, ...text);
5600856009}
5600956010function getLogLevel() {
5601056011 const logLevel = Object.keys(LogLevel).indexOf((process.env[`LOG_LEVEL`] || "").toUpperCase());
@@ -56013,12 +56014,19 @@ function getLogLevel() {
5601356014 }
5601456015 return logLevel;
5601556016}
56016- var LOGGED_TEXT = "";
5601756017var LOG_LEVEL_COLUMNS = 7;
56018- function printToLogFile(logLevel, ...text) {
56018+ var logFilePath = void 0;
56019+ function appendToLogFile(logLevel, ...text) {
56020+ if (logFilePath === void 0) {
56021+ return;
56022+ }
56023+ if (logLevel === void 0) {
56024+ appendFile(logFilePath, text.join(" "));
56025+ return;
56026+ }
5601956027 const logLevelText = `${LogLevel[logLevel]}:`.padEnd(LOG_LEVEL_COLUMNS);
56020- LOGGED_TEXT += text.join(" ").split("\n").map((l) => `${logLevelText} ${l}
56021- `).join("");
56028+ appendFile(logFilePath, text.join(" ").split("\n").map((l) => `${logLevelText} ${l}
56029+ `).join("").replace(/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]/g, "")) ;
5602256030}
5602356031
5602456032//
0 commit comments