eaa-kit 0.4.0 → 0.5.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 (54) hide show
  1. package/README.md +31 -9
  2. package/dist/astro/index.d.ts +1 -1
  3. package/dist/astro/index.js +1 -1
  4. package/dist/audit/runners/worker.js +5 -1
  5. package/dist/{audit-CPoZMXGM.js → audit-B282A3EA.js} +43 -21
  6. package/dist/audit-DyHPmGeD.js +2 -0
  7. package/dist/{baseline-22Y1NWxM.js → baseline-0u4df12v.js} +1 -1
  8. package/dist/{baseline-DB9CZGnV.js → baseline-CuAS2lMk.js} +6 -5
  9. package/dist/cli/index.js +50 -19
  10. package/dist/{collect-CFM8gEVv.js → collect-Cu1q9NTB.js} +34 -3
  11. package/dist/command-C3D7JWn6.js +160 -0
  12. package/dist/{coverage-B4IBKMO8.js → coverage-B_Y6l-Ra.js} +3 -2
  13. package/dist/{crawl-BiI1Lau_.js → crawl-BUWPgaGW.js} +83 -9
  14. package/dist/eleventy/index.d.ts +1 -1
  15. package/dist/eleventy/index.js +1 -1
  16. package/dist/fingerprint-BjYV_0F7.js +67 -0
  17. package/dist/{html-BGTO3ypW.js → html-C4vktg0A.js} +3 -3
  18. package/dist/index.d.ts +119 -4
  19. package/dist/index.js +2 -2
  20. package/dist/{init-DIWDE35F.js → init-CW7LfGT5.js} +10 -4
  21. package/dist/jsdom-22Bkt65v.js +3 -0
  22. package/dist/{jsdom-DCpGSLfW.js → jsdom-B--cEH-G.js} +12 -4
  23. package/dist/{json-DjEvy1nX.js → json-DROX33kh.js} +4 -4
  24. package/dist/{json-QQuFIw1W.js → json-D_Mnnft5.js} +1 -1
  25. package/dist/load-CFq2VQtT.js +2 -0
  26. package/dist/{load-5wRGLvub.js → load-yAR4wzez.js} +133 -8
  27. package/dist/nuxt/index.d.ts +1 -1
  28. package/dist/nuxt/index.js +1 -1
  29. package/dist/{playwright-BWniOain.js → playwright-BojtYVUa.js} +30 -6
  30. package/dist/{pool-BMevaLWD.js → pool-BO25OIez.js} +52 -2
  31. package/dist/{remediation-Dtowi2EC.js → remediation-CMBIrnpN.js} +2 -2
  32. package/dist/{render-DrvXRCEn.js → render-DbGOVmhx.js} +47 -9
  33. package/dist/{result-DoamKFsp.js → result-BWcYXeRs.js} +37 -3
  34. package/dist/{run-DB34BSOZ.js → run-C2nKFcb-.js} +1 -1
  35. package/dist/{run-BMASMmwO.d.ts → run-CtcEUhbe.d.ts} +7 -0
  36. package/dist/{sarif-SR3_lLYd.js → sarif-B-UBcVu8.js} +3 -3
  37. package/dist/{schema-is6CGX2D.js → schema-DJSF4K05.js} +15 -1
  38. package/dist/statement/templates/es.en.md +125 -0
  39. package/dist/statement/templates/es.es.md +127 -0
  40. package/dist/statement/templates/fr.en.md +128 -0
  41. package/dist/statement/templates/fr.fr.md +131 -0
  42. package/dist/statement/templates/it.en.md +127 -0
  43. package/dist/statement/templates/it.it.md +130 -0
  44. package/dist/statement/templates/nl.en.md +125 -0
  45. package/dist/statement/templates/nl.nl.md +127 -0
  46. package/dist/vite/index.d.ts +1 -1
  47. package/dist/vite/index.js +1 -1
  48. package/dist/webpack/index.d.ts +1 -1
  49. package/dist/webpack/index.js +1 -1
  50. package/package.json +6 -2
  51. package/dist/audit-CpXH2Mk8.js +0 -2
  52. package/dist/command-D8l_oYbV.js +0 -77
  53. package/dist/fingerprint-DRoneAjj.js +0 -20
  54. package/dist/jsdom-4IMzv0eE.js +0 -3
@@ -0,0 +1,130 @@
1
+ # Dichiarazione di accessibilità
2
+
3
+ {{ provider.legalName }} si impegna a rendere accessibile il sito {{ site.name }} in
4
+ conformità al decreto legislativo 27 maggio 2022, n. 82, che recepisce la direttiva (UE)
5
+ 2019/882 (European Accessibility Act) e modifica la legge 9 gennaio 2004, n. 4 (legge
6
+ Stanca). Le relative disposizioni si applicano dal 28 giugno 2025.
7
+
8
+ Questa dichiarazione di accessibilità si riferisce a {{ site.url }}.
9
+
10
+ ## Stato di conformità
11
+
12
+ {{#if compliance.isCompliant}}
13
+ Questo sito è pienamente conforme a {{ compliance.standard }}.
14
+ {{/if}}
15
+ {{#if compliance.isPartiallyCompliant}}
16
+ Questo sito è parzialmente conforme a {{ compliance.standard }}. I contenuti elencati nella
17
+ sezione seguente non sono accessibili, per i motivi indicati.
18
+ {{/if}}
19
+ {{#if compliance.isNonCompliant}}
20
+ Questo sito non è conforme a {{ compliance.standard }}. I contenuti elencati nella sezione
21
+ seguente non sono accessibili, per i motivi indicati.
22
+ {{/if}}
23
+
24
+ ## Contenuti non accessibili
25
+
26
+ {{#if hasKnownIssues}}
27
+ {{#each compliance.knownIssues}}
28
+ - {{ description }}
29
+ {{#if standards}}
30
+ Requisito interessato: {{ standards }}
31
+ {{/if}}
32
+ {{#if pageList}}
33
+ Pagine interessate: {{ pageList }}{{#if hasMorePages}} e altre {{ morePages }}{{/if}}
34
+ {{/if}}
35
+ {{#if isDisproportionateBurden}}
36
+ Motivo: onere sproporzionato.
37
+ {{/if}}
38
+ {{#if isOutOfScope}}
39
+ Motivo: il contenuto non rientra nell'ambito di applicazione del d.lgs. 82/2022.
40
+ {{/if}}
41
+ {{#if isFixPlanned}}
42
+ Motivo: la barriera è nota ed è in corso di correzione.
43
+ {{/if}}
44
+ {{#if remedyByFormatted}}
45
+ Correzione prevista entro il: {{ remedyByFormatted }}
46
+ {{/if}}
47
+ {{#if isFromAudit}}
48
+ Rilevato da un test automatico (axe-core, regola {{ ruleId }}); da riformulare con parole proprie.
49
+ {{/if}}
50
+ {{/each}}
51
+ {{/if}}
52
+ {{#if hasNoKnownIssues}}
53
+ Al momento della valutazione non risultavano contenuti non accessibili.
54
+ {{/if}}
55
+
56
+ ## Redazione della presente dichiarazione
57
+
58
+ Questa dichiarazione è stata redatta il {{ compliance.assessedOnFormatted }}.
59
+
60
+ {{#if compliance.isSelfAssessment}}
61
+ Si basa su un'autovalutazione svolta da {{ provider.legalName }}.
62
+ {{/if}}
63
+ {{#if compliance.isExternalAudit}}
64
+ Si basa su una valutazione svolta da terzi.
65
+ {{/if}}
66
+
67
+ {{#if audit.isSinglePage}}
68
+ Il test automatico del {{ audit.checkedOnFormatted }} ha riguardato una pagina di questo
69
+ sito.
70
+ {{/if}}
71
+ {{#if audit.isMultiPage}}
72
+ Il test automatico del {{ audit.checkedOnFormatted }} ha riguardato {{ audit.pages }}
73
+ pagine di questo sito.
74
+ {{/if}}
75
+ {{#if audit.needsReviewIsSingle}}
76
+ Un'ulteriore verifica di regola richiede una valutazione manuale.
77
+ {{/if}}
78
+ {{#if audit.needsReviewIsPlural}}
79
+ Altre {{ audit.needsReview }} verifiche di regole richiedono una valutazione manuale.
80
+ {{/if}}
81
+ {{#if audit.notEvaluatedIsSingle}}
82
+ Per una verifica di regola lo strumento utilizzato non ha raggiunto un esito; non viene
83
+ presentata come soddisfatta.
84
+ {{/if}}
85
+ {{#if audit.notEvaluatedIsPlural}}
86
+ Per {{ audit.notEvaluated }} verifiche di regole lo strumento utilizzato non ha raggiunto
87
+ un esito; non vengono presentate come soddisfatte.
88
+ {{/if}}
89
+ {{#if hasAudit}}
90
+
91
+ {{/if}}
92
+ La valutazione si basa anche su test automatici. Gli strumenti automatici rilevano solo una
93
+ parte delle barriere possibili; non sostituiscono né una verifica manuale né una verifica
94
+ con tecnologie assistive.
95
+
96
+ ## Riscontri e contatti
97
+
98
+ Ha incontrato una barriera, o le serve un'informazione in forma accessibile? Ci scriva:
99
+
100
+ - E-mail: {{ provider.email }}
101
+ {{#if provider.feedbackUrl}}
102
+ - Modulo di contatto: {{ provider.feedbackUrl }}
103
+ {{/if}}
104
+ {{#if provider.phone}}
105
+ - Telefono: {{ provider.phone }}
106
+ {{/if}}
107
+ {{#if provider.address}}
108
+ - Indirizzo: {{ provider.address }}
109
+ {{/if}}
110
+
111
+ Ci impegniamo a rispondere in tempi brevi.
112
+
113
+ ## Procedura di attuazione
114
+
115
+ Se la risposta non è soddisfacente, può segnalare la barriera all'Agenzia per l'Italia
116
+ digitale (AgID), autorità di vigilanza sull'accessibilità dei servizi che rientrano
117
+ nell'ambito del d.lgs. 82/2022.
118
+
119
+ Agenzia per l'Italia digitale
120
+ https://www.agid.gov.it
121
+
122
+ I soggetti privati che offrono servizi al pubblico con un fatturato medio, negli ultimi tre
123
+ anni di attività, superiore a 500 milioni di euro pubblicano e aggiornano ogni anno, entro
124
+ il 23 settembre, una dichiarazione di accessibilità secondo il modello AgID. Questo
125
+ documento non sostituisce quella dichiarazione.
126
+
127
+ ---
128
+
129
+ Questa dichiarazione è stata generata con eaa-kit e non costituisce consulenza legale. La
130
+ rilegga prima di pubblicarla e, in caso di dubbio, la faccia verificare da un legale.
@@ -0,0 +1,125 @@
1
+ # Accessibility Statement
2
+
3
+ {{ provider.legalName }} is committed to making the website {{ site.name }} accessible in
4
+ accordance with the Implementatiewet toegankelijkheidsvoorschriften producten en diensten,
5
+ which transposes Directive (EU) 2019/882 (the European Accessibility Act) into Dutch law.
6
+ It has been in force since 28 June 2025.
7
+
8
+ This accessibility statement applies to {{ site.url }}.
9
+
10
+ ## Compliance status
11
+
12
+ {{#if compliance.isCompliant}}
13
+ This website is fully compliant with {{ compliance.standard }}.
14
+ {{/if}}
15
+ {{#if compliance.isPartiallyCompliant}}
16
+ This website is partially compliant with {{ compliance.standard }}. The content listed in
17
+ the following section is not accessible, for the reasons given.
18
+ {{/if}}
19
+ {{#if compliance.isNonCompliant}}
20
+ This website is not compliant with {{ compliance.standard }}. The content listed in the
21
+ following section is not accessible, for the reasons given.
22
+ {{/if}}
23
+
24
+ ## Non-accessible content
25
+
26
+ {{#if hasKnownIssues}}
27
+ {{#each compliance.knownIssues}}
28
+ - {{ description }}
29
+ {{#if standards}}
30
+ Requirement affected: {{ standards }}
31
+ {{/if}}
32
+ {{#if pageList}}
33
+ Pages affected: {{ pageList }}{{#if hasMorePages}} and {{ morePages }} more{{/if}}
34
+ {{/if}}
35
+ {{#if isDisproportionateBurden}}
36
+ Reason: disproportionate burden.
37
+ {{/if}}
38
+ {{#if isOutOfScope}}
39
+ Reason: the content falls outside the scope of this Act.
40
+ {{/if}}
41
+ {{#if isFixPlanned}}
42
+ Reason: the barrier is known and is being addressed.
43
+ {{/if}}
44
+ {{#if remedyByFormatted}}
45
+ Expected to be resolved by: {{ remedyByFormatted }}
46
+ {{/if}}
47
+ {{#if isFromAudit}}
48
+ Detected by automated testing (axe-core, rule {{ ruleId }}); describe it in your own words.
49
+ {{/if}}
50
+ {{/each}}
51
+ {{/if}}
52
+ {{#if hasNoKnownIssues}}
53
+ No non-accessible content was known at the time of assessment.
54
+ {{/if}}
55
+
56
+ ## Preparation of this statement
57
+
58
+ This statement was prepared on {{ compliance.assessedOnFormatted }}.
59
+
60
+ {{#if compliance.isSelfAssessment}}
61
+ It is based on a self-assessment carried out by {{ provider.legalName }}.
62
+ {{/if}}
63
+ {{#if compliance.isExternalAudit}}
64
+ It is based on an assessment carried out by a third party.
65
+ {{/if}}
66
+
67
+ {{#if audit.isSinglePage}}
68
+ The automated test run of {{ audit.checkedOnFormatted }} covered one page of this website.
69
+ {{/if}}
70
+ {{#if audit.isMultiPage}}
71
+ The automated test run of {{ audit.checkedOnFormatted }} covered {{ audit.pages }}
72
+ pages of this website.
73
+ {{/if}}
74
+ {{#if audit.needsReviewIsSingle}}
75
+ One further rule check requires a manual decision.
76
+ {{/if}}
77
+ {{#if audit.needsReviewIsPlural}}
78
+ {{ audit.needsReview }} further rule checks require a manual decision.
79
+ {{/if}}
80
+ {{#if audit.notEvaluatedIsSingle}}
81
+ One rule check could not be decided by the tool that was used; it is not reported as met.
82
+ {{/if}}
83
+ {{#if audit.notEvaluatedIsPlural}}
84
+ {{ audit.notEvaluated }} rule checks could not be decided by the tool that was used; they
85
+ are not reported as met.
86
+ {{/if}}
87
+ {{#if hasAudit}}
88
+
89
+ {{/if}}
90
+ The assessment relies in part on automated testing. Automated tools detect only a subset
91
+ of possible barriers; they are not a substitute for manual testing or for testing with
92
+ assistive technologies.
93
+
94
+ ## Feedback and contact
95
+
96
+ Found a barrier, or need information in an accessible format? Please get in touch:
97
+
98
+ - Email: {{ provider.email }}
99
+ {{#if provider.feedbackUrl}}
100
+ - Contact form: {{ provider.feedbackUrl }}
101
+ {{/if}}
102
+ {{#if provider.phone}}
103
+ - Phone: {{ provider.phone }}
104
+ {{/if}}
105
+ {{#if provider.address}}
106
+ - Address: {{ provider.address }}
107
+ {{/if}}
108
+
109
+ We aim to respond to your feedback promptly.
110
+
111
+ ## Enforcement procedure
112
+
113
+ If you are not satisfied with our response, you can report the matter to the supervisor.
114
+ Supervision is split between several authorities: for services such as web shops and
115
+ customer support it is the Autoriteit Consument & Markt (ACM), and for products such as
116
+ smartphones, e-readers and payment terminals the Rijksinspectie Digitale Infrastructuur
117
+ (RDI).
118
+
119
+ Autoriteit Consument & Markt
120
+ https://www.acm.nl
121
+
122
+ ---
123
+
124
+ This statement was generated with eaa-kit and is not legal advice. Review it before
125
+ publishing, and have it checked by a lawyer if in doubt.
@@ -0,0 +1,127 @@
1
+ # Toegankelijkheidsverklaring
2
+
3
+ {{ provider.legalName }} zet zich in om de website {{ site.name }} toegankelijk te maken,
4
+ in overeenstemming met de Implementatiewet toegankelijkheidsvoorschriften producten en
5
+ diensten, waarmee richtlijn (EU) 2019/882 (European Accessibility Act) in Nederlands recht
6
+ is omgezet. De wet geldt sinds 28 juni 2025.
7
+
8
+ Deze toegankelijkheidsverklaring geldt voor {{ site.url }}.
9
+
10
+ ## Nalevingsstatus
11
+
12
+ {{#if compliance.isCompliant}}
13
+ Deze website voldoet volledig aan {{ compliance.standard }}.
14
+ {{/if}}
15
+ {{#if compliance.isPartiallyCompliant}}
16
+ Deze website voldoet gedeeltelijk aan {{ compliance.standard }}. De inhoud die hieronder
17
+ staat is niet toegankelijk, om de genoemde redenen.
18
+ {{/if}}
19
+ {{#if compliance.isNonCompliant}}
20
+ Deze website voldoet niet aan {{ compliance.standard }}. De inhoud die hieronder staat is
21
+ niet toegankelijk, om de genoemde redenen.
22
+ {{/if}}
23
+
24
+ ## Niet-toegankelijke inhoud
25
+
26
+ {{#if hasKnownIssues}}
27
+ {{#each compliance.knownIssues}}
28
+ - {{ description }}
29
+ {{#if standards}}
30
+ Betrokken eis: {{ standards }}
31
+ {{/if}}
32
+ {{#if pageList}}
33
+ Betrokken pagina's: {{ pageList }}{{#if hasMorePages}} en {{ morePages }} andere{{/if}}
34
+ {{/if}}
35
+ {{#if isDisproportionateBurden}}
36
+ Reden: onevenredige last.
37
+ {{/if}}
38
+ {{#if isOutOfScope}}
39
+ Reden: de inhoud valt buiten het toepassingsgebied van deze wet.
40
+ {{/if}}
41
+ {{#if isFixPlanned}}
42
+ Reden: de drempel is bekend en wordt verholpen.
43
+ {{/if}}
44
+ {{#if remedyByFormatted}}
45
+ Verwacht verholpen op: {{ remedyByFormatted }}
46
+ {{/if}}
47
+ {{#if isFromAudit}}
48
+ Vastgesteld met een geautomatiseerde test (axe-core, regel {{ ruleId }}); beschrijf dit in eigen woorden.
49
+ {{/if}}
50
+ {{/each}}
51
+ {{/if}}
52
+ {{#if hasNoKnownIssues}}
53
+ Op het moment van de beoordeling was er geen niet-toegankelijke inhoud bekend.
54
+ {{/if}}
55
+
56
+ ## Opstelling van deze verklaring
57
+
58
+ Deze verklaring is opgesteld op {{ compliance.assessedOnFormatted }}.
59
+
60
+ {{#if compliance.isSelfAssessment}}
61
+ Zij berust op een zelfbeoordeling door {{ provider.legalName }}.
62
+ {{/if}}
63
+ {{#if compliance.isExternalAudit}}
64
+ Zij berust op een beoordeling door een derde partij.
65
+ {{/if}}
66
+
67
+ {{#if audit.isSinglePage}}
68
+ De geautomatiseerde test van {{ audit.checkedOnFormatted }} betrof één pagina van deze
69
+ website.
70
+ {{/if}}
71
+ {{#if audit.isMultiPage}}
72
+ De geautomatiseerde test van {{ audit.checkedOnFormatted }} betrof {{ audit.pages }}
73
+ pagina's van deze website.
74
+ {{/if}}
75
+ {{#if audit.needsReviewIsSingle}}
76
+ Voor één andere regelcontrole is een menselijke beoordeling nodig.
77
+ {{/if}}
78
+ {{#if audit.needsReviewIsPlural}}
79
+ Voor {{ audit.needsReview }} andere regelcontroles is een menselijke beoordeling nodig.
80
+ {{/if}}
81
+ {{#if audit.notEvaluatedIsSingle}}
82
+ Bij één regelcontrole kwam het gebruikte gereedschap niet tot een uitkomst; die wordt niet
83
+ als voldaan gepresenteerd.
84
+ {{/if}}
85
+ {{#if audit.notEvaluatedIsPlural}}
86
+ Bij {{ audit.notEvaluated }} regelcontroles kwam het gebruikte gereedschap niet tot een
87
+ uitkomst; die worden niet als voldaan gepresenteerd.
88
+ {{/if}}
89
+ {{#if hasAudit}}
90
+
91
+ {{/if}}
92
+ De beoordeling berust mede op geautomatiseerd testen. Geautomatiseerde gereedschappen
93
+ vinden maar een deel van de mogelijke drempels; zij vervangen geen handmatige test en geen
94
+ test met hulptechnologie.
95
+
96
+ ## Reactie en contact
97
+
98
+ Een drempel tegengekomen, of informatie nodig in een toegankelijke vorm? Laat het ons
99
+ weten:
100
+
101
+ - E-mail: {{ provider.email }}
102
+ {{#if provider.feedbackUrl}}
103
+ - Contactformulier: {{ provider.feedbackUrl }}
104
+ {{/if}}
105
+ {{#if provider.phone}}
106
+ - Telefoon: {{ provider.phone }}
107
+ {{/if}}
108
+ {{#if provider.address}}
109
+ - Adres: {{ provider.address }}
110
+ {{/if}}
111
+
112
+ Wij streven ernaar snel te reageren.
113
+
114
+ ## Handhavingsprocedure
115
+
116
+ Bent u niet tevreden met onze reactie, dan kunt u een melding doen bij de toezichthouder.
117
+ Het toezicht is over meerdere toezichthouders verdeeld: voor diensten zoals webwinkels en
118
+ klantenservice is dat de Autoriteit Consument & Markt (ACM), voor producten zoals
119
+ smartphones, e-readers en betaalautomaten de Rijksinspectie Digitale Infrastructuur (RDI).
120
+
121
+ Autoriteit Consument & Markt
122
+ https://www.acm.nl
123
+
124
+ ---
125
+
126
+ Deze verklaring is gemaakt met eaa-kit en is geen juridisch advies. Lees haar na voordat u
127
+ haar publiceert en laat haar bij twijfel juridisch toetsen.
@@ -1,4 +1,4 @@
1
- import { n as IntegrationOptions, t as BuildAuditError } from "../run-BMASMmwO.js";
1
+ import { n as IntegrationOptions, t as BuildAuditError } from "../run-CtcEUhbe.js";
2
2
  //#region src/vite/index.d.ts
3
3
  interface EaaKitPluginOptions extends IntegrationOptions {
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { n as auditBuild, t as BuildAuditError } from "../run-DB34BSOZ.js";
1
+ import { n as auditBuild, t as BuildAuditError } from "../run-C2nKFcb-.js";
2
2
  import path from "node:path";
3
3
  //#region src/vite/index.ts
4
4
  function eaaKit(options = {}) {
@@ -1,4 +1,4 @@
1
- import { n as IntegrationOptions, t as BuildAuditError } from "../run-BMASMmwO.js";
1
+ import { n as IntegrationOptions, t as BuildAuditError } from "../run-CtcEUhbe.js";
2
2
  //#region src/webpack/index.d.ts
3
3
  /** The part of a webpack compilation this reads. */
4
4
  interface CompilationLike {
@@ -1,4 +1,4 @@
1
- import { n as auditBuild, r as stderrLogger, t as BuildAuditError } from "../run-DB34BSOZ.js";
1
+ import { n as auditBuild, r as stderrLogger, t as BuildAuditError } from "../run-C2nKFcb-.js";
2
2
  import path from "node:path";
3
3
  //#region src/webpack/index.ts
4
4
  var EaaKitWebpackPlugin = class {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eaa-kit",
3
- "version": "0.4.0",
4
- "description": "WCAG 2.2 AA auditor and EU accessibility statement generator (EAA / BFSG / BaFG). Audits a static build or a running site from the command line.",
3
+ "version": "0.5.0",
4
+ "description": "WCAG 2.2 AA auditor and EU accessibility statement generator for seven countries (AT, DE, CH, ES, FR, IT, NL). Audits a static build or a running site from the command line.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -19,6 +19,10 @@
19
19
  "eaa",
20
20
  "bfsg",
21
21
  "barrierefreiheit",
22
+ "accessibility-statement",
23
+ "en-301-549",
24
+ "rgaa",
25
+ "agid",
22
26
  "axe-core",
23
27
  "cli"
24
28
  ],
@@ -1,2 +0,0 @@
1
- import { n as runAuditCommand } from "./audit-CPoZMXGM.js";
2
- export { runAuditCommand };
@@ -1,77 +0,0 @@
1
- import { mkdir, writeFile } from "node:fs/promises";
2
- import path from "node:path";
3
- import pc from "picocolors";
4
- //#region src/cli/command.ts
5
- /**
6
- * What every command does around the audit itself: say what is happening, run
7
- * the engine, and put the document somewhere.
8
- *
9
- * `audit` and `baseline` are siblings — one reports what a run found and the
10
- * other writes it down — so they take the same flags, choose between the same
11
- * two engines and fail on the same setup problems. Keeping that in one place is
12
- * what stops the two commands drifting into disagreeing about what a run is.
13
- */
14
- /** Progress and diagnostics go to stderr, so the report can be piped away. */
15
- function note(message) {
16
- process.stderr.write(pc.dim(`${message}\n`));
17
- }
18
- function warn(message) {
19
- process.stderr.write(`${pc.yellow("warning")} ${message}\n`);
20
- }
21
- function fail(message) {
22
- process.stderr.write(`${pc.red("error")} ${message}\n`);
23
- }
24
- /**
25
- * Advice the reader should not miss, without the `warning` prefix: nothing has
26
- * gone wrong, but what happens next is theirs to get right.
27
- */
28
- function advise(message) {
29
- process.stderr.write(pc.yellow(`${message}\n`));
30
- }
31
- /**
32
- * Audit the pages with whichever engine was asked for.
33
- *
34
- * Returns undefined when the browser was asked for and is not usable, having
35
- * already said so: Playwright missing is a setup problem with a specific fix,
36
- * not a crash, and both commands turn it into exit 2.
37
- */
38
- async function runEngine(pages, options) {
39
- const runnerOptions = {
40
- cwd: options.cwd,
41
- ...options.baseUrl === void 0 ? {} : { baseUrl: options.baseUrl },
42
- ...options.timeoutMs === void 0 ? {} : { timeoutMs: options.timeoutMs }
43
- };
44
- if (!options.browser) {
45
- const { runPooledAudit } = await import("./pool-BMevaLWD.js");
46
- return runPooledAudit(pages, {
47
- ...runnerOptions,
48
- ...options.concurrency === void 0 ? {} : { concurrency: options.concurrency }
49
- });
50
- }
51
- const { BrowserUnavailableError, runBrowserAudit } = await import("./playwright-BWniOain.js");
52
- try {
53
- return await runBrowserAudit(options.directory, pages, runnerOptions);
54
- } catch (cause) {
55
- if (cause instanceof BrowserUnavailableError) {
56
- fail(cause.message);
57
- return;
58
- }
59
- throw cause;
60
- }
61
- }
62
- /**
63
- * Write a document to `output`, or to stdout when there is none. Parent
64
- * directories are created, since a report path in CI usually names one that is
65
- * not there yet.
66
- */
67
- async function emitDocument(body, output, cwd) {
68
- if (output === void 0) {
69
- process.stdout.write(body);
70
- return;
71
- }
72
- const target = path.resolve(cwd, output);
73
- await mkdir(path.dirname(target), { recursive: true });
74
- await writeFile(target, body, "utf8");
75
- }
76
- //#endregion
77
- export { runEngine as a, note as i, emitDocument as n, warn as o, fail as r, advise as t };
@@ -1,20 +0,0 @@
1
- import { createHash } from "node:crypto";
2
- //#region src/audit/fingerprint.ts
3
- /**
4
- * A stable identity for one violating element.
5
- *
6
- * Derived from the rule, the selector and the element's own markup, and
7
- * deliberately not from the file it was found in. Two consumers need this and
8
- * they need it to agree: SARIF, so that moving a page does not close one code
9
- * scanning alert and open an identical one, and the baseline, so that an
10
- * accepted violation stays accepted when the surrounding page changes.
11
- *
12
- * Sixteen hex characters. This identifies a defect for humans and tooling, not
13
- * a secret, and a full digest in every entry would make a baseline file for a
14
- * large site unreadable.
15
- */
16
- function elementFingerprint(ruleId, selector, html) {
17
- return createHash("sha256").update(`${ruleId}\n${selector}\n${html}`).digest("hex").slice(0, 16);
18
- }
19
- //#endregion
20
- export { elementFingerprint as t };
@@ -1,3 +0,0 @@
1
- import "./result-DoamKFsp.js";
2
- import { n as runJsdomAudit } from "./jsdom-DCpGSLfW.js";
3
- export { runJsdomAudit };