@awsless/clui 0.0.5 → 0.0.6
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.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -258,7 +258,7 @@ var table = (props) => {
|
|
|
258
258
|
const windowSize = process.stdout.columns;
|
|
259
259
|
const max = windowSize - totalPadding - totalBorder - endMargin;
|
|
260
260
|
const contentSizes = Array.from({ length }).map((_, i) => {
|
|
261
|
-
return Math.max(props.head[i]
|
|
261
|
+
return Math.max((0, import_string_length.default)(props.head[i] ?? ""), ...props.body.map((b) => (0, import_string_length.default)(String(b[i]))));
|
|
262
262
|
});
|
|
263
263
|
const columnSizes = Array.from({ length }).map(() => {
|
|
264
264
|
return 0;
|
package/dist/index.js
CHANGED
|
@@ -229,7 +229,7 @@ var table = (props) => {
|
|
|
229
229
|
const windowSize = process.stdout.columns;
|
|
230
230
|
const max = windowSize - totalPadding - totalBorder - endMargin;
|
|
231
231
|
const contentSizes = Array.from({ length }).map((_, i) => {
|
|
232
|
-
return Math.max(props.head[i]
|
|
232
|
+
return Math.max(stringLength(props.head[i] ?? ""), ...props.body.map((b) => stringLength(String(b[i]))));
|
|
233
233
|
});
|
|
234
234
|
const columnSizes = Array.from({ length }).map(() => {
|
|
235
235
|
return 0;
|