genclass 0.3.1 → 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 CHANGED
@@ -1,5 +1,15 @@
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
+
3
13
  ## 0.3.1
4
14
 
5
15
  - **`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.1", 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.
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
@@ -9405,7 +9405,9 @@ async function apps(o = {}, deps = {}) {
9405
9405
  }
9406
9406
  if (!o.all && list2.length > 20) out(` ${c.gray(`and ${n(list2.length - 20)} more: add --all`)}`);
9407
9407
  out();
9408
- out(` ${c.gray("See one:")} ${c.cyan(`npx genclass dashboard --app ${appArg(list2[0], list2)}`)}`);
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)}`)}`);
9409
9411
  out(` ${c.gray("New one:")} ${c.cyan('npx genclass apps new "Name"')}`);
9410
9412
  out(` ${c.gray("Delete one, in the browser:")} ${c.cyan(hostUrl("/account"))}`);
9411
9413
  out();
@@ -9494,7 +9496,7 @@ async function team(o = {}, deps = {}) {
9494
9496
  }
9495
9497
  top(state);
9496
9498
  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`)}`);
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`)}`);
9498
9500
  out(` ${clean(state.account?.label ?? "you", 50)} ${c.gray("owner")}`);
9499
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`}`)}`);
9500
9502
  for (const i of t.invites) out(` ${c.gray(`an invite link is open${i.expires ? ` until ${day(i.expires)}` : ""}`)}`);
@@ -9883,12 +9885,17 @@ var ask_exports = {};
9883
9885
  __export(ask_exports, {
9884
9886
  answerLines: () => answerLines,
9885
9887
  ask: () => ask2,
9886
- forget: () => forget
9888
+ forget: () => forget,
9889
+ marks: () => marks
9887
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
+ }
9888
9895
  function answerLines(text, cols2 = width() - 6) {
9889
9896
  const lines = [];
9890
9897
  for (const raw of String(text).split("\n")) {
9891
- const l = clean(raw, 600);
9898
+ const l = marks(clean(raw, 600));
9892
9899
  if (!l) {
9893
9900
  if (lines.length && lines[lines.length - 1] !== "") lines.push("");
9894
9901
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genclass",
3
- "version": "0.3.1",
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",