@great-arrow/cli 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +13 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9483,7 +9483,7 @@ function isNodeError(value) {
|
|
|
9483
9483
|
|
|
9484
9484
|
// src/lib/version.ts
|
|
9485
9485
|
var CLI_PACKAGE_NAME = "@great-arrow/cli";
|
|
9486
|
-
var CLI_VERSION = "0.7.
|
|
9486
|
+
var CLI_VERSION = "0.7.2";
|
|
9487
9487
|
var GAD_INSTALL_VERSION = "2026.08.08";
|
|
9488
9488
|
var GAD_INSTALL_MIN_VERSION = "2026.06.22";
|
|
9489
9489
|
var GAD_INSTALL_HEADER = "X-GAD-Install-Version";
|
|
@@ -10455,7 +10455,7 @@ var Formatter = class {
|
|
|
10455
10455
|
}
|
|
10456
10456
|
if (this.options.quiet) {
|
|
10457
10457
|
const lines = data.map(
|
|
10458
|
-
(row) => columns.map((col) => this.
|
|
10458
|
+
(row) => columns.map((col) => this.tableCell(row, col)).join(" ")
|
|
10459
10459
|
);
|
|
10460
10460
|
const output3 = lines.join("\n");
|
|
10461
10461
|
this.writeStdout(output3);
|
|
@@ -10465,7 +10465,7 @@ var Formatter = class {
|
|
|
10465
10465
|
if (col.width) return col.width;
|
|
10466
10466
|
const headerLen = col.header.length;
|
|
10467
10467
|
const maxDataLen = data.reduce((max, row) => {
|
|
10468
|
-
const val = this.
|
|
10468
|
+
const val = this.tableCell(row, col);
|
|
10469
10469
|
return Math.max(max, val.length);
|
|
10470
10470
|
}, 0);
|
|
10471
10471
|
return Math.max(headerLen, maxDataLen);
|
|
@@ -10473,12 +10473,21 @@ var Formatter = class {
|
|
|
10473
10473
|
const headerRow = columns.map((col, i) => this.color.bold(col.header.padEnd(widths[i]))).join(" ");
|
|
10474
10474
|
const separator = widths.map((w) => "\u2500".repeat(w)).join("\u2500\u2500");
|
|
10475
10475
|
const rows = data.map(
|
|
10476
|
-
(row) => columns.map((col, i) => this.
|
|
10476
|
+
(row) => columns.map((col, i) => this.tableCell(row, col).padEnd(widths[i])).join(" ")
|
|
10477
10477
|
);
|
|
10478
10478
|
const output2 = [headerRow, separator, ...rows].join("\n");
|
|
10479
10479
|
this.writeStdout(output2);
|
|
10480
10480
|
return output2;
|
|
10481
10481
|
}
|
|
10482
|
+
/**
|
|
10483
|
+
* One table cell: always a single line (a newline in a value would split the
|
|
10484
|
+
* row and shift every column after it), cut to the column's declared width.
|
|
10485
|
+
* Columns without a width (links, ids) are never cut.
|
|
10486
|
+
*/
|
|
10487
|
+
tableCell(row, col) {
|
|
10488
|
+
const flat = this.getCellValue(row, col).replace(/[\r\n\t\v\f]+/g, " ");
|
|
10489
|
+
return col.width && flat.length > col.width ? `${flat.slice(0, col.width - 1)}\u2026` : flat;
|
|
10490
|
+
}
|
|
10482
10491
|
/**
|
|
10483
10492
|
* Render key-value pairs for a single object.
|
|
10484
10493
|
*
|