@holmdigital/engine 4.0.1 → 4.0.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/dist/{chunk-Y4NNYB3U.mjs → chunk-7AVTGVYA.mjs} +8 -8
- package/dist/chunk-DYBFXNEE.mjs +10 -0
- package/dist/cli/index.js +6 -2
- package/dist/cli/index.mjs +6 -6
- package/dist/{github-actions-PIV5JU2C.mjs → github-actions-NC3KGO4P.mjs} +1 -1
- package/dist/{i18n-CQ2US2HR.mjs → i18n-LDYZ4L3B.mjs} +1 -1
- package/dist/index.js +6 -2
- package/dist/index.mjs +2 -2
- package/dist/{junit-generator-B6HW7DCD.mjs → junit-generator-4LHP7SGE.mjs} +1 -1
- package/dist/{plain-report-4MJZKEGX.mjs → plain-report-332RPOHK.mjs} +1 -1
- package/package.json +1 -1
- package/dist/chunk-DIBTSSLZ.mjs +0 -18
|
@@ -2,9 +2,8 @@ import {
|
|
|
2
2
|
violationsOf
|
|
3
3
|
} from "./chunk-QEHLOWUK.mjs";
|
|
4
4
|
import {
|
|
5
|
-
__dirname
|
|
6
|
-
|
|
7
|
-
} from "./chunk-DIBTSSLZ.mjs";
|
|
5
|
+
__dirname
|
|
6
|
+
} from "./chunk-DYBFXNEE.mjs";
|
|
8
7
|
|
|
9
8
|
// src/core/virtual-dom.ts
|
|
10
9
|
var VirtualDOMBuilder = class {
|
|
@@ -342,6 +341,7 @@ Chrome said: ${chromeSaid}`
|
|
|
342
341
|
|
|
343
342
|
// src/core/regulatory-scanner.ts
|
|
344
343
|
import { readFileSync } from "fs";
|
|
344
|
+
import { createRequire } from "module";
|
|
345
345
|
function wcagTagToCriterion(tag) {
|
|
346
346
|
const m = /^wcag(\d+)$/.exec(tag);
|
|
347
347
|
if (!m) return null;
|
|
@@ -399,11 +399,11 @@ function isInterstitialPage(pageTitle, hasMetaRefresh, bodyTextLength) {
|
|
|
399
399
|
return false;
|
|
400
400
|
}
|
|
401
401
|
function getEngineVersion() {
|
|
402
|
-
return "4.0.
|
|
402
|
+
return "4.0.2";
|
|
403
403
|
}
|
|
404
404
|
function getStandardsVersion() {
|
|
405
405
|
try {
|
|
406
|
-
const stdPath =
|
|
406
|
+
const stdPath = createRequire(import.meta.url).resolve("@holmdigital/standards/package.json");
|
|
407
407
|
const pkg = JSON.parse(readFileSync(stdPath, "utf-8"));
|
|
408
408
|
return pkg.version;
|
|
409
409
|
} catch {
|
|
@@ -661,7 +661,7 @@ var RegulatoryScanner = class {
|
|
|
661
661
|
};
|
|
662
662
|
const KLARSPRAK_TOP_N = 8;
|
|
663
663
|
const { generateRegulatoryReport, getAllConvergenceRules } = await import("@holmdigital/standards");
|
|
664
|
-
const { getCurrentLang } = await import("./i18n-
|
|
664
|
+
const { getCurrentLang } = await import("./i18n-LDYZ4L3B.mjs");
|
|
665
665
|
const lang = getCurrentLang();
|
|
666
666
|
const allRules = getAllConvergenceRules(lang);
|
|
667
667
|
const selfMatchingIds = getSelfMatchingRuleIds(allRules);
|
|
@@ -717,7 +717,7 @@ var RegulatoryScanner = class {
|
|
|
717
717
|
async enrichResults(axeResults) {
|
|
718
718
|
const reports = [];
|
|
719
719
|
const { generateRegulatoryReport, getConvergenceRule, getAllConvergenceRules } = await import("@holmdigital/standards");
|
|
720
|
-
const { getCurrentLang } = await import("./i18n-
|
|
720
|
+
const { getCurrentLang } = await import("./i18n-LDYZ4L3B.mjs");
|
|
721
721
|
const lang = getCurrentLang();
|
|
722
722
|
const allRules = getAllConvergenceRules(lang);
|
|
723
723
|
const selfMatchingIds = getSelfMatchingRuleIds(allRules);
|
|
@@ -810,7 +810,7 @@ var RegulatoryScanner = class {
|
|
|
810
810
|
if (!incomplete || incomplete.length === 0) return [];
|
|
811
811
|
const reports = [];
|
|
812
812
|
const { generateRegulatoryReport, getConvergenceRule } = await import("@holmdigital/standards");
|
|
813
|
-
const { getCurrentLang } = await import("./i18n-
|
|
813
|
+
const { getCurrentLang } = await import("./i18n-LDYZ4L3B.mjs");
|
|
814
814
|
const lang = getCurrentLang();
|
|
815
815
|
const readMessageKey = (checks) => checks?.find((c) => c.data && typeof c.data === "object" && "messageKey" in c.data) ?? checks?.[0];
|
|
816
816
|
for (const item of incomplete) {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// ../../node_modules/tsup/assets/esm_shims.js
|
|
2
|
+
import path from "path";
|
|
3
|
+
import { fileURLToPath } from "url";
|
|
4
|
+
var getFilename = () => fileURLToPath(import.meta.url);
|
|
5
|
+
var getDirname = () => path.dirname(getFilename());
|
|
6
|
+
var __dirname = /* @__PURE__ */ getDirname();
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
__dirname
|
|
10
|
+
};
|
package/dist/cli/index.js
CHANGED
|
@@ -36,9 +36,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
36
36
|
));
|
|
37
37
|
|
|
38
38
|
// ../../node_modules/tsup/assets/cjs_shims.js
|
|
39
|
+
var getImportMetaUrl, importMetaUrl;
|
|
39
40
|
var init_cjs_shims = __esm({
|
|
40
41
|
"../../node_modules/tsup/assets/cjs_shims.js"() {
|
|
41
42
|
"use strict";
|
|
43
|
+
getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
|
|
44
|
+
importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
42
45
|
}
|
|
43
46
|
});
|
|
44
47
|
|
|
@@ -1707,6 +1710,7 @@ Chrome said: ${chromeSaid}`
|
|
|
1707
1710
|
|
|
1708
1711
|
// src/core/regulatory-scanner.ts
|
|
1709
1712
|
var import_node_fs = require("fs");
|
|
1713
|
+
var import_node_module = require("module");
|
|
1710
1714
|
function wcagTagToCriterion(tag) {
|
|
1711
1715
|
const m = /^wcag(\d+)$/.exec(tag);
|
|
1712
1716
|
if (!m) return null;
|
|
@@ -1764,11 +1768,11 @@ function isInterstitialPage(pageTitle, hasMetaRefresh, bodyTextLength) {
|
|
|
1764
1768
|
return false;
|
|
1765
1769
|
}
|
|
1766
1770
|
function getEngineVersion() {
|
|
1767
|
-
return "4.0.
|
|
1771
|
+
return "4.0.2";
|
|
1768
1772
|
}
|
|
1769
1773
|
function getStandardsVersion() {
|
|
1770
1774
|
try {
|
|
1771
|
-
const stdPath =
|
|
1775
|
+
const stdPath = (0, import_node_module.createRequire)(importMetaUrl).resolve("@holmdigital/standards/package.json");
|
|
1772
1776
|
const pkg = JSON.parse((0, import_node_fs.readFileSync)(stdPath, "utf-8"));
|
|
1773
1777
|
return pkg.version;
|
|
1774
1778
|
} catch {
|
package/dist/cli/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
generateStatementContent,
|
|
11
11
|
getEngineVersion,
|
|
12
12
|
isBadgeWithheldByRobustness
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-7AVTGVYA.mjs";
|
|
14
14
|
import {
|
|
15
15
|
groupReportsByRule,
|
|
16
16
|
impactBreakdown,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "../chunk-QEHLOWUK.mjs";
|
|
30
30
|
import {
|
|
31
31
|
__dirname
|
|
32
|
-
} from "../chunk-
|
|
32
|
+
} from "../chunk-DYBFXNEE.mjs";
|
|
33
33
|
|
|
34
34
|
// src/cli/index.ts
|
|
35
35
|
import { Command } from "commander";
|
|
@@ -1253,7 +1253,7 @@ program.argument("<url>", "URL to scan").option("--lang <code>", "Language code
|
|
|
1253
1253
|
console.log(JSON.stringify(result, null, 2));
|
|
1254
1254
|
} else if (result.complianceStatus === "INCONCLUSIVE") {
|
|
1255
1255
|
if (options.audience === "plain") {
|
|
1256
|
-
const { renderPlainReport } = await import("../plain-report-
|
|
1256
|
+
const { renderPlainReport } = await import("../plain-report-332RPOHK.mjs");
|
|
1257
1257
|
renderPlainReport(result, plainFallbackFrom ? "en" : options.lang, plainFallbackFrom, options.sector);
|
|
1258
1258
|
} else {
|
|
1259
1259
|
console.log("");
|
|
@@ -1285,7 +1285,7 @@ program.argument("<url>", "URL to scan").option("--lang <code>", "Language code
|
|
|
1285
1285
|
console.log(chalk.gray(`
|
|
1286
1286
|
Scan: ${result.metadata.scanDuration}ms | ${result.metadata.engineVersion}`));
|
|
1287
1287
|
} else if (options.audience === "plain") {
|
|
1288
|
-
const { renderPlainReport } = await import("../plain-report-
|
|
1288
|
+
const { renderPlainReport } = await import("../plain-report-332RPOHK.mjs");
|
|
1289
1289
|
renderPlainReport(result, plainFallbackFrom ? "en" : options.lang, plainFallbackFrom, options.sector);
|
|
1290
1290
|
} else {
|
|
1291
1291
|
const violations = violationsOf(result.reports);
|
|
@@ -1412,14 +1412,14 @@ ${t("cli.badge_withheld")}`));
|
|
|
1412
1412
|
renderNoScriptAdvisory(result.noScript);
|
|
1413
1413
|
}
|
|
1414
1414
|
if (options.ci && result.reports.length > 0) {
|
|
1415
|
-
const { generateGitHubActionsAnnotations } = await import("../github-actions-
|
|
1415
|
+
const { generateGitHubActionsAnnotations } = await import("../github-actions-NC3KGO4P.mjs");
|
|
1416
1416
|
generateGitHubActionsAnnotations(result.reports);
|
|
1417
1417
|
}
|
|
1418
1418
|
if (options.ci && result.complianceStatus === "INCONCLUSIVE") {
|
|
1419
1419
|
console.log("::warning::Accessibility scan inconclusive \u2014 the page looked like an interstitial/wait/bot-challenge page, so the real content was not assessed. Try a higher --wait-for-hydration.");
|
|
1420
1420
|
}
|
|
1421
1421
|
if (options.junit) {
|
|
1422
|
-
const { generateJUnitXML } = await import("../junit-generator-
|
|
1422
|
+
const { generateJUnitXML } = await import("../junit-generator-4LHP7SGE.mjs");
|
|
1423
1423
|
const fs = await import("fs/promises");
|
|
1424
1424
|
const xml = generateJUnitXML(result);
|
|
1425
1425
|
await fs.writeFile(options.junit, xml);
|
package/dist/index.js
CHANGED
|
@@ -36,9 +36,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
36
36
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
37
|
|
|
38
38
|
// ../../node_modules/tsup/assets/cjs_shims.js
|
|
39
|
+
var getImportMetaUrl, importMetaUrl;
|
|
39
40
|
var init_cjs_shims = __esm({
|
|
40
41
|
"../../node_modules/tsup/assets/cjs_shims.js"() {
|
|
41
42
|
"use strict";
|
|
43
|
+
getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
|
|
44
|
+
importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
42
45
|
}
|
|
43
46
|
});
|
|
44
47
|
|
|
@@ -1312,6 +1315,7 @@ Chrome said: ${chromeSaid}`
|
|
|
1312
1315
|
|
|
1313
1316
|
// src/core/regulatory-scanner.ts
|
|
1314
1317
|
var import_node_fs = require("fs");
|
|
1318
|
+
var import_node_module = require("module");
|
|
1315
1319
|
function wcagTagToCriterion(tag) {
|
|
1316
1320
|
const m = /^wcag(\d+)$/.exec(tag);
|
|
1317
1321
|
if (!m) return null;
|
|
@@ -1369,11 +1373,11 @@ function isInterstitialPage(pageTitle, hasMetaRefresh, bodyTextLength) {
|
|
|
1369
1373
|
return false;
|
|
1370
1374
|
}
|
|
1371
1375
|
function getEngineVersion() {
|
|
1372
|
-
return "4.0.
|
|
1376
|
+
return "4.0.2";
|
|
1373
1377
|
}
|
|
1374
1378
|
function getStandardsVersion() {
|
|
1375
1379
|
try {
|
|
1376
|
-
const stdPath =
|
|
1380
|
+
const stdPath = (0, import_node_module.createRequire)(importMetaUrl).resolve("@holmdigital/standards/package.json");
|
|
1377
1381
|
const pkg = JSON.parse((0, import_node_fs.readFileSync)(stdPath, "utf-8"));
|
|
1378
1382
|
return pkg.version;
|
|
1379
1383
|
} catch {
|
package/dist/index.mjs
CHANGED
|
@@ -17,14 +17,14 @@ import {
|
|
|
17
17
|
resolveNationalLawReference,
|
|
18
18
|
selectMappedRuleId,
|
|
19
19
|
wcagTagToCriterion
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-7AVTGVYA.mjs";
|
|
21
21
|
import {
|
|
22
22
|
getCurrentLang,
|
|
23
23
|
setLanguage,
|
|
24
24
|
t
|
|
25
25
|
} from "./chunk-BDL6KFVJ.mjs";
|
|
26
26
|
import "./chunk-QEHLOWUK.mjs";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-DYBFXNEE.mjs";
|
|
28
28
|
export {
|
|
29
29
|
NOSCRIPT_EMPTY_THRESHOLD,
|
|
30
30
|
NOSCRIPT_PARTIAL_THRESHOLD,
|
package/package.json
CHANGED
package/dist/chunk-DIBTSSLZ.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
-
}) : x)(function(x) {
|
|
4
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
5
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
// ../../node_modules/tsup/assets/esm_shims.js
|
|
9
|
-
import path from "path";
|
|
10
|
-
import { fileURLToPath } from "url";
|
|
11
|
-
var getFilename = () => fileURLToPath(import.meta.url);
|
|
12
|
-
var getDirname = () => path.dirname(getFilename());
|
|
13
|
-
var __dirname = /* @__PURE__ */ getDirname();
|
|
14
|
-
|
|
15
|
-
export {
|
|
16
|
-
__require,
|
|
17
|
-
__dirname
|
|
18
|
-
};
|