(key: string, value: string)
| 135 | } |
| 136 | |
| 137 | export const validateEnvPair = (key: string, value: string): string | undefined => { |
| 138 | if (!isSupportedEnvKey(key)) { |
| 139 | return `${key} is not a supported environment setting` |
| 140 | } |
| 141 | |
| 142 | if (INTEGER_KEYS.has(key) || RR_INTEGER_KEY_REGEX.test(key)) { |
| 143 | return validateInteger(key, value) |
| 144 | } |
| 145 | |
| 146 | if (BOOLEAN_KEYS.has(key)) { |
| 147 | return validateBoolean(key, value) |
| 148 | } |
| 149 | |
| 150 | return undefined |
| 151 | } |
| 152 | |
| 153 | export const readEnvValues = (): Record<string, string> => { |
| 154 | const { parsed } = parseEnvFile() |
no test coverage detected