(supabaseUrl: string)
| 19 | |
| 20 | // Extract Supabase project ref from a standard URL like https://<project-ref>.supabase.co |
| 21 | function inferProjectRef(supabaseUrl: string): string | null { |
| 22 | try { |
| 23 | const host = new URL(supabaseUrl).hostname; |
| 24 | const m = host.match(/^([a-z0-9]{20})\.supabase\.co$/i); |
| 25 | return m ? m[1] : null; |
| 26 | } catch { |
| 27 | return null; |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | const inputSchema = inputs({ |
| 32 | supabaseUrl: port( |