mirror of
https://github.com/penpot/penpot.git
synced 2026-08-01 19:06:18 +00:00
🐛 Add more fields on table format on errors report cli client
This commit is contained in:
parent
7430ffe718
commit
52e5e0bec6
@ -214,11 +214,30 @@ function formatGetTable(data) {
|
|||||||
lines.push(`Version: ${data.version || "(none)"}`);
|
lines.push(`Version: ${data.version || "(none)"}`);
|
||||||
lines.push(`Hint: ${data.hint || "(none)"}`);
|
lines.push(`Hint: ${data.hint || "(none)"}`);
|
||||||
lines.push(`HREF: ${data.href || "(none)"}`);
|
lines.push(`HREF: ${data.href || "(none)"}`);
|
||||||
lines.push(`--- Report ---`);
|
|
||||||
|
|
||||||
if (data.report) {
|
if (data.context) {
|
||||||
const indentedReport = data.report.split("\n").map(line => ` ${line}`).join("\n");
|
lines.push(`--- Context ---`);
|
||||||
lines.push(indentedReport);
|
const indented = data.context.split("\n").map(line => ` ${line}`).join("\n");
|
||||||
|
lines.push(indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.params && data.params !== "{}") {
|
||||||
|
lines.push(`--- Params ---`);
|
||||||
|
const indented = data.params.split("\n").map(line => ` ${line}`).join("\n");
|
||||||
|
lines.push(indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.props && data.props !== "{}") {
|
||||||
|
lines.push(`--- Props ---`);
|
||||||
|
const indented = data.props.split("\n").map(line => ` ${line}`).join("\n");
|
||||||
|
lines.push(indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
const body = data.trace || data.report;
|
||||||
|
lines.push(`--- Report ---`);
|
||||||
|
if (body) {
|
||||||
|
const indented = body.split("\n").map(line => ` ${line}`).join("\n");
|
||||||
|
lines.push(indented);
|
||||||
} else {
|
} else {
|
||||||
lines.push(" (none)");
|
lines.push(" (none)");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user