genclass 0.3.0 → 0.3.2
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 +19 -0
- package/dist/genclass.mjs +19 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.2
|
|
4
|
+
|
|
5
|
+
From the first run of 0.3.1 against production with a real account:
|
|
6
|
+
|
|
7
|
+
- **An answer from `genclass ask` shows no Markdown marks.** The model writes page names as `` `/checkout` ``; the
|
|
8
|
+
backticks were printed as they were. Code is now cyan and bold is bold, with the marks taken out.
|
|
9
|
+
- **`genclass team` says "1 person"**, not "1 people", on a plan with no seat count.
|
|
10
|
+
- **`genclass apps` points at the app worth looking at:** this folder's, else the one that heard from its site last,
|
|
11
|
+
instead of the first by name (which was an empty test app).
|
|
12
|
+
|
|
13
|
+
## 0.3.1
|
|
14
|
+
|
|
15
|
+
- **`genclass login` renews a sign-in that 0.3.0 asks to renew.** A sign-in approved before 0.3.0 can show
|
|
16
|
+
dashboards but not the plan, alerts, stored events or questions, and the command says "run npx genclass login
|
|
17
|
+
once". `login` only looked at whether the sign-in could show dashboards, so for such a sign-in it answered
|
|
18
|
+
"already signed in", which was a dead end for anyone not at a prompt that signs in on Enter. It now asks the
|
|
19
|
+
server the newest thing a terminal is approved for, and signs in again when the answer is "sign in again". Found
|
|
20
|
+
the first time 0.3.0 met a real older sign-in in production.
|
|
21
|
+
|
|
3
22
|
## 0.3.0
|
|
4
23
|
|
|
5
24
|
The command becomes the whole product in a terminal. Until now it set GenClass up and ended; what the dashboard
|
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.2", 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
|
|
@@ -3616,8 +3616,12 @@ async function requestPlan(creds, digest, opts = {}) {
|
|
|
3616
3616
|
};
|
|
3617
3617
|
}
|
|
3618
3618
|
async function signInIsOld(creds, opts = {}) {
|
|
3619
|
-
const
|
|
3620
|
-
|
|
3619
|
+
const ask3 = (path) => request(path, { token: creds.access_token, host: creds.host, fetchFn: opts.fetchFn });
|
|
3620
|
+
const old = (r) => !r.ok && r.status === 403 && r.json?.reauth === true;
|
|
3621
|
+
const newest = await ask3("/api/cli/account");
|
|
3622
|
+
if (old(newest)) return true;
|
|
3623
|
+
if (newest.ok || newest.status !== 404) return false;
|
|
3624
|
+
return old(await ask3("/api/cli/app?id=-&range=24h"));
|
|
3621
3625
|
}
|
|
3622
3626
|
async function fetchApp(creds, id, range = "7d", opts = {}) {
|
|
3623
3627
|
const r = await request(`/api/cli/app?id=${encodeURIComponent(id)}&range=${encodeURIComponent(range)}`, { token: creds.access_token, host: creds.host, fetchFn: opts.fetchFn });
|
|
@@ -5048,7 +5052,7 @@ async function signInAgain(o = {}, deps = {}) {
|
|
|
5048
5052
|
const { creds } = readCredentialsFor();
|
|
5049
5053
|
if (!creds || !await signInIsOld(creds, deps)) return null;
|
|
5050
5054
|
out();
|
|
5051
|
-
note("You are signed in, from before the command could
|
|
5055
|
+
note("You are signed in, from before the command could do all it does now. One more approval in the browser adds that: the page lists what the terminal can do.");
|
|
5052
5056
|
return await (deps.signIn ?? signIn)(o) === "done" ? 0 : 1;
|
|
5053
5057
|
}
|
|
5054
5058
|
async function dashboard2(o = {}, deps = {}) {
|
|
@@ -9401,7 +9405,9 @@ async function apps(o = {}, deps = {}) {
|
|
|
9401
9405
|
}
|
|
9402
9406
|
if (!o.all && list2.length > 20) out(` ${c.gray(`and ${n(list2.length - 20)} more: add --all`)}`);
|
|
9403
9407
|
out();
|
|
9404
|
-
|
|
9408
|
+
const live = [...list2].sort((a, b) => String(b.last_event ?? "").localeCompare(String(a.last_event ?? "")));
|
|
9409
|
+
const show2 = list2.find((p) => p.token === state.app.token) ?? live[0];
|
|
9410
|
+
out(` ${c.gray("See one:")} ${c.cyan(`npx genclass dashboard --app ${appArg(show2, list2)}`)}`);
|
|
9405
9411
|
out(` ${c.gray("New one:")} ${c.cyan('npx genclass apps new "Name"')}`);
|
|
9406
9412
|
out(` ${c.gray("Delete one, in the browser:")} ${c.cyan(hostUrl("/account"))}`);
|
|
9407
9413
|
out();
|
|
@@ -9490,7 +9496,7 @@ async function team(o = {}, deps = {}) {
|
|
|
9490
9496
|
}
|
|
9491
9497
|
top(state);
|
|
9492
9498
|
const t = a.team;
|
|
9493
|
-
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`)}`);
|
|
9499
|
+
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`)}`);
|
|
9494
9500
|
out(` ${clean(state.account?.label ?? "you", 50)} ${c.gray("owner")}`);
|
|
9495
9501
|
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`}`)}`);
|
|
9496
9502
|
for (const i of t.invites) out(` ${c.gray(`an invite link is open${i.expires ? ` until ${day(i.expires)}` : ""}`)}`);
|
|
@@ -9879,12 +9885,17 @@ var ask_exports = {};
|
|
|
9879
9885
|
__export(ask_exports, {
|
|
9880
9886
|
answerLines: () => answerLines,
|
|
9881
9887
|
ask: () => ask2,
|
|
9882
|
-
forget: () => forget
|
|
9888
|
+
forget: () => forget,
|
|
9889
|
+
marks: () => marks
|
|
9883
9890
|
});
|
|
9891
|
+
function marks(line) {
|
|
9892
|
+
const paint = (text, f) => text.split(" ").map((w) => w ? f(w) : w).join(" ");
|
|
9893
|
+
return line.replace(/`([^`]+)`/g, (_, x) => paint(x, c.cyan)).replace(/\*\*([^*]+)\*\*/g, (_, x) => paint(x, c.bold));
|
|
9894
|
+
}
|
|
9884
9895
|
function answerLines(text, cols2 = width() - 6) {
|
|
9885
9896
|
const lines = [];
|
|
9886
9897
|
for (const raw of String(text).split("\n")) {
|
|
9887
|
-
const l = clean(raw, 600);
|
|
9898
|
+
const l = marks(clean(raw, 600));
|
|
9888
9899
|
if (!l) {
|
|
9889
9900
|
if (lines.length && lines[lines.length - 1] !== "") lines.push("");
|
|
9890
9901
|
continue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "genclass",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
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",
|