( base: 'DATABASE_URL' | 'DATABASE_REPLICA_URL', role: string )
| 5 | * env alone; unset keyed vars preserve the prior single-URL behavior. |
| 6 | */ |
| 7 | export function resolveDbUrl( |
| 8 | base: 'DATABASE_URL' | 'DATABASE_REPLICA_URL', |
| 9 | role: string |
| 10 | ): string | undefined { |
| 11 | return process.env[`${base}_${role.toUpperCase()}`] ?? process.env[base] |
| 12 | } |
no outgoing calls
no test coverage detected