Test the checkout code; publish images only for releases #5

Merged
libretech merged 4 commits from refactor/checkout-tests into main 2026-10-08 22:36:48 +02:00
2 changed files with 16 additions and 8 deletions
Showing only changes of commit 7fd4aeff17 - Show all commits
+2 -8
View File
@@ -1,16 +1,10 @@
import { winston } from "@strapi/logger";
import { formatLogLine } from "../src/logging/format";
export default {
transports: [
new winston.transports.Console({
format: winston.format.combine(
winston.format.printf(({ timestamp, level, message, ...rest }) => {
let restString = JSON.stringify(rest, undefined, 2);
restString = restString === "{}" ? "" : restString;
return `${timestamp}Z ${level}: ${message} ${restString}`;
})
)
format: winston.format.combine(winston.format.printf(formatLogLine))
})
]
};
+14
View File
@@ -0,0 +1,14 @@
/** What winston hands a printf template (logform's TransformableInfo); Strapi's default format has added `timestamp`. */
export type LogInfo = {
level: string;
message: unknown;
[key: string | symbol]: unknown;
};
/** One console line: `<timestamp>Z <level>: <message> <all other fields as indented JSON, if any>`. */
export const formatLogLine = ({ timestamp, level, message, ...rest }: LogInfo): string => {
let restString = JSON.stringify(rest, undefined, 2);
restString = restString === "{}" ? "" : restString;
return `${timestamp}Z ${level}: ${message} ${restString}`;
};