skilluse 0.1.7 → 0.1.8
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/cli.js +17 -7
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -64729,7 +64729,11 @@ function StatusMessage({ type, children }) {
|
|
|
64729
64729
|
}
|
|
64730
64730
|
// src/components/Table.tsx
|
|
64731
64731
|
var jsx_dev_runtime6 = __toESM(require_jsx_dev_runtime(), 1);
|
|
64732
|
-
function Table({
|
|
64732
|
+
function Table({
|
|
64733
|
+
data,
|
|
64734
|
+
columns,
|
|
64735
|
+
maxColWidth = 30
|
|
64736
|
+
}) {
|
|
64733
64737
|
if (data.length === 0) {
|
|
64734
64738
|
return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
64735
64739
|
dimColor: true,
|
|
@@ -64744,11 +64748,17 @@ function Table({ data, columns }) {
|
|
|
64744
64748
|
const width = value == null ? 0 : String(value).length;
|
|
64745
64749
|
return Math.max(max, width);
|
|
64746
64750
|
}, 0);
|
|
64747
|
-
return Math.max(headerWidth, maxDataWidth);
|
|
64751
|
+
return Math.min(Math.max(headerWidth, maxDataWidth), maxColWidth);
|
|
64748
64752
|
});
|
|
64753
|
+
const truncate = (str, maxLen) => {
|
|
64754
|
+
if (str.length <= maxLen)
|
|
64755
|
+
return str;
|
|
64756
|
+
return `${str.slice(0, maxLen - 2)}..`;
|
|
64757
|
+
};
|
|
64749
64758
|
const renderCell = (value, width, isHeader = false) => {
|
|
64750
64759
|
const str = value == null ? "" : String(value);
|
|
64751
|
-
const
|
|
64760
|
+
const truncated = truncate(str, width);
|
|
64761
|
+
const padded = truncated.padEnd(width);
|
|
64752
64762
|
return isHeader ? /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
64753
64763
|
bold: true,
|
|
64754
64764
|
children: padded
|
|
@@ -64758,7 +64768,7 @@ function Table({ data, columns }) {
|
|
|
64758
64768
|
};
|
|
64759
64769
|
const separator = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
|
|
64760
64770
|
children: /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
64761
|
-
children: widths.map((w, i) => "
|
|
64771
|
+
children: widths.map((w, i) => "-".repeat(w) + (i < widths.length - 1 ? "-+-" : "")).join("")
|
|
64762
64772
|
}, undefined, false, undefined, this)
|
|
64763
64773
|
}, undefined, false, undefined, this);
|
|
64764
64774
|
return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
|
|
@@ -64769,7 +64779,7 @@ function Table({ data, columns }) {
|
|
|
64769
64779
|
children: [
|
|
64770
64780
|
renderCell(String(col), widths[i], true),
|
|
64771
64781
|
i < cols.length - 1 && /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
64772
|
-
children: "
|
|
64782
|
+
children: " | "
|
|
64773
64783
|
}, undefined, false, undefined, this)
|
|
64774
64784
|
]
|
|
64775
64785
|
}, String(col), true, undefined, this))
|
|
@@ -64780,7 +64790,7 @@ function Table({ data, columns }) {
|
|
|
64780
64790
|
children: [
|
|
64781
64791
|
renderCell(row[col], widths[i]),
|
|
64782
64792
|
i < cols.length - 1 && /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
64783
|
-
children: "
|
|
64793
|
+
children: " | "
|
|
64784
64794
|
}, undefined, false, undefined, this)
|
|
64785
64795
|
]
|
|
64786
64796
|
}, String(col), true, undefined, this))
|
|
@@ -70415,7 +70425,7 @@ function Upgrade({ args: [skillName] }) {
|
|
|
70415
70425
|
// package.json
|
|
70416
70426
|
var package_default = {
|
|
70417
70427
|
name: "skilluse",
|
|
70418
|
-
version: "0.1.
|
|
70428
|
+
version: "0.1.8",
|
|
70419
70429
|
description: "CLI tool for managing and installing AI Coding Agent Skills",
|
|
70420
70430
|
main: "dist/cli.js",
|
|
70421
70431
|
bin: {
|