File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,6 +23,15 @@ export const VERCEL_ENV = process.env.VERCEL_ENV || undefined;
2323 */
2424export const VERCEL_REGION = process . env . VERCEL_REGION || undefined ;
2525
26+ /**
27+ * This constant determines if the current environment is NOT a Vercel runtime environment.
28+ *
29+ * The logic is as follows:
30+ * - If we are NOT in a development environment (`!IS_DEV_ENV`) AND:
31+ * - Vercel environment variable (`VERCEL_ENV`) is defined but the Vercel region (`VERCEL_REGION`) is NOT defined, OR
32+ * - Vercel environment variable (`VERCEL_ENV`) is NOT defined at all.
33+ * This helps identify cases where the application is running outside of Vercel's runtime environment.
34+ */
2635export const IS_NOT_VERCEL_RUNTIME_ENV =
2736 ( ! IS_DEV_ENV && VERCEL_ENV && ! VERCEL_REGION ) || ( ! IS_DEV_ENV && ! VERCEL_ENV ) ;
2837
You can’t perform that action at this time.
0 commit comments