Restore strict ensureSupabase

cgen-c113a6366c224046a2ff99b8c1709030
This commit is contained in:
Builder.io 2025-10-04 21:41:16 +00:00
parent 0209d2624f
commit ea3b0696f4

View file

@ -23,16 +23,8 @@ export interface AethexUserProfile extends UserProfile {
const isNonEmptyString = (value: unknown): value is string =>
typeof value === "string" && value.trim().length > 0;
const isTestEnvironment =
typeof process !== "undefined" &&
(process.env?.NODE_ENV === "test" || process.env?.VITEST);
const ensureSupabase = () => {
if (!isSupabaseConfigured) {
if (isTestEnvironment) {
return;
}
throw new Error(
"Supabase is not configured. Please set VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY.",
);