@holmdigital/engine 2.7.0 → 2.8.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.
@@ -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.7.0";
141
+ return "2.8.0";
142
142
  }
143
143
  function getStandardsVersion() {
144
144
  try {
@@ -160,6 +160,8 @@ var RegulatoryScanner = class {
160
160
  // Default till striktaste
161
161
  silent: false,
162
162
  invalidHttpsCert: false,
163
+ waitForHydrationMs: 2500,
164
+ // Default PÅ: klientrenderade SPA:er behöver tid att hydrera innan axe körs
163
165
  ...options
164
166
  };
165
167
  this.htmlValidator = new HtmlValidator();
@@ -208,6 +210,11 @@ var RegulatoryScanner = class {
208
210
  } catch {
209
211
  this.log("Network busy, proceeding with scan anyway...");
210
212
  }
213
+ const hydrationWait = this.options.waitForHydrationMs ?? 0;
214
+ if (hydrationWait > 0) {
215
+ this.log(`V\xE4ntar ${hydrationWait} ms p\xE5 hydrering...`);
216
+ await new Promise((resolve) => setTimeout(resolve, hydrationWait));
217
+ }
211
218
  pageTitle = await page.title();
212
219
  pageLanguage = await page.evaluate(() => document.documentElement.lang || void 0);
213
220
  let htmlValidation;
package/dist/cli/index.js CHANGED
@@ -1098,7 +1098,7 @@ var HtmlValidator = class {
1098
1098
  // src/core/regulatory-scanner.ts
1099
1099
  var import_node_fs = require("fs");
1100
1100
  function getEngineVersion() {
1101
- return "2.7.0";
1101
+ return "2.8.0";
1102
1102
  }
1103
1103
  function getStandardsVersion() {
1104
1104
  try {
@@ -1120,6 +1120,8 @@ var RegulatoryScanner = class {
1120
1120
  // Default till striktaste
1121
1121
  silent: false,
1122
1122
  invalidHttpsCert: false,
1123
+ waitForHydrationMs: 2500,
1124
+ // Default PÅ: klientrenderade SPA:er behöver tid att hydrera innan axe körs
1123
1125
  ...options
1124
1126
  };
1125
1127
  this.htmlValidator = new HtmlValidator();
@@ -1168,6 +1170,11 @@ var RegulatoryScanner = class {
1168
1170
  } catch {
1169
1171
  this.log("Network busy, proceeding with scan anyway...");
1170
1172
  }
1173
+ const hydrationWait = this.options.waitForHydrationMs ?? 0;
1174
+ if (hydrationWait > 0) {
1175
+ this.log(`V\xE4ntar ${hydrationWait} ms p\xE5 hydrering...`);
1176
+ await new Promise((resolve) => setTimeout(resolve, hydrationWait));
1177
+ }
1171
1178
  pageTitle = await page.title();
1172
1179
  pageLanguage = await page.evaluate(() => document.documentElement.lang || void 0);
1173
1180
  let htmlValidation;
@@ -7,7 +7,7 @@ import {
7
7
  generateStatement,
8
8
  generateStatementContent,
9
9
  getEngineVersion
10
- } from "../chunk-KXI4TVHQ.mjs";
10
+ } from "../chunk-AICMJ3YF.mjs";
11
11
  import {
12
12
  groupReportsByRule,
13
13
  impactBreakdown
package/dist/index.d.mts CHANGED
@@ -26,6 +26,7 @@ interface ScannerOptions {
26
26
  severityThreshold?: 'critical' | 'high' | 'medium' | 'low';
27
27
  invalidHttpsCert?: boolean;
28
28
  light?: boolean;
29
+ waitForHydrationMs?: number;
29
30
  }
30
31
  interface ScanMetadata {
31
32
  engineVersion: string;
package/dist/index.d.ts CHANGED
@@ -26,6 +26,7 @@ interface ScannerOptions {
26
26
  severityThreshold?: 'critical' | 'high' | 'medium' | 'low';
27
27
  invalidHttpsCert?: boolean;
28
28
  light?: boolean;
29
+ waitForHydrationMs?: number;
29
30
  }
30
31
  interface ScanMetadata {
31
32
  engineVersion: string;
package/dist/index.js CHANGED
@@ -875,7 +875,7 @@ var HtmlValidator = class {
875
875
  // src/core/regulatory-scanner.ts
876
876
  var import_node_fs = require("fs");
877
877
  function getEngineVersion() {
878
- return "2.7.0";
878
+ return "2.8.0";
879
879
  }
880
880
  function getStandardsVersion() {
881
881
  try {
@@ -897,6 +897,8 @@ var RegulatoryScanner = class {
897
897
  // Default till striktaste
898
898
  silent: false,
899
899
  invalidHttpsCert: false,
900
+ waitForHydrationMs: 2500,
901
+ // Default PÅ: klientrenderade SPA:er behöver tid att hydrera innan axe körs
900
902
  ...options
901
903
  };
902
904
  this.htmlValidator = new HtmlValidator();
@@ -945,6 +947,11 @@ var RegulatoryScanner = class {
945
947
  } catch {
946
948
  this.log("Network busy, proceeding with scan anyway...");
947
949
  }
950
+ const hydrationWait = this.options.waitForHydrationMs ?? 0;
951
+ if (hydrationWait > 0) {
952
+ this.log(`V\xE4ntar ${hydrationWait} ms p\xE5 hydrering...`);
953
+ await new Promise((resolve) => setTimeout(resolve, hydrationWait));
954
+ }
948
955
  pageTitle = await page.title();
949
956
  pageLanguage = await page.evaluate(() => document.documentElement.lang || void 0);
950
957
  let htmlValidation;
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  generateStatement,
6
6
  generateStatementContent,
7
7
  getEngineVersion
8
- } from "./chunk-KXI4TVHQ.mjs";
8
+ } from "./chunk-AICMJ3YF.mjs";
9
9
  import {
10
10
  getCurrentLang,
11
11
  setLanguage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holmdigital/engine",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"