tolkira 0.3.0 → 0.4.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/DESIGN.md +131 -9
- package/GLOSSARY.md +115 -8
- package/README.md +229 -37
- package/dist/attachment.d.ts +33 -0
- package/dist/attempt-diagnostics.d.ts +2 -0
- package/dist/ci.d.ts +12 -0
- package/dist/cli.js +7099 -3785
- package/dist/cli.js.map +4 -4
- package/dist/compat/cucumber-html-reporter.js +174 -8
- package/dist/compat/cucumber-html-reporter.js.map +4 -4
- package/dist/compat/options.d.ts +2 -0
- package/dist/email.d.ts +18 -0
- package/dist/history.d.ts +41 -0
- package/dist/i18n/catalogs.d.ts +7 -0
- package/dist/index.d.ts +12 -1
- package/dist/index.js +5148 -2453
- package/dist/index.js.map +4 -4
- package/dist/input/detect.d.ts +30 -0
- package/dist/input/load.d.ts +1 -0
- package/dist/input/playwright.d.ts +14 -0
- package/dist/options.d.ts +6 -0
- package/dist/output.d.ts +7 -1
- package/dist/pdf.d.ts +9 -0
- package/dist/render/attachments.d.ts +3 -0
- package/dist/render/ci.d.ts +4 -0
- package/dist/render/client-i18n.d.ts +7 -0
- package/dist/render/details.d.ts +5 -0
- package/dist/render/dom-contract.d.ts +42 -0
- package/dist/render/format.d.ts +34 -0
- package/dist/render/html.d.ts +2 -9
- package/dist/render/i18n.d.ts +30 -0
- package/dist/render/markdown.d.ts +2 -1
- package/dist/render/matrix.d.ts +3 -0
- package/dist/render/print-script.d.ts +1 -0
- package/dist/render/report-client.d.ts +1 -0
- package/dist/render/report.d.ts +4 -0
- package/dist/render/search.d.ts +3 -0
- package/dist/render/trends.d.ts +7 -0
- package/dist/render/triage.d.ts +5 -0
- package/dist/render/types.d.ts +26 -0
- package/dist/report/index-run.d.ts +69 -0
- package/dist/report/model.d.ts +11 -2
- package/dist/summary.d.ts +3 -0
- package/dist/warnings.d.ts +6 -0
- package/docs/AGENT-INTERFACE.md +367 -33
- package/docs/CI.md +185 -0
- package/docs/COMPATIBILITY.md +72 -11
- package/docs/CUCUMBER-COMPATIBILITY.md +50 -26
- package/docs/EMAIL.md +273 -0
- package/docs/I18N.md +241 -0
- package/docs/JUNIT-XML.md +19 -2
- package/docs/LIMITATIONS.md +10 -6
- package/docs/PDF.md +255 -0
- package/llms.txt +36 -4
- package/package.json +21 -5
- package/dist/report/attachment.d.ts +0 -10
package/docs/PDF.md
ADDED
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
# PDF export
|
|
2
|
+
|
|
3
|
+
`--pdf <file>` prints the report to a PDF through the optional Playwright
|
|
4
|
+
Chromium engine. It is opt-in: without the flag no PDF is created, no browser is
|
|
5
|
+
started and the one-file HTML default is unchanged. The PDF is generated from the
|
|
6
|
+
same report HTML and the same print view the browser uses, so there is no second
|
|
7
|
+
layout.
|
|
8
|
+
|
|
9
|
+
```shell
|
|
10
|
+
# PDF beside the report
|
|
11
|
+
tolkira test-results/ --out report.html --pdf report.pdf
|
|
12
|
+
|
|
13
|
+
# PDF as the only artifact; the report is rendered in memory only
|
|
14
|
+
tolkira test-results/ --pdf report.pdf
|
|
15
|
+
|
|
16
|
+
# PDF, email, history and JSON in one run
|
|
17
|
+
tolkira test-results/ --out report.html --pdf report.pdf \
|
|
18
|
+
--email email.html --history .history/history.json --json > summary.json
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Install the engine
|
|
22
|
+
|
|
23
|
+
The default `npm install tolkira` stays small: `playwright-core` is an optional
|
|
24
|
+
peer and is not installed automatically. Install it and the Chromium headless
|
|
25
|
+
shell before the first `--pdf` run, in the project where Tolkira runs:
|
|
26
|
+
|
|
27
|
+
```shell
|
|
28
|
+
npm i -D playwright-core@^1.65.0
|
|
29
|
+
npx playwright-core install chromium-headless-shell
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The consumer does not need the `playwright` package, and the full Chromium build
|
|
33
|
+
is not required: Tolkira launches headless, which uses the headless shell. A
|
|
34
|
+
project-local Tolkira install is recommended. A globally installed or
|
|
35
|
+
npx-cached Tolkira resolves `playwright-core` beside itself first, then from the
|
|
36
|
+
current project directory, so the peer must be visible to that project.
|
|
37
|
+
|
|
38
|
+
On Linux CI hosts without the browser system libraries:
|
|
39
|
+
|
|
40
|
+
```shell
|
|
41
|
+
npm i -D playwright-core@^1.65.0
|
|
42
|
+
npx playwright-core install --with-deps chromium-headless-shell
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
There is no browser postinstall: the download is explicit. Cost: about 13 MB for
|
|
46
|
+
`playwright-core`, 285.8 MB unpacked for the headless shell, and about 4 MB of
|
|
47
|
+
helpers (ffmpeg ~3.8 MB, winldd ~0.2 MB); roughly 303 MB unpacked all together,
|
|
48
|
+
and the download is smaller. The shell-only command was verified manually on
|
|
49
|
+
Windows on 2026-11-21. `npx playwright install chromium` would add both the full
|
|
50
|
+
Chromium build and the headless shell (about 736 MB unpacked) and is not required
|
|
51
|
+
for PDF. The CI e2e job still installs the full browsers for its tests. The
|
|
52
|
+
default runtime dependencies, report, email, JSON and CI output do not change
|
|
53
|
+
without `--pdf`.
|
|
54
|
+
|
|
55
|
+
If `playwright-core` or the headless shell is missing, the CLI exits 1 with the
|
|
56
|
+
install command; no partial PDF remains. The error also says to omit `--pdf` to
|
|
57
|
+
keep the HTML-only route.
|
|
58
|
+
|
|
59
|
+
## What the PDF contains
|
|
60
|
+
|
|
61
|
+
The PDF is the complete print archive of the report HTML, not a one-page
|
|
62
|
+
executive summary. `--email` is the concise summary:
|
|
63
|
+
|
|
64
|
+
- Report, Details and, when history is present, Trends;
|
|
65
|
+
- every closed feature, scenario and attachment detail opened;
|
|
66
|
+
- screenshots and other inline images;
|
|
67
|
+
- the light print palette, even when the screen uses dark mode;
|
|
68
|
+
- tables fitted to the printable width and each present view starting on a new
|
|
69
|
+
page.
|
|
70
|
+
|
|
71
|
+
The PDF is A4 portrait. A4 comes from `format: 'A4'`, and the 12 mm inset comes
|
|
72
|
+
from the print CSS `@page { margin: 12mm }`. `preferCSSPageSize` only lets a
|
|
73
|
+
declared CSS `size` take priority; the report declares none today, so A4
|
|
74
|
+
applies. Background colours print (`printBackground`), and there is no browser
|
|
75
|
+
header, footer, URL or page number (`displayHeaderFooter: false`). The layout
|
|
76
|
+
engine is Chromium only in this slice; Firefox and WebKit are not PDF engines
|
|
77
|
+
here. Letter and custom paper are not exposed; use browser print for those or
|
|
78
|
+
follow B-030.
|
|
79
|
+
|
|
80
|
+
The PDF is generated from a fresh page. The CLI search and filter state is not
|
|
81
|
+
applied, so the PDF always archives the whole run. Use the browser print if you
|
|
82
|
+
want the failures-only filtered view or landscape for an unusually wide matrix.
|
|
83
|
+
Video and audio attachments cannot print; screenshots, text attachments and the
|
|
84
|
+
skipped-attachment notice do. The PDF is a delivery artifact, not a pixel
|
|
85
|
+
contract: Chromium and font updates can shift line breaks. The PDF-only route has
|
|
86
|
+
no logo or Trends because `--logo` and `--history` require `--out`.
|
|
87
|
+
|
|
88
|
+
## CLI contract
|
|
89
|
+
|
|
90
|
+
`--pdf` is another output, not a mode. It composes with `--out`, `--email`,
|
|
91
|
+
`--json`, `--ci`/`--ci-out` and `--history`, and needs at least one input:
|
|
92
|
+
|
|
93
|
+
```shell
|
|
94
|
+
tolkira test-results/ --out report.html --pdf report.pdf
|
|
95
|
+
tolkira test-results/ --pdf report.pdf --json > summary.json
|
|
96
|
+
tolkira test-results/ --pdf report.pdf --email email.html
|
|
97
|
+
tolkira test-results/ --out report.html --pdf report.pdf --locale de
|
|
98
|
+
tolkira test-results/ --pdf report.pdf --pdf-timeout 600000
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
- At least one of `--out`, `--pdf`, `--json`, `--ci` or `--email` is required,
|
|
102
|
+
and `--pdf` needs a non-empty file path.
|
|
103
|
+
- `--locale` is accepted with `--pdf` even without `--out` or `--email`. The PDF
|
|
104
|
+
follows the report locale; the CLI, JSON and CI text stay English.
|
|
105
|
+
- `--accent` applies to the in-memory report HTML used for the PDF.
|
|
106
|
+
- Without `--out`, the PDF-only route writes no report HTML. `--logo` and
|
|
107
|
+
`--history` still require `--out` and exit 2 with the PDF-only route.
|
|
108
|
+
- `--pdf-timeout <ms>` overrides the render deadline. It requires `--pdf`,
|
|
109
|
+
accepts a positive integer up to `2147483647` and rejects `0`, negative,
|
|
110
|
+
fractional, non-numeric and leading-zero values with exit 2.
|
|
111
|
+
- The write order is **report → PDF → email → history → `--ci-out` → stdout**.
|
|
112
|
+
The PDF is written before the email that names it, so a PDF failure exits 1,
|
|
113
|
+
names the PDF path, keeps an already written report and skips the email,
|
|
114
|
+
history, `--ci-out` and stdout. No partial PDF remains.
|
|
115
|
+
- The PDF path is validated like the other outputs: it must not equal an input,
|
|
116
|
+
the logo, `--out`, `--ci-out`, `--history` or `--email`, and must not lie
|
|
117
|
+
inside an input directory. Paths are canonicalized, and Windows/macOS compare
|
|
118
|
+
case-insensitively. A collision exits 2 and writes nothing.
|
|
119
|
+
- `PDF written to <path>` is printed only when stdout is free. With `--json`
|
|
120
|
+
(including `--json --ci-out`) or `--ci` on stdout, the machine bytes are
|
|
121
|
+
unchanged and the PDF line is suppressed. With only `--ci-out` and no
|
|
122
|
+
`--json`, the PDF line is printed.
|
|
123
|
+
- The email note names `--out` when a report is written; without `--out` it
|
|
124
|
+
names the PDF as the full artifact. The PDF is written first, so the note never
|
|
125
|
+
points at a missing file.
|
|
126
|
+
- A directory or an unwritable PDF target is a write failure: exit 1, the report
|
|
127
|
+
stays, no temporary file is left behind.
|
|
128
|
+
- The report size warning also covers a PDF-only run; it measures the report
|
|
129
|
+
HTML, not the PDF file.
|
|
130
|
+
|
|
131
|
+
## API
|
|
132
|
+
|
|
133
|
+
`renderPdf(html, options?)` prints already-rendered report HTML and returns the
|
|
134
|
+
PDF bytes. It writes no file, starts no server and makes no network request:
|
|
135
|
+
HTTP(S) subresources in the caller HTML are aborted before the page loads, while
|
|
136
|
+
inline `data:` URIs render. Use `generateReport` to get the exact CLI HTML:
|
|
137
|
+
|
|
138
|
+
```ts
|
|
139
|
+
import { writeFile } from 'node:fs/promises';
|
|
140
|
+
import { generateReport, renderPdf } from 'tolkira';
|
|
141
|
+
|
|
142
|
+
const { html } = await generateReport(['test-results/'], {
|
|
143
|
+
title: 'Checkout acceptance',
|
|
144
|
+
locale: 'de',
|
|
145
|
+
});
|
|
146
|
+
const pdf = await renderPdf(html, { timeoutMs: 300_000 });
|
|
147
|
+
await writeFile('report.pdf', pdf);
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
| Option | Meaning |
|
|
151
|
+
| --- | --- |
|
|
152
|
+
| `timeoutMs` | Render deadline in milliseconds; default `300000` (five minutes) |
|
|
153
|
+
|
|
154
|
+
The CLI and `renderPdf` produce equivalent PDFs for the same HTML and engine.
|
|
155
|
+
The API returns a `Uint8Array` view over the engine bytes; it never writes an
|
|
156
|
+
output file. The call is asynchronous because it launches Chromium, loads the
|
|
157
|
+
HTML with `page.setContent` (no temporary report file or `file://` page) and
|
|
158
|
+
waits for fonts and images before printing.
|
|
159
|
+
|
|
160
|
+
## Timeouts and print volume
|
|
161
|
+
|
|
162
|
+
`page.pdf` has no `timeout` option, and Playwright/Chromium has no 30-second
|
|
163
|
+
print default. Tolkira bounds each stage explicitly: `page.setContent` receives
|
|
164
|
+
the load timeout, and the font/image wait and the print are each raced against a
|
|
165
|
+
deadline. The default is 300,000 ms (five minutes); `--pdf-timeout` and
|
|
166
|
+
`PdfOptions.timeoutMs` replace it. Each stage can consume the full deadline, so a
|
|
167
|
+
pathological run can take up to about three times the configured value. The
|
|
168
|
+
browser close has a five-second deadline; a wedged Chromium child beyond that is
|
|
169
|
+
left for the runner or job to clean up.
|
|
170
|
+
|
|
171
|
+
Print volume measured on the maintainer's machine (Chromium, 2026-11-20), not in
|
|
172
|
+
CI: about 5 s for 2,000 scenarios and 670 A4 pages, 21 s for 4,000 and about
|
|
173
|
+
2.7 minutes for 10,000 and about 3,337 pages. CI machines can be slower; raise
|
|
174
|
+
`--pdf-timeout` when a large report needs it. The 10 MB report warning is not a
|
|
175
|
+
PDF size cap; the PDF inherits the print volume limits. Very large reports mean a
|
|
176
|
+
large PDF, more memory and a longer run.
|
|
177
|
+
|
|
178
|
+
The browser is closed in a `finally` block after success or failure.
|
|
179
|
+
`setContent` keeps report data out of the file system; only the final PDF you
|
|
180
|
+
asked for is written.
|
|
181
|
+
|
|
182
|
+
## Security
|
|
183
|
+
|
|
184
|
+
The render is local and makes no network request: HTTP(S) subresources in caller
|
|
185
|
+
HTML are aborted and inline `data:` images render. Playwright launches Chromium
|
|
186
|
+
with `chromiumSandbox: false` (`--no-sandbox`) by default, and Tolkira keeps that
|
|
187
|
+
default so root/container CI keeps working. The renderer is therefore not
|
|
188
|
+
OS-sandboxed. The security boundary is the report's Content Security Policy plus
|
|
189
|
+
escaped attachment content; run untrusted attachments in a container or VM.
|
|
190
|
+
Revisit the sandbox when the CI runner supports it (B-029).
|
|
191
|
+
|
|
192
|
+
## Missing engine
|
|
193
|
+
|
|
194
|
+
Without the optional engine, `--pdf` fails cleanly:
|
|
195
|
+
|
|
196
|
+
```text
|
|
197
|
+
tolkira: Cannot render PDF for report.pdf: PDF output needs the optional Playwright Chromium engine.
|
|
198
|
+
In your project: npm i -D playwright-core@^1.65.0
|
|
199
|
+
Then: npx playwright-core install chromium-headless-shell
|
|
200
|
+
A project-local Tolkira install is recommended. Or omit --pdf.
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
An already written report stays. The email, history, `--ci-out` and stdout
|
|
204
|
+
outputs are skipped because the PDF comes first; no temporary PDF remains.
|
|
205
|
+
|
|
206
|
+
## CI example
|
|
207
|
+
|
|
208
|
+
The browser gate already installs Chromium, so a job that runs Tolkira's e2e
|
|
209
|
+
suite pays no extra download. The CI e2e job still installs the full browsers for
|
|
210
|
+
its tests; that is test tooling, not the PDF install path. A PDF-only job needs
|
|
211
|
+
the peer and the headless shell:
|
|
212
|
+
|
|
213
|
+
```yaml
|
|
214
|
+
- name: Generate report and PDF
|
|
215
|
+
if: always()
|
|
216
|
+
run: |
|
|
217
|
+
npm ci
|
|
218
|
+
npm i -D playwright-core@^1.65.0
|
|
219
|
+
npx playwright-core install --with-deps chromium-headless-shell
|
|
220
|
+
npx tolkira test-results/ --out report.html --pdf report.pdf \
|
|
221
|
+
--email email.html --json > summary.json
|
|
222
|
+
|
|
223
|
+
- name: Upload artifacts
|
|
224
|
+
if: always()
|
|
225
|
+
uses: actions/upload-artifact@v4
|
|
226
|
+
with:
|
|
227
|
+
name: cucumber-report
|
|
228
|
+
path: |
|
|
229
|
+
report.html
|
|
230
|
+
report.pdf
|
|
231
|
+
email.html
|
|
232
|
+
summary.json
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
The PDF is local: no hosted renderer and no telemetry. The headless shell
|
|
236
|
+
download is the only browser download the PDF feature adds; installing the npm
|
|
237
|
+
packages is a normal network step.
|
|
238
|
+
|
|
239
|
+
## Limits
|
|
240
|
+
|
|
241
|
+
- Chromium only; one engine, one print layout.
|
|
242
|
+
- A4 portrait only: 12 mm margins, no header/footer/URL/page numbers and no
|
|
243
|
+
Letter or custom paper in this slice. Landscape is not exposed.
|
|
244
|
+
- Tagged PDF/accessibility is B-027, page identity is B-021, page numbers are
|
|
245
|
+
B-022, a PDF size cap is B-028, the Chromium OS sandbox is B-029 and
|
|
246
|
+
Letter/custom paper is B-030.
|
|
247
|
+
- No CLI search/filter state; the browser print is the filtered and landscape
|
|
248
|
+
route.
|
|
249
|
+
- Video/audio do not print. An unusually wide matrix may need browser landscape.
|
|
250
|
+
- The PDF-only route has no logo or Trends; `--logo`/`--history` require `--out`.
|
|
251
|
+
- The engine is an optional install: about 13 MB for `playwright-core`, a
|
|
252
|
+
285.8 MB unpacked headless shell and about 4 MB of helpers (ffmpeg/winldd),
|
|
253
|
+
roughly 303 MB unpacked; the full Chromium build is not required. The render is
|
|
254
|
+
CPU/memory-heavy on very large suites.
|
|
255
|
+
- The PDF is not byte-deterministic across Chromium, font and OS versions.
|
package/llms.txt
CHANGED
|
@@ -1,22 +1,39 @@
|
|
|
1
1
|
# Tolkira
|
|
2
2
|
|
|
3
|
-
> Tolkira converts Cucumber legacy JSON, Cucumber Messages (NDJSON)
|
|
4
|
-
>
|
|
5
|
-
>
|
|
3
|
+
> Tolkira converts Cucumber legacy JSON, Cucumber Messages (NDJSON), JUnit XML
|
|
4
|
+
> and Playwright JSON into one self-contained HTML report plus an optional HTML
|
|
5
|
+
> email summary and an optional Chromium PDF, and prints a stable JSON summary
|
|
6
|
+
> for CI and AI agents. It requires Node.js 22 or newer and runs offline with no
|
|
6
7
|
> server, CDN or telemetry.
|
|
7
8
|
|
|
8
9
|
Package: https://www.npmjs.com/package/tolkira
|
|
9
10
|
|
|
10
11
|
## Start here
|
|
11
12
|
|
|
13
|
+
- [Documentation map](https://github.com/Silasoa/tolkira/blob/main/docs/README.md):
|
|
14
|
+
entry point to product, architecture, compatibility and research docs.
|
|
12
15
|
- [README](https://github.com/Silasoa/tolkira/blob/main/README.md): install,
|
|
13
16
|
quick start, migration from cucumber-html-reporter and MCHR, decision matrix.
|
|
14
17
|
- [Agent interface](https://github.com/Silasoa/tolkira/blob/main/docs/AGENT-INTERFACE.md):
|
|
15
18
|
CLI, API, JSON summary schema 2 and exit codes.
|
|
19
|
+
- [CI output](https://github.com/Silasoa/tolkira/blob/main/docs/CI.md):
|
|
20
|
+
GitHub annotations, GitLab and step summaries, caps and exit codes.
|
|
21
|
+
- [Email summary](https://github.com/Silasoa/tolkira/blob/main/docs/EMAIL.md):
|
|
22
|
+
opt-in HTML mail body with `--email`, 600 px inline template, report note and
|
|
23
|
+
CI mail-step example; no sending, no SMTP and no network.
|
|
24
|
+
- [PDF export](https://github.com/Silasoa/tolkira/blob/main/docs/PDF.md):
|
|
25
|
+
opt-in `--pdf`, `--pdf-timeout` and `renderPdf`, optional Playwright Chromium
|
|
26
|
+
install in the project, A4 portrait print archive, write order and limits.
|
|
27
|
+
- [Drop-in host validation](https://github.com/Silasoa/tolkira/blob/main/docs/DROP-IN-VALIDATION.md):
|
|
28
|
+
real host projects run before releases and major adapter/report changes.
|
|
16
29
|
- [Limitations](https://github.com/Silasoa/tolkira/blob/main/docs/LIMITATIONS.md):
|
|
17
|
-
dated status of Behave coverage, JUnit, themes and attachments.
|
|
30
|
+
dated status of Behave coverage, JUnit, Playwright, themes and attachments.
|
|
31
|
+
- [Playwright JSON](https://github.com/Silasoa/tolkira/blob/main/docs/PLAYWRIGHT-JSON.md):
|
|
32
|
+
native Playwright mapping, statuses, attachments and limits.
|
|
18
33
|
- [Compatibility](https://github.com/Silasoa/tolkira/blob/main/docs/COMPATIBILITY.md):
|
|
19
34
|
cucumber-html-reporter shim mapping and caveats.
|
|
35
|
+
- [Localisation](https://github.com/Silasoa/tolkira/blob/main/docs/I18N.md):
|
|
36
|
+
`--locale`, catalog schema, fallback, German glossary and agent checklist.
|
|
20
37
|
- [Cucumber compatibility](https://github.com/Silasoa/tolkira/blob/main/docs/CUCUMBER-COMPATIBILITY.md):
|
|
21
38
|
tested producers and versions.
|
|
22
39
|
|
|
@@ -27,5 +44,20 @@ Package: https://www.npmjs.com/package/tolkira
|
|
|
27
44
|
- Exit code 0 means the report was generated, not that the tests passed. Read
|
|
28
45
|
`status` and `counts` from the summary.
|
|
29
46
|
- Check `scenarios[].executed` before treating a scenario status as an outcome.
|
|
47
|
+
- Use `tolkira <inputs> --ci github` for GitHub annotations on stdout, or
|
|
48
|
+
`--ci markdown` for a step summary or GitLab file. Messages are not redacted.
|
|
30
49
|
- Attach `report.html` as the human-facing artifact; keep the JSON summary for
|
|
31
50
|
automation.
|
|
51
|
+
- Use `tolkira <inputs> --out report.html --email email.html` for a small HTML
|
|
52
|
+
mail body. With `--out` it names the report basename; standalone it says no
|
|
53
|
+
full report is attached. It stays local and never sends mail; attach
|
|
54
|
+
`report.html` separately. Tolkira exits 0 on failing tests, so take a mail
|
|
55
|
+
subject from `summary.json` (`status`), not from the job status.
|
|
56
|
+
- Add `--pdf report.pdf` for the complete A4 portrait print archive only when the
|
|
57
|
+
optional Playwright Chromium engine is installed in the project where Tolkira
|
|
58
|
+
runs (`npm i -D playwright-core@^1.65.0`, then
|
|
59
|
+
`npx playwright-core install chromium-headless-shell`). The PDF is
|
|
60
|
+
Chromium-only, has no CLI filter, Letter/custom paper or page numbers, and is
|
|
61
|
+
written before the email;
|
|
62
|
+
a missing engine exits 1. `--pdf-timeout <ms>` overrides the five-minute
|
|
63
|
+
render deadline.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tolkira",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Self-contained offline HTML reports for Cucumber legacy JSON, Messages and
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Self-contained offline HTML reports for Cucumber legacy JSON, Messages, JUnit XML and Playwright JSON, with a stable JSON summary for CI and AI agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Tolkira contributors",
|
|
@@ -65,10 +65,14 @@
|
|
|
65
65
|
"LICENSE",
|
|
66
66
|
"SECURITY.md",
|
|
67
67
|
"docs/AGENT-INTERFACE.md",
|
|
68
|
+
"docs/CI.md",
|
|
68
69
|
"docs/COMPATIBILITY.md",
|
|
69
70
|
"docs/CUCUMBER-COMPATIBILITY.md",
|
|
71
|
+
"docs/EMAIL.md",
|
|
72
|
+
"docs/I18N.md",
|
|
70
73
|
"docs/JUNIT-XML.md",
|
|
71
74
|
"docs/LIMITATIONS.md",
|
|
75
|
+
"docs/PDF.md",
|
|
72
76
|
"GLOSSARY.md"
|
|
73
77
|
],
|
|
74
78
|
"scripts": {
|
|
@@ -77,14 +81,17 @@
|
|
|
77
81
|
"postbuild": "node scripts/copy-compat-cjs.mjs",
|
|
78
82
|
"typecheck": "tsc --noEmit",
|
|
79
83
|
"lint": "oxlint .",
|
|
80
|
-
"test": "npm run assets && vitest run",
|
|
84
|
+
"test": "npm run i18n:check && npm run assets && vitest run",
|
|
81
85
|
"test:e2e": "playwright test",
|
|
82
86
|
"pretest:e2e": "npm run assets",
|
|
83
|
-
"
|
|
87
|
+
"hygiene": "node scripts/check-hygiene.mjs",
|
|
88
|
+
"assets": "node scripts/build-i18n.mjs && node scripts/build-styles.mjs && node scripts/build-search.mjs",
|
|
84
89
|
"styles": "node scripts/build-styles.mjs",
|
|
90
|
+
"i18n:check": "vitest run test/i18n-catalog.test.ts",
|
|
85
91
|
"prestress": "npm run build",
|
|
86
92
|
"stress": "node scripts/stress.mjs",
|
|
87
|
-
"
|
|
93
|
+
"bench:ansi": "node scripts/bench-ansi.mjs",
|
|
94
|
+
"check": "npm run i18n:check && npm run assets && npm run typecheck && npm run lint && npm run build && npm run test",
|
|
88
95
|
"prepublishOnly": "npm run check"
|
|
89
96
|
},
|
|
90
97
|
"publishConfig": {
|
|
@@ -102,7 +109,16 @@
|
|
|
102
109
|
"@types/node": "^26.6.6",
|
|
103
110
|
"esbuild": "^0.28.2",
|
|
104
111
|
"oxlint": "^1.90.0",
|
|
112
|
+
"playwright": "^1.65.0",
|
|
105
113
|
"typescript": "^7.0.2",
|
|
106
114
|
"vitest": "^5.1.0"
|
|
115
|
+
},
|
|
116
|
+
"peerDependencies": {
|
|
117
|
+
"playwright-core": "^1.65.0"
|
|
118
|
+
},
|
|
119
|
+
"peerDependenciesMeta": {
|
|
120
|
+
"playwright-core": {
|
|
121
|
+
"optional": true
|
|
122
|
+
}
|
|
107
123
|
}
|
|
108
124
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/** Text attachments above this size render as escaped text without parsing. */
|
|
2
|
-
export declare const MAX_TEXT_ATTACHMENT_BYTES = 262144;
|
|
3
|
-
export declare const MEDIA_EXTENSIONS: Record<string, string>;
|
|
4
|
-
export declare function normalizedMediaType(mediaType: string): string;
|
|
5
|
-
/**
|
|
6
|
-
* Normalises a declared media type and drops everything outside the report's
|
|
7
|
-
* renderer list. Unknown or forged types (XHTML, XML, comma-joined values)
|
|
8
|
-
* become application/octet-stream so they can never reach a data URI verbatim.
|
|
9
|
-
*/
|
|
10
|
-
export declare function safeMediaType(mediaType: string): string;
|