eaa-kit 0.9.0 → 0.11.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.
Files changed (106) hide show
  1. package/README.md +174 -149
  2. package/dist/astro/index.d.ts +1 -3
  3. package/dist/astro/index.js +2 -3
  4. package/dist/audit/runners/worker.js +2 -3
  5. package/dist/{audit-J2jeLo-y.js → audit-DbqNIrt6.js} +61 -35
  6. package/dist/audit-rUhqnm3o.js +1 -0
  7. package/dist/{baseline-DrFh7joZ.js → baseline-CKElWbx4.js} +4 -5
  8. package/dist/baseline-DU0EPiTq.js +1 -0
  9. package/dist/baseline-DYOejLFO.js +1 -0
  10. package/dist/{baseline-wyJsSIFQ.js → baseline-DvdsFTQy.js} +5 -6
  11. package/dist/{cache-D4dOIuOi.js → cache-DIV4G0TI.js} +24 -5
  12. package/dist/{checklist-Gx2g3LFC.js → checklist-CA0Ri71Z.js} +7 -8
  13. package/dist/cli/index.js +52 -35
  14. package/dist/{collect-BJYk7_pJ.js → collect-CjucwTEF.js} +16 -8
  15. package/dist/{command-BGGMf4vn.js → command-C8ZFvcc1.js} +6 -9
  16. package/dist/completeness-Cg-XIKWN.js +1 -0
  17. package/dist/completeness-Dzyvgr4Z.js +72 -0
  18. package/dist/component-CgbeRgJa.js +1 -0
  19. package/dist/{component-ChisoFyY.js → component-ZLd8DA_a.js} +3 -4
  20. package/dist/{countries-Dg0BdytB.js → countries-B_PE6r5R.js} +42 -18
  21. package/dist/{countries-DRTBubeE.js → countries-CCqog6dy.js} +10 -7
  22. package/dist/coverage-B9_6yv_8.js +2 -0
  23. package/dist/{coverage-zdzgSKjz.js → coverage-C1Z6t9Ct.js} +5 -7
  24. package/dist/{crawl-DwdqiljK.js → crawl-CkHJJV4w.js} +131 -23
  25. package/dist/{criteria-CnPJKGeb.js → criteria-CacF0HP1.js} +1 -2
  26. package/dist/{define-Ctf2uOEh.js → define-BdTPIfqE.js} +5 -5
  27. package/dist/detect-DnFHXpWh.js +49 -0
  28. package/dist/detect-oLDadgee.js +160 -0
  29. package/dist/doctor-q8IebwAb.js +248 -0
  30. package/dist/eleventy/index.d.ts +1 -3
  31. package/dist/eleventy/index.js +2 -3
  32. package/dist/{entry-CjqjrUBY.js → entry-kf94P140.js} +1 -2
  33. package/dist/{fingerprint-BjYV_0F7.js → fingerprint-CcoQ1WxQ.js} +1 -2
  34. package/dist/{frameworks-B4ClIJgE.js → frameworks-BboC8eNk.js} +234 -28
  35. package/dist/frameworks-Y-n3NUuG.js +1 -0
  36. package/dist/{fs-BmPtmFke.js → fs-tPD5r0wY.js} +1 -2
  37. package/dist/hosts-B48qR6Vt.js +19 -0
  38. package/dist/{html-whingnfj.js → html-Bjq3Iw3g.js} +54 -14
  39. package/dist/{impact-luGCnN8F.js → impact-BGlJ6j0Y.js} +1 -2
  40. package/dist/{impact-EEB9ZXmC.d.ts → impact-CZjUloYC.d.ts} +0 -2
  41. package/dist/index.d.ts +10 -23
  42. package/dist/index.js +3 -3
  43. package/dist/{init-CPbFVMuk.js → init-3Ti3ao5Z.js} +65 -126
  44. package/dist/issues-WLlepU95.js +120 -0
  45. package/dist/{jsdom-CsW_xVcA.js → jsdom-C4pLIMyP.js} +2 -3
  46. package/dist/jsdom-Zle--VQ1.js +2 -0
  47. package/dist/{json-SGCgxSPT.js → json-B_k4CDmR.js} +5 -6
  48. package/dist/json-IL1JxlTL.js +1 -0
  49. package/dist/{load-CH-ltdlq.js → load-C3eFEdoH.js} +3 -4
  50. package/dist/load-oQQJPNlV.js +1 -0
  51. package/dist/markdown-D-QpPYsz.js +138 -0
  52. package/dist/next-8zDgH0nP.js +119 -0
  53. package/dist/nuxt/index.d.ts +1 -3
  54. package/dist/nuxt/index.js +2 -3
  55. package/dist/{pages-DxY5Z0gl.js → pages-CCP1WfYe.js} +80 -17
  56. package/dist/{playwright-ukCr_5o3.js → playwright-ky4b_HME.js} +98 -16
  57. package/dist/{pool-B4tEUa2S.js → pool-B3XKdk57.js} +4 -5
  58. package/dist/project-B21NT_aX.js +502 -0
  59. package/dist/project-Dht13sb1.js +1 -0
  60. package/dist/{remediation-Bbs4KcX1.js → remediation-BkE7q7dT.js} +2 -193
  61. package/dist/{render-C6zYfaba.js → render-ky8cm4QF.js} +22 -20
  62. package/dist/result-DhoT4g0P.js +1 -0
  63. package/dist/{result-B7_zVxAX.js → result-g8dGsrcv.js} +1 -2
  64. package/dist/{review-Bz0fO9_I.js → review-BGjTBFvd.js} +2 -3
  65. package/dist/review-iheEjp7_.js +1 -0
  66. package/dist/{routes-CSctpS1P.js → routes-BpQeBDmM.js} +4 -5
  67. package/dist/{run-DzVEOkiF.js → run-D7tc7IU2.js} +2 -3
  68. package/dist/{run-BK2blxMI.d.ts → run-VXnP4uLp.d.ts} +2 -6
  69. package/dist/{sarif-9BAgNiOa.js → sarif-v66-PjdE.js} +7 -8
  70. package/dist/{schema-DJSF4K05.js → schema-DfC-Ww1w.js} +1 -2
  71. package/dist/setup-BYlqHlo0.js +2 -0
  72. package/dist/setup-Cf82ONw0.js +353 -0
  73. package/dist/shell-BdQYTaBQ.js +89 -0
  74. package/dist/{site-BHMtf3q2.js → site-CxVyh8IO.js} +1 -2
  75. package/dist/{start-DzOM0p6I.js → start-bdanSxZr.js} +9 -10
  76. package/dist/statement/templates/cz.cs.md +2 -1
  77. package/dist/statement/templates/cz.en.md +2 -1
  78. package/dist/statement/templates/dk.da.md +3 -2
  79. package/dist/statement/templates/dk.en.md +4 -3
  80. package/dist/statement/templates/pt.en.md +3 -2
  81. package/dist/statement/templates/pt.pt.md +3 -3
  82. package/dist/statement/templates/se.en.md +9 -0
  83. package/dist/statement/templates/se.sv.md +8 -0
  84. package/dist/{text-BF1LHMiV.js → text-CISDPU49.js} +11 -3
  85. package/dist/{version-B3v4rNoG.js → version-C8aJm8YJ.js} +1 -2
  86. package/dist/vite/index.d.ts +1 -3
  87. package/dist/vite/index.js +2 -3
  88. package/dist/{watch-B2RoUbo0.js → watch-CefxwMsZ.js} +3 -4
  89. package/dist/webpack/index.d.ts +1 -3
  90. package/dist/webpack/index.js +2 -3
  91. package/dist/{worksheet-B_kQ1pxq.js → worksheet-CcBo9G7s.js} +4 -5
  92. package/dist/workspaces-BBFXOyeV.js +85 -0
  93. package/package.json +15 -13
  94. package/dist/audit-CJDCQaFY.js +0 -2
  95. package/dist/baseline-477B1CZ_.js +0 -2
  96. package/dist/baseline-D9ihb-wk.js +0 -2
  97. package/dist/component-DcCn3BJS.js +0 -2
  98. package/dist/coverage-GvaMpV64.js +0 -3
  99. package/dist/frameworks-etFg_O8K.js +0 -2
  100. package/dist/jsdom-BUYuVJJm.js +0 -3
  101. package/dist/json-CyLmvF5P.js +0 -2
  102. package/dist/load-D7lBeOsq.js +0 -2
  103. package/dist/project-BLFdCbOq.js +0 -2
  104. package/dist/project-v2PoRw70.js +0 -291
  105. package/dist/result-CRmjjoAA.js +0 -2
  106. package/dist/review-a-2ghjQ5.js +0 -2
@@ -0,0 +1,89 @@
1
+ // src/audit/shell.ts
2
+ /**
3
+ * Whether a page is an empty shell that a script fills in.
4
+ *
5
+ * A single-page app's build writes one `index.html` holding an empty
6
+ * `<div id="root">` and a script tag. The browserless engine does not run
7
+ * scripts, so it audits the empty div, finds nothing wrong with it, and the
8
+ * run reports a clean site that was never looked at. That is the false
9
+ * assurance this tool exists to refuse, so such a page is set aside and named
10
+ * as not audited instead.
11
+ *
12
+ * The test is what a visitor could perceive before any script runs: text,
13
+ * images and media, embedded frames, and form controls. A page with none of
14
+ * those is a shell, whatever its root element is called.
15
+ */
16
+ function isAppShell(html) {
17
+ const lower = html.toLowerCase();
18
+ const bodyOpen = lower.indexOf("<body");
19
+ const bodyClose = lower.lastIndexOf("</body");
20
+ let body;
21
+ if (bodyOpen !== -1 && bodyClose > bodyOpen) {
22
+ const tagEnd = html.indexOf(">", bodyOpen);
23
+ body = tagEnd === -1 || tagEnd > bodyClose ? "" : html.slice(tagEnd + 1, bodyClose);
24
+ } else body = withoutElements(html, ["head"], true);
25
+ const visible = withoutComments(body);
26
+ if (/<(img|svg|video|audio|canvas|iframe|object|embed|input|select|textarea|button|picture)\b/i.test(visible)) return false;
27
+ return withoutTags(withoutElements(visible, [
28
+ "script",
29
+ "style",
30
+ "template",
31
+ "noscript"
32
+ ])).replace(/&nbsp;|&#160;/g, " ").trim() === "";
33
+ }
34
+ /** `<!-- … -->` taken out; an unclosed one runs to the end, as a browser reads it. */
35
+ function withoutComments(html) {
36
+ let output = "";
37
+ let cursor = 0;
38
+ for (;;) {
39
+ const open = html.indexOf("<!--", cursor);
40
+ if (open === -1) return output + html.slice(cursor);
41
+ output += html.slice(cursor, open);
42
+ const close = html.indexOf("-->", open + 4);
43
+ if (close === -1) return output;
44
+ cursor = close + 3;
45
+ }
46
+ }
47
+ /**
48
+ * Elements with these names taken out with their content. One left open is
49
+ * taken out to the end, which is what the old pattern's failure to match left
50
+ * in place instead; for a page that is never shown either way it is the same
51
+ * answer. `firstOnly` removes just the first, for the head.
52
+ */
53
+ function withoutElements(html, names, firstOnly = false) {
54
+ const lower = html.toLowerCase();
55
+ const opening = new RegExp(`<(${names.join("|")})\\b`, "g");
56
+ let output = "";
57
+ let cursor = 0;
58
+ for (;;) {
59
+ opening.lastIndex = cursor;
60
+ const match = opening.exec(lower);
61
+ if (match === null) return output + html.slice(cursor);
62
+ output += html.slice(cursor, match.index);
63
+ const close = closingTag(lower, match[1], match.index + match[0].length);
64
+ if (close === -1) return firstOnly ? output + html.slice(match.index) : output;
65
+ const end = lower.indexOf(">", close);
66
+ cursor = end === -1 ? html.length : end + 1;
67
+ if (firstOnly) return output + html.slice(cursor);
68
+ }
69
+ }
70
+ /** Where `</name` starts, as a whole name: `</head` is not `</header`. */
71
+ function closingTag(lower, name, from) {
72
+ let at = lower.indexOf(`</${name}`, from);
73
+ while (at !== -1 && /[a-z0-9-]/.test(lower[at + name.length + 2] ?? "")) at = lower.indexOf(`</${name}`, at + 1);
74
+ return at;
75
+ }
76
+ /** Markup taken out, text kept. A `<` with no `>` after it is text, as before. */
77
+ function withoutTags(html) {
78
+ let output = "";
79
+ let cursor = 0;
80
+ for (;;) {
81
+ const open = html.indexOf("<", cursor);
82
+ if (open === -1) return output + html.slice(cursor);
83
+ const close = html.indexOf(">", open + 1);
84
+ if (close === -1) return output + html.slice(cursor);
85
+ output += html.slice(cursor, open);
86
+ cursor = close + 1;
87
+ }
88
+ }
89
+ export { isAppShell };
@@ -1,7 +1,7 @@
1
1
  import { readFile } from "node:fs/promises";
2
2
  import path from "node:path";
3
3
  import { glob } from "tinyglobby";
4
- //#region src/audit/site.ts
4
+ // src/audit/site.ts
5
5
  /** The home page, or failing that the first page in path order. */
6
6
  async function homePage(directory) {
7
7
  for (const name of ["index.html", "index.htm"]) {
@@ -68,5 +68,4 @@ function attribute(tag, name) {
68
68
  function decodeEntities(text) {
69
69
  return text.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, "\"").replace(/&#39;|&apos;/g, "'");
70
70
  }
71
- //#endregion
72
71
  export { readSiteFacts };
@@ -1,12 +1,12 @@
1
- import "./baseline-DrFh7joZ.js";
2
- import { n as auditDefaults, o as fail, r as auditInvocation } from "./command-BGGMf4vn.js";
3
- import { n as runAuditCommand } from "./audit-J2jeLo-y.js";
4
- import { n as countryForLocale, t as COUNTRY_INFO } from "./countries-Dg0BdytB.js";
1
+ import "./baseline-CKElWbx4.js";
2
+ import { i as countryForLocale, t as COUNTRY_INFO } from "./countries-B_PE6r5R.js";
3
+ import { n as runAuditCommand } from "./audit-DbqNIrt6.js";
4
+ import { n as auditDefaults, o as fail, r as auditInvocation } from "./command-C8ZFvcc1.js";
5
5
  import { access, mkdir, writeFile } from "node:fs/promises";
6
6
  import path from "node:path";
7
7
  import { pathToFileURL } from "node:url";
8
8
  import pc from "picocolors";
9
- //#region src/cli/start.ts
9
+ // src/cli/start.ts
10
10
  /**
11
11
  * `eaa-kit`, with nothing after it.
12
12
  *
@@ -62,12 +62,12 @@ async function ensureToolDirectory(cwd) {
62
62
  async function summary(cwd, result) {
63
63
  const lines = ["", pc.bold("What eaa-kit found about this project")];
64
64
  const where = result.directory === void 0 ? "a running server" : path.relative(cwd, result.directory) === "" ? "this folder" : `${path.relative(cwd, result.directory)}${path.sep}`;
65
- const { detectFramework } = await import("./frameworks-etFg_O8K.js");
66
- const { readPackageJson } = await import("./project-BLFdCbOq.js");
65
+ const { detectFramework } = await import("./frameworks-Y-n3NUuG.js");
66
+ const { readPackageJson } = await import("./project-Dht13sb1.js");
67
67
  const framework = (await detectFramework(cwd, await readPackageJson(cwd)))?.framework.name;
68
68
  const pages = result.audits.length === 1 ? "1 page" : `${result.audits.length} pages`;
69
69
  lines.push(` Site ${where}${framework === void 0 ? "" : ` (${framework})`}, ${pages}`);
70
- const facts = result.directory === void 0 ? {} : await (await import("./site-BHMtf3q2.js")).readSiteFacts(result.directory);
70
+ const facts = result.directory === void 0 ? {} : await (await import("./site-CxVyh8IO.js")).readSiteFacts(result.directory);
71
71
  const country = facts.lang === void 0 ? void 0 : countryForLocale(facts.lang);
72
72
  if (facts.lang !== void 0) {
73
73
  const law = country === void 0 ? "" : pc.dim(` → a statement under ${COUNTRY_INFO[country].name}'s law`);
@@ -80,7 +80,7 @@ async function summary(cwd, result) {
80
80
  const next = (command, why) => {
81
81
  lines.push(` ${pc.cyan(command.padEnd(24))}${why}`);
82
82
  };
83
- const { existingConfig } = await import("./init-CPbFVMuk.js");
83
+ const { existingConfig } = await import("./init-3Ti3ao5Z.js");
84
84
  const config = await existingConfig(cwd);
85
85
  if (config === void 0) next("eaa-kit init", country === void 0 ? "write the config your accessibility statement is made from" : `write the config for your statement, with ${COUNTRY_INFO[country].name} filled in`);
86
86
  else next("eaa-kit statement", `write your accessibility statement from ${config}`);
@@ -97,5 +97,4 @@ async function exists(target) {
97
97
  return false;
98
98
  }
99
99
  }
100
- //#endregion
101
100
  export { runFirstRun };
@@ -123,7 +123,8 @@ Snažíme se odpovídat co nejdříve.
123
123
  ## Dozor
124
124
 
125
125
  Pokud nejste s naší odpovědí spokojeni, můžete se obrátit na Českou obchodní inspekci (ČOI),
126
- která vykonává dozor nad dodržováním zákona.
126
+ která vykonává dozor nad službami elektronického obchodování. Dozor nad některými dalšími
127
+ službami, například nad službami elektronických komunikací, vykonávají jiné orgány.
127
128
 
128
129
  Česká obchodní inspekce (ČOI)
129
130
  https://coi.gov.cz
@@ -125,7 +125,8 @@ We aim to respond to your feedback promptly.
125
125
  ## Enforcement procedure
126
126
 
127
127
  If you are not satisfied with our response, you can contact the Czech Trade Inspection
128
- Authority (ČOI), which supervises compliance with the Act.
128
+ Authority (ČOI), which supervises e-commerce services under the Act. Some other services,
129
+ such as electronic communications services, are supervised by other authorities.
129
130
 
130
131
  Česká obchodní inspekce (ČOI)
131
132
  https://coi.gov.cz
@@ -126,8 +126,9 @@ Vi bestræber os på at svare hurtigst muligt.
126
126
  ## Klageadgang
127
127
 
128
128
  Hvis du ikke er tilfreds med vores svar, kan du henvende dig til Sikkerhedsstyrelsen, som
129
- fører tilsyn med e-handelstjenester efter loven. Tilsynet i Danmark er fordelt på flere
130
- myndigheder: med finansielle tjenester fører Finanstilsynet for eksempel tilsyn.
129
+ fører tilsyn med e-handelstjenester og forbrugerorienterede banktjenester efter loven.
130
+ Tilsynet i Danmark er fordelt på flere myndigheder: med elektroniske
131
+ kommunikationstjenester fører Energistyrelsen for eksempel tilsyn.
131
132
 
132
133
  Sikkerhedsstyrelsen
133
134
  https://www.sik.dk
@@ -125,9 +125,10 @@ We aim to respond to your feedback promptly.
125
125
  ## Enforcement procedure
126
126
 
127
127
  If you are not satisfied with our response, you can contact the Danish Safety Technology
128
- Authority (Sikkerhedsstyrelsen), which supervises e-commerce services under the Act.
129
- Supervision in Denmark is split between several authorities: financial services, for
130
- example, are supervised by the Danish Financial Supervisory Authority (Finanstilsynet).
128
+ Authority (Sikkerhedsstyrelsen), which supervises e-commerce services and consumer banking
129
+ services under the Act. Supervision in Denmark is split between several authorities:
130
+ electronic communications services, for example, are supervised by the Danish Energy
131
+ Agency (Energistyrelsen).
131
132
 
132
133
  Sikkerhedsstyrelsen
133
134
  https://www.sik.dk
@@ -127,8 +127,9 @@ We aim to respond to your feedback promptly.
127
127
  If you are not satisfied with our response, you can complain to the competent supervisory
128
128
  authority. Supervision is split between several authorities: for e-commerce services it is
129
129
  the National Communications Authority (ANACOM), while banking services, for example, are
130
- supervised by the Banco de Portugal. The supervisory authorities report non-compliant
131
- products and services to the National Institute for Rehabilitation (INR, I.P.).
130
+ supervised by the Banco de Portugal. The National Institute for Rehabilitation (INR, I.P.)
131
+ monitors how the rules are applied and passes complaints sent to it directly on to the
132
+ competent authority.
132
133
 
133
134
  Autoridade Nacional de Comunicações (ANACOM)
134
135
  https://www.anacom.pt
@@ -128,9 +128,9 @@ Procuramos responder com a maior brevidade possível.
128
128
  Se não ficar satisfeito com a nossa resposta, pode apresentar uma reclamação à entidade
129
129
  fiscalizadora competente. A fiscalização está repartida por várias entidades: para os
130
130
  serviços de comércio eletrónico é a Autoridade Nacional de Comunicações (ANACOM), e os
131
- serviços bancários, por exemplo, são fiscalizados pelo Banco de Portugal. As entidades
132
- fiscalizadoras comunicam os produtos e serviços que não cumprem os requisitos de
133
- acessibilidade ao Instituto Nacional para a Reabilitação (INR, I.P.).
131
+ serviços bancários, por exemplo, são fiscalizados pelo Banco de Portugal. O Instituto
132
+ Nacional para a Reabilitação (INR, I.P.) acompanha a aplicação do regime e encaminha para
133
+ a entidade competente as queixas que lhe sejam dirigidas diretamente.
134
134
 
135
135
  Autoridade Nacional de Comunicações (ANACOM)
136
136
  https://www.anacom.pt
@@ -124,11 +124,20 @@ We aim to respond to your feedback promptly.
124
124
 
125
125
  ## Enforcement procedure
126
126
 
127
+ {{#if supervision.unchanged}}
127
128
  If you are not satisfied with our response, you can report the matter to the Swedish Post
128
129
  and Telecom Authority (PTS), which supervises e-commerce services under the Act.
129
130
 
130
131
  Post- och telestyrelsen (PTS)
131
132
  https://pts.se
133
+ {{/if}}
134
+ {{#if supervision.changed}}
135
+ If you are not satisfied with our response, you can report the matter to
136
+ Digitaliseringsmyndigheten, the Swedish government agency for digitalisation, which
137
+ supervises e-commerce services under the Act.
138
+
139
+ Digitaliseringsmyndigheten
140
+ {{/if}}
132
141
 
133
142
  Websites and mobile applications of public sector bodies fall under a separate act, which
134
143
  requires an accessibility statement of its own. This document is not that statement.
@@ -127,11 +127,19 @@ Vi strävar efter att svara så snart som möjligt.
127
127
 
128
128
  ## Tillsyn
129
129
 
130
+ {{#if supervision.unchanged}}
130
131
  Om du inte är nöjd med vårt svar kan du anmäla saken till Post- och telestyrelsen (PTS), som
131
132
  har tillsyn över e-handelstjänster enligt lagen.
132
133
 
133
134
  Post- och telestyrelsen (PTS)
134
135
  https://pts.se
136
+ {{/if}}
137
+ {{#if supervision.changed}}
138
+ Om du inte är nöjd med vårt svar kan du anmäla saken till Digitaliseringsmyndigheten, som
139
+ har tillsyn över e-handelstjänster enligt lagen.
140
+
141
+ Digitaliseringsmyndigheten
142
+ {{/if}}
135
143
 
136
144
  Offentliga aktörers webbplatser och mobila applikationer omfattas av en annan lag, som
137
145
  kräver en egen tillgänglighetsredogörelse. Det här dokumentet ersätter inte den.
@@ -1,4 +1,4 @@
1
- //#region src/text.ts
1
+ // src/text.ts
2
2
  /**
3
3
  * Text this package writes: escaping, counting and the standards references
4
4
  * that appear in every report and in the statement.
@@ -59,5 +59,13 @@ function standardsReference(successCriteria, enClauses) {
59
59
  function isoDate(date) {
60
60
  return date.toISOString().slice(0, 10);
61
61
  }
62
- //#endregion
63
- export { isoDate as a, escapeText as i, count as n, plural as o, escapeAttribute as r, standardsReference as s, collapse as t };
62
+ /**
63
+ * An ISO calendar date that exists. `Date.parse` alone takes 2027-02-30 and
64
+ * quietly means 2 March, so the parsed day has to read back as what was typed.
65
+ */
66
+ function isCalendarDate(value) {
67
+ if (!/^\d{4}-\d{2}-\d{2}$/.test(value)) return false;
68
+ const time = Date.parse(`${value}T00:00:00Z`);
69
+ return !Number.isNaN(time) && new Date(time).toISOString().slice(0, 10) === value;
70
+ }
71
+ export { isCalendarDate as a, standardsReference as c, escapeText as i, count as n, isoDate as o, escapeAttribute as r, plural as s, collapse as t };
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from "node:module";
2
- //#region src/version.ts
2
+ // src/version.ts
3
3
  /**
4
4
  * The published package version, reported by `--version` and stamped into the
5
5
  * JSON report.
@@ -11,5 +11,4 @@ import { createRequire } from "node:module";
11
11
  * entry in the exports map, which must stay.
12
12
  */
13
13
  const TOOL_VERSION = createRequire(import.meta.url)("eaa-kit/package.json").version;
14
- //#endregion
15
14
  export { TOOL_VERSION as t };
@@ -1,5 +1,4 @@
1
- import { n as IntegrationOptions, t as BuildAuditError } from "../run-BK2blxMI.js";
2
- //#region src/vite/index.d.ts
1
+ import { n as IntegrationOptions, t as BuildAuditError } from "../run-VXnP4uLp.js";
3
2
  interface EaaKitPluginOptions extends IntegrationOptions {
4
3
  /**
5
4
  * Directory to audit, relative to the Vite root. Defaults to the build's own
@@ -35,5 +34,4 @@ interface VitePluginLike {
35
34
  closeBundle(): Promise<void>;
36
35
  }
37
36
  declare function eaaKit(options?: EaaKitPluginOptions): VitePluginLike;
38
- //#endregion
39
37
  export { BuildAuditError, EaaKitPluginOptions, ResolvedConfigLike, VitePluginLike, eaaKit as default };
@@ -1,6 +1,6 @@
1
- import { n as auditBuild, t as BuildAuditError } from "../run-DzVEOkiF.js";
1
+ import { n as auditBuild, t as BuildAuditError } from "../run-D7tc7IU2.js";
2
2
  import path from "node:path";
3
- //#region src/vite/index.ts
3
+ // src/vite/index.ts
4
4
  function eaaKit(options = {}) {
5
5
  let directory;
6
6
  let logger;
@@ -36,5 +36,4 @@ function prefixed(logger) {
36
36
  error: (message) => write("error", message)
37
37
  };
38
38
  }
39
- //#endregion
40
39
  export { BuildAuditError, eaaKit as default };
@@ -1,9 +1,9 @@
1
- import { n as isDirectory } from "./fs-BmPtmFke.js";
2
- import { d as warn, l as note } from "./command-BGGMf4vn.js";
1
+ import { n as isDirectory } from "./fs-tPD5r0wY.js";
2
+ import { d as warn, l as note } from "./command-C8ZFvcc1.js";
3
3
  import path from "node:path";
4
4
  import pc from "picocolors";
5
5
  import { watch } from "node:fs";
6
- //#region src/cli/watch.ts
6
+ // src/cli/watch.ts
7
7
  const DEFAULT_DEBOUNCE_MS = 150;
8
8
  const DEFAULT_POLL_MS = 1e3;
9
9
  /**
@@ -118,5 +118,4 @@ function stopSignal(given) {
118
118
  }
119
119
  };
120
120
  }
121
- //#endregion
122
121
  export { watchAudit };
@@ -1,5 +1,4 @@
1
- import { n as IntegrationOptions, t as BuildAuditError } from "../run-BK2blxMI.js";
2
- //#region src/webpack/index.d.ts
1
+ import { n as IntegrationOptions, t as BuildAuditError } from "../run-VXnP4uLp.js";
3
2
  /** The part of a webpack compilation this reads. */
4
3
  interface CompilationLike {
5
4
  /** Non-empty when the build itself failed; there is nothing to audit then. */
@@ -29,5 +28,4 @@ declare class EaaKitWebpackPlugin {
29
28
  constructor(options?: EaaKitWebpackOptions);
30
29
  apply(compiler: CompilerLike): void;
31
30
  }
32
- //#endregion
33
31
  export { BuildAuditError, CompilationLike, CompilerLike, EaaKitWebpackOptions, EaaKitWebpackPlugin as default };
@@ -1,6 +1,6 @@
1
- import { n as auditBuild, r as stderrLogger, t as BuildAuditError } from "../run-DzVEOkiF.js";
1
+ import { n as auditBuild, r as stderrLogger, t as BuildAuditError } from "../run-D7tc7IU2.js";
2
2
  import path from "node:path";
3
- //#region src/webpack/index.ts
3
+ // src/webpack/index.ts
4
4
  var EaaKitWebpackPlugin = class {
5
5
  options;
6
6
  constructor(options = {}) {
@@ -16,5 +16,4 @@ var EaaKitWebpackPlugin = class {
16
16
  });
17
17
  }
18
18
  };
19
- //#endregion
20
19
  export { BuildAuditError, EaaKitWebpackPlugin as default };
@@ -1,7 +1,7 @@
1
- import { t as WCAG22_AA_CRITERIA } from "./criteria-CnPJKGeb.js";
2
- import { n as DEFAULT_TAGS } from "./result-B7_zVxAX.js";
3
- import { a as manualCheckFor, i as rulesByCriterion, o as understandingUrl } from "./coverage-zdzgSKjz.js";
4
- //#region src/audit/worksheet.ts
1
+ import { t as WCAG22_AA_CRITERIA } from "./criteria-CacF0HP1.js";
2
+ import { a as manualCheckFor, i as rulesByCriterion, o as understandingUrl } from "./coverage-C1Z6t9Ct.js";
3
+ import { n as DEFAULT_TAGS } from "./result-g8dGsrcv.js";
4
+ // src/audit/worksheet.ts
5
5
  function buildWorksheet(options) {
6
6
  const rules = rulesByCriterion(options.tags ?? DEFAULT_TAGS);
7
7
  const unautomatable = WCAG22_AA_CRITERIA.filter((criterion) => (rules.get(criterion.number) ?? []).length === 0);
@@ -60,5 +60,4 @@ function criterionEntry(criterion, rules, review) {
60
60
  lines.push("");
61
61
  return lines;
62
62
  }
63
- //#endregion
64
63
  export { buildWorksheet };
@@ -0,0 +1,85 @@
1
+ import { i as toPosix, t as exists } from "./fs-tPD5r0wY.js";
2
+ import { i as detectFramework } from "./frameworks-BboC8eNk.js";
3
+ import { o as readPackageJson } from "./project-B21NT_aX.js";
4
+ import { readFile } from "node:fs/promises";
5
+ import path from "node:path";
6
+ import { glob } from "tinyglobby";
7
+ // src/audit/workspaces.ts
8
+ /** Where Turborepo and Nx put things by convention, when nothing else says. */
9
+ const CONVENTIONAL = ["apps/*", "packages/*"];
10
+ /** Undefined when `root` is not the root of a workspace. */
11
+ async function findWorkspaceSites(root) {
12
+ const listed = await workspaceGlobs(root);
13
+ if (listed === void 0) return void 0;
14
+ const trim = (pattern) => pattern.replace(/^!/, "").replace(/\/$/, "");
15
+ const included = listed.globs.filter((pattern) => !pattern.startsWith("!"));
16
+ const excluded = listed.globs.filter((pattern) => pattern.startsWith("!"));
17
+ const manifests = await glob(included.map((pattern) => `${trim(pattern)}/package.json`), {
18
+ cwd: root,
19
+ ignore: ["**/node_modules/**", ...excluded.flatMap((pattern) => [`${trim(pattern)}/package.json`, `${trim(pattern)}/**`])],
20
+ onlyFiles: true,
21
+ dot: false
22
+ });
23
+ const sites = [];
24
+ for (const manifest of manifests.sort()) {
25
+ const dir = path.dirname(manifest);
26
+ if (dir === ".") continue;
27
+ const absolute = path.join(root, dir);
28
+ const framework = await detectFramework(absolute, await readPackageJson(absolute));
29
+ if (framework === void 0) continue;
30
+ if (framework.framework.id === "vite" && !await exists(path.join(absolute, "index.html"))) continue;
31
+ sites.push({
32
+ dir: toPosix(dir),
33
+ framework
34
+ });
35
+ }
36
+ return {
37
+ evidence: listed.evidence,
38
+ sites
39
+ };
40
+ }
41
+ async function workspaceGlobs(root) {
42
+ const pnpm = await readText(path.join(root, "pnpm-workspace.yaml"));
43
+ if (pnpm !== void 0) return {
44
+ evidence: "pnpm-workspace.yaml",
45
+ globs: yamlPackages(pnpm)
46
+ };
47
+ const pkg = await readPackageJson(root);
48
+ const workspaces = Array.isArray(pkg?.workspaces) ? pkg.workspaces : pkg?.workspaces?.packages;
49
+ if (workspaces !== void 0 && workspaces.length > 0) return {
50
+ evidence: "package.json workspaces",
51
+ globs: workspaces
52
+ };
53
+ const lerna = await readText(path.join(root, "lerna.json"));
54
+ if (lerna !== void 0) try {
55
+ return {
56
+ evidence: "lerna.json",
57
+ globs: JSON.parse(lerna).packages ?? CONVENTIONAL
58
+ };
59
+ } catch {
60
+ return {
61
+ evidence: "lerna.json",
62
+ globs: CONVENTIONAL
63
+ };
64
+ }
65
+ for (const marker of ["turbo.json", "nx.json"]) if (await exists(path.join(root, marker))) return {
66
+ evidence: marker,
67
+ globs: CONVENTIONAL
68
+ };
69
+ }
70
+ /**
71
+ * The `packages:` list out of pnpm-workspace.yaml, read with a pattern. It is a
72
+ * list of strings, and a YAML parser would be a dependency for one list.
73
+ * Negated entries are kept: they are exclusions, applied when scanning.
74
+ */
75
+ function yamlPackages(source) {
76
+ return [...(/^packages:\s*\n((?:[ \t]*(?:-.*|#.*)?\n?)*)/m.exec(source)?.[1] ?? "").matchAll(/^[ \t]*-[ \t]*['"]?([^'"\n#]+?)['"]?[ \t]*(?:#.*)?$/gm)].map((match) => match[1] ?? "").filter((entry) => entry !== "");
77
+ }
78
+ async function readText(file) {
79
+ try {
80
+ return await readFile(file, "utf8");
81
+ } catch {
82
+ return;
83
+ }
84
+ }
85
+ export { findWorkspaceSites };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eaa-kit",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "description": "WCAG 2.2 AA auditor and EU accessibility statement generator for fifteen countries (AT, BE, CH, CZ, DE, DK, ES, FI, FR, IE, IT, NL, PL, PT, SE). Audits a static build or a running site from the command line.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -82,7 +82,8 @@
82
82
  "smoke": "pnpm build && node dist/cli/index.js audit tests/fixtures/site --include about/** --format json && node dist/cli/index.js audit tests/fixtures/site --include \"about/**\" \"blog/**\" \"drafts/**\" \"legacy.htm\" --concurrency 2 && node dist/cli/index.js audit tests/fixtures/site --include about/** --format html && node dist/cli/index.js audit tests/fixtures/site --baseline examples/baseline.json && node -e \"import('./dist/astro/index.js').then(m => { const i = m.default(); if (i.name !== 'eaa-kit' || typeof i.hooks['astro:build:done'] !== 'function') { throw new Error('astro entry point is not an integration') } console.log('astro entry ok') })\" && node dist/cli/index.js baseline tests/fixtures/site --output .eaa-kit/smoke-baseline.json && node dist/cli/index.js baseline tests/fixtures/site --output .eaa-kit/smoke-baseline.json --prune && node dist/cli/index.js checklist --record .eaa-kit/smoke-review.json --output .eaa-kit/smoke-review.md && node dist/cli/index.js audit tests/fixtures/site --include about/** --review .eaa-kit/smoke-review.json --coverage && node dist/cli/index.js statement --config examples/eaa.config.json && node dist/cli/index.js statement --config examples/eaa.config.json --audit examples/report.json --format html && node dist/cli/index.js audit tests/fixtures/site --include about/** --format json --no-cache --output .eaa-kit/smoke-base.json && node dist/cli/index.js audit tests/fixtures/site --include about/** --format json --no-cache --output .eaa-kit/smoke-head.json && node dist/cli/index.js diff .eaa-kit/smoke-base.json .eaa-kit/smoke-head.json --format json",
83
83
  "bench": "pnpm build && node scripts/bench.mjs",
84
84
  "examples": "pnpm build && node scripts/generate-examples.mjs",
85
- "test:packaged": "pnpm build && node scripts/test-packaged.mjs"
85
+ "test:packaged": "pnpm build && node scripts/test-packaged.mjs",
86
+ "release:check": "node scripts/release-check.ts"
86
87
  },
87
88
  "peerDependencies": {
88
89
  "astro": ">=4.0.0",
@@ -97,27 +98,28 @@
97
98
  }
98
99
  },
99
100
  "dependencies": {
100
- "axe-core": "^4.13.0",
101
- "commander": "^15.0.0",
102
- "jsdom": "^30.0.1",
101
+ "axe-core": "~4.13.0",
102
+ "commander": "^15.1.0",
103
+ "jsdom": "^30.1.3",
103
104
  "picocolors": "^1.1.1",
104
105
  "tinyglobby": "^0.2.17"
105
106
  },
106
107
  "devDependencies": {
107
- "@11ty/eleventy": "^3.1.6",
108
+ "@11ty/eleventy": "^3.1.8",
108
109
  "@biomejs/biome": "^2.5.9",
109
110
  "@types/jsdom": "^30.0.0",
110
- "@types/node": "^26.2.0",
111
+ "@types/node": "^26.6.6",
111
112
  "ajv": "^8.20.0",
112
113
  "ajv-formats": "^3.0.1",
113
- "astro": "^7.2.9",
114
- "nuxt": "^4.5.2",
115
- "playwright": "^1.62.1",
114
+ "astro": "^7.4.13",
115
+ "nuxt": "^4.6.4",
116
+ "playwright": "^1.65.1",
116
117
  "tsdown": "^0.22.14",
117
118
  "typescript": "^7.0.2",
118
- "vite": "^8.2.2",
119
- "vitest": "^4.1.11",
120
- "webpack": "^5.110.2"
119
+ "vite": "^8.3.8",
120
+ "vitest": "^4.1.12",
121
+ "webpack": "^5.113.0",
122
+ "yaml": "^2.9.1"
121
123
  },
122
124
  "publishConfig": {
123
125
  "access": "public",
@@ -1,2 +0,0 @@
1
- import { n as runAuditCommand } from "./audit-J2jeLo-y.js";
2
- export { runAuditCommand };
@@ -1,2 +0,0 @@
1
- import { o as readBaseline, r as applyBaseline, t as BaselineError } from "./baseline-DrFh7joZ.js";
2
- export { BaselineError, applyBaseline, readBaseline };
@@ -1,2 +0,0 @@
1
- import { t as runBaselineCommand } from "./baseline-wyJsSIFQ.js";
2
- export { runBaselineCommand };
@@ -1,2 +0,0 @@
1
- import { n as componentFor, t as buildComponentIndex } from "./component-ChisoFyY.js";
2
- export { buildComponentIndex, componentFor };
@@ -1,3 +0,0 @@
1
- import { t as WCAG22_AA_CRITERIA } from "./criteria-CnPJKGeb.js";
2
- import "./coverage-zdzgSKjz.js";
3
- export { WCAG22_AA_CRITERIA };
@@ -1,2 +0,0 @@
1
- import { i as detectFramework, t as FALLBACK_OUTPUTS } from "./frameworks-B4ClIJgE.js";
2
- export { FALLBACK_OUTPUTS, detectFramework };
@@ -1,3 +0,0 @@
1
- import "./result-B7_zVxAX.js";
2
- import { n as runJsdomAudit } from "./jsdom-CsW_xVcA.js";
3
- export { runJsdomAudit };
@@ -1,2 +0,0 @@
1
- import { r as serialiseJsonReport, t as buildJsonReport } from "./json-SGCgxSPT.js";
2
- export { buildJsonReport, serialiseJsonReport };
@@ -1,2 +0,0 @@
1
- import { r as loadAuditConfig } from "./load-CH-ltdlq.js";
2
- export { loadAuditConfig };
@@ -1,2 +0,0 @@
1
- import { i as readPackageJson, t as autoDetectSource } from "./project-v2PoRw70.js";
2
- export { autoDetectSource, readPackageJson };