@holmdigital/engine 2.5.0 → 2.5.2
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/README.md +5 -3
- package/dist/{chunk-4AM7NVKM.mjs → chunk-E6DOZWW2.mjs} +3 -2
- package/dist/cli/index.js +12 -8
- package/dist/cli/index.mjs +10 -7
- package/dist/index.js +3 -2
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,8 +21,8 @@ For a comprehensive guide on CLI flags, CI/CD integration, and configuration fil
|
|
|
21
21
|
|
|
22
22
|
## Features
|
|
23
23
|
|
|
24
|
-
- **Regulatory Mapping**: Maps technical failures to EU laws (EN 301 549, EAA), international laws (Australian DDA), and **U.S. ADA (Title II state/local, Title III private sector) + Section 508 (federal agencies)**.
|
|
25
|
-
- **Sector-Aware US Routing**: `--country US --sector public` references **ADA Title II + Section 508** (DOJ enforcement); `--sector private` references **ADA Title III** (DOJ enforcement).
|
|
24
|
+
- **Regulatory Mapping**: Maps technical failures to EU laws (EN 301 549, EAA), international laws (Australian DDA), and **U.S. ADA (Title II state/local, Title III private sector) + Section 508 (federal agencies) + HHS Section 504 (HHS-funded healthcare/research)**.
|
|
25
|
+
- **Sector-Aware US Routing**: `--country US --sector public` references **ADA Title II + Section 508** (DOJ enforcement); `--sector private` references **ADA Title III + HHS Section 504** (DOJ + HHS OCR enforcement) — covering both general public-accommodations exposure and HHS-funded healthcare obligations in a single statement.
|
|
26
26
|
- **HTML Structure Validation**: Built-in `html-validate` checks to prevent false positives/negatives.
|
|
27
27
|
- **Internationalization (i18n)**:
|
|
28
28
|
- **CLI output**: 9 locale files (`en`, `sv`, `no`, `fi`, `da`, `de`, `fr`, `es`, `nl`) + 4 English aliases (`en-gb`, `en-us`, `en-ca`, `en-au`) that fall back to `en`.
|
|
@@ -98,8 +98,10 @@ npx hd-a11y-scan https://example.com --light --json
|
|
|
98
98
|
# U.S. state/local government statement (ADA Title II + Section 508, DOJ)
|
|
99
99
|
npx hd-a11y-scan https://example.gov --country US --sector public --statement statement.md --lang en-us
|
|
100
100
|
|
|
101
|
-
# U.S. private sector
|
|
101
|
+
# U.S. private sector statement (ADA Title III + HHS Section 504, DOJ + HHS OCR)
|
|
102
|
+
# Covers general "public accommodation" exposure AND HHS-funded healthcare obligations
|
|
102
103
|
npx hd-a11y-scan https://shop.example.com --country US --sector private --statement statement.md --lang en-us
|
|
104
|
+
npx hd-a11y-scan https://hospital.example.com --country US --sector private --statement statement.md --lang en-us
|
|
103
105
|
```
|
|
104
106
|
|
|
105
107
|
## JSON Output
|
|
@@ -138,7 +138,7 @@ var HtmlValidator = class {
|
|
|
138
138
|
// src/core/regulatory-scanner.ts
|
|
139
139
|
import { readFileSync } from "fs";
|
|
140
140
|
function getEngineVersion() {
|
|
141
|
-
return "2.5.
|
|
141
|
+
return "2.5.2";
|
|
142
142
|
}
|
|
143
143
|
function getStandardsVersion() {
|
|
144
144
|
try {
|
|
@@ -823,7 +823,8 @@ async function generateStatementContent(result, lang = "en", format = "html", me
|
|
|
823
823
|
const s508 = usLaws.find((l) => l.id === "us-508");
|
|
824
824
|
return s508 ? `${adaLaw.fullName} (${adaLaw.law}) & ${s508.fullName} (${s508.law})` : `${adaLaw.fullName} (${adaLaw.law})`;
|
|
825
825
|
}
|
|
826
|
-
|
|
826
|
+
const hhs504 = usLaws.find((l) => l.euFramework === "REHAB" && l.scope === "private");
|
|
827
|
+
return hhs504 ? `${adaLaw.fullName} (${adaLaw.law}) & ${hhs504.fullName} (${hhs504.law})` : `${adaLaw.fullName} (${adaLaw.law})`;
|
|
827
828
|
}
|
|
828
829
|
}
|
|
829
830
|
const law = getNationalLawByFramework(sector === "private" ? "EAA" : "WAD", country);
|
package/dist/cli/index.js
CHANGED
|
@@ -783,7 +783,7 @@ var HtmlValidator = class {
|
|
|
783
783
|
// src/core/regulatory-scanner.ts
|
|
784
784
|
var import_node_fs = require("fs");
|
|
785
785
|
function getEngineVersion() {
|
|
786
|
-
return "2.5.
|
|
786
|
+
return "2.5.2";
|
|
787
787
|
}
|
|
788
788
|
function getStandardsVersion() {
|
|
789
789
|
try {
|
|
@@ -1221,7 +1221,7 @@ var LOCALE_TO_INTL = {
|
|
|
1221
1221
|
"en-us": "en-US",
|
|
1222
1222
|
"en-ca": "en-CA"
|
|
1223
1223
|
};
|
|
1224
|
-
function generateReportHTML(result) {
|
|
1224
|
+
function generateReportHTML(result, sector = "public") {
|
|
1225
1225
|
const criticalCount = result.stats.critical;
|
|
1226
1226
|
const highCount = result.stats.high;
|
|
1227
1227
|
const htmlErrorsCount = result.htmlValidation?.errors?.length ?? 0;
|
|
@@ -1359,7 +1359,7 @@ function generateReportHTML(result) {
|
|
|
1359
1359
|
}
|
|
1360
1360
|
.legal-grid {
|
|
1361
1361
|
display: grid;
|
|
1362
|
-
grid-template-columns: repeat(
|
|
1362
|
+
grid-template-columns: repeat(var(--legal-cols, 1), 1fr);
|
|
1363
1363
|
gap: 1rem;
|
|
1364
1364
|
}
|
|
1365
1365
|
.legal-stat {
|
|
@@ -1444,11 +1444,13 @@ function generateReportHTML(result) {
|
|
|
1444
1444
|
${result.legalSummary ? `
|
|
1445
1445
|
<div class="legal-summary">
|
|
1446
1446
|
<div class="legal-summary-title">\u{1F1EA}\u{1F1FA} EU Legal Framework Impact</div>
|
|
1447
|
-
<div class="legal-grid">
|
|
1447
|
+
<div class="legal-grid" style="--legal-cols: ${sector === "public" ? 1 : 2}">
|
|
1448
|
+
${sector === "public" ? `
|
|
1448
1449
|
<div class="legal-stat">
|
|
1449
1450
|
<div class="legal-stat-value" style="color: #1d4ed8;">${result.legalSummary.wadApplicable}</div>
|
|
1450
1451
|
<div class="legal-stat-label">WAD (Public Sector) Violations</div>
|
|
1451
1452
|
</div>
|
|
1453
|
+
` : `
|
|
1452
1454
|
<div class="legal-stat">
|
|
1453
1455
|
<div class="legal-stat-value" style="color: #7c3aed;">${result.legalSummary.eaaApplicable}</div>
|
|
1454
1456
|
<div class="legal-stat-label">EAA (Private Sector) Violations</div>
|
|
@@ -1457,6 +1459,7 @@ function generateReportHTML(result) {
|
|
|
1457
1459
|
<div class="legal-stat-value" style="color: #dc2626;">${result.legalSummary.eaaDeadlineViolations}</div>
|
|
1458
1460
|
<div class="legal-stat-label">EAA 2025 Deadline Issues</div>
|
|
1459
1461
|
</div>
|
|
1462
|
+
`}
|
|
1460
1463
|
</div>
|
|
1461
1464
|
</div>
|
|
1462
1465
|
` : ""}
|
|
@@ -1476,8 +1479,8 @@ function generateReportHTML(result) {
|
|
|
1476
1479
|
<div class="violation-title">${report.ruleId}</div>
|
|
1477
1480
|
<div>
|
|
1478
1481
|
<span class="badge ${riskClass}">${report.holmdigitalInsight.diggRisk}</span>
|
|
1479
|
-
${report.legalContext?.appliesTo?.includes("WAD") ? '<span class="badge badge-wad">WAD</span>' : ""}
|
|
1480
|
-
${report.legalContext?.appliesTo?.includes("EAA") ? '<span class="badge badge-eaa">EAA</span>' : ""}
|
|
1482
|
+
${sector === "public" && report.legalContext?.appliesTo?.includes("WAD") ? '<span class="badge badge-wad">WAD</span>' : ""}
|
|
1483
|
+
${sector === "private" && report.legalContext?.appliesTo?.includes("EAA") ? '<span class="badge badge-eaa">EAA</span>' : ""}
|
|
1481
1484
|
</div>
|
|
1482
1485
|
</div>
|
|
1483
1486
|
<div class="violation-meta">
|
|
@@ -1808,7 +1811,8 @@ async function generateStatementContent(result, lang = "en", format = "html", me
|
|
|
1808
1811
|
const s508 = usLaws.find((l) => l.id === "us-508");
|
|
1809
1812
|
return s508 ? `${adaLaw.fullName} (${adaLaw.law}) & ${s508.fullName} (${s508.law})` : `${adaLaw.fullName} (${adaLaw.law})`;
|
|
1810
1813
|
}
|
|
1811
|
-
|
|
1814
|
+
const hhs504 = usLaws.find((l) => l.euFramework === "REHAB" && l.scope === "private");
|
|
1815
|
+
return hhs504 ? `${adaLaw.fullName} (${adaLaw.law}) & ${hhs504.fullName} (${hhs504.law})` : `${adaLaw.fullName} (${adaLaw.law})`;
|
|
1812
1816
|
}
|
|
1813
1817
|
}
|
|
1814
1818
|
const law = (0, import_standards.getNationalLawByFramework)(sector === "private" ? "EAA" : "WAD", country);
|
|
@@ -2039,7 +2043,7 @@ program.argument("<url>", "URL to scan").option("--lang <code>", "Language code
|
|
|
2039
2043
|
if (spinner) spinner.succeed(t("cli.complete"));
|
|
2040
2044
|
if (options.pdf) {
|
|
2041
2045
|
if (spinner) spinner.start(t("cli.generating_pdf"));
|
|
2042
|
-
const html = generateReportHTML(result);
|
|
2046
|
+
const html = generateReportHTML(result, options.sector);
|
|
2043
2047
|
await generatePDF(html, options.pdf);
|
|
2044
2048
|
if (spinner) spinner.succeed(t("cli.pdf_saved", { path: options.pdf }));
|
|
2045
2049
|
}
|
package/dist/cli/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
generateStatement,
|
|
8
8
|
generateStatementContent,
|
|
9
9
|
getEngineVersion
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-E6DOZWW2.mjs";
|
|
11
11
|
import {
|
|
12
12
|
getCurrentLang,
|
|
13
13
|
setLanguage,
|
|
@@ -37,7 +37,7 @@ var LOCALE_TO_INTL = {
|
|
|
37
37
|
"en-us": "en-US",
|
|
38
38
|
"en-ca": "en-CA"
|
|
39
39
|
};
|
|
40
|
-
function generateReportHTML(result) {
|
|
40
|
+
function generateReportHTML(result, sector = "public") {
|
|
41
41
|
const criticalCount = result.stats.critical;
|
|
42
42
|
const highCount = result.stats.high;
|
|
43
43
|
const htmlErrorsCount = result.htmlValidation?.errors?.length ?? 0;
|
|
@@ -175,7 +175,7 @@ function generateReportHTML(result) {
|
|
|
175
175
|
}
|
|
176
176
|
.legal-grid {
|
|
177
177
|
display: grid;
|
|
178
|
-
grid-template-columns: repeat(
|
|
178
|
+
grid-template-columns: repeat(var(--legal-cols, 1), 1fr);
|
|
179
179
|
gap: 1rem;
|
|
180
180
|
}
|
|
181
181
|
.legal-stat {
|
|
@@ -260,11 +260,13 @@ function generateReportHTML(result) {
|
|
|
260
260
|
${result.legalSummary ? `
|
|
261
261
|
<div class="legal-summary">
|
|
262
262
|
<div class="legal-summary-title">\u{1F1EA}\u{1F1FA} EU Legal Framework Impact</div>
|
|
263
|
-
<div class="legal-grid">
|
|
263
|
+
<div class="legal-grid" style="--legal-cols: ${sector === "public" ? 1 : 2}">
|
|
264
|
+
${sector === "public" ? `
|
|
264
265
|
<div class="legal-stat">
|
|
265
266
|
<div class="legal-stat-value" style="color: #1d4ed8;">${result.legalSummary.wadApplicable}</div>
|
|
266
267
|
<div class="legal-stat-label">WAD (Public Sector) Violations</div>
|
|
267
268
|
</div>
|
|
269
|
+
` : `
|
|
268
270
|
<div class="legal-stat">
|
|
269
271
|
<div class="legal-stat-value" style="color: #7c3aed;">${result.legalSummary.eaaApplicable}</div>
|
|
270
272
|
<div class="legal-stat-label">EAA (Private Sector) Violations</div>
|
|
@@ -273,6 +275,7 @@ function generateReportHTML(result) {
|
|
|
273
275
|
<div class="legal-stat-value" style="color: #dc2626;">${result.legalSummary.eaaDeadlineViolations}</div>
|
|
274
276
|
<div class="legal-stat-label">EAA 2025 Deadline Issues</div>
|
|
275
277
|
</div>
|
|
278
|
+
`}
|
|
276
279
|
</div>
|
|
277
280
|
</div>
|
|
278
281
|
` : ""}
|
|
@@ -292,8 +295,8 @@ function generateReportHTML(result) {
|
|
|
292
295
|
<div class="violation-title">${report.ruleId}</div>
|
|
293
296
|
<div>
|
|
294
297
|
<span class="badge ${riskClass}">${report.holmdigitalInsight.diggRisk}</span>
|
|
295
|
-
${report.legalContext?.appliesTo?.includes("WAD") ? '<span class="badge badge-wad">WAD</span>' : ""}
|
|
296
|
-
${report.legalContext?.appliesTo?.includes("EAA") ? '<span class="badge badge-eaa">EAA</span>' : ""}
|
|
298
|
+
${sector === "public" && report.legalContext?.appliesTo?.includes("WAD") ? '<span class="badge badge-wad">WAD</span>' : ""}
|
|
299
|
+
${sector === "private" && report.legalContext?.appliesTo?.includes("EAA") ? '<span class="badge badge-eaa">EAA</span>' : ""}
|
|
297
300
|
</div>
|
|
298
301
|
</div>
|
|
299
302
|
<div class="violation-meta">
|
|
@@ -508,7 +511,7 @@ program.argument("<url>", "URL to scan").option("--lang <code>", "Language code
|
|
|
508
511
|
if (spinner) spinner.succeed(t("cli.complete"));
|
|
509
512
|
if (options.pdf) {
|
|
510
513
|
if (spinner) spinner.start(t("cli.generating_pdf"));
|
|
511
|
-
const html = generateReportHTML(result);
|
|
514
|
+
const html = generateReportHTML(result, options.sector);
|
|
512
515
|
await generatePDF(html, options.pdf);
|
|
513
516
|
if (spinner) spinner.succeed(t("cli.pdf_saved", { path: options.pdf }));
|
|
514
517
|
}
|
package/dist/index.js
CHANGED
|
@@ -677,7 +677,7 @@ var HtmlValidator = class {
|
|
|
677
677
|
// src/core/regulatory-scanner.ts
|
|
678
678
|
var import_node_fs = require("fs");
|
|
679
679
|
function getEngineVersion() {
|
|
680
|
-
return "2.5.
|
|
680
|
+
return "2.5.2";
|
|
681
681
|
}
|
|
682
682
|
function getStandardsVersion() {
|
|
683
683
|
try {
|
|
@@ -1363,7 +1363,8 @@ async function generateStatementContent(result, lang = "en", format = "html", me
|
|
|
1363
1363
|
const s508 = usLaws.find((l) => l.id === "us-508");
|
|
1364
1364
|
return s508 ? `${adaLaw.fullName} (${adaLaw.law}) & ${s508.fullName} (${s508.law})` : `${adaLaw.fullName} (${adaLaw.law})`;
|
|
1365
1365
|
}
|
|
1366
|
-
|
|
1366
|
+
const hhs504 = usLaws.find((l) => l.euFramework === "REHAB" && l.scope === "private");
|
|
1367
|
+
return hhs504 ? `${adaLaw.fullName} (${adaLaw.law}) & ${hhs504.fullName} (${hhs504.law})` : `${adaLaw.fullName} (${adaLaw.law})`;
|
|
1367
1368
|
}
|
|
1368
1369
|
}
|
|
1369
1370
|
const law = (0, import_standards.getNationalLawByFramework)(sector === "private" ? "EAA" : "WAD", country);
|
package/dist/index.mjs
CHANGED