()
| 16 | } |
| 17 | |
| 18 | export function retrieveDotEnvCfg(): Record<string, string> { |
| 19 | // eslint-disable-next-line @typescript-eslint/no-var-requires |
| 20 | const env = require('dotenv').config().parsed ?? {} |
| 21 | |
| 22 | const keys = Object.keys(env) |
| 23 | const reactKeys = keys.filter(key => { |
| 24 | return key.startsWith(Cfg.PREFIX) || key === 'PUBLIC_URL' |
| 25 | }) |
| 26 | |
| 27 | const envCfg: Record<string, string> = {} |
| 28 | for (const key of reactKeys) { |
| 29 | // @ts-ignore |
| 30 | envCfg[key] = process.env[key] |
| 31 | } |
| 32 | return envCfg |
| 33 | } |
no outgoing calls
no test coverage detected