mirror of
https://github.com/penpot/penpot.git
synced 2026-07-25 07:28:22 +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(`Hint: ${data.hint || "(none)"}`);
|
||||
lines.push(`HREF: ${data.href || "(none)"}`);
|
||||
|
||||
if (data.context) {
|
||||
lines.push(`--- Context ---`);
|
||||
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 (data.report) {
|
||||
const indentedReport = data.report.split("\n").map(line => ` ${line}`).join("\n");
|
||||
lines.push(indentedReport);
|
||||
if (body) {
|
||||
const indented = body.split("\n").map(line => ` ${line}`).join("\n");
|
||||
lines.push(indented);
|
||||
} else {
|
||||
lines.push(" (none)");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user