genclass 0.3.1 → 0.3.3
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/CHANGELOG.md +25 -0
- package/dist/genclass.mjs +31 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.3
|
|
4
|
+
|
|
5
|
+
- **"Put this app in your account" works.** For an app that already has GenClass in it but is not in the signed-in
|
|
6
|
+
account (set up by someone else, or before there was an account), the step ran the runtime's `connect` with
|
|
7
|
+
`--in-account`, an option only `init` takes. `connect` refused it and printed its usage, and the app could never
|
|
8
|
+
be put in the account from the walk. Since 0.2.0; found by a teammate on a real project. The step now passes
|
|
9
|
+
`connect` only its own options: it asks which of the account's apps this is (or makes a new one), shows the change
|
|
10
|
+
and writes it. A test runs both of the runtime's commands with exactly what the step passes.
|
|
11
|
+
- **A step that fails says so, and the walk does not offer what depends on it.** The walk used to go straight on to
|
|
12
|
+
"See your first page" (asking whether the site was deployed) for an app that was not in the account, which can
|
|
13
|
+
never finish. Now a failed step gets one line saying it did not finish and will be offered again, and the first
|
|
14
|
+
page is only offered once the app is in the account.
|
|
15
|
+
- When the account's plan has no room for another app, the hint names an app it has (`connect` and pick it) instead
|
|
16
|
+
of "sign in again", which hit the same limit.
|
|
17
|
+
|
|
18
|
+
## 0.3.2
|
|
19
|
+
|
|
20
|
+
From the first run of 0.3.1 against production with a real account:
|
|
21
|
+
|
|
22
|
+
- **An answer from `genclass ask` shows no Markdown marks.** The model writes page names as `` `/checkout` ``; the
|
|
23
|
+
backticks were printed as they were. Code is now cyan and bold is bold, with the marks taken out.
|
|
24
|
+
- **`genclass team` says "1 person"**, not "1 people", on a plan with no seat count.
|
|
25
|
+
- **`genclass apps` points at the app worth looking at:** this folder's, else the one that heard from its site last,
|
|
26
|
+
instead of the first by name (which was an empty test app).
|
|
27
|
+
|
|
3
28
|
## 0.3.1
|
|
4
29
|
|
|
5
30
|
- **`genclass login` renews a sign-in that 0.3.0 asks to renew.** A sign-in approved before 0.3.0 can show
|
package/dist/genclass.mjs
CHANGED
|
@@ -12,7 +12,7 @@ var __export = (target, all) => {
|
|
|
12
12
|
var define_GENCLASS_BUILD_default;
|
|
13
13
|
var init_define_GENCLASS_BUILD = __esm({
|
|
14
14
|
"<define:__GENCLASS_BUILD__>"() {
|
|
15
|
-
define_GENCLASS_BUILD_default = { version: "0.3.
|
|
15
|
+
define_GENCLASS_BUILD_default = { version: "0.3.3", runtimeVersion: "0.3.0-beta.6", mcpVersion: "0.2.2", workflow: `# GenClass on your existing Playwright suite: no change to your tests or your playwright.config.
|
|
16
16
|
# Copy to .github/workflows/genclass.yml.
|
|
17
17
|
#
|
|
18
18
|
# Assumes "npx playwright test" works on a fresh checkout with dependencies installed, which usually
|
|
@@ -2454,6 +2454,11 @@ function tokenRow(tk) {
|
|
|
2454
2454
|
}
|
|
2455
2455
|
if (tk.failed) {
|
|
2456
2456
|
row("Token", `none: could not create one (${tk.why})`, c.yellow(sym.warn));
|
|
2457
|
+
if (tk.account && /^upgrade needed/.test(String(tk.why))) {
|
|
2458
|
+
out(` GenClass works without it; you only miss the dashboard. Use one of your apps instead:`);
|
|
2459
|
+
out(` ${c.cyan(`${CMD} connect`)} and pick it, or make room at ${c.cyan(hostUrl("/account"))}`);
|
|
2460
|
+
return;
|
|
2461
|
+
}
|
|
2457
2462
|
out(` GenClass works without it; you only miss the dashboard. ${tk.account ? `Run ${c.cyan(`${CMD} login`)} again, then` : `Get a token at ${c.cyan(START_URL)}`}`);
|
|
2458
2463
|
out(` ${tk.account ? c.cyan(`${CMD} connect`) : `and run ${c.cyan(`${CMD} init --token gc_...`)}`}`);
|
|
2459
2464
|
return;
|
|
@@ -4437,7 +4442,9 @@ async function readState(o = {}, deps = {}) {
|
|
|
4437
4442
|
why: "It fills once your live site has been opened.",
|
|
4438
4443
|
more: "GenClass sends nothing from localhost, so the dashboard starts with your deployed site. Deploy as you normally do, open the site, and run npx genclass again.",
|
|
4439
4444
|
run: null,
|
|
4440
|
-
human: "deploy your app and open the live site once"
|
|
4445
|
+
human: "deploy your app and open the live site once",
|
|
4446
|
+
// nothing to watch for until the app is in the account: the walk does not offer it before
|
|
4447
|
+
after: "runtime"
|
|
4441
4448
|
});
|
|
4442
4449
|
const wf = { state: (
|
|
4443
4450
|
/** @type {StepState} */
|
|
@@ -4514,7 +4521,8 @@ async function readState(o = {}, deps = {}) {
|
|
|
4514
4521
|
run: "npx genclass suggest",
|
|
4515
4522
|
human: s?.failed ? "work through the list: npx genclass suggest" : null
|
|
4516
4523
|
});
|
|
4517
|
-
const
|
|
4524
|
+
const ready = (x) => !x.after || steps.find((y) => y.id === x.after)?.state === "done";
|
|
4525
|
+
const next = steps.find((x) => x.state === "todo" && !(o.skip ?? []).includes(x.id) && ready(x)) ?? null;
|
|
4518
4526
|
if (next) next.state = "next";
|
|
4519
4527
|
return {
|
|
4520
4528
|
cwd,
|
|
@@ -4666,8 +4674,8 @@ async function checkout(offer, o = {}, deps = {}) {
|
|
|
4666
4674
|
}
|
|
4667
4675
|
function runtimeArgs(state, o = {}) {
|
|
4668
4676
|
const connect2 = state.steps.find((s) => s.id === "runtime")?.run === "npx genclass connect";
|
|
4669
|
-
const args = ["--cwd", state.cwd, ...o.yes ? ["--yes"] : []
|
|
4670
|
-
return { cmd:
|
|
4677
|
+
const args = ["--cwd", state.cwd, ...o.yes ? ["--yes"] : []];
|
|
4678
|
+
return connect2 ? { cmd: "connect", args } : { cmd: "init", args: [...args, ...state.signedIn ? ["--in-account"] : [], "--no-devtools", "--brief"] };
|
|
4671
4679
|
}
|
|
4672
4680
|
async function addRuntime(state, o = {}) {
|
|
4673
4681
|
if (!state.steps.find((s) => s.id === "runtime")?.vite) {
|
|
@@ -9405,7 +9413,9 @@ async function apps(o = {}, deps = {}) {
|
|
|
9405
9413
|
}
|
|
9406
9414
|
if (!o.all && list2.length > 20) out(` ${c.gray(`and ${n(list2.length - 20)} more: add --all`)}`);
|
|
9407
9415
|
out();
|
|
9408
|
-
|
|
9416
|
+
const live = [...list2].sort((a, b) => String(b.last_event ?? "").localeCompare(String(a.last_event ?? "")));
|
|
9417
|
+
const show2 = list2.find((p) => p.token === state.app.token) ?? live[0];
|
|
9418
|
+
out(` ${c.gray("See one:")} ${c.cyan(`npx genclass dashboard --app ${appArg(show2, list2)}`)}`);
|
|
9409
9419
|
out(` ${c.gray("New one:")} ${c.cyan('npx genclass apps new "Name"')}`);
|
|
9410
9420
|
out(` ${c.gray("Delete one, in the browser:")} ${c.cyan(hostUrl("/account"))}`);
|
|
9411
9421
|
out();
|
|
@@ -9494,7 +9504,7 @@ async function team(o = {}, deps = {}) {
|
|
|
9494
9504
|
}
|
|
9495
9505
|
top(state);
|
|
9496
9506
|
const t = a.team;
|
|
9497
|
-
out(` ${c.bold("Team")} ${c.gray(t.seats === null ? `${n(t.used)} people` : `${n(t.used)} of ${n(t.seats)} seat${t.seats === 1 ? "" : "s"} used`)}`);
|
|
9507
|
+
out(` ${c.bold("Team")} ${c.gray(t.seats === null ? `${n(t.used)} ${t.used === 1 ? "person" : "people"}` : `${n(t.used)} of ${n(t.seats)} seat${t.seats === 1 ? "" : "s"} used`)}`);
|
|
9498
9508
|
out(` ${clean(state.account?.label ?? "you", 50)} ${c.gray("owner")}`);
|
|
9499
9509
|
for (const m of t.members) out(` ${clean(m.label, 50)} ${c.gray(`${m.joined ? `joined ${ago(m.joined, deps.now)}` : "member"}${m.active ? "" : ` ${sym.dot} over the seats, cannot open dashboards`}`)}`);
|
|
9500
9510
|
for (const i of t.invites) out(` ${c.gray(`an invite link is open${i.expires ? ` until ${day(i.expires)}` : ""}`)}`);
|
|
@@ -9883,12 +9893,17 @@ var ask_exports = {};
|
|
|
9883
9893
|
__export(ask_exports, {
|
|
9884
9894
|
answerLines: () => answerLines,
|
|
9885
9895
|
ask: () => ask2,
|
|
9886
|
-
forget: () => forget
|
|
9896
|
+
forget: () => forget,
|
|
9897
|
+
marks: () => marks
|
|
9887
9898
|
});
|
|
9899
|
+
function marks(line) {
|
|
9900
|
+
const paint = (text, f) => text.split(" ").map((w) => w ? f(w) : w).join(" ");
|
|
9901
|
+
return line.replace(/`([^`]+)`/g, (_, x) => paint(x, c.cyan)).replace(/\*\*([^*]+)\*\*/g, (_, x) => paint(x, c.bold));
|
|
9902
|
+
}
|
|
9888
9903
|
function answerLines(text, cols2 = width() - 6) {
|
|
9889
9904
|
const lines = [];
|
|
9890
9905
|
for (const raw of String(text).split("\n")) {
|
|
9891
|
-
const l = clean(raw, 600);
|
|
9906
|
+
const l = marks(clean(raw, 600));
|
|
9892
9907
|
if (!l) {
|
|
9893
9908
|
if (lines.length && lines[lines.length - 1] !== "") lines.push("");
|
|
9894
9909
|
continue;
|
|
@@ -10156,7 +10171,13 @@ async function setup(o = {}, deps = {}) {
|
|
|
10156
10171
|
result = "skipped";
|
|
10157
10172
|
} else result = await deps.runSuggest({ cwd: o.cwd, fromSetup: true }) === 0 ? "done" : "failed";
|
|
10158
10173
|
}
|
|
10159
|
-
if (result === "failed")
|
|
10174
|
+
if (result === "failed") {
|
|
10175
|
+
failed = true;
|
|
10176
|
+
if (!auto) {
|
|
10177
|
+
out();
|
|
10178
|
+
warn(`${step.doing} did not finish. The steps that do not need it go on, and npx genclass offers it again next time.`);
|
|
10179
|
+
}
|
|
10180
|
+
}
|
|
10160
10181
|
if (step.id === "account" && result === "failed" && !auto && signInTries++ < 1) note("Enter tries the sign-in again with a new code.");
|
|
10161
10182
|
else skip2.push(step.id);
|
|
10162
10183
|
out();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "genclass",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "GenClass CLI: one command that sets GenClass up, shows your app in the terminal (problems, analytics, events), hands problems to your coding agent, answers questions about your app and tells you what it is missing.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|