genclass 0.3.0 → 0.3.1

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,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.1
4
+
5
+ - **`genclass login` renews a sign-in that 0.3.0 asks to renew.** A sign-in approved before 0.3.0 can show
6
+ dashboards but not the plan, alerts, stored events or questions, and the command says "run npx genclass login
7
+ once". `login` only looked at whether the sign-in could show dashboards, so for such a sign-in it answered
8
+ "already signed in", which was a dead end for anyone not at a prompt that signs in on Enter. It now asks the
9
+ server the newest thing a terminal is approved for, and signs in again when the answer is "sign in again". Found
10
+ the first time 0.3.0 met a real older sign-in in production.
11
+
3
12
  ## 0.3.0
4
13
 
5
14
  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.0", 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.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.
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 r = await request("/api/cli/app?id=-&range=24h", { token: creds.access_token, host: creds.host, fetchFn: opts.fetchFn });
3620
- return !r.ok && r.status === 403 && r.json?.reauth === true;
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 show dashboards. One more approval in the browser adds that.");
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 = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genclass",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
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",