mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-11-08 12:24:45 +00:00
23 lines
609 B
TypeScript
23 lines
609 B
TypeScript
/**
|
|
* Shared environment helpers.
|
|
*/
|
|
|
|
/**
|
|
* Whether the UI is running inside a Prowler Cloud deployment.
|
|
*
|
|
* `NEXT_PUBLIC_*` vars are statically inlined by Next.js wherever the literal
|
|
* `process.env.NEXT_PUBLIC_IS_CLOUD_ENV` appears in source, so keeping this read
|
|
* inside a helper is safe.
|
|
*/
|
|
export function isCloud(): boolean {
|
|
return process.env.NEXT_PUBLIC_IS_CLOUD_ENV === "true";
|
|
}
|
|
|
|
export function isLocalDevelopment(): boolean {
|
|
return process.env.NODE_ENV === "development";
|
|
}
|
|
|
|
export function shouldRequireEmailVerification(): boolean {
|
|
return isCloud() && !isLocalDevelopment();
|
|
}
|