MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / parseWebSocketUrl

Function parseWebSocketUrl

src/settings/lspSettings.js:62–77  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

60}
61
62function parseWebSocketUrl(value) {
63 const normalized = String(value || "").trim();
64 if (!normalized) {
65 throw new Error(
66 strings["lsp-error-websocket-url-required"] ||
67 "WebSocket URL is required",
68 );
69 }
70 if (!/^wss?:\/\//i.test(normalized)) {
71 throw new Error(
72 strings["lsp-error-websocket-url-invalid"] ||
73 "WebSocket URL must start with ws:// or wss://",
74 );
75 }
76 return normalized;
77}
78
79function buildDefaultCheckCommand(binaryCommand, installer) {
80 const executable = String(

Callers 1

callbackFunction · 0.85

Calls 1

StringInterface · 0.85

Tested by

no test coverage detected