ls-mcp 1.7.0 → 1.8.0

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 CHANGED
@@ -255,6 +255,18 @@ var MCPServerManagerService = class {
255
255
  estimatedProduct: "claude-desktop"
256
256
  };
257
257
  }
258
+ if (commandString.includes("cursor")) {
259
+ return {
260
+ estimatedVendor: "cursor",
261
+ estimatedProduct: "cursor"
262
+ };
263
+ }
264
+ if (commandString.includes("visual studio code") || commandString.includes("vscode")) {
265
+ return {
266
+ estimatedVendor: "vscode",
267
+ estimatedProduct: "vscode"
268
+ };
269
+ }
258
270
  }
259
271
  isCommandMatch(commandTokens, pid, ppid) {
260
272
  if (commandTokens.length === 0) return false;
@@ -741,7 +753,7 @@ function render7(text) {
741
753
  __name(render7, "render");
742
754
 
743
755
  // src/services/render-service.ts
744
- var RenderService = class {
756
+ var RenderService = class _RenderService {
745
757
  static {
746
758
  __name(this, "RenderService");
747
759
  }
@@ -761,7 +773,7 @@ var RenderService = class {
761
773
  const centerColumns = [0, 2, 3];
762
774
  const leftPadding = " ";
763
775
  const columnWidths = headers.map((header, index) => {
764
- const headerWidth = this.getVisibleLength(render2(header));
776
+ const headerWidth = _RenderService.getVisibleLength(render2(header));
765
777
  const dataWidth = Math.max(...data.map((row) => {
766
778
  let text = String(row[keys[index]]);
767
779
  if (keys[index] === "transport") {
@@ -776,19 +788,19 @@ var RenderService = class {
776
788
  if (keys[index] === "name") {
777
789
  text = render4(text);
778
790
  }
779
- return this.getVisibleLength(text);
791
+ return _RenderService.getVisibleLength(text);
780
792
  }));
781
793
  return Math.max(headerWidth, dataWidth);
782
794
  });
783
795
  const centerText = /* @__PURE__ */ __name((text, width) => {
784
- const visibleLength = this.getVisibleLength(text);
796
+ const visibleLength = _RenderService.getVisibleLength(text);
785
797
  const padding = width - visibleLength;
786
798
  const leftPad = Math.floor(padding / 2);
787
799
  const rightPad = padding - leftPad;
788
800
  return " ".repeat(leftPad) + text + " ".repeat(rightPad);
789
801
  }, "centerText");
790
802
  const padRight = /* @__PURE__ */ __name((text, width) => {
791
- const visibleLength = this.getVisibleLength(text);
803
+ const visibleLength = _RenderService.getVisibleLength(text);
792
804
  const padding = Math.max(0, width - visibleLength);
793
805
  return text + " ".repeat(padding);
794
806
  }, "padRight");
@@ -846,13 +858,13 @@ var RenderService = class {
846
858
  if (Object.keys(groupMetadata).length > 0) {
847
859
  const runningCount = groupMetadata.mcpServersRunning || 0;
848
860
  const totalCount = groupMetadata.mcpServersTotal || 0;
849
- const metadataRow = this.renderProgressBar(runningCount, totalCount, "Running");
861
+ const metadataRow = _RenderService.renderProgressBar(runningCount, totalCount, "Running");
850
862
  data.push({ key: "MCP SERVERS", value: metadataRow });
851
863
  }
852
864
  const columnWidths = headers.map((header, index) => {
853
865
  const dataWidth = Math.max(...data.map((row) => {
854
866
  const columnText = render2(row[keys[index]]);
855
- const columnTextLength = this.getVisibleLength(columnText);
867
+ const columnTextLength = _RenderService.getVisibleLength(columnText);
856
868
  return columnTextLength;
857
869
  }));
858
870
  return Math.max(header.length, dataWidth);
package/dist/bin/cli.mjs CHANGED
@@ -233,6 +233,18 @@ var MCPServerManagerService = class {
233
233
  estimatedProduct: "claude-desktop"
234
234
  };
235
235
  }
236
+ if (commandString.includes("cursor")) {
237
+ return {
238
+ estimatedVendor: "cursor",
239
+ estimatedProduct: "cursor"
240
+ };
241
+ }
242
+ if (commandString.includes("visual studio code") || commandString.includes("vscode")) {
243
+ return {
244
+ estimatedVendor: "vscode",
245
+ estimatedProduct: "vscode"
246
+ };
247
+ }
236
248
  }
237
249
  isCommandMatch(commandTokens, pid, ppid) {
238
250
  if (commandTokens.length === 0) return false;
@@ -719,7 +731,7 @@ function render7(text) {
719
731
  __name(render7, "render");
720
732
 
721
733
  // src/services/render-service.ts
722
- var RenderService = class {
734
+ var RenderService = class _RenderService {
723
735
  static {
724
736
  __name(this, "RenderService");
725
737
  }
@@ -739,7 +751,7 @@ var RenderService = class {
739
751
  const centerColumns = [0, 2, 3];
740
752
  const leftPadding = " ";
741
753
  const columnWidths = headers.map((header, index) => {
742
- const headerWidth = this.getVisibleLength(render2(header));
754
+ const headerWidth = _RenderService.getVisibleLength(render2(header));
743
755
  const dataWidth = Math.max(...data.map((row) => {
744
756
  let text = String(row[keys[index]]);
745
757
  if (keys[index] === "transport") {
@@ -754,19 +766,19 @@ var RenderService = class {
754
766
  if (keys[index] === "name") {
755
767
  text = render4(text);
756
768
  }
757
- return this.getVisibleLength(text);
769
+ return _RenderService.getVisibleLength(text);
758
770
  }));
759
771
  return Math.max(headerWidth, dataWidth);
760
772
  });
761
773
  const centerText = /* @__PURE__ */ __name((text, width) => {
762
- const visibleLength = this.getVisibleLength(text);
774
+ const visibleLength = _RenderService.getVisibleLength(text);
763
775
  const padding = width - visibleLength;
764
776
  const leftPad = Math.floor(padding / 2);
765
777
  const rightPad = padding - leftPad;
766
778
  return " ".repeat(leftPad) + text + " ".repeat(rightPad);
767
779
  }, "centerText");
768
780
  const padRight = /* @__PURE__ */ __name((text, width) => {
769
- const visibleLength = this.getVisibleLength(text);
781
+ const visibleLength = _RenderService.getVisibleLength(text);
770
782
  const padding = Math.max(0, width - visibleLength);
771
783
  return text + " ".repeat(padding);
772
784
  }, "padRight");
@@ -824,13 +836,13 @@ var RenderService = class {
824
836
  if (Object.keys(groupMetadata).length > 0) {
825
837
  const runningCount = groupMetadata.mcpServersRunning || 0;
826
838
  const totalCount = groupMetadata.mcpServersTotal || 0;
827
- const metadataRow = this.renderProgressBar(runningCount, totalCount, "Running");
839
+ const metadataRow = _RenderService.renderProgressBar(runningCount, totalCount, "Running");
828
840
  data.push({ key: "MCP SERVERS", value: metadataRow });
829
841
  }
830
842
  const columnWidths = headers.map((header, index) => {
831
843
  const dataWidth = Math.max(...data.map((row) => {
832
844
  const columnText = render2(row[keys[index]]);
833
- const columnTextLength = this.getVisibleLength(columnText);
845
+ const columnTextLength = _RenderService.getVisibleLength(columnText);
834
846
  return columnTextLength;
835
847
  }));
836
848
  return Math.max(header.length, dataWidth);
package/dist/main.cjs CHANGED
@@ -261,6 +261,18 @@ var MCPServerManagerService = class {
261
261
  estimatedProduct: "claude-desktop"
262
262
  };
263
263
  }
264
+ if (commandString.includes("cursor")) {
265
+ return {
266
+ estimatedVendor: "cursor",
267
+ estimatedProduct: "cursor"
268
+ };
269
+ }
270
+ if (commandString.includes("visual studio code") || commandString.includes("vscode")) {
271
+ return {
272
+ estimatedVendor: "vscode",
273
+ estimatedProduct: "vscode"
274
+ };
275
+ }
264
276
  }
265
277
  isCommandMatch(commandTokens, pid, ppid) {
266
278
  if (commandTokens.length === 0) return false;
package/dist/main.mjs CHANGED
@@ -229,6 +229,18 @@ var MCPServerManagerService = class {
229
229
  estimatedProduct: "claude-desktop"
230
230
  };
231
231
  }
232
+ if (commandString.includes("cursor")) {
233
+ return {
234
+ estimatedVendor: "cursor",
235
+ estimatedProduct: "cursor"
236
+ };
237
+ }
238
+ if (commandString.includes("visual studio code") || commandString.includes("vscode")) {
239
+ return {
240
+ estimatedVendor: "vscode",
241
+ estimatedProduct: "vscode"
242
+ };
243
+ }
232
244
  }
233
245
  isCommandMatch(commandTokens, pid, ppid) {
234
246
  if (commandTokens.length === 0) return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ls-mcp",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "description": "list and detect MCP servers and configurations",
5
5
  "types": "dist/main.d.ts",
6
6
  "type": "module",
@@ -213,6 +213,20 @@ export class MCPServerManagerService {
213
213
  estimatedProduct: 'claude-desktop'
214
214
  }
215
215
  }
216
+
217
+ if (commandString.includes('cursor')) {
218
+ return {
219
+ estimatedVendor: 'cursor',
220
+ estimatedProduct: 'cursor'
221
+ }
222
+ }
223
+
224
+ if (commandString.includes('visual studio code') || commandString.includes('vscode')) {
225
+ return {
226
+ estimatedVendor: 'vscode',
227
+ estimatedProduct: 'vscode'
228
+ }
229
+ }
216
230
  }
217
231
 
218
232
  private isCommandMatch (commandTokens: string[], pid: string, ppid: string): boolean {
@@ -35,7 +35,7 @@ export class RenderService {
35
35
 
36
36
  // Calculate column widths accounting for styled text
37
37
  const columnWidths = headers.map((header, index) => {
38
- const headerWidth = this.getVisibleLength(ColumnNameComponent(header))
38
+ const headerWidth = RenderService.getVisibleLength(ColumnNameComponent(header))
39
39
  const dataWidth = Math.max(...data.map(row => {
40
40
  let text = String(row[keys[index]])
41
41
 
@@ -56,14 +56,14 @@ export class RenderService {
56
56
  text = MCPServerNameComponent(text)
57
57
  }
58
58
 
59
- return this.getVisibleLength(text)
59
+ return RenderService.getVisibleLength(text)
60
60
  }))
61
61
  return Math.max(headerWidth, dataWidth)
62
62
  })
63
63
 
64
64
  // Helper function to center text in a given width
65
65
  const centerText = (text: string, width: number): string => {
66
- const visibleLength = this.getVisibleLength(text)
66
+ const visibleLength = RenderService.getVisibleLength(text)
67
67
  const padding = width - visibleLength
68
68
  const leftPad = Math.floor(padding / 2)
69
69
  const rightPad = padding - leftPad
@@ -72,7 +72,7 @@ export class RenderService {
72
72
 
73
73
  // Helper function to pad text to the right
74
74
  const padRight = (text: string, width: number): string => {
75
- const visibleLength = this.getVisibleLength(text)
75
+ const visibleLength = RenderService.getVisibleLength(text)
76
76
  const padding = Math.max(0, width - visibleLength)
77
77
  return text + ' '.repeat(padding)
78
78
  }
@@ -158,7 +158,7 @@ export class RenderService {
158
158
  if (Object.keys(groupMetadata).length > 0) {
159
159
  const runningCount = groupMetadata.mcpServersRunning || 0
160
160
  const totalCount = groupMetadata.mcpServersTotal || 0
161
- const metadataRow = this.renderProgressBar(runningCount, totalCount, 'Running')
161
+ const metadataRow = RenderService.renderProgressBar(runningCount, totalCount, 'Running')
162
162
  data.push({ key: 'MCP SERVERS', value: metadataRow })
163
163
  }
164
164
 
@@ -166,7 +166,7 @@ export class RenderService {
166
166
  const columnWidths = headers.map((header, index) => {
167
167
  const dataWidth = Math.max(...data.map(row => {
168
168
  const columnText = ColumnNameComponent(row[keys[index]])
169
- const columnTextLength = this.getVisibleLength(columnText)
169
+ const columnTextLength = RenderService.getVisibleLength(columnText)
170
170
  return columnTextLength
171
171
  }))
172
172
  return Math.max(header.length, dataWidth)