- Deleted `pnpm-workspace.yaml` as it is no longer needed. - Removed `apply-migrations.sh` script that handled database migrations. - Eliminated `generate-full-stack-env.mjs` script for environment variable generation. - Deleted `selfhost-backup.sh` script for creating backups of the self-hosted environment. - Removed `selfhost-doctor.sh` script for health checks of the self-hosted services. - Deleted `selfhost-restore.sh` script for restoring backups in the self-hosted environment.
18 lines
481 B
TypeScript
18 lines
481 B
TypeScript
import { createClient } from "@supabase/supabase-js";
|
||
|
||
export function createServiceRoleClient() {
|
||
const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL;
|
||
const serviceRoleKey = process.env.SUPABASE_SERVICE_ROLE_KEY;
|
||
|
||
if (!supabaseUrl || !serviceRoleKey) {
|
||
throw new Error("Supabase service role yapılandırması eksik.");
|
||
}
|
||
|
||
return createClient(supabaseUrl, serviceRoleKey, {
|
||
auth: {
|
||
autoRefreshToken: false,
|
||
persistSession: false,
|
||
},
|
||
});
|
||
}
|