(flag: string | undefined, env: NodeJS.ProcessEnv)
| 517 | } |
| 518 | |
| 519 | function resolveApiKey(flag: string | undefined, env: NodeJS.ProcessEnv): string | undefined { |
| 520 | if (typeof flag === 'string' && flag.length > 0) return flag; |
| 521 | const fromEnv = env['KIMI_REGISTRY_API_KEY']; |
| 522 | if (typeof fromEnv === 'string' && fromEnv.length > 0) return fromEnv; |
| 523 | return undefined; |
| 524 | } |
| 525 | |
| 526 | function asManaged(config: KimiConfig): ManagedKimiConfigShape { |
| 527 | return config as unknown as ManagedKimiConfigShape; |
no outgoing calls
no test coverage detected