Initial state for GitNexus analysis

This commit is contained in:
Zaid Marzguioui
2026-03-29 19:44:57 +02:00
parent 9d7c7f8030
commit 61ff48cb73
155 changed files with 23483 additions and 1722 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,24 @@
import type { SupabaseClient } from '@supabase/supabase-js';
import type { Database } from '@kit/supabase/database';
/**
* Resolve an account slug to its UUID.
* Used by every data loader in the CMS.
*/
export async function resolveAccountId(
client: SupabaseClient<Database>,
slug: string,
): Promise<string> {
const { data, error } = await client
.from('accounts')
.select('id')
.eq('slug', slug)
.single();
if (error || !data) {
throw new Error(`Account not found: ${slug}`);
}
return data.id;
}