dbcat 0.0.15 → 0.0.16
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/package.json +1 -1
- package/src/table.ts +3 -3
package/package.json
CHANGED
package/src/table.ts
CHANGED
|
@@ -80,7 +80,7 @@ export interface TableOptions {
|
|
|
80
80
|
// Wraps a string for table display, preserving ANSI codes and Unicode widths.
|
|
81
81
|
function wrapLines(str: string, maxWidth: number): string[] {
|
|
82
82
|
if (typeof Bun.wrapAnsi === "function") {
|
|
83
|
-
return Bun.wrapAnsi(str, maxWidth, { hard: true }).split("\n");
|
|
83
|
+
return Bun.wrapAnsi(str, maxWidth, { hard: true, trim: false }).split("\n");
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
const raw = str.split(/\n/g).join(" ");
|
|
@@ -112,12 +112,12 @@ function wrapLines(str: string, maxWidth: number): string[] {
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
if (Bun.stringWidth(current) >= maxWidth) {
|
|
115
|
-
lines.push(current
|
|
115
|
+
lines.push(current);
|
|
116
116
|
current = "";
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
if (current.length > 0) {
|
|
120
|
-
lines.push(current
|
|
120
|
+
lines.push(current);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
return lines;
|