@holmdigital/engine 1.2.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.
- package/LICENSE +59 -0
- package/README.md +60 -0
- package/dist/chunk-MFACMI2F.mjs +411 -0
- package/dist/chunk-OXZPYWBW.mjs +233 -0
- package/dist/chunk-Y6FXYEAI.mjs +10 -0
- package/dist/cli/index.d.mts +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +1197 -0
- package/dist/cli/index.mjs +501 -0
- package/dist/i18n-FLJMYIKJ.mjs +11 -0
- package/dist/index.d.mts +88 -0
- package/dist/index.d.ts +88 -0
- package/dist/index.js +718 -0
- package/dist/index.mjs +11 -0
- package/package.json +69 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
// src/locales/en.json
|
|
2
|
+
var en_default = {
|
|
3
|
+
cli: {
|
|
4
|
+
title: "\n\u{1F310} HolmDigital Regulatory Scanner\n",
|
|
5
|
+
scanning: "Scanning {url}...\n",
|
|
6
|
+
initializing: "Initializing scanner...",
|
|
7
|
+
analyzing: "Analyzing DOM & Shadow DOM...",
|
|
8
|
+
complete: "Scan complete!",
|
|
9
|
+
generating_pdf: "Generating PDF Report...",
|
|
10
|
+
pdf_saved: "PDF Report saved to {path}",
|
|
11
|
+
scan_failed: "Scan failed",
|
|
12
|
+
critical_failure: "\nCI/CD Failure: Critical regulatory violations found.",
|
|
13
|
+
score: "\nCompliance Score: {score}/100",
|
|
14
|
+
status: "Compliance Status: {status}",
|
|
15
|
+
not_compliant: " (Not compliant with legal requirements)",
|
|
16
|
+
viewport: "Viewport: {width}x{height}",
|
|
17
|
+
prescriptive_fix: "\n\u{1F4A1} Prescriptive Fix:",
|
|
18
|
+
use_component: "Use component: {component}",
|
|
19
|
+
pseudo_tests: "\n\u{1F9EC} Generating Pseudo-Automation Tests...\n",
|
|
20
|
+
test_for: "Test for {ruleId}:"
|
|
21
|
+
},
|
|
22
|
+
report: {
|
|
23
|
+
title: "Accessibility Report - {url}",
|
|
24
|
+
generated: "Generated: {date}",
|
|
25
|
+
scan_target: "Scan Target: {url}",
|
|
26
|
+
overall_score: "Overall Score",
|
|
27
|
+
critical_issues: "Critical Issues",
|
|
28
|
+
high_issues: "High Issues",
|
|
29
|
+
total_issues: "Total Issues",
|
|
30
|
+
detailed_violations: "Detailed Violations",
|
|
31
|
+
prescriptive_fix: "\u{1F4A1} Prescriptive Fix",
|
|
32
|
+
use: "Use",
|
|
33
|
+
footer: "Generated by @holmdigital/engine v0.1.0 \u2022 Standards: WCAG 2.1 AA, EN 301 549, DOS-lagen"
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
// src/locales/sv.json
|
|
38
|
+
var sv_default = {
|
|
39
|
+
cli: {
|
|
40
|
+
title: "\n\u{1F310} HolmDigital Regulatorisk Scanner\n",
|
|
41
|
+
scanning: "Skannar {url}...\n",
|
|
42
|
+
initializing: "Initierar skanner...",
|
|
43
|
+
analyzing: "Analyserar DOM & Shadow DOM...",
|
|
44
|
+
complete: "Skanning klar!",
|
|
45
|
+
generating_pdf: "Genererar PDF-rapport...",
|
|
46
|
+
pdf_saved: "PDF-rapport sparad till {path}",
|
|
47
|
+
scan_failed: "Skanning misslyckades",
|
|
48
|
+
critical_failure: "\nCI/CD Fel: Kritiska regulatoriska brister hittades.",
|
|
49
|
+
score: "\nEfterlevnadspo\xE4ng: {score}/100",
|
|
50
|
+
status: "Efterlevnadsstatus: {status}",
|
|
51
|
+
not_compliant: " (Uppfyller ej legala krav)",
|
|
52
|
+
viewport: "Sk\xE4rmstorlek: {width}x{height}",
|
|
53
|
+
prescriptive_fix: "\n\u{1F4A1} Preskriptiv L\xF6sning:",
|
|
54
|
+
use_component: "Anv\xE4nd komponent: {component}",
|
|
55
|
+
pseudo_tests: "\n\u{1F9EC} Genererar Pseudo-automationstester...\n",
|
|
56
|
+
test_for: "Test f\xF6r {ruleId}:"
|
|
57
|
+
},
|
|
58
|
+
report: {
|
|
59
|
+
title: "Tillg\xE4nglighetsrapport - {url}",
|
|
60
|
+
generated: "Genererad: {date}",
|
|
61
|
+
scan_target: "Skannat m\xE5l: {url}",
|
|
62
|
+
overall_score: "Totalpo\xE4ng",
|
|
63
|
+
critical_issues: "Kritiska fel",
|
|
64
|
+
high_issues: "Allvarliga fel",
|
|
65
|
+
total_issues: "Antal brister",
|
|
66
|
+
detailed_violations: "Detaljerade brister",
|
|
67
|
+
prescriptive_fix: "\u{1F4A1} Preskriptiv L\xF6sning",
|
|
68
|
+
use: "Anv\xE4nd",
|
|
69
|
+
footer: "Genererad av @holmdigital/engine v0.1.0 \u2022 Standarder: WCAG 2.1 AA, EN 301 549, DOS-lagen"
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// src/locales/de.json
|
|
74
|
+
var de_default = {
|
|
75
|
+
cli: {
|
|
76
|
+
title: "\n\u{1F310} HolmDigital Regulatorischer Scanner\n",
|
|
77
|
+
scanning: "Scanne {url}...\n",
|
|
78
|
+
initializing: "Initialisiere Scanner...",
|
|
79
|
+
analyzing: "Analysiere DOM & Shadow DOM...",
|
|
80
|
+
complete: "Scan abgeschlossen!",
|
|
81
|
+
generating_pdf: "Generiere PDF-Bericht...",
|
|
82
|
+
pdf_saved: "PDF-Bericht gespeichert unter {path}",
|
|
83
|
+
scan_failed: "Scan fehlgeschlagen",
|
|
84
|
+
critical_failure: "\nCI/CD Fehler: Kritische regulatorische Verst\xF6\xDFe gefunden.",
|
|
85
|
+
score: "\nKonformit\xE4tsbewertung: {score}/100",
|
|
86
|
+
status: "Konformit\xE4tsstatus: {status}",
|
|
87
|
+
not_compliant: " (Nicht konform mit gesetzlichen Anforderungen - BITV 2.0)",
|
|
88
|
+
viewport: "Ansichtsfenster: {width}x{height}",
|
|
89
|
+
prescriptive_fix: "\n\u{1F4A1} Vorschriftsm\xE4\xDFige L\xF6sung:",
|
|
90
|
+
use_component: "Verwenden Sie die Komponente: {component}",
|
|
91
|
+
pseudo_tests: "\n\u{1F9EC} Generiere Pseudo-Automatisierungstests...\n",
|
|
92
|
+
test_for: "Test f\xFCr {ruleId}:"
|
|
93
|
+
},
|
|
94
|
+
report: {
|
|
95
|
+
title: "Barrierefreiheitsbericht - {url}",
|
|
96
|
+
generated: "Generiert: {date}",
|
|
97
|
+
scan_target: "Scan-Ziel: {url}",
|
|
98
|
+
overall_score: "Gesamtbewertung",
|
|
99
|
+
critical_issues: "Kritische Probleme",
|
|
100
|
+
high_issues: "Hohe Probleme",
|
|
101
|
+
total_issues: "Gesamtprobleme",
|
|
102
|
+
detailed_violations: "Detaillierte Verst\xF6\xDFe",
|
|
103
|
+
prescriptive_fix: "\u{1F4A1} Vorschriftsm\xE4\xDFige L\xF6sung",
|
|
104
|
+
use: "Verwenden",
|
|
105
|
+
footer: "Generiert von @holmdigital/engine v0.1.0 \u2022 Standards: WCAG 2.1 AA, EN 301 549, BITV 2.0"
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
// src/locales/fr.json
|
|
110
|
+
var fr_default = {
|
|
111
|
+
cli: {
|
|
112
|
+
title: "\n\u{1F310} HolmDigital Scanner R\xE9glementaire\n",
|
|
113
|
+
scanning: "Scan de {url} en cours...\n",
|
|
114
|
+
initializing: "Initialisation du scanner...",
|
|
115
|
+
analyzing: "Analyse du DOM & Shadow DOM...",
|
|
116
|
+
complete: "Scan termin\xE9 !",
|
|
117
|
+
generating_pdf: "G\xE9n\xE9ration du rapport PDF...",
|
|
118
|
+
pdf_saved: "Rapport PDF enregistr\xE9 sous {path}",
|
|
119
|
+
scan_failed: "\xC9chec du scan",
|
|
120
|
+
critical_failure: "\n\xC9chec CI/CD : Violations r\xE9glementaires critiques d\xE9tect\xE9es.",
|
|
121
|
+
score: "\nScore de Conformit\xE9 : {score}/100",
|
|
122
|
+
status: "Statut de Conformit\xE9 : {status}",
|
|
123
|
+
not_compliant: " (Non conforme aux exigences l\xE9gales - RGAA)",
|
|
124
|
+
viewport: "Fen\xEAtre d'affichage : {width}x{height}",
|
|
125
|
+
prescriptive_fix: "\n\u{1F4A1} Solution Prescriptive :",
|
|
126
|
+
use_component: "Utilisez le composant : {component}",
|
|
127
|
+
pseudo_tests: "\n\u{1F9EC} G\xE9n\xE9ration de tests de pseudo-automatisation...\n",
|
|
128
|
+
test_for: "Test pour {ruleId} :"
|
|
129
|
+
},
|
|
130
|
+
report: {
|
|
131
|
+
title: "Rapport d'Accessibilit\xE9 - {url}",
|
|
132
|
+
generated: "G\xE9n\xE9r\xE9 le : {date}",
|
|
133
|
+
scan_target: "Cible du scan : {url}",
|
|
134
|
+
overall_score: "Score Global",
|
|
135
|
+
critical_issues: "Probl\xE8mes Critiques",
|
|
136
|
+
high_issues: "Probl\xE8mes Importants",
|
|
137
|
+
total_issues: "Total des Probl\xE8mes",
|
|
138
|
+
detailed_violations: "Violations D\xE9taill\xE9es",
|
|
139
|
+
prescriptive_fix: "\u{1F4A1} Solution Prescriptive",
|
|
140
|
+
use: "Utiliser",
|
|
141
|
+
footer: "G\xE9n\xE9r\xE9 par @holmdigital/engine v0.1.0 \u2022 Standards : WCAG 2.1 AA, EN 301 549, RGAA"
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
// src/locales/es.json
|
|
146
|
+
var es_default = {
|
|
147
|
+
cli: {
|
|
148
|
+
title: "\n\u{1F310} HolmDigital Esc\xE1ner Regulatorio\n",
|
|
149
|
+
scanning: "Escaneando {url}...\n",
|
|
150
|
+
initializing: "Inicializando esc\xE1ner...",
|
|
151
|
+
analyzing: "Analizando DOM y Shadow DOM...",
|
|
152
|
+
complete: "\xA1Escaneo completo!",
|
|
153
|
+
generating_pdf: "Generando Informe PDF...",
|
|
154
|
+
pdf_saved: "Informe PDF guardado en {path}",
|
|
155
|
+
scan_failed: "Escaneo fallido",
|
|
156
|
+
critical_failure: "\nFallo de CI/CD: Se encontraron violaciones regulatorias cr\xEDticas.",
|
|
157
|
+
score: "\nPuntuaci\xF3n de Cumplimiento: {score}/100",
|
|
158
|
+
status: "Estado de Cumplimiento: {status}",
|
|
159
|
+
not_compliant: " (No cumple con los requisitos legales - UNE 139803)",
|
|
160
|
+
viewport: "Ventana gr\xE1fica: {width}x{height}",
|
|
161
|
+
prescriptive_fix: "\n\u{1F4A1} Soluci\xF3n Prescriptiva:",
|
|
162
|
+
use_component: "Use el componente: {component}",
|
|
163
|
+
pseudo_tests: "\n\u{1F9EC} Generando pruebas de pseudo-automatizaci\xF3n...\n",
|
|
164
|
+
test_for: "Prueba para {ruleId}:"
|
|
165
|
+
},
|
|
166
|
+
report: {
|
|
167
|
+
title: "Informe de Accesibilidad - {url}",
|
|
168
|
+
generated: "Generado: {date}",
|
|
169
|
+
scan_target: "Objetivo de escaneo: {url}",
|
|
170
|
+
overall_score: "Puntuaci\xF3n General",
|
|
171
|
+
critical_issues: "Problemas Cr\xEDticos",
|
|
172
|
+
high_issues: "Problemas Altos",
|
|
173
|
+
total_issues: "Problemas Totales",
|
|
174
|
+
detailed_violations: "Violaciones Detalladas",
|
|
175
|
+
prescriptive_fix: "\u{1F4A1} Soluci\xF3n Prescriptiva",
|
|
176
|
+
use: "Usar",
|
|
177
|
+
footer: "Generado por @holmdigital/engine v0.1.0 \u2022 Est\xE1ndares: WCAG 2.1 AA, EN 301 549, UNE 139803"
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
// src/i18n/index.ts
|
|
182
|
+
var locales = {
|
|
183
|
+
en: en_default,
|
|
184
|
+
sv: sv_default,
|
|
185
|
+
de: de_default,
|
|
186
|
+
fr: fr_default,
|
|
187
|
+
es: es_default
|
|
188
|
+
};
|
|
189
|
+
var currentLang = "en";
|
|
190
|
+
function setLanguage(lang) {
|
|
191
|
+
if (locales[lang]) {
|
|
192
|
+
currentLang = lang;
|
|
193
|
+
} else {
|
|
194
|
+
console.warn(`Language '${lang}' not found, falling back to 'en'.`);
|
|
195
|
+
currentLang = "en";
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
function t(key, params) {
|
|
199
|
+
const keys = key.split(".");
|
|
200
|
+
let value = locales[currentLang];
|
|
201
|
+
for (const k of keys) {
|
|
202
|
+
if (value && typeof value === "object" && k in value) {
|
|
203
|
+
value = value[k];
|
|
204
|
+
} else {
|
|
205
|
+
let fallbackValue = locales["en"];
|
|
206
|
+
for (const fk of keys) {
|
|
207
|
+
if (fallbackValue && typeof fallbackValue === "object" && fk in fallbackValue) {
|
|
208
|
+
fallbackValue = fallbackValue[fk];
|
|
209
|
+
} else {
|
|
210
|
+
return key;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
value = fallbackValue;
|
|
214
|
+
break;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
if (typeof value !== "string") return key;
|
|
218
|
+
if (params) {
|
|
219
|
+
return value.replace(/{(\w+)}/g, (_, k) => {
|
|
220
|
+
return params[k] !== void 0 ? String(params[k]) : `{${k}}`;
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
return value;
|
|
224
|
+
}
|
|
225
|
+
function getCurrentLang() {
|
|
226
|
+
return currentLang;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export {
|
|
230
|
+
setLanguage,
|
|
231
|
+
t,
|
|
232
|
+
getCurrentLang
|
|
233
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
export {
|
|
9
|
+
__require
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|