(env: Env)
| 568 | ]; |
| 569 | |
| 570 | const checkPlaceholderSecrets = (env: Env): string[] => { |
| 571 | if (env.NODE_ENV !== "production") { |
| 572 | return []; |
| 573 | } |
| 574 | |
| 575 | return PLACEHOLDER_SECRET_FIELDS.flatMap(({ name, generator }) => { |
| 576 | const value = env[name]; |
| 577 | |
| 578 | if (typeof value !== "string" || !isPlaceholderSecret(value)) { |
| 579 | return []; |
| 580 | } |
| 581 | |
| 582 | return [ |
| 583 | `${name} looks like a placeholder ("${value}"). ` + |
| 584 | `Generate a real value with \`${generator}\` and set it before boot.`, |
| 585 | ]; |
| 586 | }); |
| 587 | }; |
| 588 | |
| 589 | const checkAIProvider = (env: Env): string[] => { |
| 590 | if (!env.AI_ENABLED || env.NODE_ENV === "test") { |
no test coverage detected