@jrpool/kilotest 60.7.6 → 60.9.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/job.json CHANGED
@@ -3,7 +3,6 @@
3
3
  "what": "Kilotest job",
4
4
  "strict": false,
5
5
  "standard": "only",
6
- "imageColor": 0,
7
6
  "observe": false,
8
7
  "device": {
9
8
  "id": "default",
@@ -26,13 +25,13 @@
26
25
  "type": "test",
27
26
  "launch": {},
28
27
  "which": "alfa",
29
- "what": "Alfa"
28
+ "what": "Alfa by Siteimprove"
30
29
  },
31
30
  {
32
31
  "type": "test",
33
32
  "launch": {},
34
33
  "which": "aslint",
35
- "what": "ASLint"
34
+ "what": "ASLint by eSSENTIAL Accessibility"
36
35
  },
37
36
  {
38
37
  "type": "test",
package/lhm.plugin.json CHANGED
@@ -4423,5 +4423,5 @@
4423
4423
  }
4424
4424
  }
4425
4425
  ],
4426
- "version": "60.7.6"
4426
+ "version": "60.9.0"
4427
4427
  }
package/openapi-3.0.yaml CHANGED
@@ -2,7 +2,7 @@ openapi: 3.0.3
2
2
  info:
3
3
  title: Kilotest API
4
4
  description: 'Kilotest is an ensemble testing and reporting service for front-end web quality. It uses an ensemble of 12 rule engines to test web pages for front-end quality (accessibility, usability, and web standards, including HTML, CSS, ARIA, and WCAG). Kilotest acts as a web server for human users, an MCP server for AI platforms, and an API for programmatic access. With this API you can request that a page be tested or retested, discover available reports, incrementally retrieve facts from a report: from what reports are available, to what issues were reported in one report, to what elements violated one issue, to what diagnoses rule engines gave for one violation.'
5
- version: 60.7.6
5
+ version: 60.9.0
6
6
  license:
7
7
  name: MIT
8
8
  url: https://github.com/jrpool/kilotest/blob/main/LICENSE
package/openapi.yaml CHANGED
@@ -2,7 +2,7 @@ openapi: 3.1.0
2
2
  info:
3
3
  title: Kilotest API
4
4
  description: 'Kilotest is an ensemble testing and reporting service for front-end web quality. It uses an ensemble of 12 rule engines to test web pages for front-end quality (accessibility, usability, and web standards, including HTML, CSS, ARIA, and WCAG). Kilotest acts as a web server for human users, an MCP server for AI platforms, and an API for programmatic access. With this API you can request that a page be tested or retested, discover available reports, incrementally retrieve facts from a report: from what reports are available, to what issues were reported in one report, to what elements violated one issue, to what diagnoses rule engines gave for one violation.'
5
- version: 60.7.6
5
+ version: 60.9.0
6
6
  license:
7
7
  name: MIT
8
8
  identifier: MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jrpool/kilotest",
3
- "version": "60.7.6",
3
+ "version": "60.9.0",
4
4
  "description": "Ensemble testing for front-end web quality",
5
5
  "type": "module",
6
6
  "main": "index.ts",
@@ -0,0 +1,67 @@
1
+ /*
2
+ strip-report-images.ts
3
+ Replaces the base64 page-image payloads in report images arrays with the marker string "deleted", cutting the bulk of each report while leaving every other property untouched. Array length is preserved, so checkpoints[].imageIndexes still resolves to a real element, and job properties such as imageColor remain as a record of what the job specified.
4
+
5
+ Usage:
6
+ node scripts/strip-report-images.ts [--dry-run] [reportsDir]
7
+
8
+ reportsDir defaults to db/reports. Run it once per report directory (reports, hiddenReports). With --dry-run, reports are analyzed and the changes are listed but no file is written.
9
+ */
10
+
11
+ // IMPORTS
12
+
13
+ import fs from 'node:fs';
14
+ import path from 'node:path';
15
+
16
+ // CONSTANTS
17
+
18
+ const DRY_RUN = process.argv.includes('--dry-run');
19
+ const reportsDir = process.argv.find((arg, index) => index > 1 && !arg.startsWith('--'))
20
+ ?? path.join(import.meta.dirname, '..', 'db', 'reports');
21
+ const STUB = 'deleted';
22
+
23
+ // FUNCTIONS
24
+
25
+ // Serializes an object exactly as Kilotest writes reports (util.getJSON).
26
+ const getJSON = (object: unknown): string => `${JSON.stringify(object, null, 2)}\n`;
27
+
28
+ // OPERATION
29
+
30
+ const fileNames = fs.readdirSync(reportsDir).filter(name => name.endsWith('.json'));
31
+ if (!fileNames.length) {
32
+ console.log(`No report files found in ${reportsDir}`);
33
+ process.exit(0);
34
+ }
35
+ let revised = 0;
36
+ let skipped = 0;
37
+ for (const fileName of fileNames) {
38
+ const filePath = path.join(reportsDir, fileName);
39
+ let report;
40
+ try {
41
+ report = JSON.parse(fs.readFileSync(filePath, 'utf8'));
42
+ }
43
+ catch (error) {
44
+ console.log(`${fileName}: SKIPPED (unreadable or not JSON: ${(error as Error).message})`);
45
+ skipped++;
46
+ continue;
47
+ }
48
+ const {images} = report;
49
+ const needsStubbing = Array.isArray(images) && images.some(image => image !== STUB);
50
+ if (!needsStubbing) {
51
+ skipped++;
52
+ continue;
53
+ }
54
+ const freedBytes = images
55
+ .filter((image: unknown) => image !== STUB)
56
+ .reduce((total: number, image: any) => total + String(image).length, 0);
57
+ report.images = images.map(() => STUB);
58
+ revised++;
59
+ console.log(
60
+ `${fileName}:${DRY_RUN ? ' (dry run)' : ''} stubbed ${images.length} image(s), `
61
+ + `freed ~${Math.round(freedBytes / 1024)} KB`
62
+ );
63
+ if (!DRY_RUN) {
64
+ fs.writeFileSync(filePath, getJSON(report));
65
+ }
66
+ }
67
+ console.log(`Done: ${revised} report(s) ${DRY_RUN ? 'would be ' : ''}revised, ${skipped} skipped.`);
package/server.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/jrpool/kilotest",
7
7
  "source": "github"
8
8
  },
9
- "version": "60.7.6",
9
+ "version": "60.9.0",
10
10
  "remotes": [
11
11
  {
12
12
  "type": "streamable-http",