@jrpool/kilotest 60.1.6 → 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 CHANGED
@@ -4423,5 +4423,5 @@
4423
4423
  }
4424
4424
  }
4425
4425
  ],
4426
- "version": "60.1.6"
4426
+ "version": "60.1.7"
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.1.6
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.6
5
+ version: 60.1.7
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.1.6",
3
+ "version": "60.1.7",
4
4
  "description": "Ensemble testing for front-end web quality",
5
5
  "type": "module",
6
6
  "main": "index.ts",
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.1.6",
9
+ "version": "60.1.7",
10
10
  "remotes": [
11
11
  {
12
12
  "type": "streamable-http",
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: 1.1rem 1.5rem;
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
  }
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
- head: (await fs.readFile(path.join(import.meta.dirname, 'web', 'head.partial'), 'utf8')).trimEnd(),
385
- logo: (await fs.readFile(path.join(import.meta.dirname, 'logo.svg'), 'utf8')).trimEnd()
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 => {
@@ -0,0 +1,6 @@
1
+ <header>
2
+ <div class="header-inner">
3
+ <a class="brand" href="/">__logo__<span class="brand-name">Kilotest</span></a>
4
+ <p class="brand-tag">Ensemble front-end testing</p>
5
+ </div>
6
+ </header>
@@ -52,12 +52,7 @@
52
52
  </script>
53
53
  </head>
54
54
  <body class="styled">
55
- <header>
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>
@@ -6,12 +6,7 @@
6
6
  <title>Pages tested | Kilotest</title>
7
7
  </head>
8
8
  <body class="styled">
9
- <header>
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__