genclass 0.3.2 → 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 +15 -0
- package/dist/genclass.mjs +20 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
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
|
+
|
|
3
18
|
## 0.3.2
|
|
4
19
|
|
|
5
20
|
From the first run of 0.3.1 against production with a real account:
|
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) {
|
|
@@ -10163,7 +10171,13 @@ async function setup(o = {}, deps = {}) {
|
|
|
10163
10171
|
result = "skipped";
|
|
10164
10172
|
} else result = await deps.runSuggest({ cwd: o.cwd, fromSetup: true }) === 0 ? "done" : "failed";
|
|
10165
10173
|
}
|
|
10166
|
-
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
|
+
}
|
|
10167
10181
|
if (step.id === "account" && result === "failed" && !auto && signInTries++ < 1) note("Enter tries the sign-in again with a new code.");
|
|
10168
10182
|
else skip2.push(step.id);
|
|
10169
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",
|