@ia-qa/pal 0.1.0 → 0.2.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 +19 -7
- package/TUTORIAL.md +294 -0
- package/dist/cli/index.js +125 -17
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/report.js +3 -1
- package/dist/report.js.map +1 -1
- package/dist/setup.d.ts +34 -0
- package/dist/setup.js +162 -0
- package/dist/setup.js.map +1 -0
- package/dist/tour.d.ts +5 -0
- package/dist/tour.js +16 -0
- package/dist/tour.js.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -8,6 +8,8 @@ One command walks your web app, maps every page, checks it, and compares it with
|
|
|
8
8
|
- **Deterministic.** Verdicts come from [`@ia-qa/self-healing`](https://www.npmjs.com/package/@ia-qa/self-healing) — the same engine as `ia-qa-heal diff` and `ia-qa-heal check`, so the two can never disagree.
|
|
9
9
|
- **Honest about coverage.** A tour that measured part of your app says which part. A first tour establishes a baseline; it is never reported as a pass.
|
|
10
10
|
|
|
11
|
+
> **New here?** The [step-by-step tutorial](https://www.ia-qa.com/devtools/pal/tutorial) walks a first tour, reading the report, logins and CI.
|
|
12
|
+
|
|
11
13
|
## Install
|
|
12
14
|
|
|
13
15
|
```bash
|
|
@@ -15,26 +17,36 @@ npm i -D @ia-qa/pal
|
|
|
15
17
|
npx playwright install chromium
|
|
16
18
|
```
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
## Use
|
|
19
21
|
|
|
20
22
|
```bash
|
|
21
|
-
npx ia-qa-
|
|
23
|
+
npx ia-qa-pal tour
|
|
22
24
|
```
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
**Not set up yet?** In a terminal, the first `tour` asks two questions — where the app lives, and how it logs in — then reads its pages from `sitemap.xml` (or, without one, follows its links: same host, GET only, at most 50 pages), shows you exactly what it will write, and writes it only when you say yes. Nothing it asks takes a password.
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
From CI or an agent, the same setup with flags:
|
|
27
29
|
|
|
28
30
|
```bash
|
|
29
|
-
npx ia-qa-pal
|
|
31
|
+
npx ia-qa-pal setup --url https://your-app.example --login none --yes
|
|
30
32
|
```
|
|
31
33
|
|
|
34
|
+
| `--login` | |
|
|
35
|
+
|---|---|
|
|
36
|
+
| `none` | public pages |
|
|
37
|
+
| `browser` | you log in by hand once — SSO, MFA, anything: `npx -p @ia-qa/self-healing ia-qa-heal login` |
|
|
38
|
+
| `session --session <file>` | your test suite already saves a Playwright `storageState`; only its path is written |
|
|
39
|
+
|
|
40
|
+
A login form filled from environment variables (`auth` in the config) is set up with `npx -p @ia-qa/self-healing ia-qa-heal init`.
|
|
41
|
+
|
|
32
42
|
**First tour** — every page on the surface (no clicks), the first 10 pages that have closed menus, tabs or dialogs explored in depth, the checks, and a baseline.
|
|
33
43
|
|
|
34
44
|
**Every tour after** — each page re-captured the way its baseline was captured, compared with it, checked.
|
|
35
45
|
|
|
36
46
|
**`--more`** — explores the next batch in depth and adds it to the baseline. It refuses while the last tour ended on BLOCK: promoting those pages would accept drift nobody looked at.
|
|
37
47
|
|
|
48
|
+
Illustrative report:
|
|
49
|
+
|
|
38
50
|
```
|
|
39
51
|
ia-qa-pal tour — https://app.example · level 1 (with a login)
|
|
40
52
|
✅ PASS · 7937 ok · 1 renamed · 0 lost · 0 ambiguous · 0 rebound
|
|
@@ -64,7 +76,7 @@ The time estimate only appears once a batch has been explored on your app: it is
|
|
|
64
76
|
|---|---|
|
|
65
77
|
| `0` | nothing needs a decision (warnings never fail a tour) |
|
|
66
78
|
| `1` | a dead link, or drift that blocks (an element lost, ambiguous, or a selector now pointing at another element) |
|
|
67
|
-
| `2` | could not answer:
|
|
79
|
+
| `2` | could not answer: not set up, nothing could be mapped, or the tour refused to run |
|
|
68
80
|
|
|
69
81
|
Read `2` as "no answer", never as "the app is broken".
|
|
70
82
|
|
|
@@ -77,4 +89,4 @@ Read `2` as "no answer", never as "the app is broken".
|
|
|
77
89
|
|
|
78
90
|
## Not yet
|
|
79
91
|
|
|
80
|
-
Reading your test suite (coverage of what it does not test, repairs proposed as a patch), a
|
|
92
|
+
Reading your test suite (coverage of what it does not test, repairs proposed as a patch), a local MCP server for agents, and background exploration are planned next.
|
package/TUTORIAL.md
ADDED
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
# ia-qa-pal — tutorial
|
|
2
|
+
|
|
3
|
+
`@ia-qa/pal` is a QA pal **next to** your team. It does the routine rounds nobody has time for — walk the whole app, map every page, check it, compare it with the last round — and hands a person only what needs a person.
|
|
4
|
+
|
|
5
|
+
It is not a QA engineer. It does not know what your app *should* do, so it never judges business behaviour. It knows what your app *did* yesterday, what is broken in a way any app can be broken (a dead link, a control nobody can name), and — the part most tools leave out — **what it could not see**.
|
|
6
|
+
|
|
7
|
+
Everything runs on your machine, in a headless browser. Nothing is uploaded. No LLM decides anything.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 1. Install
|
|
12
|
+
|
|
13
|
+
Node 18 or newer.
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm i -D @ia-qa/pal
|
|
17
|
+
npx playwright install chromium
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Check it answers:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx ia-qa-pal --help
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 2. The first tour
|
|
29
|
+
|
|
30
|
+
In your project folder:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npx ia-qa-pal tour
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The project is not set up yet, so the tour asks two questions first.
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
This project is not set up yet — two questions first.
|
|
40
|
+
|
|
41
|
+
Where does the app live? (https://…) https://www.ia-qa.com
|
|
42
|
+
Does the app ask you to log in?
|
|
43
|
+
1 no
|
|
44
|
+
2 yes — I log in by hand in a browser (SSO, MFA, anything)
|
|
45
|
+
3 yes — my test suite already saves a Playwright storageState file
|
|
46
|
+
Choice [1-3]: 1
|
|
47
|
+
🗺 Reading www.ia-qa.com/sitemap.xml (and robots.txt) — a plain fetch, nothing else.
|
|
48
|
+
Found 146 pages.
|
|
49
|
+
|
|
50
|
+
📄 This writes /home/me/shop/.ia-qa/config.json
|
|
51
|
+
app https://www.ia-qa.com
|
|
52
|
+
pages 146 from the sitemap: home, all-tools, method, resources, articles, veille, mcp-server, mcp-registry, +138 more
|
|
53
|
+
login none
|
|
54
|
+
Nothing else is written. No field holds a secret.
|
|
55
|
+
Write it? [y/N] y
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
- **The pages come from your `sitemap.xml`.** No sitemap? It follows the links from your home page instead — same host, GET only, at most 50 pages, never a link that acts (`/logout`, `/delete`…).
|
|
59
|
+
- **It shows the file before writing it**, and what it shows is exactly what it writes. It never overwrites an existing config.
|
|
60
|
+
- **No question takes a password.**
|
|
61
|
+
|
|
62
|
+
Then the tour runs:
|
|
63
|
+
|
|
64
|
+
1. **Surface** — every page, loaded, no clicks. On a real site this is about 1.7 s a page.
|
|
65
|
+
2. **Depth** — the first 10 pages that have closed menus, tabs, accordions or dialogs are explored: each is opened, and what it reveals goes into the page's contract. About 20 s a page, and it grows with the number of controls.
|
|
66
|
+
3. **Checks** — dead links, controls without an accessible name, names shared by several controls, pages nothing links to.
|
|
67
|
+
4. **Baseline** — what the app is today becomes the reference for tomorrow.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 3. Reading the first report
|
|
72
|
+
|
|
73
|
+
A real first tour, on a 9-page app behind a login:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
ia-qa-pal tour — https://www.nodemented.com · level 1 (with a login)
|
|
77
|
+
📌 Baseline established — nothing to compare yet. The next tour measures drift against it.
|
|
78
|
+
9 of 9 pages under contract · 8 explored in depth of 8 pages with closed controls
|
|
79
|
+
|
|
80
|
+
⛔ To decide
|
|
81
|
+
new 14 elements without an accessible name — e.g. alert #\31 on billing
|
|
82
|
+
new 7 names shared by several elements — e.g. button "🎥" ×10 on feature-manager
|
|
83
|
+
new 8 pages nothing links to — admin-dashboard, billing, cookies, …
|
|
84
|
+
Full list: ia-qa-heal check. Warnings never fail the tour.
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Every page fit in the first batch, so nothing was left unexplored. On a larger app the report ends with what the tour did not reach — illustrative numbers:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
🔍 Not seen
|
|
91
|
+
136 pages with closed controls not explored yet — about 47 min (3000 controls × 0.94 s, pace measured on 142 clicks)
|
|
92
|
+
ia-qa-pal tour --more explores the next batch
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The report has at most four sections, and each one appears only when it holds something:
|
|
96
|
+
|
|
97
|
+
| section | what it holds | what you do |
|
|
98
|
+
|---|---|---|
|
|
99
|
+
| 🔴 **Broken in the app** | links your app itself answers with an error | fix the link |
|
|
100
|
+
| ⛔ **To decide** | drift that blocks, and findings seen for the first time | a person looks |
|
|
101
|
+
| 🔧 **Ready to repair** | *(coming with test-suite support)* | |
|
|
102
|
+
| 🔍 **Not seen** | pages not explored, not mapped, only partly explored, links it could not verify | decide whether it matters |
|
|
103
|
+
|
|
104
|
+
Three things are worth knowing about this first report:
|
|
105
|
+
|
|
106
|
+
- **It is not a pass.** Nothing was compared — there was nothing to compare with. The headline says so.
|
|
107
|
+
- **The denominator is always there.** `10 explored in depth of 146` is the honest number; `10 pages explored` would not be.
|
|
108
|
+
- **The time estimate is measured, not assumed.** It only appears once a batch has run on *your* app, and it prints what it rests on.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 4. The next tours
|
|
113
|
+
|
|
114
|
+
Change nothing, or deploy something, and run it again:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
npx ia-qa-pal tour
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
The same app, the next tour:
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
ia-qa-pal tour — https://www.nodemented.com · level 1 (with a login)
|
|
124
|
+
✅ PASS · 358 ok · 0 renamed · 0 lost · 0 ambiguous · 0 rebound
|
|
125
|
+
9 of 9 pages under contract · 8 explored in depth of 8 pages with closed controls
|
|
126
|
+
29 warnings already reported — not listed again.
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Each page is captured again **the way its baseline was captured** — on the surface, or opened in depth — and compared with it. A finding already reported is counted, not listed again: a list that never shrinks stops being read by the third tour.
|
|
130
|
+
|
|
131
|
+
When something moved (illustrative):
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
⛔ BLOCK · 1937 ok · 0 renamed · 1 lost · 0 ambiguous · 0 rebound
|
|
135
|
+
|
|
136
|
+
⛔ To decide
|
|
137
|
+
drift settings: 1 lost · 0 ambiguous · 0 rebound
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
What the words mean:
|
|
141
|
+
|
|
142
|
+
| word | meaning |
|
|
143
|
+
|---|---|
|
|
144
|
+
| `renamed` | the same control, relabelled. Reported, never blocking. |
|
|
145
|
+
| `lost` | a control that is gone. |
|
|
146
|
+
| `ambiguous` | several controls now answer to the same description — choosing would be guessing. |
|
|
147
|
+
| `rebound` | a selector that used to reach one control now reaches **another**. A test using it would pass while clicking the wrong thing. |
|
|
148
|
+
|
|
149
|
+
A label that changes on its own every run — a counter, a date, a generated value — comes back as `renamed` every time. Tell it apart once in `.ia-qa/config.json`:
|
|
150
|
+
|
|
151
|
+
```json
|
|
152
|
+
"nameMask": ["Cart (*)"]
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
The control stays under contract; only its label is no longer compared.
|
|
156
|
+
|
|
157
|
+
### Exit codes
|
|
158
|
+
|
|
159
|
+
| code | meaning |
|
|
160
|
+
|---|---|
|
|
161
|
+
| `0` | nothing needs a decision — warnings never fail a tour |
|
|
162
|
+
| `1` | a dead link, or drift that blocks |
|
|
163
|
+
| `2` | no answer: not set up, nothing could be mapped, or the tour refused to run |
|
|
164
|
+
|
|
165
|
+
Read `2` as "could not answer", never as "the app is broken".
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## 5. Exploring the rest
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
npx ia-qa-pal tour --more
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
# illustrative
|
|
177
|
+
🔍 10 pages explored in depth and promoted to the baseline: resources, articles, …
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
`--more` explores the next batch and adds those pages to the baseline. Run it when you have the time — the estimate told you how much. `--batch <n>` changes the batch size.
|
|
181
|
+
|
|
182
|
+
It **refuses** when the last tour ended on BLOCK:
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
⏸ Did not run — The last tour ended on BLOCK. Exploring now would promote those pages as they are today and accept that drift unseen — resolve it, then run `ia-qa-pal tour` again.
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Promoting a page to the baseline says "this is how it should be". Doing that while something unexplained changed would accept the change without anyone looking at it.
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## 6. Behind a login
|
|
193
|
+
|
|
194
|
+
The second setup question has three answers.
|
|
195
|
+
|
|
196
|
+
**By hand in a browser** — for SSO, MFA, a consent screen, a magic link, anything:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
npx -p @ia-qa/self-healing ia-qa-heal login
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
A visible browser opens, you log in, and the session is saved in `.ia-qa/session.json`. 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.
|
|
203
|
+
|
|
204
|
+
Pages found during setup were found without logging in. Once logged in, list the ones behind the login:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
npx -p @ia-qa/self-healing ia-qa-heal discover --crawl --apply
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**Your test suite already saves a session** — most authenticated Playwright suites write a `storageState` in `globalSetup`. Give its path; only the path is written:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
npx ia-qa-pal setup --url https://staging.shop.example --login session --session playwright/.auth/user.json --yes
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
**A login form filled from environment variables** is set up with `npx -p @ia-qa/self-healing ia-qa-heal init`, which writes the variable *names*, never their values.
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## 7. In CI
|
|
221
|
+
|
|
222
|
+
Build the baseline on your machine, commit it, and let CI compare.
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
git add .ia-qa/config.json .ia-qa/baseline .ia-qa/pal
|
|
226
|
+
git commit -m "ia-qa-pal baseline"
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Never commit `.ia-qa/session.json`.
|
|
230
|
+
|
|
231
|
+
```yaml
|
|
232
|
+
- run: npm ci
|
|
233
|
+
- run: npx playwright install chromium
|
|
234
|
+
- run: npx ia-qa-pal tour --json > pal-report.json
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
- With the baseline committed, a tour in CI is a regression tour: it never grows the baseline. (Without one, it would run a first tour and write a baseline nobody reviewed — commit it first.) A green run over 10 pages and a green run over 20 do not say the same thing, so the reference changes only when a person runs `--more` or promotes it.
|
|
238
|
+
- `--json` puts the whole report on stdout; progress stays on stderr.
|
|
239
|
+
- Gate on the exit code: `1` fails the build, `2` means the job could not answer — report it as a broken job, not as a broken app.
|
|
240
|
+
- Setting up from CI takes flags and never asks: `ia-qa-pal setup --url … --login none --yes`.
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## 8. With an AI agent
|
|
245
|
+
|
|
246
|
+
An agent can drive `ia-qa-pal` from a shell. Three rules it must follow — they are also in `ia-qa-pal --help`:
|
|
247
|
+
|
|
248
|
+
- **Read "Not seen".** A clean tour over part of an app is not a clean app, and the agent must say which part was not seen.
|
|
249
|
+
- **A first tour is not a pass.** It established the baseline.
|
|
250
|
+
- **Never answer a setup question for you, and never run `ia-qa-heal login`.** That command waits for a person at a browser; the agent gives it to you instead.
|
|
251
|
+
|
|
252
|
+
Asked to tour a project that is not set up, `ia-qa-pal tour --json` answers with what is missing rather than guessing:
|
|
253
|
+
|
|
254
|
+
```json
|
|
255
|
+
{
|
|
256
|
+
"refused": "This project is not set up yet — there is no .ia-qa/config.json.",
|
|
257
|
+
"setupRequired": {
|
|
258
|
+
"missing": ["url", "login"],
|
|
259
|
+
"command": "ia-qa-pal setup --url https://your-app.example --login none --yes"
|
|
260
|
+
},
|
|
261
|
+
"exitCode": 2
|
|
262
|
+
}
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## 9. What it touches
|
|
268
|
+
|
|
269
|
+
- **Only your app.** Its pages load whatever they load in any browser (fonts, analytics…).
|
|
270
|
+
- **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, send…) are never clicked.
|
|
271
|
+
- **The link check** requests your app's own links with GET and skips any URL that acts.
|
|
272
|
+
- **Files** live in `.ia-qa/`: `config.json`, `mapping/` (today), `baseline/` (the reference), `pal/state.json` (the measured pace and the findings already reported).
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## 10. When something looks wrong
|
|
277
|
+
|
|
278
|
+
**A page is "not mapped" with a timeout.** One slow page costs that page, not the tour. It stays in **Not seen**; if its drift is shown, the report marks it as an older capture.
|
|
279
|
+
|
|
280
|
+
**Every page behind the login is "not mapped".** The session expired, or never worked. Log in again with `ia-qa-heal login`, then run the tour.
|
|
281
|
+
|
|
282
|
+
**`renamed` on a label you did not touch.** A counter, a date or generated content. Add a `nameMask` for it (section 4).
|
|
283
|
+
|
|
284
|
+
**"only partly explored (click budget reached)".** The page has more closed controls than one exploration opens (150 clicks). Its contract covers part of the page, and the report says so.
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## 11. Coming next
|
|
289
|
+
|
|
290
|
+
- **Your test suite**: which pages it never visits, and repairs to its selectors proposed as a patch — never applied without you.
|
|
291
|
+
- **A local MCP server** so agents call `tour` as a tool.
|
|
292
|
+
- **Background exploration**, followed from the local console.
|
|
293
|
+
|
|
294
|
+
`ia-qa-pal` is built on [`@ia-qa/self-healing`](https://www.npmjs.com/package/@ia-qa/self-healing): the verdicts it prints are the ones `ia-qa-heal diff` and `ia-qa-heal check` compute, so the two never disagree.
|
package/dist/cli/index.js
CHANGED
|
@@ -1,8 +1,43 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
3
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
const readline = __importStar(require("readline/promises"));
|
|
4
38
|
const tour_1 = require("../tour");
|
|
5
39
|
const report_1 = require("../report");
|
|
40
|
+
const setup_1 = require("../setup");
|
|
6
41
|
const VERSION = require('../../package.json').version;
|
|
7
42
|
const HELP = `ia-qa-pal — a QA pal next to your team
|
|
8
43
|
|
|
@@ -13,23 +48,35 @@ Runs entirely on your machine with a local browser. No LLM, nothing uploaded.
|
|
|
13
48
|
[FOR AI AGENTS] You are driving this for a human. Read the whole report, the
|
|
14
49
|
"Not seen" section included: a clean tour over part of an app is not a clean
|
|
15
50
|
app, and you must say which part was not seen. A first tour establishes the
|
|
16
|
-
baseline — never report it as a pass.
|
|
17
|
-
|
|
51
|
+
baseline — never report it as a pass. Set a project up with flags only
|
|
52
|
+
(\`setup --url … --login … --yes\`), never by guessing an answer for the human.
|
|
53
|
+
Never run \`ia-qa-heal login\`: it waits for a human at a browser; ask them.
|
|
18
54
|
|
|
19
55
|
Usage:
|
|
20
56
|
ia-qa-pal tour First run: every page on the surface, the first
|
|
21
57
|
batch in depth, checks, baseline.
|
|
22
58
|
Next runs: re-capture, compare, check.
|
|
59
|
+
No config yet: asks the setup questions first
|
|
60
|
+
(in a terminal), otherwise says what is missing.
|
|
23
61
|
--more explore the next batch in depth instead
|
|
24
62
|
--batch <n> pages per depth batch (default 10)
|
|
25
63
|
--json the report as one JSON document on stdout
|
|
26
64
|
--session <file> a Playwright storageState to reuse
|
|
27
65
|
--config <dir> project holding .ia-qa/ (default: here)
|
|
28
66
|
|
|
29
|
-
|
|
30
|
-
|
|
67
|
+
ia-qa-pal setup Write .ia-qa/config.json: the app address, how it
|
|
68
|
+
logs in, and its pages (from sitemap.xml, else by
|
|
69
|
+
following its links). Never overwrites a config.
|
|
70
|
+
--url <https://…> the app
|
|
71
|
+
--login none|browser|session none; by hand in a browser (then run
|
|
72
|
+
${setup_1.LOGIN_COMMAND});
|
|
73
|
+
or a storageState your suite already writes
|
|
74
|
+
--session <file> that storageState (with --login session)
|
|
75
|
+
--yes write without asking
|
|
76
|
+
--config <dir> project folder (default: here)
|
|
31
77
|
|
|
32
|
-
|
|
78
|
+
Exit codes: 0 nothing to decide · 1 something broke or needs a decision ·
|
|
79
|
+
2 could not answer (not set up, nothing mapped, refused).
|
|
33
80
|
`;
|
|
34
81
|
function valueOf(args, flag) {
|
|
35
82
|
const i = args.indexOf(flag);
|
|
@@ -40,6 +87,46 @@ function valueOf(args, flag) {
|
|
|
40
87
|
throw new Error(`${flag} needs a value.`);
|
|
41
88
|
return v;
|
|
42
89
|
}
|
|
90
|
+
const interactive = () => !!process.stdin.isTTY && !!process.stderr.isTTY && !process.env.CI;
|
|
91
|
+
async function withPrompt(fn) {
|
|
92
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stderr });
|
|
93
|
+
try {
|
|
94
|
+
return await fn((q) => rl.question(q));
|
|
95
|
+
}
|
|
96
|
+
finally {
|
|
97
|
+
rl.close();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
function loginFlag(args) {
|
|
101
|
+
const v = valueOf(args, '--login');
|
|
102
|
+
if (v === undefined)
|
|
103
|
+
return undefined;
|
|
104
|
+
if (v !== 'none' && v !== 'browser' && v !== 'session')
|
|
105
|
+
throw new Error('--login takes none, browser or session.');
|
|
106
|
+
return v;
|
|
107
|
+
}
|
|
108
|
+
function printSetup(outcome, json) {
|
|
109
|
+
if (json) {
|
|
110
|
+
process.stdout.write(`${JSON.stringify({ schema: 'ia-qa-pal/setup@1', ...outcome }, null, 2)}\n`);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (!outcome.written) {
|
|
114
|
+
for (const p of outcome.problems)
|
|
115
|
+
process.stderr.write(`❌ ${p}\n`);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
process.stderr.write(`\n✅ Written: ${outcome.file}\n`);
|
|
119
|
+
if (outcome.next === setup_1.LOGIN_COMMAND) {
|
|
120
|
+
process.stderr.write(`\nNext, by a person at a browser (an agent cannot do this):\n ${setup_1.LOGIN_COMMAND}\nthen:\n ia-qa-pal tour\n`);
|
|
121
|
+
if (outcome.pagesFrom !== 'sitemap') {
|
|
122
|
+
process.stderr.write('\nThe pages were found without logging in. Once logged in, list the ones behind the login:\n' +
|
|
123
|
+
' npx -p @ia-qa/self-healing ia-qa-heal discover --crawl --apply\n');
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
process.stderr.write(`\nNext:\n ia-qa-pal tour\n`);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
43
130
|
async function main() {
|
|
44
131
|
const args = process.argv.slice(2);
|
|
45
132
|
const command = args[0];
|
|
@@ -51,30 +138,51 @@ async function main() {
|
|
|
51
138
|
process.stdout.write(`${VERSION}\n`);
|
|
52
139
|
return;
|
|
53
140
|
}
|
|
54
|
-
if (command !== 'tour') {
|
|
55
|
-
process.stderr.write(`Unknown command "${command}". Run ia-qa-pal help.\n`);
|
|
56
|
-
process.exitCode = 2;
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
141
|
const json = args.includes('--json');
|
|
60
142
|
try {
|
|
143
|
+
if (command === 'setup') {
|
|
144
|
+
const options = {
|
|
145
|
+
dir: valueOf(args, '--config'),
|
|
146
|
+
url: valueOf(args, '--url'),
|
|
147
|
+
login: loginFlag(args),
|
|
148
|
+
session: valueOf(args, '--session'),
|
|
149
|
+
yes: args.includes('--yes'),
|
|
150
|
+
};
|
|
151
|
+
const outcome = interactive() && !json
|
|
152
|
+
? await withPrompt((ask) => (0, setup_1.runSetup)({ ...options, ask }))
|
|
153
|
+
: await (0, setup_1.runSetup)(options);
|
|
154
|
+
printSetup(outcome, json);
|
|
155
|
+
process.exitCode = outcome.written ? 0 : 2;
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
if (command !== 'tour') {
|
|
159
|
+
process.stderr.write(`Unknown command "${command}". Run ia-qa-pal help.\n`);
|
|
160
|
+
process.exitCode = 2;
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
61
163
|
const batchRaw = valueOf(args, '--batch');
|
|
62
164
|
const batch = batchRaw === undefined ? undefined : Number(batchRaw);
|
|
63
165
|
if (batch !== undefined && (!Number.isInteger(batch) || batch < 1))
|
|
64
166
|
throw new Error('--batch needs a positive whole number.');
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
167
|
+
const dir = valueOf(args, '--config');
|
|
168
|
+
if (!(0, setup_1.configExists)(dir ?? process.cwd()) && interactive() && !json) {
|
|
169
|
+
process.stderr.write('This project is not set up yet — two questions first.\n\n');
|
|
170
|
+
const outcome = await withPrompt((ask) => (0, setup_1.runSetup)({ dir, session: valueOf(args, '--session'), ask }));
|
|
171
|
+
printSetup(outcome, false);
|
|
172
|
+
if (!outcome.written || outcome.next !== 'ia-qa-pal tour') {
|
|
173
|
+
process.exitCode = outcome.written ? 0 : 2;
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
process.stderr.write('\n');
|
|
177
|
+
}
|
|
178
|
+
const result = await (0, tour_1.runTour)({ dir, batch, more: args.includes('--more'), session: valueOf(args, '--session') });
|
|
71
179
|
process.stdout.write(json ? `${JSON.stringify(result, null, 2)}\n` : (0, report_1.renderReport)(result));
|
|
72
180
|
process.exitCode = result.exitCode;
|
|
73
181
|
}
|
|
74
182
|
catch (err) {
|
|
75
183
|
const message = err instanceof Error ? err.message : String(err);
|
|
76
184
|
if (json)
|
|
77
|
-
process.stdout.write(`${JSON.stringify({
|
|
185
|
+
process.stdout.write(`${JSON.stringify({ error: message, exitCode: 2 }, null, 2)}\n`);
|
|
78
186
|
else
|
|
79
187
|
process.stderr.write(`❌ ${message}\n`);
|
|
80
188
|
process.exitCode = 2;
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4DAA8C;AAC9C,kCAAkC;AAClC,sCAAyC;AACzC,oCAAiE;AAGjE,MAAM,OAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAiB,CAAC;AAEhE,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCA8BsB,qBAAa;;;;;;;;CAQ/C,CAAC;AAEF,SAAS,OAAO,CAAC,IAAc,EAAE,IAAY;IAC3C,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,IAAI,CAAC,KAAK,CAAC,CAAC;QAAE,OAAO,SAAS,CAAC;IAC/B,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,iBAAiB,CAAC,CAAC;IACrF,OAAO,CAAC,CAAC;AACX,CAAC;AAED,MAAM,WAAW,GAAG,GAAY,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC,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,EAAE,CAAC;QACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjE,IAAI,IAAI;YAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;;YAC3F,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,OAAO,IAAI,CAAC,CAAC;QAC5C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC;AAED,KAAK,IAAI,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { runTour } from './tour';
|
|
2
2
|
export type { TourOptions, TourResult } from './tour';
|
|
3
3
|
export { renderReport } from './report';
|
|
4
|
+
export { runSetup, LOGIN_COMMAND } from './setup';
|
|
5
|
+
export type { SetupOptions, SetupOutcome, PalLogin } from './setup';
|
|
4
6
|
export { selectBatch, needingDepth, estimate, splitFindings, exitCodeFor, DEFAULT_BATCH } from './plan';
|
|
5
7
|
export type { Estimate, Pace, CheckSplit } from './plan';
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_BATCH = exports.exitCodeFor = exports.splitFindings = exports.estimate = exports.needingDepth = exports.selectBatch = exports.renderReport = exports.runTour = void 0;
|
|
3
|
+
exports.DEFAULT_BATCH = exports.exitCodeFor = exports.splitFindings = exports.estimate = exports.needingDepth = exports.selectBatch = exports.LOGIN_COMMAND = exports.runSetup = exports.renderReport = exports.runTour = void 0;
|
|
4
4
|
var tour_1 = require("./tour");
|
|
5
5
|
Object.defineProperty(exports, "runTour", { enumerable: true, get: function () { return tour_1.runTour; } });
|
|
6
6
|
var report_1 = require("./report");
|
|
7
7
|
Object.defineProperty(exports, "renderReport", { enumerable: true, get: function () { return report_1.renderReport; } });
|
|
8
|
+
var setup_1 = require("./setup");
|
|
9
|
+
Object.defineProperty(exports, "runSetup", { enumerable: true, get: function () { return setup_1.runSetup; } });
|
|
10
|
+
Object.defineProperty(exports, "LOGIN_COMMAND", { enumerable: true, get: function () { return setup_1.LOGIN_COMMAND; } });
|
|
8
11
|
var plan_1 = require("./plan");
|
|
9
12
|
Object.defineProperty(exports, "selectBatch", { enumerable: true, get: function () { return plan_1.selectBatch; } });
|
|
10
13
|
Object.defineProperty(exports, "needingDepth", { enumerable: true, get: function () { return plan_1.needingDepth; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,+BAAiC;AAAxB,+FAAA,OAAO,OAAA;AAEhB,mCAAwC;AAA/B,sGAAA,YAAY,OAAA;AACrB,+BAAwG;AAA/F,mGAAA,WAAW,OAAA;AAAE,oGAAA,YAAY,OAAA;AAAE,gGAAA,QAAQ,OAAA;AAAE,qGAAA,aAAa,OAAA;AAAE,mGAAA,WAAW,OAAA;AAAE,qGAAA,aAAa,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,+BAAiC;AAAxB,+FAAA,OAAO,OAAA;AAEhB,mCAAwC;AAA/B,sGAAA,YAAY,OAAA;AACrB,iCAAkD;AAAzC,iGAAA,QAAQ,OAAA;AAAE,sGAAA,aAAa,OAAA;AAEhC,+BAAwG;AAA/F,mGAAA,WAAW,OAAA;AAAE,oGAAA,YAAY,OAAA;AAAE,gGAAA,QAAQ,OAAA;AAAE,qGAAA,aAAa,OAAA;AAAE,mGAAA,WAAW,OAAA;AAAE,qGAAA,aAAa,OAAA"}
|
package/dist/report.js
CHANGED
|
@@ -36,8 +36,10 @@ function headline(r) {
|
|
|
36
36
|
function renderReport(r) {
|
|
37
37
|
const out = [];
|
|
38
38
|
const level = r.level === 1 ? 'level 1 (with a login)' : 'level 0 (public pages)';
|
|
39
|
-
out.push(`ia-qa-pal tour — ${r.baseUrl} · ${level}`);
|
|
39
|
+
out.push(r.baseUrl ? `ia-qa-pal tour — ${r.baseUrl} · ${level}` : 'ia-qa-pal tour');
|
|
40
40
|
out.push(headline(r));
|
|
41
|
+
if (r.setupRequired)
|
|
42
|
+
out.push('', ` Set it up: ${r.setupRequired.command}`, ' (in a terminal, `ia-qa-pal tour` asks the two questions itself)');
|
|
41
43
|
if (r.refused)
|
|
42
44
|
return out.join('\n') + '\n';
|
|
43
45
|
const p = r.pages;
|
package/dist/report.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.js","sourceRoot":"","sources":["../src/report.ts"],"names":[],"mappings":";;AAiCA,
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../src/report.ts"],"names":[],"mappings":";;AAiCA,oCA0EC;AAzGD;;;;;GAKG;AAEH,MAAM,MAAM,GAAG,CAAC,CAAS,EAAE,GAAW,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAE5F,SAAS,QAAQ,CAAC,OAAe;IAC/B,IAAI,OAAO,GAAG,EAAE;QAAE,OAAO,GAAG,OAAO,IAAI,CAAC;IACxC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;IACzC,IAAI,OAAO,GAAG,EAAE;QAAE,OAAO,GAAG,OAAO,MAAM,CAAC;IAC1C,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAA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,KAAK,EAAE,aAAa;QAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC;IACvE,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC;QAAE,MAAM,CAAC,IAAI,CAAC,MAAM,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,EAAE,MAAM,CAAC,oDAAoD,CAAC,CAAC;IACjJ,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,OAAO,IAAI,EAAE;QAAE,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC/F,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,aAAa,EAAE,GAAG,MAAM,CAAC,CAAC;IAE9D,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAC/B,CAAC"}
|
package/dist/setup.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { PageTarget } from '@ia-qa/self-healing';
|
|
2
|
+
/**
|
|
3
|
+
* Two questions and a preview. Everything that decides the file goes through `planSetup` /
|
|
4
|
+
* `writeSetup` — the same door `ia-qa-heal ui` uses — so what is shown is what is written, an
|
|
5
|
+
* existing config is never overwritten, and no field ever takes a secret.
|
|
6
|
+
*/
|
|
7
|
+
export type PalLogin = 'none' | 'browser' | 'session';
|
|
8
|
+
export declare const LOGIN_COMMAND = "npx -p @ia-qa/self-healing ia-qa-heal login";
|
|
9
|
+
export interface SetupOptions {
|
|
10
|
+
dir?: string;
|
|
11
|
+
url?: string;
|
|
12
|
+
login?: PalLogin;
|
|
13
|
+
/** Path of a Playwright storageState the suite already writes (login = session). */
|
|
14
|
+
session?: string;
|
|
15
|
+
/** Write without asking for confirmation. */
|
|
16
|
+
yes?: boolean;
|
|
17
|
+
/** Ask for what is missing. Absent: nothing is asked, a missing answer is a refusal. */
|
|
18
|
+
ask?: (question: string) => Promise<string>;
|
|
19
|
+
onProgress?: (line: string) => void;
|
|
20
|
+
}
|
|
21
|
+
export interface SetupOutcome {
|
|
22
|
+
written: boolean;
|
|
23
|
+
file?: string;
|
|
24
|
+
baseUrl?: string;
|
|
25
|
+
pages: PageTarget[];
|
|
26
|
+
pagesFrom?: 'sitemap' | 'crawl' | 'home';
|
|
27
|
+
login?: PalLogin;
|
|
28
|
+
/** What stops the file from being written, in words a person can act on. */
|
|
29
|
+
problems: string[];
|
|
30
|
+
/** The command to run next — a person's command when the login needs a browser. */
|
|
31
|
+
next?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function configExists(dir: string): boolean;
|
|
34
|
+
export declare function runSetup(opts?: SetupOptions): Promise<SetupOutcome>;
|
package/dist/setup.js
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
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.LOGIN_COMMAND = void 0;
|
|
37
|
+
exports.configExists = configExists;
|
|
38
|
+
exports.runSetup = runSetup;
|
|
39
|
+
const fs = __importStar(require("fs"));
|
|
40
|
+
const path = __importStar(require("path"));
|
|
41
|
+
const self_healing_1 = require("@ia-qa/self-healing");
|
|
42
|
+
exports.LOGIN_COMMAND = 'npx -p @ia-qa/self-healing ia-qa-heal login';
|
|
43
|
+
const CRAWL_CAP = 50;
|
|
44
|
+
const LOGIN_CHOICES = { '1': 'none', '2': 'browser', '3': 'session' };
|
|
45
|
+
function configExists(dir) {
|
|
46
|
+
return fs.existsSync(path.join(dir, '.ia-qa', 'config.json'));
|
|
47
|
+
}
|
|
48
|
+
function withHome(pages) {
|
|
49
|
+
const hasHome = pages.some((p) => {
|
|
50
|
+
try {
|
|
51
|
+
return new URL(p.url, 'http://x').pathname === '/';
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
if (hasHome)
|
|
58
|
+
return pages;
|
|
59
|
+
const name = pages.some((p) => p.name === 'home') ? 'home-page' : 'home';
|
|
60
|
+
return [{ name, url: '/' }, ...pages];
|
|
61
|
+
}
|
|
62
|
+
function request(baseUrl, pages, login, session) {
|
|
63
|
+
const mode = login === 'none' ? 'none' : 'session';
|
|
64
|
+
return { baseUrl, pages, login: { mode, ...(login === 'session' && session ? { sessionFile: session } : {}) } };
|
|
65
|
+
}
|
|
66
|
+
async function runSetup(opts = {}) {
|
|
67
|
+
const dir = path.resolve(opts.dir ?? process.cwd());
|
|
68
|
+
const progress = opts.onProgress ?? ((line) => console.error(line));
|
|
69
|
+
const refuse = (problems, extra = {}) => ({ written: false, pages: [], problems, ...extra });
|
|
70
|
+
if (configExists(dir)) {
|
|
71
|
+
return refuse([`${path.join(dir, '.ia-qa', 'config.json')} already exists — setup never overwrites one. Run: ia-qa-pal tour`]);
|
|
72
|
+
}
|
|
73
|
+
let url = opts.url?.trim();
|
|
74
|
+
if (!url && opts.ask)
|
|
75
|
+
url = (await opts.ask('Where does the app live? (https://…) ')).trim();
|
|
76
|
+
if (!url)
|
|
77
|
+
return refuse(['The app address is missing: --url https://your-app.example']);
|
|
78
|
+
if (!(0, self_healing_1.isWebAddress)(url))
|
|
79
|
+
return refuse([`"${url}" is not a web address — it starts with http:// or https://.`]);
|
|
80
|
+
let login = opts.login;
|
|
81
|
+
if (!login && opts.ask) {
|
|
82
|
+
const answer = (await opts.ask('Does the app ask you to log in?\n' +
|
|
83
|
+
' 1 no\n' +
|
|
84
|
+
' 2 yes — I log in by hand in a browser (SSO, MFA, anything)\n' +
|
|
85
|
+
' 3 yes — my test suite already saves a Playwright storageState file\n' +
|
|
86
|
+
'Choice [1-3]: ')).trim();
|
|
87
|
+
login = LOGIN_CHOICES[answer];
|
|
88
|
+
}
|
|
89
|
+
if (!login)
|
|
90
|
+
return refuse(['How the app logs in is missing: --login none | browser | session']);
|
|
91
|
+
let session = opts.session?.trim();
|
|
92
|
+
if (login === 'session' && !session && opts.ask)
|
|
93
|
+
session = (await opts.ask('Path of that storageState file: ')).trim();
|
|
94
|
+
if (login === 'session' && !session)
|
|
95
|
+
return refuse(['--login session needs the file: --session path/to/storageState.json']);
|
|
96
|
+
const host = new URL(url).host;
|
|
97
|
+
progress(`🗺 Reading ${host}/sitemap.xml (and robots.txt) — a plain fetch, nothing else.`);
|
|
98
|
+
let pages = [];
|
|
99
|
+
let pagesFrom = 'home';
|
|
100
|
+
try {
|
|
101
|
+
const sitemap = await (0, self_healing_1.readSitemap)(url);
|
|
102
|
+
pages = sitemap.pages;
|
|
103
|
+
if (pages.length > 0) {
|
|
104
|
+
pagesFrom = 'sitemap';
|
|
105
|
+
progress(` Found ${pages.length} page${pages.length === 1 ? '' : 's'}${sitemap.capped ? ' (the sitemap holds more — stopped at the cap)' : ''}.`);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
for (const line of sitemap.reason)
|
|
109
|
+
progress(` ${line}`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
catch (err) {
|
|
113
|
+
progress(` No sitemap: ${err instanceof Error ? err.message : String(err)}`);
|
|
114
|
+
}
|
|
115
|
+
if (pages.length === 0) {
|
|
116
|
+
progress(`🕸 Following links from ${host} in a headless browser — same host, GET only, at most ${CRAWL_CAP} pages, action links skipped.`);
|
|
117
|
+
try {
|
|
118
|
+
(0, self_healing_1.setBaseDir)(dir);
|
|
119
|
+
const plan = (0, self_healing_1.planSetup)(request(url, [{ name: 'home', url: '/' }], login, session), dir);
|
|
120
|
+
const found = await (0, self_healing_1.crawlApp)(plan.config, { maxPages: CRAWL_CAP, ...(session ? { session: path.resolve(dir, session) } : {}) });
|
|
121
|
+
pages = found.map((c) => ({ name: c.name, url: c.url }));
|
|
122
|
+
if (pages.length > 0)
|
|
123
|
+
pagesFrom = 'crawl';
|
|
124
|
+
progress(` Found ${pages.length} page${pages.length === 1 ? '' : 's'}.`);
|
|
125
|
+
}
|
|
126
|
+
catch (err) {
|
|
127
|
+
progress(` Could not follow links: ${err instanceof Error ? err.message : String(err)}`);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
pages = withHome(pages);
|
|
131
|
+
const body = request(url, pages, login, session);
|
|
132
|
+
const plan = (0, self_healing_1.planSetup)(body, dir);
|
|
133
|
+
const outcome = { written: false, baseUrl: url, pages: plan.config.pages, pagesFrom, login, problems: plan.problems };
|
|
134
|
+
if (plan.problems.length > 0)
|
|
135
|
+
return outcome;
|
|
136
|
+
const file = path.join(dir, '.ia-qa', 'config.json');
|
|
137
|
+
const names = plan.config.pages.map((p) => p.name);
|
|
138
|
+
progress('');
|
|
139
|
+
progress(`📄 This writes ${file}`);
|
|
140
|
+
progress(` app ${url}`);
|
|
141
|
+
progress(` pages ${names.length} from the ${pagesFrom === 'home' ? 'home page only' : pagesFrom}: ${names.slice(0, 8).join(', ')}${names.length > 8 ? `, +${names.length - 8} more` : ''}`);
|
|
142
|
+
progress(` login ${login === 'none' ? 'none' : login === 'browser' ? `by hand — ${exports.LOGIN_COMMAND} saves .ia-qa/session.json` : `storageState ${session}`}`);
|
|
143
|
+
progress(' Nothing else is written. No field holds a secret.');
|
|
144
|
+
if (!opts.yes) {
|
|
145
|
+
if (!opts.ask)
|
|
146
|
+
return { ...outcome, problems: ['Not written: confirm with --yes.'] };
|
|
147
|
+
const confirm = (await opts.ask('Write it? [y/N] ')).trim().toLowerCase();
|
|
148
|
+
if (confirm !== 'y' && confirm !== 'yes')
|
|
149
|
+
return { ...outcome, problems: ['Not written — nothing changed.'] };
|
|
150
|
+
}
|
|
151
|
+
const result = (0, self_healing_1.writeSetup)(body, dir);
|
|
152
|
+
if (!result.written)
|
|
153
|
+
return { ...outcome, problems: [result.error] };
|
|
154
|
+
const needsSession = login === 'browser' && !fs.existsSync(path.join(dir, '.ia-qa', 'session.json'));
|
|
155
|
+
return {
|
|
156
|
+
...outcome,
|
|
157
|
+
written: true,
|
|
158
|
+
file: result.file,
|
|
159
|
+
next: needsSession ? exports.LOGIN_COMMAND : 'ia-qa-pal tour',
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=setup.js.map
|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AAE,CAAC,gCAAgC,CAAC,EAAE,CAAC;IAChH,CAAC;IAED,MAAM,MAAM,GAAG,IAAA,yBAAU,EAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACrC,IAAI,CAAC,MAAM,CAAC,OAAO;QAAE,OAAO,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;IACrE,MAAM,YAAY,GAAG,KAAK,KAAK,SAAS,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC;IACrG,OAAO;QACL,GAAG,OAAO;QACV,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,qBAAa,CAAC,CAAC,CAAC,gBAAgB;KACtD,CAAC;AACJ,CAAC"}
|
package/dist/tour.d.ts
CHANGED
|
@@ -51,6 +51,11 @@ export interface TourResult {
|
|
|
51
51
|
estimate: Estimate | null;
|
|
52
52
|
/** Set when the tour declined to run, with the reason. */
|
|
53
53
|
refused?: string;
|
|
54
|
+
/** The project has no config yet: what a setup needs, and the command that provides it. */
|
|
55
|
+
setupRequired?: {
|
|
56
|
+
missing: Array<'url' | 'login'>;
|
|
57
|
+
command: string;
|
|
58
|
+
};
|
|
54
59
|
exitCode: 0 | 1 | 2;
|
|
55
60
|
durationMs: number;
|
|
56
61
|
}
|
package/dist/tour.js
CHANGED
|
@@ -105,6 +105,22 @@ async function runTour(opts = {}) {
|
|
|
105
105
|
const progress = opts.onProgress ?? ((line) => console.error(line));
|
|
106
106
|
const dir = path.resolve(opts.dir ?? process.cwd());
|
|
107
107
|
(0, self_healing_1.setBaseDir)(dir);
|
|
108
|
+
if (!fs.existsSync(path.join(dir, '.ia-qa', 'config.json'))) {
|
|
109
|
+
return {
|
|
110
|
+
schema: 'ia-qa-pal/tour@1',
|
|
111
|
+
mode: 'first',
|
|
112
|
+
baseUrl: '',
|
|
113
|
+
level: 0,
|
|
114
|
+
pages: { configured: 0, underContract: 0, explored: 0, notExplored: [], exploredThisTour: [], partlyExplored: [], notMapped: [], notInBaseline: [] },
|
|
115
|
+
drift: null,
|
|
116
|
+
check: null,
|
|
117
|
+
estimate: null,
|
|
118
|
+
refused: 'This project is not set up yet — there is no .ia-qa/config.json.',
|
|
119
|
+
setupRequired: { missing: ['url', 'login'], command: 'ia-qa-pal setup --url https://your-app.example --login none --yes' },
|
|
120
|
+
exitCode: 2,
|
|
121
|
+
durationMs: Date.now() - started,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
108
124
|
const config = (0, self_healing_1.loadConfig)();
|
|
109
125
|
const names = config.pages.map((p) => p.name);
|
|
110
126
|
const state = (0, state_1.loadState)();
|
package/dist/tour.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tour.js","sourceRoot":"","sources":["../src/tour.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2HA,0BAqIC;AAhQD,uCAAyB;AACzB,2CAA6B;AAC7B,sDAU6B;AAE7B,iCAAwG;AAExG,mCAA+C;AAgD/C,MAAM,SAAS,GAAc,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;AAEhF;;;GAGG;AACH,KAAK,UAAU,QAAQ,CAAI,EAAoB;IAC7C,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IACpC,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,GAAG,CAAC,GAAG,IAAe,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;IAC3F,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,EAAE,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EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACnH,MAAM,CAAC,QAAQ,GAAG,IAAA,eAAQ,EAAC,MAAM,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAClF,MAAM,CAAC,QAAQ,GAAG,IAAA,kBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC,CAAC;IAEjH,IAAA,iBAAS,EAAC,KAAK,CAAC,CAAC;IACjB,OAAO,MAAM,EAAE,CAAC;AAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ia-qa/pal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "A QA pal next to your team: one command walks your web app, maps it, checks it and diffs it against yesterday, then reports what broke, what needs a decision and what it could not see. Local, deterministic, no LLM.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"qa",
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"dist",
|
|
31
|
-
"README.md"
|
|
31
|
+
"README.md",
|
|
32
|
+
"TUTORIAL.md"
|
|
32
33
|
],
|
|
33
34
|
"scripts": {
|
|
34
35
|
"build": "tsc -p tsconfig.json",
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
"node": ">=18.0.0"
|
|
40
41
|
},
|
|
41
42
|
"dependencies": {
|
|
42
|
-
"@ia-qa/self-healing": "^1.
|
|
43
|
+
"@ia-qa/self-healing": "^1.11.0"
|
|
43
44
|
},
|
|
44
45
|
"peerDependencies": {
|
|
45
46
|
"playwright": ">=1.40.0"
|