ls-mcp 1.13.0 → 1.13.1
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/bin/cli.cjs +9 -5
- package/dist/bin/cli.mjs +9 -5
- package/package.json +1 -1
- package/src/components/summary.ts +10 -5
package/dist/bin/cli.cjs
CHANGED
|
@@ -1810,9 +1810,9 @@ __name(getSourceIcon, "getSourceIcon");
|
|
|
1810
1810
|
var import_node_util11 = require("util");
|
|
1811
1811
|
function SummaryComponent(stats) {
|
|
1812
1812
|
const { totalServers, runningServers, highRiskCredentials, implicitLatestVersions, transportBreakdown } = stats;
|
|
1813
|
-
const runningBar = createProgressBar(runningServers, totalServers, 20, "green");
|
|
1814
|
-
const securityBar = createProgressBar(highRiskCredentials, totalServers, 20, "red");
|
|
1815
|
-
const versionBar = createProgressBar(implicitLatestVersions, totalServers, 20, "red");
|
|
1813
|
+
const runningBar = createProgressBar(runningServers, totalServers, 20, "green", false);
|
|
1814
|
+
const securityBar = createProgressBar(highRiskCredentials, totalServers, 20, "red", true);
|
|
1815
|
+
const versionBar = createProgressBar(implicitLatestVersions, totalServers, 20, "red", true);
|
|
1816
1816
|
const transportText = `stdio: ${transportBreakdown.stdio} | SSE: ${transportBreakdown.sse} | HTTP: ${transportBreakdown.http}`;
|
|
1817
1817
|
const lines = [
|
|
1818
1818
|
"SUMMARY",
|
|
@@ -1824,7 +1824,7 @@ function SummaryComponent(stats) {
|
|
|
1824
1824
|
return lines.join("\n");
|
|
1825
1825
|
}
|
|
1826
1826
|
__name(SummaryComponent, "SummaryComponent");
|
|
1827
|
-
function createProgressBar(count, total, width, color) {
|
|
1827
|
+
function createProgressBar(count, total, width, color, emptyIsGood = false) {
|
|
1828
1828
|
if (total === 0) {
|
|
1829
1829
|
const emptyBar = "\u2591".repeat(width);
|
|
1830
1830
|
return emptyBar;
|
|
@@ -1839,7 +1839,11 @@ function createProgressBar(count, total, width, color) {
|
|
|
1839
1839
|
empty = (0, import_node_util11.styleText)(["green"], "\u2591".repeat(emptyWidth));
|
|
1840
1840
|
} else {
|
|
1841
1841
|
filled = (0, import_node_util11.styleText)(["redBright"], "\u2588".repeat(filledWidth));
|
|
1842
|
-
|
|
1842
|
+
if (count === 0 && emptyIsGood) {
|
|
1843
|
+
empty = (0, import_node_util11.styleText)(["green"], "\u2591".repeat(emptyWidth));
|
|
1844
|
+
} else {
|
|
1845
|
+
empty = (0, import_node_util11.styleText)(["red"], "\u2591".repeat(emptyWidth));
|
|
1846
|
+
}
|
|
1843
1847
|
}
|
|
1844
1848
|
return `${filled}${empty}`;
|
|
1845
1849
|
}
|
package/dist/bin/cli.mjs
CHANGED
|
@@ -1788,9 +1788,9 @@ __name(getSourceIcon, "getSourceIcon");
|
|
|
1788
1788
|
import { styleText as styleText10 } from "util";
|
|
1789
1789
|
function SummaryComponent(stats) {
|
|
1790
1790
|
const { totalServers, runningServers, highRiskCredentials, implicitLatestVersions, transportBreakdown } = stats;
|
|
1791
|
-
const runningBar = createProgressBar(runningServers, totalServers, 20, "green");
|
|
1792
|
-
const securityBar = createProgressBar(highRiskCredentials, totalServers, 20, "red");
|
|
1793
|
-
const versionBar = createProgressBar(implicitLatestVersions, totalServers, 20, "red");
|
|
1791
|
+
const runningBar = createProgressBar(runningServers, totalServers, 20, "green", false);
|
|
1792
|
+
const securityBar = createProgressBar(highRiskCredentials, totalServers, 20, "red", true);
|
|
1793
|
+
const versionBar = createProgressBar(implicitLatestVersions, totalServers, 20, "red", true);
|
|
1794
1794
|
const transportText = `stdio: ${transportBreakdown.stdio} | SSE: ${transportBreakdown.sse} | HTTP: ${transportBreakdown.http}`;
|
|
1795
1795
|
const lines = [
|
|
1796
1796
|
"SUMMARY",
|
|
@@ -1802,7 +1802,7 @@ function SummaryComponent(stats) {
|
|
|
1802
1802
|
return lines.join("\n");
|
|
1803
1803
|
}
|
|
1804
1804
|
__name(SummaryComponent, "SummaryComponent");
|
|
1805
|
-
function createProgressBar(count, total, width, color) {
|
|
1805
|
+
function createProgressBar(count, total, width, color, emptyIsGood = false) {
|
|
1806
1806
|
if (total === 0) {
|
|
1807
1807
|
const emptyBar = "\u2591".repeat(width);
|
|
1808
1808
|
return emptyBar;
|
|
@@ -1817,7 +1817,11 @@ function createProgressBar(count, total, width, color) {
|
|
|
1817
1817
|
empty = styleText10(["green"], "\u2591".repeat(emptyWidth));
|
|
1818
1818
|
} else {
|
|
1819
1819
|
filled = styleText10(["redBright"], "\u2588".repeat(filledWidth));
|
|
1820
|
-
|
|
1820
|
+
if (count === 0 && emptyIsGood) {
|
|
1821
|
+
empty = styleText10(["green"], "\u2591".repeat(emptyWidth));
|
|
1822
|
+
} else {
|
|
1823
|
+
empty = styleText10(["red"], "\u2591".repeat(emptyWidth));
|
|
1824
|
+
}
|
|
1821
1825
|
}
|
|
1822
1826
|
return `${filled}${empty}`;
|
|
1823
1827
|
}
|
package/package.json
CHANGED
|
@@ -16,9 +16,9 @@ export default function SummaryComponent (stats: SummaryStats): string {
|
|
|
16
16
|
const { totalServers, runningServers, highRiskCredentials, implicitLatestVersions, transportBreakdown } = stats
|
|
17
17
|
|
|
18
18
|
// Create progress bars (20 characters wide, following existing convention)
|
|
19
|
-
const runningBar = createProgressBar(runningServers, totalServers, 20, 'green')
|
|
20
|
-
const securityBar = createProgressBar(highRiskCredentials, totalServers, 20, 'red')
|
|
21
|
-
const versionBar = createProgressBar(implicitLatestVersions, totalServers, 20, 'red')
|
|
19
|
+
const runningBar = createProgressBar(runningServers, totalServers, 20, 'green', false)
|
|
20
|
+
const securityBar = createProgressBar(highRiskCredentials, totalServers, 20, 'red', true)
|
|
21
|
+
const versionBar = createProgressBar(implicitLatestVersions, totalServers, 20, 'red', true)
|
|
22
22
|
|
|
23
23
|
// Format transport breakdown
|
|
24
24
|
const transportText = `stdio: ${transportBreakdown.stdio} | SSE: ${transportBreakdown.sse} | HTTP: ${transportBreakdown.http}`
|
|
@@ -35,7 +35,7 @@ export default function SummaryComponent (stats: SummaryStats): string {
|
|
|
35
35
|
return lines.join('\n')
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
function createProgressBar (count: number, total: number, width: number, color: 'green' | 'red'): string {
|
|
38
|
+
function createProgressBar (count: number, total: number, width: number, color: 'green' | 'red', emptyIsGood: boolean = false): string {
|
|
39
39
|
if (total === 0) {
|
|
40
40
|
const emptyBar = '░'.repeat(width)
|
|
41
41
|
return emptyBar
|
|
@@ -53,7 +53,12 @@ function createProgressBar (count: number, total: number, width: number, color:
|
|
|
53
53
|
empty = styleText(['green'], '░'.repeat(emptyWidth))
|
|
54
54
|
} else { // red
|
|
55
55
|
filled = styleText(['redBright'], '█'.repeat(filledWidth))
|
|
56
|
-
empty
|
|
56
|
+
// If count is 0 and emptyIsGood is true, use green for empty sections (0 issues is good)
|
|
57
|
+
if (count === 0 && emptyIsGood) {
|
|
58
|
+
empty = styleText(['green'], '░'.repeat(emptyWidth))
|
|
59
|
+
} else {
|
|
60
|
+
empty = styleText(['red'], '░'.repeat(emptyWidth))
|
|
61
|
+
}
|
|
57
62
|
}
|
|
58
63
|
|
|
59
64
|
return `${filled}${empty}`
|