@jrpool/kilotest 60.1.5 → 60.1.7
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/lhm.plugin.json +1 -1
- package/openapi-3.0.yaml +1 -1
- package/openapi.yaml +1 -1
- package/package.json +1 -1
- package/server.json +1 -1
- package/style.css +5 -5
- package/util.ts +17 -6
- package/web/header.partial +6 -0
- package/web/home/index.html +1 -6
- package/web/listPages/index.html +1 -6
package/lhm.plugin.json
CHANGED
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.1.
|
|
5
|
+
version: 60.1.7
|
|
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.1.
|
|
5
|
+
version: 60.1.7
|
|
6
6
|
license:
|
|
7
7
|
name: MIT
|
|
8
8
|
identifier: MIT
|
package/package.json
CHANGED
package/server.json
CHANGED
package/style.css
CHANGED
|
@@ -257,12 +257,11 @@ body.styled header {
|
|
|
257
257
|
body.styled .header-inner {
|
|
258
258
|
max-width: 64rem;
|
|
259
259
|
margin-inline: auto;
|
|
260
|
-
padding:
|
|
261
|
-
display: flex;
|
|
262
|
-
align-items: baseline;
|
|
263
|
-
gap: 0.75rem;
|
|
260
|
+
padding: 0.75rem 1.5rem;
|
|
264
261
|
}
|
|
265
262
|
body.styled .brand {
|
|
263
|
+
display: block;
|
|
264
|
+
padding-block: 0.4rem;
|
|
266
265
|
font-weight: 800;
|
|
267
266
|
font-size: 1.25rem;
|
|
268
267
|
letter-spacing: -0.02em;
|
|
@@ -282,6 +281,7 @@ body.styled .brand svg {
|
|
|
282
281
|
vertical-align: -0.2em;
|
|
283
282
|
}
|
|
284
283
|
body.styled .brand-tag {
|
|
284
|
+
margin: 0;
|
|
285
285
|
font-size: 0.85rem;
|
|
286
286
|
color: var(--muted);
|
|
287
287
|
}
|
|
@@ -429,7 +429,7 @@ body.styled .page ol, body.styled .page ul {
|
|
|
429
429
|
margin: 0.5rem 0 1rem;
|
|
430
430
|
}
|
|
431
431
|
body.styled ul.links {
|
|
432
|
-
|
|
432
|
+
columns: 16rem 3;
|
|
433
433
|
column-gap: 2.5rem;
|
|
434
434
|
}
|
|
435
435
|
body.styled ul.links li {
|
package/util.ts
CHANGED
|
@@ -376,14 +376,23 @@ export const getPlainText = (string: string): string => string
|
|
|
376
376
|
.replace(/&/g, '+')
|
|
377
377
|
.replace(/[<>"']/g, ' ');
|
|
378
378
|
// Markup shared by populated templates, lazily read once from files.
|
|
379
|
-
let sharedContent: {head: string, logo: string} | undefined;
|
|
379
|
+
let sharedContent: {head: string, header: string, headerNL: string, logo: string} | undefined;
|
|
380
380
|
// Returns the markup shared by populated templates.
|
|
381
|
-
const getSharedContent = async (): Promise<{head: string, logo: string}> => {
|
|
381
|
+
const getSharedContent = async (): Promise<{head: string, header: string, headerNL: string, logo: string}> => {
|
|
382
382
|
// Trailing newlines are stripped so injection does not add blank lines.
|
|
383
|
-
sharedContent
|
|
384
|
-
|
|
385
|
-
logo
|
|
386
|
-
|
|
383
|
+
if (!sharedContent) {
|
|
384
|
+
const webDir = path.join(import.meta.dirname, 'web');
|
|
385
|
+
const logo = (await fs.readFile(path.join(import.meta.dirname, 'logo.svg'), 'utf8')).trimEnd();
|
|
386
|
+
const header = (await fs.readFile(path.join(webDir, 'header.partial'), 'utf8')).trimEnd()
|
|
387
|
+
.replace(/__logo__/g, () => logo);
|
|
388
|
+
sharedContent = {
|
|
389
|
+
head: (await fs.readFile(path.join(webDir, 'head.partial'), 'utf8')).trimEnd(),
|
|
390
|
+
header,
|
|
391
|
+
// The home page gets the same header with its brand as text, not a link to itself.
|
|
392
|
+
headerNL: header.replace('<a class="brand" href="/">', '<span class="brand">').replace('</a>', '</span>'),
|
|
393
|
+
logo
|
|
394
|
+
};
|
|
395
|
+
}
|
|
387
396
|
return sharedContent;
|
|
388
397
|
};
|
|
389
398
|
// Populates an HTML template file with named values.
|
|
@@ -394,6 +403,8 @@ export const populateFile = async (filePath: string, query: Record<string, strin
|
|
|
394
403
|
const shared = await getSharedContent();
|
|
395
404
|
answerPage = answerPage
|
|
396
405
|
.replace(/__head__/g, () => shared.head)
|
|
406
|
+
.replace(/__headerNL__/g, () => shared.headerNL)
|
|
407
|
+
.replace(/__header__/g, () => shared.header)
|
|
397
408
|
.replace(/__logo__/g, () => shared.logo);
|
|
398
409
|
// Replace its placeholders.
|
|
399
410
|
Object.keys(query).forEach(param => {
|
package/web/home/index.html
CHANGED
|
@@ -52,12 +52,7 @@
|
|
|
52
52
|
</script>
|
|
53
53
|
</head>
|
|
54
54
|
<body class="styled">
|
|
55
|
-
|
|
56
|
-
<div class="header-inner">
|
|
57
|
-
<span class="brand">__logo__Kilotest</span>
|
|
58
|
-
<span class="brand-tag">Ensemble front-end testing</span>
|
|
59
|
-
</div>
|
|
60
|
-
</header>
|
|
55
|
+
__headerNL__
|
|
61
56
|
<main>
|
|
62
57
|
<div class="hero">
|
|
63
58
|
<p class="eyebrow">12 rule engines · ~1,300 tests</p>
|
package/web/listPages/index.html
CHANGED
|
@@ -6,12 +6,7 @@
|
|
|
6
6
|
<title>Pages tested | Kilotest</title>
|
|
7
7
|
</head>
|
|
8
8
|
<body class="styled">
|
|
9
|
-
|
|
10
|
-
<div class="header-inner">
|
|
11
|
-
<a class="brand" href="/">__logo__<span class="brand-name">Kilotest</span></a>
|
|
12
|
-
<span class="brand-tag">Ensemble front-end testing</span>
|
|
13
|
-
</div>
|
|
14
|
-
</header>
|
|
9
|
+
__header__
|
|
15
10
|
<main class="page">
|
|
16
11
|
<h1>Pages tested</h1>
|
|
17
12
|
__jobSections__
|