()
| 79 | export const MIN_SERVER_VERSION = '2.2.2'; |
| 80 | |
| 81 | export async function getApiBaseUrl(): Promise<string> { |
| 82 | try { |
| 83 | const url = await discoverBackendPort(); |
| 84 | api.defaults.baseURL = url; |
| 85 | return url; |
| 86 | } catch { |
| 87 | return api.defaults.baseURL || envApiUrl || 'http://127.0.0.1:1920/api'; |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | function compareVersions(current: string, minimum: string): boolean { |
| 92 | const c = current.split('.').map(Number); |
no test coverage detected