(values: Record<string, string>)
| 181 | } |
| 182 | |
| 183 | export const validateEnvValues = (values: Record<string, string>): EnvValidationIssue[] => { |
| 184 | const issues: EnvValidationIssue[] = [] |
| 185 | |
| 186 | for (const [key, value] of Object.entries(values)) { |
| 187 | const issue = validateEnvPair(key, value) |
| 188 | if (!issue) { |
| 189 | continue |
| 190 | } |
| 191 | |
| 192 | issues.push({ |
| 193 | path: key, |
| 194 | message: issue, |
| 195 | }) |
| 196 | } |
| 197 | |
| 198 | return issues |
| 199 | } |
| 200 | |
| 201 | export const isSecretEnvKey = (key: string): boolean => { |
| 202 | return SECRET_KEY_REGEX.test(key) |
no test coverage detected