(host: string = resolveHost())
| 49 | } |
| 50 | |
| 51 | export function resolveVisAuthToken(host: string = resolveHost()): string | undefined { |
| 52 | const raw = process.env['VIS_AUTH_TOKEN']; |
| 53 | const token = raw?.trim(); |
| 54 | if (token !== undefined && token.length > 0) return token; |
| 55 | if (!isLoopbackHost(host)) { |
| 56 | throw new Error( |
| 57 | `VIS_AUTH_TOKEN is required when binding vis-server outside loopback (host=${host})`, |
| 58 | ); |
| 59 | } |
| 60 | return undefined; |
| 61 | } |
| 62 | |
| 63 | export const KIMI_CODE_HOME: string = resolveKimiCodeHome(); |
no test coverage detected