mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-17 17:41:50 +00:00
ac3f289de6
Co-authored-by: Pablo F.G <pablo.fernandez@prowler.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
29 lines
760 B
TypeScript
29 lines
760 B
TypeScript
import {
|
|
assertGatedIntegrations,
|
|
warnGatedIntegrationsMisconfig,
|
|
} from "@/lib/integrations";
|
|
import { readEnv } from "@/lib/runtime-env";
|
|
|
|
// Boot-time required-env assertion so a misconfigured container fails fast
|
|
// with a clear message. A key with a deprecated legacy name is satisfied by
|
|
// either name (see readEnv).
|
|
const REQUIRED: ReadonlyArray<{
|
|
key: keyof NodeJS.ProcessEnv;
|
|
legacy?: keyof NodeJS.ProcessEnv;
|
|
}> = [
|
|
{ key: "UI_API_BASE_URL", legacy: "NEXT_PUBLIC_API_BASE_URL" },
|
|
{ key: "AUTH_URL" },
|
|
{ key: "AUTH_SECRET" },
|
|
];
|
|
|
|
for (const { key, legacy } of REQUIRED) {
|
|
if (!readEnv(key, legacy)) {
|
|
throw new Error(`Missing required env: ${key}`);
|
|
}
|
|
}
|
|
|
|
assertGatedIntegrations();
|
|
warnGatedIntegrationsMisconfig();
|
|
|
|
export {};
|