accessibility-checker 3.0.2 → 3.0.6
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 +3 -3
- package/lib/ACConfigLoader.js +8 -4
- package/lib/ACConstants.js +1 -1
- package/lib/ACHelper.js +237 -239
- package/lib/reporters/ACReporterCSV.js +4 -6
- package/lib/reporters/ACReporterHTML.js +422 -0
- package/lib/reporters/ACReporterJSON.js +2 -2
- package/lib/reporters/genReport.js +11 -0
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -89,8 +89,8 @@ reportLevels:
|
|
|
89
89
|
- potentialrecommendation
|
|
90
90
|
- manual
|
|
91
91
|
|
|
92
|
-
# Optional -
|
|
93
|
-
# Valid values: json, csv
|
|
92
|
+
# Optional - In which fornats should the results be output
|
|
93
|
+
# Valid values: json, csv, html
|
|
94
94
|
# Default: json
|
|
95
95
|
outputFormat:
|
|
96
96
|
- json
|
|
@@ -143,7 +143,7 @@ module.exports = {
|
|
|
143
143
|
|
|
144
144
|
### Command-line
|
|
145
145
|
|
|
146
|
-
The module provides some basic command-line utilities that will allow you to scan files, directories, or URLs. Run `npx achecker` for more information.
|
|
146
|
+
The module provides some basic command-line utilities that will allow you to scan files, directories, or URLs. Create a .txt file with path(s) to files, directories or a list of urls to be scan. Provide the npx acherer the full path of the .txt file to start the scan, e.g. npx archerer path/to/your/file.txt. Run `npx achecker` for more information.
|
|
147
147
|
|
|
148
148
|
### Programmatic
|
|
149
149
|
|
package/lib/ACConfigLoader.js
CHANGED
|
@@ -106,7 +106,11 @@ async function processACConfig(ACConfig) {
|
|
|
106
106
|
try {
|
|
107
107
|
ruleArchiveParse = await new Promise((resolve, reject) => {
|
|
108
108
|
request.get(ruleArchiveFile, function (error, response, body) {
|
|
109
|
-
|
|
109
|
+
if (error) {
|
|
110
|
+
reject(error);
|
|
111
|
+
} else {
|
|
112
|
+
resolve(JSON.parse(body));
|
|
113
|
+
}
|
|
110
114
|
});
|
|
111
115
|
});
|
|
112
116
|
} catch (err) {
|
|
@@ -308,7 +312,7 @@ function loadConfigFromYAMLorJSONFile() {
|
|
|
308
312
|
* @memberOf this
|
|
309
313
|
*/
|
|
310
314
|
async function processConfiguration(config) {
|
|
311
|
-
constants.DEBUG && console.log("START '
|
|
315
|
+
constants.DEBUG && console.log("START 'processConfiguration' function");
|
|
312
316
|
|
|
313
317
|
// Variable Decleration
|
|
314
318
|
var ACConfig = null;
|
|
@@ -347,8 +351,8 @@ async function processConfiguration(config) {
|
|
|
347
351
|
// In the case the Karma config is set to config.LOG_DEBUG then also enable the accessibility-checker debuging
|
|
348
352
|
ACConfig.DEBUG = constants.DEBUG;
|
|
349
353
|
|
|
350
|
-
constants.DEBUG && console.log("END '
|
|
354
|
+
constants.DEBUG && console.log("END 'processConfiguration' function");
|
|
351
355
|
return ACConfig;
|
|
352
356
|
}
|
|
353
357
|
|
|
354
|
-
module.exports = processConfiguration();
|
|
358
|
+
module.exports = processConfiguration();
|