@holmdigital/engine 2.5.2 → 2.5.5
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 +4 -2
- package/dist/{chunk-E6DOZWW2.mjs → chunk-D4NZ5KI3.mjs} +7 -5
- package/dist/cli/index.js +8 -5
- package/dist/cli/index.mjs +2 -1
- package/dist/index.js +7 -5
- package/dist/index.mjs +1 -1
- package/package.json +27 -9
package/README.md
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|

|
|
6
6
|
[](https://www.npmjs.com/package/@holmdigital/engine)
|
|
7
7
|
|
|
8
|
+
> Full documentation and live scanner: [holmdigital.se/wcag-verktyg/engine](https://holmdigital.se/wcag-verktyg/engine)
|
|
9
|
+
|
|
8
10
|
> Regulatory accessibility test engine with Virtual DOM, Shadow DOM support, and built-in legal compliance reporting.
|
|
9
11
|
|
|
10
12
|
## Why this package?
|
|
@@ -111,9 +113,9 @@ npx hd-a11y-scan https://hospital.example.com --country US --sector private --st
|
|
|
111
113
|
"url": "https://example.com",
|
|
112
114
|
"timestamp": "2026-01-13T17:05:11.749Z",
|
|
113
115
|
"metadata": {
|
|
114
|
-
"engineVersion": "2.
|
|
116
|
+
"engineVersion": "2.5.3",
|
|
115
117
|
"axeCoreVersion": "4.11.1",
|
|
116
|
-
"standardsVersion": "
|
|
118
|
+
"standardsVersion": "2.5.2",
|
|
117
119
|
"scanDuration": 2891,
|
|
118
120
|
"pageTitle": "Example Domain",
|
|
119
121
|
"pageLanguage": "en"
|
|
@@ -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.5";
|
|
142
142
|
}
|
|
143
143
|
function getStandardsVersion() {
|
|
144
144
|
try {
|
|
@@ -205,7 +205,7 @@ var RegulatoryScanner = class {
|
|
|
205
205
|
timeout: 1e4,
|
|
206
206
|
concurrency: 2
|
|
207
207
|
});
|
|
208
|
-
} catch
|
|
208
|
+
} catch {
|
|
209
209
|
this.log("Network busy, proceeding with scan anyway...");
|
|
210
210
|
}
|
|
211
211
|
pageTitle = await page.title();
|
|
@@ -685,7 +685,7 @@ async function generateStatementContent(result, lang = "en", format = "html", me
|
|
|
685
685
|
const logoBuffer = await fs.readFile(p);
|
|
686
686
|
logoUrl = `data:image/jpeg;base64,${logoBuffer.toString("base64")}`;
|
|
687
687
|
break;
|
|
688
|
-
} catch
|
|
688
|
+
} catch {
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
} catch (e) {
|
|
@@ -705,8 +705,10 @@ async function generateStatementContent(result, lang = "en", format = "html", me
|
|
|
705
705
|
url: "https://holmdigital.se"
|
|
706
706
|
},
|
|
707
707
|
logoUrl,
|
|
708
|
-
|
|
709
|
-
|
|
708
|
+
// Placeholders make it obvious the consumer must supply real contact info.
|
|
709
|
+
// Previous fallback leaked HolmDigital's own contact details into customer statements.
|
|
710
|
+
contactEmail: metadata?.contactEmail || "[YOUR EMAIL]",
|
|
711
|
+
phoneNumber: metadata?.phoneNumber || "[YOUR PHONE]",
|
|
710
712
|
responseTime: metadata?.responseTime || RESPONSE_TIME_DEFAULT[lang] || RESPONSE_TIME_DEFAULT["en"],
|
|
711
713
|
nonComplianceItems,
|
|
712
714
|
locale: lang,
|
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.5";
|
|
787
787
|
}
|
|
788
788
|
function getStandardsVersion() {
|
|
789
789
|
try {
|
|
@@ -850,7 +850,7 @@ var RegulatoryScanner = class {
|
|
|
850
850
|
timeout: 1e4,
|
|
851
851
|
concurrency: 2
|
|
852
852
|
});
|
|
853
|
-
} catch
|
|
853
|
+
} catch {
|
|
854
854
|
this.log("Network busy, proceeding with scan anyway...");
|
|
855
855
|
}
|
|
856
856
|
pageTitle = await page.title();
|
|
@@ -1414,6 +1414,7 @@ function generateReportHTML(result, sector = "public") {
|
|
|
1414
1414
|
<div class="meta">
|
|
1415
1415
|
<div>${t("report.scan_target", { url: result.url })}</div>
|
|
1416
1416
|
<div>${t("report.generated", { date: formatDate(result.timestamp) })}</div>
|
|
1417
|
+
${sector ? `<div style="margin-top: 0.25rem; font-size: 0.75rem; font-weight: 600; color: ${sector === "private" ? "#7c3aed" : "#1d4ed8"};">${sector === "private" ? "Private sector (EAA)" : "Public sector (WAD)"}</div>` : ""}
|
|
1417
1418
|
${generateBadgeUrl(result.score) ? `<div style="margin-top: 0.5rem;"><img src="${generateBadgeUrl(result.score)}" alt="Accessibility Status: 100% Compliant" /></div>` : ""}
|
|
1418
1419
|
</div>
|
|
1419
1420
|
</div>
|
|
@@ -1673,7 +1674,7 @@ async function generateStatementContent(result, lang = "en", format = "html", me
|
|
|
1673
1674
|
const logoBuffer = await import_promises.default.readFile(p);
|
|
1674
1675
|
logoUrl = `data:image/jpeg;base64,${logoBuffer.toString("base64")}`;
|
|
1675
1676
|
break;
|
|
1676
|
-
} catch
|
|
1677
|
+
} catch {
|
|
1677
1678
|
}
|
|
1678
1679
|
}
|
|
1679
1680
|
} catch (e) {
|
|
@@ -1693,8 +1694,10 @@ async function generateStatementContent(result, lang = "en", format = "html", me
|
|
|
1693
1694
|
url: "https://holmdigital.se"
|
|
1694
1695
|
},
|
|
1695
1696
|
logoUrl,
|
|
1696
|
-
|
|
1697
|
-
|
|
1697
|
+
// Placeholders make it obvious the consumer must supply real contact info.
|
|
1698
|
+
// Previous fallback leaked HolmDigital's own contact details into customer statements.
|
|
1699
|
+
contactEmail: metadata?.contactEmail || "[YOUR EMAIL]",
|
|
1700
|
+
phoneNumber: metadata?.phoneNumber || "[YOUR PHONE]",
|
|
1698
1701
|
responseTime: metadata?.responseTime || RESPONSE_TIME_DEFAULT[lang] || RESPONSE_TIME_DEFAULT["en"],
|
|
1699
1702
|
nonComplianceItems,
|
|
1700
1703
|
locale: lang,
|
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-D4NZ5KI3.mjs";
|
|
11
11
|
import {
|
|
12
12
|
getCurrentLang,
|
|
13
13
|
setLanguage,
|
|
@@ -230,6 +230,7 @@ function generateReportHTML(result, sector = "public") {
|
|
|
230
230
|
<div class="meta">
|
|
231
231
|
<div>${t("report.scan_target", { url: result.url })}</div>
|
|
232
232
|
<div>${t("report.generated", { date: formatDate(result.timestamp) })}</div>
|
|
233
|
+
${sector ? `<div style="margin-top: 0.25rem; font-size: 0.75rem; font-weight: 600; color: ${sector === "private" ? "#7c3aed" : "#1d4ed8"};">${sector === "private" ? "Private sector (EAA)" : "Public sector (WAD)"}</div>` : ""}
|
|
233
234
|
${generateBadgeUrl(result.score) ? `<div style="margin-top: 0.5rem;"><img src="${generateBadgeUrl(result.score)}" alt="Accessibility Status: 100% Compliant" /></div>` : ""}
|
|
234
235
|
</div>
|
|
235
236
|
</div>
|
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.5";
|
|
681
681
|
}
|
|
682
682
|
function getStandardsVersion() {
|
|
683
683
|
try {
|
|
@@ -744,7 +744,7 @@ var RegulatoryScanner = class {
|
|
|
744
744
|
timeout: 1e4,
|
|
745
745
|
concurrency: 2
|
|
746
746
|
});
|
|
747
|
-
} catch
|
|
747
|
+
} catch {
|
|
748
748
|
this.log("Network busy, proceeding with scan anyway...");
|
|
749
749
|
}
|
|
750
750
|
pageTitle = await page.title();
|
|
@@ -1225,7 +1225,7 @@ async function generateStatementContent(result, lang = "en", format = "html", me
|
|
|
1225
1225
|
const logoBuffer = await import_promises.default.readFile(p);
|
|
1226
1226
|
logoUrl = `data:image/jpeg;base64,${logoBuffer.toString("base64")}`;
|
|
1227
1227
|
break;
|
|
1228
|
-
} catch
|
|
1228
|
+
} catch {
|
|
1229
1229
|
}
|
|
1230
1230
|
}
|
|
1231
1231
|
} catch (e) {
|
|
@@ -1245,8 +1245,10 @@ async function generateStatementContent(result, lang = "en", format = "html", me
|
|
|
1245
1245
|
url: "https://holmdigital.se"
|
|
1246
1246
|
},
|
|
1247
1247
|
logoUrl,
|
|
1248
|
-
|
|
1249
|
-
|
|
1248
|
+
// Placeholders make it obvious the consumer must supply real contact info.
|
|
1249
|
+
// Previous fallback leaked HolmDigital's own contact details into customer statements.
|
|
1250
|
+
contactEmail: metadata?.contactEmail || "[YOUR EMAIL]",
|
|
1251
|
+
phoneNumber: metadata?.phoneNumber || "[YOUR PHONE]",
|
|
1250
1252
|
responseTime: metadata?.responseTime || RESPONSE_TIME_DEFAULT[lang] || RESPONSE_TIME_DEFAULT["en"],
|
|
1251
1253
|
nonComplianceItems,
|
|
1252
1254
|
locale: lang,
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holmdigital/engine",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -19,11 +19,25 @@
|
|
|
19
19
|
},
|
|
20
20
|
"exports": {
|
|
21
21
|
".": {
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
"import": {
|
|
23
|
+
"types": "./dist/index.d.mts",
|
|
24
|
+
"default": "./dist/index.mjs"
|
|
25
|
+
},
|
|
26
|
+
"require": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"default": "./dist/index.js"
|
|
29
|
+
}
|
|
25
30
|
},
|
|
26
|
-
"./cli":
|
|
31
|
+
"./cli": {
|
|
32
|
+
"import": {
|
|
33
|
+
"types": "./dist/cli/index.d.mts",
|
|
34
|
+
"default": "./dist/cli/index.mjs"
|
|
35
|
+
},
|
|
36
|
+
"require": {
|
|
37
|
+
"types": "./dist/cli/index.d.ts",
|
|
38
|
+
"default": "./dist/cli/index.js"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
27
41
|
},
|
|
28
42
|
"files": [
|
|
29
43
|
"dist",
|
|
@@ -36,7 +50,11 @@
|
|
|
36
50
|
"test:ci": "vitest run",
|
|
37
51
|
"test:integration": "vitest run --config vitest.integration.config.ts",
|
|
38
52
|
"lint": "eslint src",
|
|
39
|
-
"
|
|
53
|
+
"typecheck": "tsc --noEmit",
|
|
54
|
+
"prepublishOnly": "npm run verify",
|
|
55
|
+
"check:exports": "publint --strict",
|
|
56
|
+
"check:types": "attw --pack . --ignore-rules no-resolution",
|
|
57
|
+
"verify": "npm run build && npm run lint && npm run typecheck && npm run check:exports && npm run check:types && npm run test:ci"
|
|
40
58
|
},
|
|
41
59
|
"keywords": [
|
|
42
60
|
"accessibility",
|
|
@@ -60,8 +78,8 @@
|
|
|
60
78
|
"author": "Holm Digital AB",
|
|
61
79
|
"license": "MIT",
|
|
62
80
|
"dependencies": {
|
|
63
|
-
"@holmdigital/components": "^2.
|
|
64
|
-
"@holmdigital/standards": "
|
|
81
|
+
"@holmdigital/components": "^2.7.0",
|
|
82
|
+
"@holmdigital/standards": "^2.5.3",
|
|
65
83
|
"axe-core": "^4.11.1",
|
|
66
84
|
"chalk": "^5.3.0",
|
|
67
85
|
"commander": "^12.1.0",
|
|
@@ -83,4 +101,4 @@
|
|
|
83
101
|
"typescript": "^5.7.2",
|
|
84
102
|
"vitest": "^4.0.16"
|
|
85
103
|
}
|
|
86
|
-
}
|
|
104
|
+
}
|