()
| 40 | } |
| 41 | |
| 42 | export function getNoumenaPlatformWebSocketBaseUrl(): string { |
| 43 | const baseUrl = getNoumenaPlatformBaseUrl() |
| 44 | if (baseUrl.startsWith('https://')) { |
| 45 | return `wss://${baseUrl.slice('https://'.length)}` |
| 46 | } |
| 47 | if (baseUrl.startsWith('http://')) { |
| 48 | return `ws://${baseUrl.slice('http://'.length)}` |
| 49 | } |
| 50 | return baseUrl |
| 51 | } |
| 52 | |
| 53 | export function buildNoumenaPlatformUrl(path: string): string { |
| 54 | const normalizedPath = path.startsWith('/') ? path.slice(1) : path |
no test coverage detected