@holmdigital/engine 2.5.0 → 2.5.1

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.5.0";
141
+ return "2.5.1";
142
142
  }
143
143
  function getStandardsVersion() {
144
144
  try {
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.0";
786
+ return "2.5.1";
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(3, 1fr);
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">
@@ -2039,7 +2042,7 @@ program.argument("<url>", "URL to scan").option("--lang <code>", "Language code
2039
2042
  if (spinner) spinner.succeed(t("cli.complete"));
2040
2043
  if (options.pdf) {
2041
2044
  if (spinner) spinner.start(t("cli.generating_pdf"));
2042
- const html = generateReportHTML(result);
2045
+ const html = generateReportHTML(result, options.sector);
2043
2046
  await generatePDF(html, options.pdf);
2044
2047
  if (spinner) spinner.succeed(t("cli.pdf_saved", { path: options.pdf }));
2045
2048
  }
@@ -7,7 +7,7 @@ import {
7
7
  generateStatement,
8
8
  generateStatementContent,
9
9
  getEngineVersion
10
- } from "../chunk-4AM7NVKM.mjs";
10
+ } from "../chunk-KOTT5C66.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(3, 1fr);
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.0";
680
+ return "2.5.1";
681
681
  }
682
682
  function getStandardsVersion() {
683
683
  try {
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  generateStatement,
6
6
  generateStatementContent,
7
7
  getEngineVersion
8
- } from "./chunk-4AM7NVKM.mjs";
8
+ } from "./chunk-KOTT5C66.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.5.0",
3
+ "version": "2.5.1",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"