- Implemented a bash script to test n8n API and retrieve credential schemas. - Added types for API responses, Google Calendar, and WhatsApp instances. - Configured Vitest for testing with React and added setup for testing-library.
16 lines
601 B
TypeScript
16 lines
601 B
TypeScript
import { createBrowserClient } from "@supabase/ssr";
|
|
|
|
// Validação de variáveis de ambiente obrigatórias
|
|
const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL;
|
|
const supabaseAnonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;
|
|
|
|
if (!supabaseUrl || !supabaseAnonKey) {
|
|
throw new Error(
|
|
"Missing required Supabase environment variables. " +
|
|
"Please ensure NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY are set.",
|
|
);
|
|
}
|
|
|
|
// Cliente Supabase para uso no browser - gerencia cookies automaticamente
|
|
export const supabase = createBrowserClient(supabaseUrl, supabaseAnonKey);
|