@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 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]?.length ?? 0, ...props.body.map((b) => String(b[i])?.length));
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]?.length ?? 0, ...props.body.map((b) => String(b[i])?.length));
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/clui",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {