Read Supabase's wrapped lists, create free projects directly, open Supabase in a new tab, keep installs clean
- list_organizations and list_projects reply {organizations: [...]} and {projects: [...]}: read both
- A $0 project is created without a cost confirmation, as Supabase's tool asks
- Connect Supabase opens Supabase in its own tab; broke's tab updates when the sign-in finishes
- Installs use npm ci, and npm run update puts back an npm-rewritten package-lock.json
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0e1a05801c
commit
5893af22c1
5 files changed
+47
-11
No files matched your search
@@ -182,9 +182,17 @@ export function ConnectSupabaseButton({ onDone, onFail }: { onDone: () => void;
|
||||
onClick={async () => {
|
||||
setBusy(true);
|
||||
setMsg("");
|
||||
// Supabase opens in its own tab, so broke stays put. Opened now, while the click still counts, or it's blocked.
|
||||
const tab = window.open("", "_blank");
|
||||
const res = await fetch("/api/setup/supabase/connect", { method: "POST" });
|
||||
const body = await res.json().catch(() => ({}));
|
||||
if (body.url) return void (window.location.href = body.url);
|
||||
if (body.url) {
|
||||
if (tab) tab.location.href = body.url;
|
||||
else window.location.href = body.url; // pop-ups blocked: this tab, as before
|
||||
setMsg("Approve broke in the Supabase tab. This page updates when you're done.");
|
||||
return;
|
||||
}
|
||||
tab?.close();
|
||||
setBusy(false);
|
||||
if (!res.ok) {
|
||||
setMsg(body.error ?? "Couldn't start the Supabase sign-in.");
|
||||
|
||||
Reference in new issue
Block a user