sodabase 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -2
- package/dist/api/client.js +230 -0
- package/dist/api/fakeClient.js +130 -0
- package/dist/api/gotrueAuth.js +160 -0
- package/dist/api/types.js +15 -0
- package/dist/app.js +47 -0
- package/dist/cli.js +87 -0
- package/dist/config/flowState.js +45 -0
- package/dist/config/tokenStore.js +33 -0
- package/dist/ui.js +606 -0
- package/package.json +54 -4
package/dist/ui.js
ADDED
|
@@ -0,0 +1,606 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text, useApp, useInput } from "ink";
|
|
3
|
+
import { createContext, useContext, useEffect, useRef, useState } from "react";
|
|
4
|
+
import { totalIssues } from "./api/types.js";
|
|
5
|
+
import { saveCreds } from "./config/tokenStore.js";
|
|
6
|
+
// ── utils ─────────────────────────────────────────────────────────────────────
|
|
7
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
8
|
+
function useSpinner() {
|
|
9
|
+
const frames = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
|
|
10
|
+
const [i, setI] = useState(0);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const t = setInterval(() => setI((x) => (x + 1) % frames.length), 90);
|
|
13
|
+
return () => clearInterval(t);
|
|
14
|
+
}, []);
|
|
15
|
+
return frames[i] ?? "⠋";
|
|
16
|
+
}
|
|
17
|
+
const Ctx = createContext(null);
|
|
18
|
+
export function WizardProvider({ value, children }) {
|
|
19
|
+
return _jsx(Ctx.Provider, { value: value, children: children });
|
|
20
|
+
}
|
|
21
|
+
function useWizard() {
|
|
22
|
+
const w = useContext(Ctx);
|
|
23
|
+
if (!w)
|
|
24
|
+
throw new Error("WizardProvider missing");
|
|
25
|
+
return w;
|
|
26
|
+
}
|
|
27
|
+
// ── presentational bits ─────────────────────────────────────────────────────────
|
|
28
|
+
export function BrandBar() {
|
|
29
|
+
return (_jsx(Box, { children: _jsxs(Text, { backgroundColor: "green", color: "black", children: [" Sodabase Wizard · ", _jsx(Text, { bold: true, children: "setup" }), " "] }) }));
|
|
30
|
+
}
|
|
31
|
+
function Eyebrow({ children }) {
|
|
32
|
+
return (_jsxs(Text, { color: "green", bold: true, children: ["\u25E7 ", children] }));
|
|
33
|
+
}
|
|
34
|
+
const sevColor = { bad: "red", warn: "yellow", ok: "green" };
|
|
35
|
+
// ── Phase: boot + detect ─────────────────────────────────────────────────────────
|
|
36
|
+
export function BootDetect({ onDone }) {
|
|
37
|
+
const { services, fast } = useWizard();
|
|
38
|
+
const spin = useSpinner();
|
|
39
|
+
const [project, setProject] = useState(null);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
let on = true;
|
|
42
|
+
(async () => {
|
|
43
|
+
const p = await services.detectProject();
|
|
44
|
+
if (!on)
|
|
45
|
+
return;
|
|
46
|
+
setProject(p);
|
|
47
|
+
await sleep(fast ? 120 : 900);
|
|
48
|
+
if (on)
|
|
49
|
+
onDone({ project: p });
|
|
50
|
+
})();
|
|
51
|
+
return () => {
|
|
52
|
+
on = false;
|
|
53
|
+
};
|
|
54
|
+
}, []);
|
|
55
|
+
return (_jsxs(Box, { flexDirection: "column", paddingX: 2, marginTop: 1, children: [_jsx(Eyebrow, { children: project ? "Project detected" : "Sodabase starting up" }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { children: "We'll set up data-quality monitoring for your Supabase project." }), _jsx(Text, { dimColor: true, children: "Read-only, always. The only write is one scoped, audited read-only role." })] }), _jsx(Box, { marginTop: 1, flexDirection: "column", children: !project ? (_jsxs(Text, { children: [_jsx(Text, { color: "green", children: spin }), " Detecting Supabase project\u2026"] })) : (_jsxs(_Fragment, { children: [_jsxs(Text, { children: [_jsx(Text, { color: "green", children: "\u2714" }), " Directory ", _jsx(Text, { dimColor: true, children: project.directory })] }), _jsxs(Text, { children: [_jsx(Text, { color: "green", children: "\u2714" }), " Framework ", project.framework] }), _jsxs(Text, { children: [_jsx(Text, { color: "green", children: "\u2714" }), " Database ", _jsx(Text, { dimColor: true, children: project.database })] })] })) })] }));
|
|
56
|
+
}
|
|
57
|
+
// ── Phase: GoTrue sign-in ────────────────────────────────────────────────────────
|
|
58
|
+
const PROVIDERS = [
|
|
59
|
+
{ id: "github", label: "GitHub" },
|
|
60
|
+
{ id: "google", label: "Google" },
|
|
61
|
+
{ id: "email", label: "Email (one-time code)" },
|
|
62
|
+
];
|
|
63
|
+
/** Turn a raw GoTrue/transport error into a human message + an actionable hint. */
|
|
64
|
+
function friendlySignInError(raw) {
|
|
65
|
+
if (/multiple accounts with the same email/i.test(raw))
|
|
66
|
+
return {
|
|
67
|
+
text: "This email has more than one Sodabase account, so that provider can't pick one.",
|
|
68
|
+
hint: "Try a different provider (press r), or ask support to merge the duplicate accounts.",
|
|
69
|
+
};
|
|
70
|
+
if (/timed out|redirect/i.test(raw))
|
|
71
|
+
return { text: raw, hint: "Check that http://127.0.0.1:8976/callback is in the Supabase Auth redirect allowlist." };
|
|
72
|
+
if (/anon key/i.test(raw))
|
|
73
|
+
return { text: raw, hint: "Set SODABASE_SUPABASE_ANON_KEY to the project's publishable key." };
|
|
74
|
+
if (/rate limit|too many|for security purposes/i.test(raw))
|
|
75
|
+
return { text: "Too many sign-in attempts for now.", hint: "Wait a minute, then press r to request a fresh code." };
|
|
76
|
+
if (/expired|invalid|incorrect|otp|token/i.test(raw))
|
|
77
|
+
return { text: "That code is invalid or has expired.", hint: "Press r to go back and request a new code." };
|
|
78
|
+
return { text: raw };
|
|
79
|
+
}
|
|
80
|
+
export function SignIn({ onDone }) {
|
|
81
|
+
const { services, signedIn, demo, interactive } = useWizard();
|
|
82
|
+
const spin = useSpinner();
|
|
83
|
+
const [stage, setStage] = useState(interactive ? "pick" : "signing");
|
|
84
|
+
const [cursor, setCursor] = useState(0);
|
|
85
|
+
const [chosen, setChosen] = useState(undefined);
|
|
86
|
+
const [email, setEmail] = useState("");
|
|
87
|
+
const [code, setCode] = useState("");
|
|
88
|
+
const [err, setErr] = useState(null);
|
|
89
|
+
const mounted = useRef(true);
|
|
90
|
+
useEffect(() => () => void (mounted.current = false), []);
|
|
91
|
+
// Finish sign-in the same way for every path: set the bearer, persist (never in --demo), advance.
|
|
92
|
+
function complete(session) {
|
|
93
|
+
if (!mounted.current)
|
|
94
|
+
return;
|
|
95
|
+
services.setBearer(session.accessToken);
|
|
96
|
+
if (!demo) {
|
|
97
|
+
// Never persist the fake --demo session to the real creds file.
|
|
98
|
+
try {
|
|
99
|
+
saveCreds({
|
|
100
|
+
accessToken: session.accessToken,
|
|
101
|
+
...(session.refreshToken ? { refreshToken: session.refreshToken } : {}),
|
|
102
|
+
...(session.expiresAt ? { expiresAt: session.expiresAt } : {}),
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
catch {
|
|
106
|
+
/* non-fatal */
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
onDone({});
|
|
110
|
+
}
|
|
111
|
+
function fail(e) {
|
|
112
|
+
if (!mounted.current)
|
|
113
|
+
return;
|
|
114
|
+
setErr(friendlySignInError(e instanceof Error ? e.message : String(e)));
|
|
115
|
+
setStage("error");
|
|
116
|
+
}
|
|
117
|
+
async function go(provider) {
|
|
118
|
+
setChosen(provider);
|
|
119
|
+
setErr(null);
|
|
120
|
+
setStage("signing");
|
|
121
|
+
try {
|
|
122
|
+
complete(await services.signIn(provider));
|
|
123
|
+
}
|
|
124
|
+
catch (e) {
|
|
125
|
+
fail(e);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
async function startEmail() {
|
|
129
|
+
setErr(null);
|
|
130
|
+
setStage("sending");
|
|
131
|
+
try {
|
|
132
|
+
await services.emailOtpStart(email.trim());
|
|
133
|
+
if (!mounted.current)
|
|
134
|
+
return;
|
|
135
|
+
setCode("");
|
|
136
|
+
setStage("code");
|
|
137
|
+
}
|
|
138
|
+
catch (e) {
|
|
139
|
+
fail(e);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
async function verifyEmail() {
|
|
143
|
+
setErr(null);
|
|
144
|
+
setStage("verifying");
|
|
145
|
+
try {
|
|
146
|
+
complete(await services.emailOtpVerify(email.trim(), code.trim()));
|
|
147
|
+
}
|
|
148
|
+
catch (e) {
|
|
149
|
+
fail(e);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
useEffect(() => {
|
|
153
|
+
if (signedIn) {
|
|
154
|
+
onDone({}); // a valid session is already loaded — skip sign-in
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
if (!interactive)
|
|
158
|
+
void go(); // non-interactive: env/default provider, no picker
|
|
159
|
+
}, []);
|
|
160
|
+
useInput((input, key) => {
|
|
161
|
+
if (stage === "pick") {
|
|
162
|
+
if (key.upArrow)
|
|
163
|
+
setCursor((c) => Math.max(0, c - 1));
|
|
164
|
+
else if (key.downArrow)
|
|
165
|
+
setCursor((c) => Math.min(PROVIDERS.length - 1, c + 1));
|
|
166
|
+
else if (key.return) {
|
|
167
|
+
const id = PROVIDERS[cursor]?.id;
|
|
168
|
+
if (id === "email") {
|
|
169
|
+
setErr(null);
|
|
170
|
+
setEmail("");
|
|
171
|
+
setStage("email");
|
|
172
|
+
}
|
|
173
|
+
else
|
|
174
|
+
void go(id);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
else if (stage === "email") {
|
|
178
|
+
// Hand-rolled controlled text input (no ink-text-input dep): printable chars + backspace + enter.
|
|
179
|
+
if (key.return) {
|
|
180
|
+
if (email.trim())
|
|
181
|
+
void startEmail();
|
|
182
|
+
}
|
|
183
|
+
else if (key.backspace || key.delete)
|
|
184
|
+
setEmail((e) => e.slice(0, -1));
|
|
185
|
+
else if (input && !key.ctrl && !key.meta && !key.tab)
|
|
186
|
+
setEmail((e) => e + input);
|
|
187
|
+
}
|
|
188
|
+
else if (stage === "code") {
|
|
189
|
+
// Same hand-rolled input, digits-only. Supabase's email OTP length is configurable (6–10), so cap at
|
|
190
|
+
// the max (10), not 6 — a project set to 8-digit codes must still be fully enterable.
|
|
191
|
+
if (key.return) {
|
|
192
|
+
if (code.trim())
|
|
193
|
+
void verifyEmail();
|
|
194
|
+
}
|
|
195
|
+
else if (key.backspace || key.delete)
|
|
196
|
+
setCode((c) => c.slice(0, -1));
|
|
197
|
+
else if (input && /^[0-9]+$/.test(input))
|
|
198
|
+
setCode((c) => (c + input).slice(0, 10));
|
|
199
|
+
}
|
|
200
|
+
else if (stage === "error") {
|
|
201
|
+
if (input === "r" || key.return) {
|
|
202
|
+
setErr(null);
|
|
203
|
+
setCode("");
|
|
204
|
+
setStage("pick");
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}, { isActive: interactive && (stage === "pick" || stage === "email" || stage === "code" || stage === "error") });
|
|
208
|
+
const providerLabel = PROVIDERS.find((p) => p.id === chosen)?.label ?? chosen ?? "your provider";
|
|
209
|
+
return (_jsxs(Box, { flexDirection: "column", paddingX: 2, marginTop: 1, children: [_jsx(Eyebrow, { children: "Sign in to Sodabase" }), signedIn ? (_jsx(Box, { marginTop: 1, children: _jsxs(Text, { children: [_jsx(Text, { color: "green", children: "\u2714" }), " Already signed in ", _jsx(Text, { dimColor: true, children: "(using your saved session)" })] }) })) : stage === "pick" ? (_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { dimColor: true, children: "How do you want to sign in?" }), _jsx(Box, { marginTop: 1, flexDirection: "column", children: PROVIDERS.map((p, i) => {
|
|
210
|
+
const here = i === cursor;
|
|
211
|
+
return (_jsxs(Text, { color: here ? "green" : undefined, children: [here ? "❯ " : " ", p.label] }, p.id));
|
|
212
|
+
}) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "\u2191\u2193 move \u00B7 enter to continue \u00B7 GitHub/Google open your browser" }) })] })) : stage === "email" ? (_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { dimColor: true, children: "Enter your email \u2014 we'll send you a sign-in code." }), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { children: ["Email: ", _jsx(Text, { color: "green", children: email }), _jsx(Text, { inverse: true, children: " " })] }) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "type to edit \u00B7 backspace to delete \u00B7 enter to send \u00B7 Ctrl-C to quit" }) })] })) : stage === "sending" ? (_jsx(Box, { marginTop: 1, children: _jsxs(Text, { children: [_jsx(Text, { color: "green", children: spin }), " Sending a sign-in code to ", email, "\u2026"] }) })) : stage === "code" ? (_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsxs(Text, { dimColor: true, children: ["We emailed a sign-in code to ", email, ". Enter it below."] }), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { children: ["Code: ", _jsx(Text, { color: "green", children: code }), _jsx(Text, { inverse: true, children: " " })] }) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "enter to verify \u00B7 backspace to delete \u00B7 press r after a failure to start over" }) })] })) : stage === "verifying" ? (_jsx(Box, { marginTop: 1, children: _jsxs(Text, { children: [_jsx(Text, { color: "green", children: spin }), " Verifying your code\u2026"] }) })) : stage === "error" && err ? (_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { color: "red", children: err.text }), err.hint && _jsx(Text, { dimColor: true, children: err.hint }), interactive && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "press r to start over \u00B7 Ctrl-C to quit" }) }))] })) : (_jsx(Box, { marginTop: 1, children: _jsxs(Text, { children: [_jsx(Text, { color: "green", children: spin }), " Opening your browser to sign in with ", providerLabel, "\u2026"] }) }))] }));
|
|
213
|
+
}
|
|
214
|
+
// ── Phase: connect (multi-step: authorize → list → pick project) ─────────────────
|
|
215
|
+
/** Short status tags shown next to a project in the picker: "watching" (already set up in this workspace) and
|
|
216
|
+
* a paused/transitional Supabase status (its DB is offline, so it can't be watched until resumed). */
|
|
217
|
+
function projectTags(p) {
|
|
218
|
+
const tags = [];
|
|
219
|
+
if (p.watching)
|
|
220
|
+
tags.push({ label: "watching", color: "green" });
|
|
221
|
+
if (p.status && p.status !== "ACTIVE_HEALTHY") {
|
|
222
|
+
tags.push({ label: p.status === "INACTIVE" ? "paused" : p.status.toLowerCase().replace(/_/g, " "), color: "yellow" });
|
|
223
|
+
}
|
|
224
|
+
return tags;
|
|
225
|
+
}
|
|
226
|
+
/** Can we set up monitoring on this project now? Only a known non-healthy status (paused/transitional — its DB
|
|
227
|
+
* is offline) blocks; an empty/unknown status is left to the backend. Keeps us off the "watch an offline DB →
|
|
228
|
+
* deferred failure" path, including the single-project auto-select that skips the picker. */
|
|
229
|
+
function isWatchable(p) {
|
|
230
|
+
return !p.status || p.status === "ACTIVE_HEALTHY";
|
|
231
|
+
}
|
|
232
|
+
const issuesLabel = (n) => `${n} ${n === 1 ? "issue" : "issues"}`;
|
|
233
|
+
/** Aligned list of the workspace's watched projects with their live issue counts. The count is the SUM of
|
|
234
|
+
* monitor signals + data-quality findings (the API exposes them separately; the CLI shows one number). Green =
|
|
235
|
+
* all clear, yellow = has issues. Names are padded to a common width so the issue column lines up. */
|
|
236
|
+
function WatchedProjects({ projects }) {
|
|
237
|
+
const width = projects.reduce((w, p) => Math.max(w, p.name.length), 0);
|
|
238
|
+
return (_jsx(Box, { flexDirection: "column", children: projects.map((p) => {
|
|
239
|
+
const n = totalIssues(p);
|
|
240
|
+
return (_jsxs(Text, { children: [" ", p.name.padEnd(width), " ", _jsx(Text, { color: n > 0 ? "yellow" : "green", children: issuesLabel(n) })] }, p.ref));
|
|
241
|
+
}) }));
|
|
242
|
+
}
|
|
243
|
+
export function Connect({ onDone }) {
|
|
244
|
+
const { services, interactive } = useWizard();
|
|
245
|
+
const spin = useSpinner();
|
|
246
|
+
const [connectionId, setConnectionId] = useState(null);
|
|
247
|
+
const [alreadyConnected, setAlreadyConnected] = useState(false);
|
|
248
|
+
const [projects, setProjects] = useState(null);
|
|
249
|
+
const [cursor, setCursor] = useState(0);
|
|
250
|
+
const [chosen, setChosen] = useState(null);
|
|
251
|
+
const [error, setError] = useState(null);
|
|
252
|
+
useEffect(() => {
|
|
253
|
+
let on = true;
|
|
254
|
+
(async () => {
|
|
255
|
+
try {
|
|
256
|
+
// connect() opens the browser, captures code+state at our loopback, and self-completes
|
|
257
|
+
// the callback with our own Bearer — no browser web session needed (fixes the 401/403).
|
|
258
|
+
const { connectionId: cid, alreadyConnected: ac } = await services.connect();
|
|
259
|
+
if (!on)
|
|
260
|
+
return;
|
|
261
|
+
setConnectionId(cid);
|
|
262
|
+
setAlreadyConnected(!!ac);
|
|
263
|
+
const projs = await services.listProjects(cid);
|
|
264
|
+
if (!on)
|
|
265
|
+
return;
|
|
266
|
+
setProjects(projs);
|
|
267
|
+
// No projects in the connected org → don't advance with an empty projectRef (which onboards nothing and
|
|
268
|
+
// fails deep). Say so plainly.
|
|
269
|
+
if (projs.length === 0) {
|
|
270
|
+
setError("This Supabase organization has no projects. Create one in Supabase, then run setup again.");
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
if (projs.length === 1 || !interactive)
|
|
274
|
+
finish(cid, projs[0]);
|
|
275
|
+
}
|
|
276
|
+
catch (e) {
|
|
277
|
+
if (on)
|
|
278
|
+
setError(e instanceof Error ? e.message : String(e));
|
|
279
|
+
}
|
|
280
|
+
})();
|
|
281
|
+
return () => {
|
|
282
|
+
on = false;
|
|
283
|
+
};
|
|
284
|
+
}, []);
|
|
285
|
+
function finish(connId, project) {
|
|
286
|
+
// Don't send an offline (paused/transitional) project into onboarding — the DB is unreachable, so it would
|
|
287
|
+
// fail deep in the job. Surface it here, up front and recoverable, instead. Also covers the single-project
|
|
288
|
+
// auto-select path, which skips the picker (and its tag) entirely.
|
|
289
|
+
if (project && !isWatchable(project)) {
|
|
290
|
+
setError(`"${project.name}" is paused in Supabase — resume it there, then run setup again.`);
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
const ref = project?.ref ?? "";
|
|
294
|
+
setChosen(ref);
|
|
295
|
+
if (project?.watching) {
|
|
296
|
+
// Already monitored — there's nothing new to provision or adjust, so skip setup + the (empty) scope
|
|
297
|
+
// screen and go straight to the status view.
|
|
298
|
+
onDone({ connectionId: connId, projectRef: ref, alreadyWatching: true }, { to: "findings" });
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
onDone({ connectionId: connId, projectRef: ref });
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
useInput((_i, key) => {
|
|
305
|
+
if (!projects || chosen)
|
|
306
|
+
return;
|
|
307
|
+
if (key.upArrow)
|
|
308
|
+
setCursor((c) => Math.max(0, c - 1));
|
|
309
|
+
else if (key.downArrow)
|
|
310
|
+
setCursor((c) => Math.min(projects.length - 1, c + 1));
|
|
311
|
+
else if (key.return && connectionId)
|
|
312
|
+
finish(connectionId, projects[cursor]);
|
|
313
|
+
}, { isActive: interactive && !!projects && !chosen });
|
|
314
|
+
const picking = interactive && projects && projects.length > 1 && !chosen;
|
|
315
|
+
return (_jsxs(Box, { flexDirection: "column", paddingX: 2, marginTop: 1, children: [_jsx(Eyebrow, { children: "Authorize your database" }), _jsx(Box, { marginTop: 1, flexDirection: "column", children: error ? (_jsx(Text, { color: "red", children: error })) : !connectionId ? (_jsxs(_Fragment, { children: [_jsxs(Text, { children: [_jsx(Text, { color: "green", children: spin }), " Opening your browser to authorize\u2026"] }), _jsx(Text, { dimColor: true, children: "Read-only \u2014 no connection string to paste. Approve on Supabase, then return here." })] })) : !projects ? (_jsxs(Text, { children: [_jsx(Text, { color: "green", children: spin }), " Loading your projects\u2026"] })) : picking ? (_jsxs(_Fragment, { children: [_jsx(Text, { children: "Pick the project to watch:" }), projects.map((p, i) => (_jsxs(Text, { color: i === cursor ? "green" : undefined, children: [i === cursor ? "❯ " : " ", p.name, " ", _jsxs(Text, { dimColor: true, children: ["(", p.ref, ")"] }), projectTags(p).map((t) => (_jsxs(Text, { color: t.color, children: [" ", "\u00B7 ", t.label] }, t.label)))] }, p.ref))), _jsx(Text, { dimColor: true, children: "\u2191\u2193 move \u00B7 enter select \u00B7 green = watching \u00B7 yellow = offline" })] })) : (_jsxs(_Fragment, { children: [alreadyConnected && (_jsxs(Text, { dimColor: true, children: [_jsx(Text, { color: "green", children: "\u2713" }), " Already connected \u2014 continuing on your existing connection."] })), _jsxs(Text, { children: [_jsx(Text, { color: "green", children: "\u2714" }), " Connected \u00B7 project ", _jsx(Text, { bold: true, children: chosen ?? projects[0]?.ref ?? "—" }), _jsx(Text, { color: "green", children: " 🔒 read-only, audited" })] })] })) })] }));
|
|
316
|
+
}
|
|
317
|
+
// ── Phase: the server-side onboarding job (two-panel) ─────────────────────────────
|
|
318
|
+
// Human labels for the backend onboarding job's step names (machine keys). Unknown names fall back to the raw
|
|
319
|
+
// key, so a new backend step still shows (just un-prettified) rather than disappearing.
|
|
320
|
+
const STEP_LABELS = {
|
|
321
|
+
provision: "Provision read-only role",
|
|
322
|
+
map_schema: "Map schema & monitors",
|
|
323
|
+
grant: "Grant read access",
|
|
324
|
+
activate: "Activate monitors",
|
|
325
|
+
scan: "Day-1 quality scan queued",
|
|
326
|
+
onboard: "Set up monitoring", // legacy single-step (jobs enqueued before step enrichment)
|
|
327
|
+
timeout: "Timed out",
|
|
328
|
+
};
|
|
329
|
+
const stepLabel = (name) => STEP_LABELS[name] ?? name;
|
|
330
|
+
export function AgentView({ ctx, onDone }) {
|
|
331
|
+
const { services, fast } = useWizard();
|
|
332
|
+
const [steps, setSteps] = useState([]);
|
|
333
|
+
const [logs, setLogs] = useState(["Planning the trust setup."]);
|
|
334
|
+
const [error, setError] = useState(null);
|
|
335
|
+
useEffect(() => {
|
|
336
|
+
let on = true;
|
|
337
|
+
(async () => {
|
|
338
|
+
try {
|
|
339
|
+
const { id } = await services.enqueueOnboarding(ctx.connectionId ?? "", ctx.projectRef ?? "");
|
|
340
|
+
while (on) {
|
|
341
|
+
const st = await services.jobStatus(id);
|
|
342
|
+
if (!on)
|
|
343
|
+
return;
|
|
344
|
+
setSteps(st.steps);
|
|
345
|
+
const last = st.steps.filter((s) => s.status === "done" || s.status === "skipped").at(-1);
|
|
346
|
+
if (last?.detail)
|
|
347
|
+
setLogs((l) => [...l, `${stepLabel(last.name)} — ${last.detail}`].slice(-4));
|
|
348
|
+
if (st.status === "done") {
|
|
349
|
+
await sleep(fast ? 80 : 500);
|
|
350
|
+
if (on)
|
|
351
|
+
onDone({});
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
if (st.status === "failed")
|
|
355
|
+
return setError(st.error ?? "onboarding failed");
|
|
356
|
+
await sleep(fast ? 90 : 650);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
catch (e) {
|
|
360
|
+
if (on)
|
|
361
|
+
setError(e instanceof Error ? e.message : String(e));
|
|
362
|
+
}
|
|
363
|
+
})();
|
|
364
|
+
return () => {
|
|
365
|
+
on = false;
|
|
366
|
+
};
|
|
367
|
+
}, []);
|
|
368
|
+
const done = steps.filter((s) => s.status === "done").length;
|
|
369
|
+
const total = steps.filter((s) => s.status !== "skipped").length || steps.length;
|
|
370
|
+
return (_jsxs(Box, { flexDirection: "column", paddingX: 2, marginTop: 1, children: [_jsx(Eyebrow, { children: "Setting up \u2014 agent at work" }), error ? (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "red", children: error }) })) : (_jsxs(_Fragment, { children: [_jsxs(Box, { marginTop: 1, flexDirection: "row", children: [_jsxs(Box, { flexDirection: "column", width: 40, children: [_jsx(Text, { bold: true, children: "Learn" }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { dimColor: true, children: "Sodabase is setting up your monitors" }), _jsx(Text, { dimColor: true, children: "and baselines on the server \u2014 the same" }), _jsx(Text, { dimColor: true, children: "job the web onboarding runs. This panel" }), _jsx(Text, { dimColor: true, children: "just renders it; the CLI owns no" }), _jsx(Text, { dimColor: true, children: "orchestration." })] })] }), _jsxs(Box, { flexDirection: "column", flexGrow: 1, children: [_jsx(Text, { bold: true, children: "Tasks" }), steps.map((s) => {
|
|
371
|
+
const mk = s.status === "done" ? "✔" : s.status === "running" ? "▶" : s.status === "skipped" ? "—" : "□";
|
|
372
|
+
const color = s.status === "done" || s.status === "running" ? "green" : undefined;
|
|
373
|
+
return (_jsxs(Text, { color: color, dimColor: s.status === "pending" || s.status === "queued" || s.status === "skipped", children: [" ", mk, " ", stepLabel(s.name)] }, s.name));
|
|
374
|
+
}), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { children: [_jsx(Text, { color: "green", children: "Progress" }), " ", _jsx(Text, { bold: true, children: `${done}/${total}` })] }) })] })] }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { dimColor: true, children: "Tail logs" }), logs.map((l, i) => (_jsxs(Text, { dimColor: true, children: [" ", l] }, i)))] })] }))] }));
|
|
375
|
+
}
|
|
376
|
+
// ── Phase: Scope (onboard-then-adjust; monitor ids) ──────────────────────────────
|
|
377
|
+
export function ScopeAdjust({ onDone }) {
|
|
378
|
+
const { services, fast, interactive } = useWizard();
|
|
379
|
+
const [proposals, setProposals] = useState(null);
|
|
380
|
+
const [sel, setSel] = useState([]);
|
|
381
|
+
const [cursor, setCursor] = useState(0);
|
|
382
|
+
const [committed, setCommitted] = useState(false);
|
|
383
|
+
const [error, setError] = useState(null);
|
|
384
|
+
useEffect(() => {
|
|
385
|
+
let on = true;
|
|
386
|
+
(async () => {
|
|
387
|
+
try {
|
|
388
|
+
const list = await services.proposals();
|
|
389
|
+
if (!on)
|
|
390
|
+
return;
|
|
391
|
+
setProposals(list.proposals);
|
|
392
|
+
setSel(list.proposals.map(() => true)); // all proposed monitors on by default
|
|
393
|
+
// Nothing to adjust (already set up, or discovery proposed none) → don't make the user stare at an empty
|
|
394
|
+
// list: show the empty message briefly, then advance. Applies in interactive mode too.
|
|
395
|
+
if (list.proposals.length === 0) {
|
|
396
|
+
await sleep(fast ? 300 : 900);
|
|
397
|
+
if (on)
|
|
398
|
+
await commit(list.proposals, []);
|
|
399
|
+
}
|
|
400
|
+
else if (!interactive) {
|
|
401
|
+
await sleep(fast ? 300 : 1200);
|
|
402
|
+
if (on)
|
|
403
|
+
await commit(list.proposals, list.proposals.map(() => true));
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
catch (e) {
|
|
407
|
+
if (on)
|
|
408
|
+
setError(e instanceof Error ? e.message : String(e));
|
|
409
|
+
}
|
|
410
|
+
})();
|
|
411
|
+
return () => {
|
|
412
|
+
on = false;
|
|
413
|
+
};
|
|
414
|
+
}, []);
|
|
415
|
+
async function commit(p, s) {
|
|
416
|
+
try {
|
|
417
|
+
if (p.length === 0) {
|
|
418
|
+
// Nothing proposed → no confirm/decline calls to make; just move on.
|
|
419
|
+
setCommitted(true);
|
|
420
|
+
onDone({ selected: 0 });
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
const confirm = p.filter((_, i) => s[i]).map((x) => x.id);
|
|
424
|
+
const decline = p.filter((_, i) => !s[i]).map((x) => x.id);
|
|
425
|
+
await services.confirmProposals(confirm.length === p.length ? null : confirm);
|
|
426
|
+
if (decline.length)
|
|
427
|
+
await services.declineProposals(decline);
|
|
428
|
+
setCommitted(true);
|
|
429
|
+
onDone({ selected: confirm.length });
|
|
430
|
+
}
|
|
431
|
+
catch (e) {
|
|
432
|
+
// A network/401 here must surface, not become an unhandled rejection that kills the Ink app.
|
|
433
|
+
setError(e instanceof Error ? e.message : String(e));
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
useInput((_i, key) => {
|
|
437
|
+
if (!proposals || committed)
|
|
438
|
+
return;
|
|
439
|
+
if (key.upArrow)
|
|
440
|
+
setCursor((c) => Math.max(0, c - 1));
|
|
441
|
+
else if (key.downArrow)
|
|
442
|
+
setCursor((c) => Math.min(proposals.length - 1, c + 1));
|
|
443
|
+
else if (_i === " ")
|
|
444
|
+
setSel((s) => s.map((v, i) => (i === cursor ? !v : v)));
|
|
445
|
+
else if (key.return)
|
|
446
|
+
void commit(proposals, sel);
|
|
447
|
+
}, { isActive: interactive && !!proposals && !committed });
|
|
448
|
+
return (_jsxs(Box, { flexDirection: "column", paddingX: 2, marginTop: 1, children: [_jsx(Eyebrow, { children: "What matters most" }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Monitoring what discovery proposed. Adjust below \u2014 unpicked ones won't run." }) }), _jsx(Box, { marginTop: 1, flexDirection: "column", children: error ? (_jsx(Text, { color: "red", children: error })) : !proposals ? (_jsx(Text, { dimColor: true, children: "loading proposals\u2026" })) : proposals.length === 0 ? (_jsx(Text, { dimColor: true, children: "Nothing to adjust \u2014 these are already set up." })) : (proposals.map((p, i) => {
|
|
449
|
+
const on = sel[i];
|
|
450
|
+
const here = interactive && i === cursor;
|
|
451
|
+
return (_jsxs(Text, { color: on ? "green" : undefined, dimColor: !on, children: [here ? "❯ " : " ", on ? "[x]" : "[ ]", " ", p.dataset, " ", _jsxs(Text, { dimColor: true, children: ["\u00B7 ", p.type] })] }, p.id));
|
|
452
|
+
})) }), _jsx(Box, { marginTop: 1, children: interactive && !committed && proposals && proposals.length > 0 ? (_jsx(Text, { dimColor: true, children: "\u2191\u2193 move \u00B7 space toggle \u00B7 enter confirm" })) : (_jsx(Text, { dimColor: true, children: committed ? "saved" : "accepting recommended…" })) })] }));
|
|
453
|
+
}
|
|
454
|
+
// ── Phase: day-1 scan — status + dashboard link (no REST source) ──────────────────
|
|
455
|
+
export function Findings({ ctx, onDone }) {
|
|
456
|
+
const { services, fast, interactive } = useWizard();
|
|
457
|
+
const [findings, setFindings] = useState(null);
|
|
458
|
+
const [projects, setProjects] = useState(null);
|
|
459
|
+
const [ready, setReady] = useState(false);
|
|
460
|
+
useEffect(() => {
|
|
461
|
+
let on = true;
|
|
462
|
+
(async () => {
|
|
463
|
+
if (ctx.alreadyWatching) {
|
|
464
|
+
// Already monitored → show the workspace's watched projects + live issue counts, not the scan pitch.
|
|
465
|
+
try {
|
|
466
|
+
const p = await services.dashboardProjects();
|
|
467
|
+
if (on)
|
|
468
|
+
setProjects(p);
|
|
469
|
+
}
|
|
470
|
+
catch {
|
|
471
|
+
if (on)
|
|
472
|
+
setProjects([]); // fall back to the plain message if the status read fails
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
else if (services.illustrativeFindings) {
|
|
476
|
+
const f = await services.illustrativeFindings();
|
|
477
|
+
if (on)
|
|
478
|
+
setFindings(f);
|
|
479
|
+
}
|
|
480
|
+
if (!on)
|
|
481
|
+
return;
|
|
482
|
+
setReady(true);
|
|
483
|
+
if (!interactive) {
|
|
484
|
+
await sleep(fast ? 400 : 1600);
|
|
485
|
+
if (on)
|
|
486
|
+
onDone({});
|
|
487
|
+
}
|
|
488
|
+
})();
|
|
489
|
+
return () => {
|
|
490
|
+
on = false;
|
|
491
|
+
};
|
|
492
|
+
}, []);
|
|
493
|
+
useInput((_i, key) => {
|
|
494
|
+
if (key.return)
|
|
495
|
+
onDone({});
|
|
496
|
+
}, { isActive: interactive && ready });
|
|
497
|
+
if (ctx.alreadyWatching) {
|
|
498
|
+
return (_jsxs(Box, { flexDirection: "column", paddingX: 2, marginTop: 1, children: [_jsx(Eyebrow, { children: "Already monitored" }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [projects === null ? (_jsx(Text, { dimColor: true, children: "loading your projects\u2026" })) : projects.length > 0 ? (_jsxs(_Fragment, { children: [_jsx(Text, { dimColor: true, children: "You're already watching these \u2014 setup skipped:" }), _jsx(Box, { marginTop: 1, children: _jsx(WatchedProjects, { projects: projects }) })] })) : (_jsx(Text, { dimColor: true, children: "You're already monitoring this project \u2014 setup skipped." })), _jsxs(Box, { marginTop: 1, children: [_jsx(Text, { dimColor: true, children: "Dashboard \u2192 " }), _jsxs(Text, { color: "cyan", children: ["https://sodabase.io/projects/", ctx.projectRef ?? "…"] })] }), interactive && ready && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "enter to continue" }) }))] })] }));
|
|
499
|
+
}
|
|
500
|
+
return (_jsxs(Box, { flexDirection: "column", paddingX: 2, marginTop: 1, children: [_jsx(Eyebrow, { children: "Day-1 quality scan" }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { children: "The scan runs in the background (async) \u2014 results land in your dashboard:" }), _jsxs(Text, { children: [" ", _jsxs(Text, { color: "cyan", children: ["https://sodabase.io/projects/", ctx.projectRef ?? "…", "/data-trust"] })] })] }), findings && (_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { dimColor: true, children: "Illustrative \u2014 what you'd typically see first:" }), findings.map((f) => (_jsxs(Text, { children: [" ", _jsx(Text, { color: sevColor[f.severity], children: "\u25CF" }), " ", f.column, " ", _jsxs(Text, { dimColor: true, children: ["(", f.family, ") \u2014 ", f.detail] })] }, f.column)))] })), interactive && ready && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "enter to continue" }) }))] }));
|
|
501
|
+
}
|
|
502
|
+
// ── Phase: consented in-flow MCP install ─────────────────────────────────────────
|
|
503
|
+
const AGENTS = ["claude-code", "cursor", "codex"];
|
|
504
|
+
export function McpInstall({ onDone }) {
|
|
505
|
+
const { services, fast, interactive } = useWizard();
|
|
506
|
+
const [sel, setSel] = useState([true, false, false]);
|
|
507
|
+
const [cursor, setCursor] = useState(0);
|
|
508
|
+
const [result, setResult] = useState(null);
|
|
509
|
+
const [busy, setBusy] = useState(false);
|
|
510
|
+
const [error, setError] = useState(null);
|
|
511
|
+
async function run(choices) {
|
|
512
|
+
if (choices.length === 0) {
|
|
513
|
+
onDone({ installed: [] });
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
setBusy(true);
|
|
517
|
+
try {
|
|
518
|
+
const r = await services.installMcp(choices);
|
|
519
|
+
setResult(r);
|
|
520
|
+
await sleep(fast ? 300 : 900);
|
|
521
|
+
onDone({ installed: choices });
|
|
522
|
+
}
|
|
523
|
+
catch (e) {
|
|
524
|
+
// Don't silently swallow it — the user should know the MCP didn't install, and how to add it by hand.
|
|
525
|
+
setBusy(false);
|
|
526
|
+
setError(e instanceof Error ? e.message : String(e));
|
|
527
|
+
if (!interactive) {
|
|
528
|
+
await sleep(fast ? 300 : 1200);
|
|
529
|
+
onDone({ installed: [] });
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
useEffect(() => {
|
|
534
|
+
if (interactive)
|
|
535
|
+
return;
|
|
536
|
+
let on = true;
|
|
537
|
+
(async () => {
|
|
538
|
+
await sleep(fast ? 300 : 1000);
|
|
539
|
+
if (on)
|
|
540
|
+
await run(["claude-code"]);
|
|
541
|
+
})();
|
|
542
|
+
return () => {
|
|
543
|
+
on = false;
|
|
544
|
+
};
|
|
545
|
+
}, []);
|
|
546
|
+
useInput((input, key) => {
|
|
547
|
+
if (busy)
|
|
548
|
+
return;
|
|
549
|
+
if (error) {
|
|
550
|
+
if (key.return)
|
|
551
|
+
onDone({ installed: [] });
|
|
552
|
+
return;
|
|
553
|
+
}
|
|
554
|
+
if (key.upArrow)
|
|
555
|
+
setCursor((c) => Math.max(0, c - 1));
|
|
556
|
+
else if (key.downArrow)
|
|
557
|
+
setCursor((c) => Math.min(AGENTS.length - 1, c + 1));
|
|
558
|
+
else if (input === " ")
|
|
559
|
+
setSel((s) => s.map((v, i) => (i === cursor ? !v : v)));
|
|
560
|
+
else if (input === "n")
|
|
561
|
+
void run([]);
|
|
562
|
+
else if (key.return)
|
|
563
|
+
void run(AGENTS.filter((_, i) => sel[i]));
|
|
564
|
+
}, { isActive: interactive && !busy && !result });
|
|
565
|
+
return (_jsxs(Box, { flexDirection: "column", paddingX: 2, marginTop: 1, children: [_jsx(Eyebrow, { children: "Set up your coding agent (optional)" }), error ? (_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsxs(Text, { color: "yellow", children: ["Couldn't auto-install the MCP: ", error] }), _jsx(Text, { dimColor: true, children: "Add it yourself (Claude Code):" }), _jsxs(Text, { color: "cyan", children: [" ", "claude mcp add --transport http sodabase https://sodabase.io/mcp"] }), interactive && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "enter to continue" }) }))] })) : result ? (_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsxs(Text, { dimColor: true, children: ["Ran: ", result.command] }), result.wrote.map((w) => (_jsxs(Text, { children: [" ", _jsx(Text, { color: "green", children: "\u2714" }), " ", w.agent, " ", _jsxs(Text, { dimColor: true, children: ["\u2192 ", w.path] })] }, w.agent))), _jsx(Text, { color: "green", children: "Ready next time you restart your agent." })] })) : (_jsxs(_Fragment, { children: [_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { dimColor: true, children: "Install the Sodabase MCP so your agent can ask \"is this data safe to trust?\"" }), _jsx(Text, { dimColor: true, children: "Explicit \u2014 we show the exact change and only write on your confirm." })] }), _jsx(Box, { marginTop: 1, flexDirection: "column", children: AGENTS.map((a, i) => {
|
|
566
|
+
const on = sel[i];
|
|
567
|
+
const here = interactive && i === cursor;
|
|
568
|
+
return (_jsxs(Text, { color: on ? "green" : undefined, dimColor: !on, children: [here ? "❯ " : " ", on ? "[x]" : "[ ]", " ", a] }, a));
|
|
569
|
+
}) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: interactive ? "↑↓ move · space toggle · enter install · n skip" : "installing for claude-code…" }) })] }))] }));
|
|
570
|
+
}
|
|
571
|
+
// ── Phase: trust report (terminal) ───────────────────────────────────────────────
|
|
572
|
+
export function Report({ ctx }) {
|
|
573
|
+
const { exit } = useApp();
|
|
574
|
+
const { services, fast, interactive } = useWizard();
|
|
575
|
+
const [projects, setProjects] = useState(null);
|
|
576
|
+
useEffect(() => {
|
|
577
|
+
let on = true;
|
|
578
|
+
(async () => {
|
|
579
|
+
try {
|
|
580
|
+
const p = await services.dashboardProjects();
|
|
581
|
+
if (on)
|
|
582
|
+
setProjects(p);
|
|
583
|
+
}
|
|
584
|
+
catch {
|
|
585
|
+
if (on)
|
|
586
|
+
setProjects([]); // fall back to the trust lines only
|
|
587
|
+
}
|
|
588
|
+
})();
|
|
589
|
+
return () => {
|
|
590
|
+
on = false;
|
|
591
|
+
};
|
|
592
|
+
}, []);
|
|
593
|
+
// Non-interactive (demo/CI): auto-exit after a readable pause. Interactive: wait for enter so the report
|
|
594
|
+
// doesn't flash past before it can be read.
|
|
595
|
+
useEffect(() => {
|
|
596
|
+
if (interactive)
|
|
597
|
+
return;
|
|
598
|
+
const t = setTimeout(() => exit(), fast ? 400 : 3200);
|
|
599
|
+
return () => clearTimeout(t);
|
|
600
|
+
}, [interactive]);
|
|
601
|
+
useInput((_i, key) => {
|
|
602
|
+
if (key.return)
|
|
603
|
+
exit();
|
|
604
|
+
}, { isActive: interactive });
|
|
605
|
+
return (_jsxs(Box, { flexDirection: "column", paddingX: 2, marginTop: 1, children: [_jsx(Text, { color: "green", bold: true, children: "\u25E7 Setup complete" }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { bold: true, children: "Sodabase is watching \u2713" }), projects === null ? (_jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "loading your projects\u2026" }) })) : projects.length > 0 ? (_jsx(Box, { marginTop: 1, children: _jsx(WatchedProjects, { projects: projects }) })) : null, _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsxs(Text, { children: [" ", "Access ", _jsx(Text, { bold: true, children: "read-only" }), " ", _jsx(Text, { dimColor: true, children: "\u00B7 scoped soda_readonly role \u00B7 audited" })] }), _jsxs(Text, { children: [" ", "Baselines ", _jsx(Text, { dimColor: true, children: "warming up \u2014 alerts stay quiet for the first 24h" })] }), ctx.installed && ctx.installed.length > 0 && (_jsxs(Text, { children: [" ", _jsx(Text, { color: "green", children: "\u2714" }), " MCP installed for ", ctx.installed.join(", "), " ", _jsx(Text, { dimColor: true, children: "\u00B7 check_trust next restart" })] }))] }), _jsxs(Box, { marginTop: 1, children: [_jsx(Text, { dimColor: true, children: "Dashboard \u2192 " }), _jsxs(Text, { color: "cyan", children: ["https://sodabase.io/projects/", ctx.projectRef ?? "…"] })] }), interactive && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "enter to finish" }) }))] })] }));
|
|
606
|
+
}
|