@ia-qa/pal 0.4.0 → 0.7.0
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/README.md +75 -5
- package/TUTORIAL.md +106 -2
- package/dist/cli/index.js +65 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/history.d.ts +23 -0
- package/dist/history.js +108 -0
- package/dist/history.js.map +1 -0
- package/dist/htmlReport.d.ts +15 -0
- package/dist/htmlReport.js +381 -0
- package/dist/htmlReport.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +20 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.d.ts +6 -0
- package/dist/mcp/server.js +2 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/rebaseline.d.ts +66 -0
- package/dist/rebaseline.js +176 -0
- package/dist/rebaseline.js.map +1 -0
- package/dist/report.d.ts +9 -0
- package/dist/report.js +39 -7
- package/dist/report.js.map +1 -1
- package/dist/run.d.ts +4 -0
- package/dist/run.js +34 -2
- package/dist/run.js.map +1 -1
- package/dist/setup.js +17 -1
- package/dist/setup.js.map +1 -1
- package/dist/suite.d.ts +44 -0
- package/dist/suite.js +83 -2
- package/dist/suite.js.map +1 -1
- package/dist/tour.d.ts +12 -0
- package/dist/tour.js +17 -7
- package/dist/tour.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -60,6 +60,33 @@ ia-qa-pal tour — https://app.example · level 1 (with a login)
|
|
|
60
60
|
|
|
61
61
|
The time estimate only appears once a batch has been explored on your app: it is the pace measured there, never a constant.
|
|
62
62
|
|
|
63
|
+
## The report as a web page
|
|
64
|
+
|
|
65
|
+
For whoever does not live in a terminal — the rest of the team, a PM, a ticket:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npx ia-qa-pal tour --report --open # the tour, then its page
|
|
69
|
+
npx ia-qa-pal report --open # the last tour's page, again (after --background, say)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
[](https://www.ia-qa.com/media/pal-report.png)
|
|
73
|
+
|
|
74
|
+
One self-contained HTML file (`.ia-qa/pal/report.html` by default, or `--report <file.html>`): the verdict, the same four sections as the terminal — rendered from the same result, so the two cannot disagree — the clicks that reached each element, a copy button on every command, and the last tours as a timeline. Light and dark, readable on a phone. Nothing in it loads from the network, and nothing is sent anywhere. "Not seen" is always shown, and counts are "10 of 16", never a percentage.
|
|
75
|
+
|
|
76
|
+

|
|
77
|
+
|
|
78
|
+
## What a tour judges
|
|
79
|
+
|
|
80
|
+
**The pages your config declares, and nothing else.** `.ia-qa/mapping/` outlives a config: an
|
|
81
|
+
old repository often holds contracts from applications retired years ago, and folding those into
|
|
82
|
+
the verdict produces hundreds of findings about apps nobody asked about. Contracts that are not
|
|
83
|
+
declared are counted and named under *Not seen* — never judged, never silently dropped.
|
|
84
|
+
`--all-contracts` judges everything, when auditing the whole folder is what you want.
|
|
85
|
+
|
|
86
|
+
The shared shell (`_layouts/`) is always compared: it belongs to the pages in scope. And links
|
|
87
|
+
from contracts out of scope still count as links, so a page they point to is never reported as
|
|
88
|
+
a page nothing links to.
|
|
89
|
+
|
|
63
90
|
## What fails a tour, and what does not
|
|
64
91
|
|
|
65
92
|
- **Drift on what a page shows when it loads** — a control lost, ambiguous, or a selector now reaching another element — fails the tour.
|
|
@@ -71,25 +98,65 @@ The time estimate only appears once a batch has been explored on your app: it is
|
|
|
71
98
|
npx ia-qa-pal accept settings checkout # or --all: every page the last tour reported
|
|
72
99
|
```
|
|
73
100
|
|
|
101
|
+
## A baseline too old to compare
|
|
102
|
+
|
|
103
|
+
A baseline captured before exploration depth or capture fingerprints existed cannot be compared
|
|
104
|
+
with a capture that has both: every revealed element reads as lost. `accept` is the wrong verb
|
|
105
|
+
there — it says "this change is intended", and nothing was intended. `rebaseline` replaces those
|
|
106
|
+
references instead, and shows exactly what it would replace first:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
npx ia-qa-pal rebaseline --all # the plan — writes nothing
|
|
110
|
+
npx ia-qa-pal rebaseline --all --yes # replace them
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
📋 This would replace 1 baselines — nothing is written yet:
|
|
115
|
+
home
|
|
116
|
+
2025-01-05 → 2026-09-16 · 6 → 21 elements · depth 0 → 1
|
|
117
|
+
the baseline predates capture fingerprints — the two sides cannot be told apart
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
It refuses the same things `accept` refuses: a page your config does not declare, and a page the
|
|
121
|
+
last tour could not re-capture (rebaselining it would promote an older moment). A rebaseline
|
|
122
|
+
accepts every row it lists, real regressions included — read the drift first, and commit
|
|
123
|
+
`.ia-qa/baseline` beforehand: the old references then live in git, and nowhere else.
|
|
124
|
+
|
|
74
125
|
## With your test suite
|
|
75
126
|
|
|
76
127
|
Declare it at setup (`--tests tests/`, or answer yes when the tour finds it) and every tour also reads it:
|
|
77
128
|
|
|
78
129
|
- **🔧 Ready to repair** — when a selector your tests write stops reaching its element while the element is still there, the rewrite is listed with `file:line` and the command that applies it after you review it. pal never edits your tests.
|
|
79
130
|
- **⛔ To decide** — locator names your tests use that nothing on the mapped pages carries, and renamed labels your tests locate by name.
|
|
80
|
-
- **🔍 Not seen** — `ia-qa-pal tour --suite` runs
|
|
131
|
+
- **🔍 Not seen** — `ia-qa-pal tour --suite` runs your tests once, with the capture hook, and names the pages they **never visit**. A full suite can take twenty minutes, which is why nobody runs it every tour: declare a shorter one for pal, and it runs that instead.
|
|
81
132
|
|
|
82
|
-
```
|
|
83
|
-
|
|
133
|
+
```json
|
|
134
|
+
{ "pal": { "testCommand": "npx playwright test --grep @smoke" } }
|
|
84
135
|
```
|
|
85
136
|
|
|
86
|
-
|
|
137
|
+
It is read from `.ia-qa/config.json` — never from a flag or an agent's call, like every command this tool runs. When pal used that shorter command, the report says so and never claims "your suite never visits": a subset cannot retire your real coverage from view. The capture is kept apart from the tour's contracts. Your specs need the hook for this — one import:
|
|
138
|
+
|
|
139
|
+
| your runner | the line that arms it |
|
|
140
|
+
|---|---|
|
|
141
|
+
| Playwright | in your specs: `import { test, expect } from '@ia-qa/self-healing/capture'` |
|
|
142
|
+
| Cypress | in `cypress/support/e2e.js`: `import '@ia-qa/self-healing/cypress'` |
|
|
143
|
+
| Selenium | `const { capture } = require('@ia-qa/self-healing/selenium')`, then `await capture(driver)` after each navigation |
|
|
144
|
+
|
|
145
|
+
pal reads which runner your project drives off the disk (`cypress.config.*`, `wdio.conf.*`,
|
|
146
|
+
`playwright.config.*`, the dependencies) and prints that runner's line — all three when it cannot
|
|
147
|
+
tell. Everything else at this level is framework-agnostic already: the locators your tests write
|
|
148
|
+
are read, repaired and audited by `@ia-qa/self-healing`, which handles Playwright, Cypress and
|
|
149
|
+
Selenium (with its documented limits — Cypress is rewritten only through `cy.findByRole`, and an
|
|
150
|
+
XPath literal is never turned into CSS).
|
|
151
|
+
|
|
152
|
+
Without the hook, the report says the suite ran but recorded no page — never that it visits nothing.
|
|
87
153
|
|
|
88
154
|
## In the background, and for agents
|
|
89
155
|
|
|
90
156
|
```bash
|
|
91
157
|
npx ia-qa-pal tour --background # returns at once
|
|
92
158
|
npx ia-qa-pal status # phase and progress, then the report
|
|
159
|
+
npx ia-qa-pal report --open # once it is done: the report as a web page
|
|
93
160
|
```
|
|
94
161
|
|
|
95
162
|
One tour runs per project; a second is refused while the first is alive, and a tour whose process died is reported as interrupted, never as running.
|
|
@@ -108,8 +175,11 @@ One tour runs per project; a second is refused while the first is alive, and a t
|
|
|
108
175
|
| `--suite` | also run your test command once, with the capture hook |
|
|
109
176
|
| `--background` | start detached and return at once |
|
|
110
177
|
| `--strict` | also fail on drift reached only by clicking |
|
|
178
|
+
| `--all-contracts` | judge every contract in `.ia-qa/mapping/`, not only the pages your config declares |
|
|
111
179
|
| `--batch <n>` | pages per depth batch (default 10) |
|
|
112
180
|
| `--json` | the whole report as one JSON document on stdout; progress stays on stderr |
|
|
181
|
+
| `--report [file.html]` | also write the report as a web page (default `.ia-qa/pal/report.html`) |
|
|
182
|
+
| `--open` | open that page in your browser |
|
|
113
183
|
| `--session <file>` | a Playwright `storageState` to reuse |
|
|
114
184
|
| `--config <dir>` | the project holding `.ia-qa/` (default: current directory) |
|
|
115
185
|
|
|
@@ -129,4 +199,4 @@ Read `2` as "no answer", never as "the app is broken".
|
|
|
129
199
|
- **Exploration is read-only.** While menus, tabs and dialogs are opened, every non-GET request is blocked, and controls named like actions (log out, delete, pay…) are never clicked.
|
|
130
200
|
- **The link check** requests your app's own links with GET, skipping any URL that acts (`/logout`, `/delete`…).
|
|
131
201
|
- **Your test command** runs only with `--suite` (or `suite: true` from an agent), and it is always the one in your config — never a string passed on the call.
|
|
132
|
-
- **Files** live in `.ia-qa/`: contracts, baseline, `usage.json` (your suite's locators), and `pal/` (the measured pace, findings already reported, the current run and its log). A saved session there holds live cookies — it is gitignored and never leaves your machine.
|
|
202
|
+
- **Files** live in `.ia-qa/`: contracts, baseline, `usage.json` (your suite's locators), and `pal/` (the measured pace, findings already reported, the current run and its log, one line per past tour for the timeline, and the report page). A saved session there holds live cookies — it is gitignored and never leaves your machine.
|
package/TUTORIAL.md
CHANGED
|
@@ -161,6 +161,32 @@ With the `nameMask` added, the next tour of the same game:
|
|
|
161
161
|
|
|
162
162
|
and it exits `0`, still listing the two buttons under *To decide*.
|
|
163
163
|
|
|
164
|
+
### The same report, as a page
|
|
165
|
+
|
|
166
|
+
The terminal is for you; the page is for the person you send it to.
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
npx ia-qa-pal tour --report --open # run the tour, then open its page
|
|
170
|
+
npx ia-qa-pal report --open # the last tour's page, without running anything
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
That second tour of the game, as a page — nothing staged, this is the file pal wrote:
|
|
174
|
+
|
|
175
|
+
[](https://www.ia-qa.com/media/pal-report.png)
|
|
176
|
+
|
|
177
|
+
How to read it, top to bottom:
|
|
178
|
+
|
|
179
|
+
- **The verdict** — ✅ *All clear* only when a comparison ran and nothing needs a look; ⚠️ *Worth a look* when nothing failed but something should be seen; ⛔ *Something broke*; 📌 *Baseline established* on a first tour, which is never shown as green; ⏸ *No answer this time* when the tour could not answer.
|
|
180
|
+
- **The gauges** — counts, "10 of 16", never a percentage: this is not code coverage.
|
|
181
|
+
- **To decide / Broken / Ready to repair** — the same lines as the terminal, with the clicks that reached each element and a **copy** button on every command.
|
|
182
|
+
- **Not seen** — always there, never folded away.
|
|
183
|
+
- **Recent tours** — one dot per tour, coloured by how it ended (hover for the date, the duration and the pages).
|
|
184
|
+
- **Raw report (JSON)** at the bottom, for whoever wants every field.
|
|
185
|
+
|
|
186
|
+
It is one HTML file — `.ia-qa/pal/report.html` unless you give `--report <file.html>` — with nothing loaded from the network, so it opens offline and survives being attached to a ticket. On a phone, and in dark mode:
|
|
187
|
+
|
|
188
|
+

|
|
189
|
+
|
|
164
190
|
When a change **is** intended — you renamed a button, removed a page section — review it and make it the reference for those pages only:
|
|
165
191
|
|
|
166
192
|
```bash
|
|
@@ -231,7 +257,7 @@ The second setup question has three answers.
|
|
|
231
257
|
npx -p @ia-qa/self-healing ia-qa-heal login
|
|
232
258
|
```
|
|
233
259
|
|
|
234
|
-
A visible browser opens, you log in, and the session is saved in `.ia-qa/session.json
|
|
260
|
+
A visible browser opens, you log in, and the session is saved in `.ia-qa/session.json` — but only once it has been checked: `login` reopens the app in a clean browser with that session and refuses to call it good if it lands back on the login form. A session carrying nothing is never written over the one you already had. That file holds live cookies: it is gitignored and never leaves your machine. When it expires, the pages behind the login show up in **Not seen** — never as a pass.
|
|
235
261
|
|
|
236
262
|
Pages found during setup were found without logging in. Once logged in, list the ones behind the login:
|
|
237
263
|
|
|
@@ -311,7 +337,7 @@ npx ia-qa-pal status
|
|
|
311
337
|
⏳ A tour is running (pid 34136, since 2026-09-15T14:04:32Z) — depth 4/10 · jeu-planete
|
|
312
338
|
```
|
|
313
339
|
|
|
314
|
-
When it is done, `status` prints the report. Only one tour runs per project: a second is refused while the first is alive, because two tours would write the same contracts. A tour whose process died before finishing is reported as **interrupted** — never as still running, never as a result. Its output is in `.ia-qa/pal/run.log`.
|
|
340
|
+
When it is done, `status` prints the report, and `npx ia-qa-pal report --open` opens it as a page. Only one tour runs per project: a second is refused while the first is alive, because two tours would write the same contracts. A tour whose process died before finishing is reported as **interrupted** — never as still running, never as a result. Its output is in `.ia-qa/pal/run.log`.
|
|
315
341
|
|
|
316
342
|
---
|
|
317
343
|
|
|
@@ -378,6 +404,84 @@ Asked to tour a project that is not set up, `ia-qa-pal tour --json` answers with
|
|
|
378
404
|
|
|
379
405
|
---
|
|
380
406
|
|
|
407
|
+
## 10b. On an old repository: what a tour is allowed to judge
|
|
408
|
+
|
|
409
|
+
`.ia-qa/mapping/` outlives a config. A folder that has been in use for years often holds
|
|
410
|
+
contracts from applications retired long ago, and a tour that judged all of them answered a
|
|
411
|
+
question nobody asked — one field report came back with 471 warnings and 51 losses, most of
|
|
412
|
+
them about other apps.
|
|
413
|
+
|
|
414
|
+
A tour judges **the pages your `config.json` declares**. The rest is reported, never judged:
|
|
415
|
+
|
|
416
|
+
```
|
|
417
|
+
🔍 Not seen
|
|
418
|
+
38 contracts in .ia-qa/mapping/ your config does not declare — not measured: xac-home, xcm-orders, …
|
|
419
|
+
ia-qa-pal tour --all-contracts judges them too
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
Two rules keep the narrower scope from becoming a blind spot of its own:
|
|
423
|
+
|
|
424
|
+
- **The shared shell is always compared.** `_layouts/` belongs to the pages in scope.
|
|
425
|
+
- **Links from contracts out of scope still count.** A page reached only from an old contract is
|
|
426
|
+
reachable, so it is never reported as a page nothing links to. Replacing noise with a false
|
|
427
|
+
finding would be the worse trade.
|
|
428
|
+
|
|
429
|
+
To audit the whole folder — a migration, a clean-up — ask for it explicitly:
|
|
430
|
+
|
|
431
|
+
```bash
|
|
432
|
+
npx ia-qa-pal tour --all-contracts
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
Pages that are declared but have no contract yet are a different thing, and they already have
|
|
436
|
+
their own line: they show up as not mapped, with the reason.
|
|
437
|
+
|
|
438
|
+
---
|
|
439
|
+
|
|
440
|
+
## 10c. A baseline too old to compare, and a suite too slow to run
|
|
441
|
+
|
|
442
|
+
Two things bite on a repository that has been alive for years.
|
|
443
|
+
|
|
444
|
+
**A baseline from before the tool grew.** Exploration depth and capture fingerprints did not
|
|
445
|
+
always exist. A baseline without them, compared against a capture that has both, reports every
|
|
446
|
+
revealed element as lost — the comparison never worked, so there is nothing to *accept*:
|
|
447
|
+
|
|
448
|
+
```bash
|
|
449
|
+
npx ia-qa-pal rebaseline --all # the plan — writes nothing
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
```
|
|
453
|
+
📋 This would replace 1 baselines — nothing is written yet:
|
|
454
|
+
home
|
|
455
|
+
2025-01-05 → 2026-09-16 · 6 → 21 elements · depth 0 → 1
|
|
456
|
+
the baseline predates capture fingerprints — the two sides cannot be told apart
|
|
457
|
+
|
|
458
|
+
Read the drift first — a rebaseline accepts every row above, including any real regression.
|
|
459
|
+
ia-qa-pal tour --report see what changed, page by page
|
|
460
|
+
ia-qa-pal rebaseline --all --yes replace them
|
|
461
|
+
The old baselines are only in git: commit .ia-qa/baseline before and you can go back.
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
Add `--yes` when the plan is what you want. It refuses what `accept` refuses — an undeclared
|
|
465
|
+
page, and a page the last tour could not re-capture.
|
|
466
|
+
|
|
467
|
+
**A suite too slow to run every tour.** `--suite` runs your tests with the capture hook to learn
|
|
468
|
+
which pages they never visit; on a real project that is twenty minutes, so it stops being run and
|
|
469
|
+
the question stops being answered. Give pal a shorter command in `.ia-qa/config.json`:
|
|
470
|
+
|
|
471
|
+
```json
|
|
472
|
+
{
|
|
473
|
+
"testCommand": "npx playwright test",
|
|
474
|
+
"pal": { "testCommand": "npx playwright test --grep @smoke" }
|
|
475
|
+
}
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
`--suite` then runs that one. Two rules keep it honest: the command comes from the **file**, never
|
|
479
|
+
from a flag or an agent's call; and once pal ran a shorter command, the report says *that command*
|
|
480
|
+
never visits those pages — never "your suite", which would retire real coverage from view on the
|
|
481
|
+
strength of a run that never exercised it.
|
|
482
|
+
|
|
483
|
+
---
|
|
484
|
+
|
|
381
485
|
## 11. What it touches
|
|
382
486
|
|
|
383
487
|
- **Only your app.** Its pages load whatever they load in any browser (fonts, analytics…).
|
package/dist/cli/index.js
CHANGED
|
@@ -40,6 +40,8 @@ const report_1 = require("../report");
|
|
|
40
40
|
const setup_1 = require("../setup");
|
|
41
41
|
const run_1 = require("../run");
|
|
42
42
|
const accept_1 = require("../accept");
|
|
43
|
+
const htmlReport_1 = require("../htmlReport");
|
|
44
|
+
const rebaseline_1 = require("../rebaseline");
|
|
43
45
|
const VERSION = require('../../package.json').version;
|
|
44
46
|
const HELP = `ia-qa-pal — a QA pal next to your team
|
|
45
47
|
|
|
@@ -64,16 +66,22 @@ Usage:
|
|
|
64
66
|
No config yet: asks the setup questions first
|
|
65
67
|
(in a terminal), otherwise says what is missing.
|
|
66
68
|
--more explore the next batch in depth instead
|
|
67
|
-
--suite also run
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
--suite also run your tests once, with the capture hook, to
|
|
70
|
+
learn which pages they never visit. Runs "pal":
|
|
71
|
+
{ "testCommand": … } from config.json when it is
|
|
72
|
+
declared (a shorter command), else "testCommand"
|
|
70
73
|
--background start the tour detached and return at once;
|
|
71
74
|
follow it with \`ia-qa-pal status\`
|
|
75
|
+
--all-contracts judge every contract in .ia-qa/mapping/, not only
|
|
76
|
+
the pages your config declares (default: declared only)
|
|
72
77
|
--strict also fail on drift behind interaction (elements
|
|
73
78
|
reached only by clicking, which may depend on
|
|
74
79
|
the data the click lands on)
|
|
75
80
|
--batch <n> pages per depth batch (default 10)
|
|
76
81
|
--json the report as one JSON document on stdout
|
|
82
|
+
--report [file.html] also write the report as a web page (default
|
|
83
|
+
.ia-qa/pal/report.html)
|
|
84
|
+
--open open that page in your browser
|
|
77
85
|
--session <file> a Playwright storageState to reuse
|
|
78
86
|
--config <dir> project holding .ia-qa/ (default: here)
|
|
79
87
|
|
|
@@ -83,6 +91,23 @@ Usage:
|
|
|
83
91
|
--config <dir> project folder (default: here)
|
|
84
92
|
[FOR AI AGENTS] only on the human's decision.
|
|
85
93
|
|
|
94
|
+
ia-qa-pal rebaseline <page>… Replace those pages' baselines with their latest capture —
|
|
95
|
+
for a baseline too old to compare (captured before
|
|
96
|
+
exploration depth or capture fingerprints existed).
|
|
97
|
+
Shows exactly what would be replaced and writes nothing.
|
|
98
|
+
--all every page your config declares
|
|
99
|
+
--yes actually replace them (after reading the plan)
|
|
100
|
+
--json the plan as one JSON document
|
|
101
|
+
--config <dir> project folder (default: here)
|
|
102
|
+
[FOR AI AGENTS] the plan is for a human; never --yes
|
|
103
|
+
on your own initiative.
|
|
104
|
+
|
|
105
|
+
ia-qa-pal report [file.html] Write the last tour's report as one web page:
|
|
106
|
+
verdict, the four sections, recent tours.
|
|
107
|
+
Self-contained, nothing sent anywhere.
|
|
108
|
+
--open open it in your browser
|
|
109
|
+
--config <dir> project folder (default: here)
|
|
110
|
+
|
|
86
111
|
ia-qa-pal status The tour running now (phase, progress) or the
|
|
87
112
|
last one (its report).
|
|
88
113
|
--json as one JSON document
|
|
@@ -114,6 +139,11 @@ function valueOf(args, flag) {
|
|
|
114
139
|
throw new Error(`${flag} needs a value.`);
|
|
115
140
|
return v;
|
|
116
141
|
}
|
|
142
|
+
function reportTarget(args, after) {
|
|
143
|
+
const i = args.indexOf(after);
|
|
144
|
+
const v = i === -1 ? undefined : args[i + 1];
|
|
145
|
+
return v && !v.startsWith('--') ? v : undefined;
|
|
146
|
+
}
|
|
117
147
|
const interactive = () => !!process.stdin.isTTY && !!process.stderr.isTTY && !process.env.CI;
|
|
118
148
|
async function withPrompt(fn) {
|
|
119
149
|
const rl = readline.createInterface({ input: process.stdin, output: process.stderr });
|
|
@@ -221,6 +251,31 @@ async function main() {
|
|
|
221
251
|
process.exitCode = run?.status === 'done' ? run.exitCode ?? 0 : run ? 0 : 2;
|
|
222
252
|
return;
|
|
223
253
|
}
|
|
254
|
+
if (command === 'rebaseline') {
|
|
255
|
+
const pages = args.slice(1).filter((a, i, all) => !a.startsWith('--') && all[i - 1] !== '--config');
|
|
256
|
+
const plan = (0, rebaseline_1.rebaselinePlan)(dir, pages, { all: args.includes('--all') });
|
|
257
|
+
const applied = args.includes('--yes') ? await (0, rebaseline_1.applyRebaseline)(dir, plan) : plan;
|
|
258
|
+
if (json)
|
|
259
|
+
process.stdout.write(`${JSON.stringify({ schema: 'ia-qa-pal/rebaseline@1', ...applied }, null, 2)}\n`);
|
|
260
|
+
else
|
|
261
|
+
process.stderr.write((0, rebaseline_1.renderRebaseline)(applied, { applied: args.includes('--yes') }));
|
|
262
|
+
process.exitCode = applied.refused ? 2 : 0;
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
if (command === 'report') {
|
|
266
|
+
const run = (0, run_1.readRun)(dir);
|
|
267
|
+
if (!run?.report) {
|
|
268
|
+
process.stderr.write(run?.status === 'running' ? 'A tour is still running — its report comes when it ends: ia-qa-pal status\n' : 'No finished tour to report on yet. Run one: ia-qa-pal tour\n');
|
|
269
|
+
process.exitCode = 2;
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
const file = (0, htmlReport_1.writeHtmlReport)(dir, run.report, { file: reportTarget(args, 'report'), version: VERSION, at: run.finishedAt });
|
|
273
|
+
process.stderr.write(`📄 Report: ${file}\n`);
|
|
274
|
+
if (args.includes('--open'))
|
|
275
|
+
(0, htmlReport_1.openFile)(file);
|
|
276
|
+
process.exitCode = 0;
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
224
279
|
if (command !== 'tour') {
|
|
225
280
|
process.stderr.write(`Unknown command "${command}". Run ia-qa-pal help.\n`);
|
|
226
281
|
process.exitCode = 2;
|
|
@@ -230,7 +285,7 @@ async function main() {
|
|
|
230
285
|
const batch = batchRaw === undefined ? undefined : Number(batchRaw);
|
|
231
286
|
if (batch !== undefined && (!Number.isInteger(batch) || batch < 1))
|
|
232
287
|
throw new Error('--batch needs a positive whole number.');
|
|
233
|
-
const tourOptions = { more: args.includes('--more'), suite: args.includes('--suite'), strict: args.includes('--strict'), batch, session: valueOf(args, '--session') };
|
|
288
|
+
const tourOptions = { more: args.includes('--more'), suite: args.includes('--suite'), strict: args.includes('--strict'), allContracts: args.includes('--all-contracts'), batch, session: valueOf(args, '--session') };
|
|
234
289
|
if (args.includes('--background')) {
|
|
235
290
|
const started = (0, run_1.startBackground)(dir, tourOptions);
|
|
236
291
|
if (json)
|
|
@@ -254,6 +309,12 @@ async function main() {
|
|
|
254
309
|
}
|
|
255
310
|
const result = await (0, run_1.trackedTour)({ dir, ...tourOptions });
|
|
256
311
|
process.stdout.write(json ? `${JSON.stringify(result, null, 2)}\n` : (0, report_1.renderReport)(result));
|
|
312
|
+
if (args.includes('--report') || args.includes('--open')) {
|
|
313
|
+
const file = (0, htmlReport_1.writeHtmlReport)(dir, result, { file: reportTarget(args, '--report'), version: VERSION });
|
|
314
|
+
process.stderr.write(`📄 Report: ${file}\n`);
|
|
315
|
+
if (args.includes('--open'))
|
|
316
|
+
(0, htmlReport_1.openFile)(file);
|
|
317
|
+
}
|
|
257
318
|
process.exitCode = result.exitCode;
|
|
258
319
|
}
|
|
259
320
|
catch (err) {
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4DAA8C;AAC9C,2CAA6B;AAC7B,sCAAyC;AACzC,oCAAiE;AAEjE,gCAA4F;AAC5F,sCAAwC;AAGxC,MAAM,OAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAiB,CAAC;AAEhE,MAAM,IAAI,GAAG;;;;;;;;;;;;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H,CAAC;AAED,KAAK,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { TourResult } from './tour';
|
|
2
|
+
/**
|
|
3
|
+
* One short line per finished tour, so a report can show how the last tours went. Only what
|
|
4
|
+
* the timeline draws — the full report of each tour is not kept, and nothing here is a secret.
|
|
5
|
+
*/
|
|
6
|
+
export interface HistoryEntry {
|
|
7
|
+
at: string;
|
|
8
|
+
mode: TourResult['mode'];
|
|
9
|
+
mood: Mood;
|
|
10
|
+
exitCode: number;
|
|
11
|
+
durationMs: number;
|
|
12
|
+
underContract: number;
|
|
13
|
+
configured: number;
|
|
14
|
+
}
|
|
15
|
+
export type Mood = 'baseline' | 'clean' | 'look' | 'broken' | 'no-answer';
|
|
16
|
+
export declare const historyFile: (dir: string) => string;
|
|
17
|
+
/**
|
|
18
|
+
* The one mood a tour ends in, shared by the terminal-free report and its timeline.
|
|
19
|
+
* `look` is a tour that fails nothing but still holds something a person should see.
|
|
20
|
+
*/
|
|
21
|
+
export declare function moodOf(r: TourResult): Mood;
|
|
22
|
+
export declare function appendHistory(dir: string, r: TourResult, at?: string): void;
|
|
23
|
+
export declare function readHistory(dir: string): HistoryEntry[];
|
package/dist/history.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.historyFile = void 0;
|
|
37
|
+
exports.moodOf = moodOf;
|
|
38
|
+
exports.appendHistory = appendHistory;
|
|
39
|
+
exports.readHistory = readHistory;
|
|
40
|
+
const fs = __importStar(require("fs"));
|
|
41
|
+
const path = __importStar(require("path"));
|
|
42
|
+
const MAX_ENTRIES = 60;
|
|
43
|
+
const historyFile = (dir) => path.join(dir, '.ia-qa', 'pal', 'history.jsonl');
|
|
44
|
+
exports.historyFile = historyFile;
|
|
45
|
+
/**
|
|
46
|
+
* The one mood a tour ends in, shared by the terminal-free report and its timeline.
|
|
47
|
+
* `look` is a tour that fails nothing but still holds something a person should see.
|
|
48
|
+
*/
|
|
49
|
+
function moodOf(r) {
|
|
50
|
+
if (r.refused || r.exitCode === 2)
|
|
51
|
+
return 'no-answer';
|
|
52
|
+
if (r.exitCode === 1)
|
|
53
|
+
return 'broken';
|
|
54
|
+
if (r.mode !== 'regression')
|
|
55
|
+
return 'baseline';
|
|
56
|
+
const d = r.drift;
|
|
57
|
+
const s = r.suite;
|
|
58
|
+
const somethingToSee = !d ||
|
|
59
|
+
d.verdict !== 'PASS' ||
|
|
60
|
+
d.behindInteraction.length > 0 ||
|
|
61
|
+
d.maskSuggestions.length > 0 ||
|
|
62
|
+
(r.check && (r.check.newUnnamed.length + r.check.newAmbiguous.length + r.check.newOrphans.length > 0)) ||
|
|
63
|
+
(s && ((s.repairs?.total ?? 0) > 0 || s.newDeadNames.length > 0)) ||
|
|
64
|
+
r.pages.notMapped.length > 0 ||
|
|
65
|
+
(r.pages.unreadable?.length ?? 0) > 0;
|
|
66
|
+
return somethingToSee ? 'look' : 'clean';
|
|
67
|
+
}
|
|
68
|
+
function appendHistory(dir, r, at = new Date().toISOString()) {
|
|
69
|
+
const entry = {
|
|
70
|
+
at,
|
|
71
|
+
mode: r.mode,
|
|
72
|
+
mood: moodOf(r),
|
|
73
|
+
exitCode: r.exitCode,
|
|
74
|
+
durationMs: r.durationMs,
|
|
75
|
+
underContract: r.pages.underContract,
|
|
76
|
+
configured: r.pages.configured,
|
|
77
|
+
};
|
|
78
|
+
try {
|
|
79
|
+
const file = (0, exports.historyFile)(dir);
|
|
80
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
81
|
+
const lines = fs.existsSync(file) ? fs.readFileSync(file, 'utf8').split('\n').filter(Boolean) : [];
|
|
82
|
+
lines.push(JSON.stringify(entry));
|
|
83
|
+
fs.writeFileSync(file, lines.slice(-MAX_ENTRIES).join('\n') + '\n');
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
/* history is a courtesy to the report; a full disk must not cost the tour */
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function readHistory(dir) {
|
|
90
|
+
try {
|
|
91
|
+
return fs
|
|
92
|
+
.readFileSync((0, exports.historyFile)(dir), 'utf8')
|
|
93
|
+
.split('\n')
|
|
94
|
+
.filter(Boolean)
|
|
95
|
+
.flatMap((line) => {
|
|
96
|
+
try {
|
|
97
|
+
return [JSON.parse(line)];
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
return [];
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
return [];
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.js","sourceRoot":"","sources":["../src/history.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,wBAgBC;AAED,sCAmBC;AAED,kCAgBC;AApFD,uCAAyB;AACzB,2CAA6B;AAoB7B,MAAM,WAAW,GAAG,EAAE,CAAC;AAEhB,MAAM,WAAW,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC;AAAhF,QAAA,WAAW,eAAqE;AAE7F;;;GAGG;AACH,SAAgB,MAAM,CAAC,CAAa;IAClC,IAAI,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC;QAAE,OAAO,WAAW,CAAC;IACtD,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC;QAAE,OAAO,QAAQ,CAAC;IACtC,IAAI,CAAC,CAAC,IAAI,KAAK,YAAY;QAAE,OAAO,UAAU,CAAC;IAC/C,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC;IAClB,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC;IAClB,MAAM,cAAc,GAClB,CAAC,CAAC;QACF,CAAC,CAAC,OAAO,KAAK,MAAM;QACpB,CAAC,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC;QAC9B,CAAC,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC;QAC5B,CAAC,CA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AAC,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACnG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;QAClC,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IACtE,CAAC;IAAC,MAAM,CAAC;QACP,6EAA6E;IAC/E,CAAC;AACH,CAAC;AAED,SAAgB,WAAW,CAAC,GAAW;IACrC,IAAI,CAAC;QACH,OAAO,EAAE;aACN,YAAY,CAAC,IAAA,mBAAW,EAAC,GAAG,CAAC,EAAE,MAAM,CAAC;aACtC,KAAK,CAAC,IAAI,CAAC;aACX,MAAM,CAAC,OAAO,CAAC;aACf,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YAChB,IAAI,CAAC;gBACH,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAiB,CAAC,CAAC;YAC5C,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,EAAE,CAAC;YACZ,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TourResult } from './tour';
|
|
2
|
+
import type { HistoryEntry } from './history';
|
|
3
|
+
export declare function renderHtmlReport(r: TourResult, history?: HistoryEntry[], meta?: {
|
|
4
|
+
version?: string;
|
|
5
|
+
generatedAt?: string;
|
|
6
|
+
}): string;
|
|
7
|
+
export declare const reportFile: (dir: string) => string;
|
|
8
|
+
/** Writes the report next to the project's pal state (or where asked) and returns the absolute path. */
|
|
9
|
+
export declare function writeHtmlReport(dir: string, r: TourResult, opts?: {
|
|
10
|
+
file?: string;
|
|
11
|
+
version?: string;
|
|
12
|
+
at?: string;
|
|
13
|
+
}): string;
|
|
14
|
+
/** Best effort: a report that cannot be opened is still written, and its path was printed. */
|
|
15
|
+
export declare function openFile(file: string): void;
|