ls-mcp 1.6.1 → 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
@@ -123,10 +123,19 @@ var MCPServerManagerService = class {
123
123
  this.command = serverConfig.command;
124
124
  this.args = serverConfig.args || [];
125
125
  this.transport = serverConfig.transport || "stdio";
126
+ if (serverConfig?.type && serverConfig.type === "sse") {
127
+ this.transport = "sse";
128
+ }
129
+ if (serverConfig?.type && serverConfig.type === "http") {
130
+ this.transport = "http";
131
+ }
132
+ if (serverConfig?.type && serverConfig.type === "stdio") {
133
+ this.transport = "stdio";
134
+ }
126
135
  if (serverConfig.url) {
127
- this.source = "remote";
136
+ this.source = serverConfig.url;
128
137
  } else {
129
- this.source = "local";
138
+ this.source = this.getBaseCommand(serverConfig.command);
130
139
  }
131
140
  this.env = serverConfig.env || {};
132
141
  }
@@ -246,6 +255,18 @@ var MCPServerManagerService = class {
246
255
  estimatedProduct: "claude-desktop"
247
256
  };
248
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
+ }
249
270
  }
250
271
  isCommandMatch(commandTokens, pid, ppid) {
251
272
  if (commandTokens.length === 0) return false;
@@ -615,6 +636,7 @@ var MCPFiles = class {
615
636
  args: serverConfigRaw.args,
616
637
  url: serverConfigRaw.url,
617
638
  transport: serverConfigRaw.transport,
639
+ type: serverConfigRaw.type,
618
640
  env: serverConfigRaw.env
619
641
  };
620
642
  const MCPServerManager = new MCPServerManagerService(serverConfig);
@@ -660,6 +682,9 @@ function render(text) {
660
682
  if (formattedText === "SSE") {
661
683
  data = (0, import_node_util.styleText)(["blue"], formattedText);
662
684
  }
685
+ if (formattedText === "HTTP") {
686
+ data = (0, import_node_util.styleText)(["blue"], formattedText);
687
+ }
663
688
  return data;
664
689
  }
665
690
  __name(render, "render");
@@ -699,14 +724,8 @@ __name(render4, "render");
699
724
  // src/components/mcp-server-source.ts
700
725
  var import_node_util5 = require("util");
701
726
  function render5(text) {
702
- const formattedText = text.toUpperCase();
703
- if (formattedText === "LOCAL") {
704
- return (0, import_node_util5.styleText)(["gray"], formattedText);
705
- }
706
- if (formattedText === "REMOTE") {
707
- return (0, import_node_util5.styleText)(["blue"], formattedText);
708
- }
709
- return formattedText;
727
+ const formattedText = String(text).trim();
728
+ return (0, import_node_util5.styleText)(["gray"], formattedText);
710
729
  }
711
730
  __name(render5, "render");
712
731
 
@@ -734,7 +753,7 @@ function render7(text) {
734
753
  __name(render7, "render");
735
754
 
736
755
  // src/services/render-service.ts
737
- var RenderService = class {
756
+ var RenderService = class _RenderService {
738
757
  static {
739
758
  __name(this, "RenderService");
740
759
  }
@@ -754,7 +773,7 @@ var RenderService = class {
754
773
  const centerColumns = [0, 2, 3];
755
774
  const leftPadding = " ";
756
775
  const columnWidths = headers.map((header, index) => {
757
- const headerWidth = this.getVisibleLength(render2(header));
776
+ const headerWidth = _RenderService.getVisibleLength(render2(header));
758
777
  const dataWidth = Math.max(...data.map((row) => {
759
778
  let text = String(row[keys[index]]);
760
779
  if (keys[index] === "transport") {
@@ -769,19 +788,19 @@ var RenderService = class {
769
788
  if (keys[index] === "name") {
770
789
  text = render4(text);
771
790
  }
772
- return this.getVisibleLength(text);
791
+ return _RenderService.getVisibleLength(text);
773
792
  }));
774
793
  return Math.max(headerWidth, dataWidth);
775
794
  });
776
795
  const centerText = /* @__PURE__ */ __name((text, width) => {
777
- const visibleLength = this.getVisibleLength(text);
796
+ const visibleLength = _RenderService.getVisibleLength(text);
778
797
  const padding = width - visibleLength;
779
798
  const leftPad = Math.floor(padding / 2);
780
799
  const rightPad = padding - leftPad;
781
800
  return " ".repeat(leftPad) + text + " ".repeat(rightPad);
782
801
  }, "centerText");
783
802
  const padRight = /* @__PURE__ */ __name((text, width) => {
784
- const visibleLength = this.getVisibleLength(text);
803
+ const visibleLength = _RenderService.getVisibleLength(text);
785
804
  const padding = Math.max(0, width - visibleLength);
786
805
  return text + " ".repeat(padding);
787
806
  }, "padRight");
@@ -839,13 +858,13 @@ var RenderService = class {
839
858
  if (Object.keys(groupMetadata).length > 0) {
840
859
  const runningCount = groupMetadata.mcpServersRunning || 0;
841
860
  const totalCount = groupMetadata.mcpServersTotal || 0;
842
- const metadataRow = this.renderProgressBar(runningCount, totalCount, "Running");
861
+ const metadataRow = _RenderService.renderProgressBar(runningCount, totalCount, "Running");
843
862
  data.push({ key: "MCP SERVERS", value: metadataRow });
844
863
  }
845
864
  const columnWidths = headers.map((header, index) => {
846
865
  const dataWidth = Math.max(...data.map((row) => {
847
866
  const columnText = render2(row[keys[index]]);
848
- const columnTextLength = this.getVisibleLength(columnText);
867
+ const columnTextLength = _RenderService.getVisibleLength(columnText);
849
868
  return columnTextLength;
850
869
  }));
851
870
  return Math.max(header.length, dataWidth);
package/dist/bin/cli.mjs CHANGED
@@ -101,10 +101,19 @@ var MCPServerManagerService = class {
101
101
  this.command = serverConfig.command;
102
102
  this.args = serverConfig.args || [];
103
103
  this.transport = serverConfig.transport || "stdio";
104
+ if (serverConfig?.type && serverConfig.type === "sse") {
105
+ this.transport = "sse";
106
+ }
107
+ if (serverConfig?.type && serverConfig.type === "http") {
108
+ this.transport = "http";
109
+ }
110
+ if (serverConfig?.type && serverConfig.type === "stdio") {
111
+ this.transport = "stdio";
112
+ }
104
113
  if (serverConfig.url) {
105
- this.source = "remote";
114
+ this.source = serverConfig.url;
106
115
  } else {
107
- this.source = "local";
116
+ this.source = this.getBaseCommand(serverConfig.command);
108
117
  }
109
118
  this.env = serverConfig.env || {};
110
119
  }
@@ -224,6 +233,18 @@ var MCPServerManagerService = class {
224
233
  estimatedProduct: "claude-desktop"
225
234
  };
226
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
+ }
227
248
  }
228
249
  isCommandMatch(commandTokens, pid, ppid) {
229
250
  if (commandTokens.length === 0) return false;
@@ -593,6 +614,7 @@ var MCPFiles = class {
593
614
  args: serverConfigRaw.args,
594
615
  url: serverConfigRaw.url,
595
616
  transport: serverConfigRaw.transport,
617
+ type: serverConfigRaw.type,
596
618
  env: serverConfigRaw.env
597
619
  };
598
620
  const MCPServerManager = new MCPServerManagerService(serverConfig);
@@ -638,6 +660,9 @@ function render(text) {
638
660
  if (formattedText === "SSE") {
639
661
  data = styleText(["blue"], formattedText);
640
662
  }
663
+ if (formattedText === "HTTP") {
664
+ data = styleText(["blue"], formattedText);
665
+ }
641
666
  return data;
642
667
  }
643
668
  __name(render, "render");
@@ -677,14 +702,8 @@ __name(render4, "render");
677
702
  // src/components/mcp-server-source.ts
678
703
  import { styleText as styleText5 } from "util";
679
704
  function render5(text) {
680
- const formattedText = text.toUpperCase();
681
- if (formattedText === "LOCAL") {
682
- return styleText5(["gray"], formattedText);
683
- }
684
- if (formattedText === "REMOTE") {
685
- return styleText5(["blue"], formattedText);
686
- }
687
- return formattedText;
705
+ const formattedText = String(text).trim();
706
+ return styleText5(["gray"], formattedText);
688
707
  }
689
708
  __name(render5, "render");
690
709
 
@@ -712,7 +731,7 @@ function render7(text) {
712
731
  __name(render7, "render");
713
732
 
714
733
  // src/services/render-service.ts
715
- var RenderService = class {
734
+ var RenderService = class _RenderService {
716
735
  static {
717
736
  __name(this, "RenderService");
718
737
  }
@@ -732,7 +751,7 @@ var RenderService = class {
732
751
  const centerColumns = [0, 2, 3];
733
752
  const leftPadding = " ";
734
753
  const columnWidths = headers.map((header, index) => {
735
- const headerWidth = this.getVisibleLength(render2(header));
754
+ const headerWidth = _RenderService.getVisibleLength(render2(header));
736
755
  const dataWidth = Math.max(...data.map((row) => {
737
756
  let text = String(row[keys[index]]);
738
757
  if (keys[index] === "transport") {
@@ -747,19 +766,19 @@ var RenderService = class {
747
766
  if (keys[index] === "name") {
748
767
  text = render4(text);
749
768
  }
750
- return this.getVisibleLength(text);
769
+ return _RenderService.getVisibleLength(text);
751
770
  }));
752
771
  return Math.max(headerWidth, dataWidth);
753
772
  });
754
773
  const centerText = /* @__PURE__ */ __name((text, width) => {
755
- const visibleLength = this.getVisibleLength(text);
774
+ const visibleLength = _RenderService.getVisibleLength(text);
756
775
  const padding = width - visibleLength;
757
776
  const leftPad = Math.floor(padding / 2);
758
777
  const rightPad = padding - leftPad;
759
778
  return " ".repeat(leftPad) + text + " ".repeat(rightPad);
760
779
  }, "centerText");
761
780
  const padRight = /* @__PURE__ */ __name((text, width) => {
762
- const visibleLength = this.getVisibleLength(text);
781
+ const visibleLength = _RenderService.getVisibleLength(text);
763
782
  const padding = Math.max(0, width - visibleLength);
764
783
  return text + " ".repeat(padding);
765
784
  }, "padRight");
@@ -817,13 +836,13 @@ var RenderService = class {
817
836
  if (Object.keys(groupMetadata).length > 0) {
818
837
  const runningCount = groupMetadata.mcpServersRunning || 0;
819
838
  const totalCount = groupMetadata.mcpServersTotal || 0;
820
- const metadataRow = this.renderProgressBar(runningCount, totalCount, "Running");
839
+ const metadataRow = _RenderService.renderProgressBar(runningCount, totalCount, "Running");
821
840
  data.push({ key: "MCP SERVERS", value: metadataRow });
822
841
  }
823
842
  const columnWidths = headers.map((header, index) => {
824
843
  const dataWidth = Math.max(...data.map((row) => {
825
844
  const columnText = render2(row[keys[index]]);
826
- const columnTextLength = this.getVisibleLength(columnText);
845
+ const columnTextLength = _RenderService.getVisibleLength(columnText);
827
846
  return columnTextLength;
828
847
  }));
829
848
  return Math.max(header.length, dataWidth);
package/dist/main.cjs CHANGED
@@ -129,10 +129,19 @@ var MCPServerManagerService = class {
129
129
  this.command = serverConfig.command;
130
130
  this.args = serverConfig.args || [];
131
131
  this.transport = serverConfig.transport || "stdio";
132
+ if (serverConfig?.type && serverConfig.type === "sse") {
133
+ this.transport = "sse";
134
+ }
135
+ if (serverConfig?.type && serverConfig.type === "http") {
136
+ this.transport = "http";
137
+ }
138
+ if (serverConfig?.type && serverConfig.type === "stdio") {
139
+ this.transport = "stdio";
140
+ }
132
141
  if (serverConfig.url) {
133
- this.source = "remote";
142
+ this.source = serverConfig.url;
134
143
  } else {
135
- this.source = "local";
144
+ this.source = this.getBaseCommand(serverConfig.command);
136
145
  }
137
146
  this.env = serverConfig.env || {};
138
147
  }
@@ -252,6 +261,18 @@ var MCPServerManagerService = class {
252
261
  estimatedProduct: "claude-desktop"
253
262
  };
254
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
+ }
255
276
  }
256
277
  isCommandMatch(commandTokens, pid, ppid) {
257
278
  if (commandTokens.length === 0) return false;
@@ -621,6 +642,7 @@ var MCPFiles = class {
621
642
  args: serverConfigRaw.args,
622
643
  url: serverConfigRaw.url,
623
644
  transport: serverConfigRaw.transport,
645
+ type: serverConfigRaw.type,
624
646
  env: serverConfigRaw.env
625
647
  };
626
648
  const MCPServerManager = new MCPServerManagerService(serverConfig);
package/dist/main.d.cts CHANGED
@@ -3,7 +3,8 @@ interface MCPServerInfo {
3
3
  command: string;
4
4
  args?: string[];
5
5
  transport?: 'stdio' | 'sse' | 'http';
6
- source?: 'local' | 'remote';
6
+ type?: 'sse' | 'http' | 'stdio';
7
+ source?: string;
7
8
  env?: Record<string, string>;
8
9
  status?: 'running' | 'stopped';
9
10
  }
package/dist/main.d.ts CHANGED
@@ -3,7 +3,8 @@ interface MCPServerInfo {
3
3
  command: string;
4
4
  args?: string[];
5
5
  transport?: 'stdio' | 'sse' | 'http';
6
- source?: 'local' | 'remote';
6
+ type?: 'sse' | 'http' | 'stdio';
7
+ source?: string;
7
8
  env?: Record<string, string>;
8
9
  status?: 'running' | 'stopped';
9
10
  }
package/dist/main.mjs CHANGED
@@ -97,10 +97,19 @@ var MCPServerManagerService = class {
97
97
  this.command = serverConfig.command;
98
98
  this.args = serverConfig.args || [];
99
99
  this.transport = serverConfig.transport || "stdio";
100
+ if (serverConfig?.type && serverConfig.type === "sse") {
101
+ this.transport = "sse";
102
+ }
103
+ if (serverConfig?.type && serverConfig.type === "http") {
104
+ this.transport = "http";
105
+ }
106
+ if (serverConfig?.type && serverConfig.type === "stdio") {
107
+ this.transport = "stdio";
108
+ }
100
109
  if (serverConfig.url) {
101
- this.source = "remote";
110
+ this.source = serverConfig.url;
102
111
  } else {
103
- this.source = "local";
112
+ this.source = this.getBaseCommand(serverConfig.command);
104
113
  }
105
114
  this.env = serverConfig.env || {};
106
115
  }
@@ -220,6 +229,18 @@ var MCPServerManagerService = class {
220
229
  estimatedProduct: "claude-desktop"
221
230
  };
222
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
+ }
223
244
  }
224
245
  isCommandMatch(commandTokens, pid, ppid) {
225
246
  if (commandTokens.length === 0) return false;
@@ -589,6 +610,7 @@ var MCPFiles = class {
589
610
  args: serverConfigRaw.args,
590
611
  url: serverConfigRaw.url,
591
612
  transport: serverConfigRaw.transport,
613
+ type: serverConfigRaw.type,
592
614
  env: serverConfigRaw.env
593
615
  };
594
616
  const MCPServerManager = new MCPServerManagerService(serverConfig);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ls-mcp",
3
- "version": "1.6.1",
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",
package/src/bin/cli.ts CHANGED
@@ -10,7 +10,8 @@ interface MCPServerInfo {
10
10
  command: string
11
11
  args?: string[]
12
12
  transport?: 'stdio' | 'sse' | 'http'
13
- source?: 'local' | 'remote'
13
+ type?: 'sse' | 'http' | 'stdio'
14
+ source?: string
14
15
  env?: Record<string, string>
15
16
  status?: 'running' | 'stopped'
16
17
  }
@@ -1,15 +1,7 @@
1
1
  import { styleText } from 'node:util'
2
2
 
3
3
  export default function render (text: string) {
4
- const formattedText = text.toUpperCase()
4
+ const formattedText = String(text).trim()
5
5
 
6
- if (formattedText === 'LOCAL') {
7
- return styleText(['gray'], formattedText)
8
- }
9
-
10
- if (formattedText === 'REMOTE') {
11
- return styleText(['blue'], formattedText)
12
- }
13
-
14
- return formattedText
6
+ return styleText(['gray'], formattedText)
15
7
  }
@@ -3,6 +3,7 @@ import { styleText } from 'node:util'
3
3
  export default function render (text: string) {
4
4
  const formattedText = text.toUpperCase()
5
5
  let data = ''
6
+
6
7
  if (formattedText === 'STDIO') {
7
8
  data = styleText(['magenta'], formattedText)
8
9
  }
@@ -11,5 +12,9 @@ export default function render (text: string) {
11
12
  data = styleText(['blue'], formattedText)
12
13
  }
13
14
 
15
+ if (formattedText === 'HTTP') {
16
+ data = styleText(['blue'], formattedText)
17
+ }
18
+
14
19
  return data
15
20
  }
package/src/main.ts CHANGED
@@ -9,7 +9,8 @@ interface MCPServerInfo {
9
9
  command: string
10
10
  args?: string[]
11
11
  transport?: 'stdio' | 'sse' | 'http',
12
- source?: 'local' | 'remote'
12
+ type?: 'sse' | 'http' | 'stdio'
13
+ source?: string
13
14
  env?: Record<string, string>
14
15
  status?: 'running' | 'stopped'
15
16
  }
@@ -191,6 +192,7 @@ export class MCPFiles {
191
192
  args: serverConfigRaw.args,
192
193
  url: serverConfigRaw.url,
193
194
  transport: serverConfigRaw.transport,
195
+ type: serverConfigRaw.type,
194
196
  env: serverConfigRaw.env
195
197
  }
196
198
  const MCPServerManager = new MCPServerManagerService(serverConfig)
@@ -8,6 +8,7 @@ interface MCPServerConfig {
8
8
  args?: string[]
9
9
  transport?: 'stdio' | 'sse'
10
10
  url?: string
11
+ type?: 'sse' | 'http' | 'stdio'
11
12
  env?: Record<string, string>
12
13
  }
13
14
 
@@ -24,8 +25,8 @@ export class MCPServerManagerService {
24
25
  private name: string
25
26
  private command: string
26
27
  private args: string[]
27
- private transport?: 'stdio' | 'sse'
28
- private source?: 'local' | 'remote'
28
+ private transport?: 'stdio' | 'sse' | 'http'
29
+ private source?: string
29
30
  private env?: Record<string, string>
30
31
  private running: boolean = false
31
32
 
@@ -34,10 +35,20 @@ export class MCPServerManagerService {
34
35
  this.command = serverConfig.command
35
36
  this.args = serverConfig.args || []
36
37
  this.transport = serverConfig.transport || 'stdio'
38
+ if (serverConfig?.type && serverConfig.type === 'sse') {
39
+ this.transport = 'sse'
40
+ }
41
+ if (serverConfig?.type && serverConfig.type === 'http') {
42
+ this.transport = 'http'
43
+ }
44
+ if (serverConfig?.type && serverConfig.type === 'stdio') {
45
+ this.transport = 'stdio'
46
+ }
47
+
37
48
  if (serverConfig.url) {
38
- this.source = 'remote'
49
+ this.source = serverConfig.url
39
50
  } else {
40
- this.source = 'local'
51
+ this.source = this.getBaseCommand(serverConfig.command)
41
52
  }
42
53
  this.env = serverConfig.env || {}
43
54
  }
@@ -58,7 +69,7 @@ export class MCPServerManagerService {
58
69
  return this.transport
59
70
  }
60
71
 
61
- getSource (): 'local' | 'remote' | undefined {
72
+ getSource (): string | undefined {
62
73
  return this.source
63
74
  }
64
75
 
@@ -202,6 +213,20 @@ export class MCPServerManagerService {
202
213
  estimatedProduct: 'claude-desktop'
203
214
  }
204
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
+ }
205
230
  }
206
231
 
207
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)