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 CHANGED
@@ -89,8 +89,8 @@ reportLevels:
89
89
  - potentialrecommendation
90
90
  - manual
91
91
 
92
- # Optional - Which type should the results be outputted to
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
 
@@ -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
- resolve(JSON.parse(body));
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 'processKarmaConfiguration' function");
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 'processKarmaConfiguration' function");
354
+ constants.DEBUG && console.log("END 'processConfiguration' function");
351
355
  return ACConfig;
352
356
  }
353
357
 
354
- module.exports = processConfiguration();
358
+ module.exports = processConfiguration();
@@ -24,7 +24,7 @@ var pathLib = require('path');
24
24
 
25
25
  // Used to specify all the constant
26
26
  var constants = {
27
- DEBUG: false,
27
+ DEBUG: process.env.DEBUG === "true",
28
28
 
29
29
  policies: ["IBM_Accessibility"],
30
30