accessibility-checker
Advanced tools
Comparing version 3.1.40 to 3.1.41
@@ -24,2 +24,3 @@ "use strict"; | ||
// Load all the modules that are needed | ||
var os_1 = require("os"); | ||
var pathLib = require("path"); | ||
@@ -55,2 +56,4 @@ var IEngine_1 = require("./api/IEngine"); | ||
baselineFolder: "baselines", | ||
// Default cache folder (for ace-node.js / archives.json) | ||
cacheFolder: "".concat((0, os_1.tmpdir)(), "/accessibility-checker/"), | ||
// Specify default value for Which file extensions should be checked | ||
@@ -57,0 +60,0 @@ extensions: ["html", "htm", "svg"], |
@@ -143,3 +143,3 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var config, response, data, engineDir, cacheDir; | ||
var config, response, data, engineDir; | ||
return __generator(this, function (_b) { | ||
@@ -160,15 +160,12 @@ switch (_b.label) { | ||
data = _b.sent(); | ||
engineDir = path.join(__dirname, "engine"); | ||
engineDir = path.join(config.cacheFolder, "engine"); | ||
if (!fs.existsSync(engineDir)) { | ||
fs.mkdirSync(engineDir); | ||
fs.mkdirSync(engineDir, { recursive: true }); | ||
} | ||
cacheDir = path.join(engineDir, "cache"); | ||
if (!fs.existsSync(cacheDir)) { | ||
fs.mkdirSync(cacheDir); | ||
} | ||
return [4 /*yield*/, new Promise(function (resolve, reject) { | ||
fs.writeFile(path.join(engineDir, "ace-node.js"), data, function (err) { | ||
var nodePath = path.join(engineDir, "ace-node"); | ||
fs.writeFile(nodePath + ".js", data, function (err) { | ||
try { | ||
err && console.log(err); | ||
var ace_ibma = require("./engine/ace-node"); | ||
var ace_ibma = require(nodePath); | ||
checker = new ace_ibma.Checker(); | ||
@@ -175,0 +172,0 @@ } |
@@ -61,2 +61,7 @@ import { eRuleLevel, RuleDetails } from "./IEngine"; | ||
/** | ||
* (optional) Where the tool can read/write cached files (ace-node.js / archive.json) | ||
* Default: `${os.tmpdir()}/accessibility-checker/` | ||
*/ | ||
cacheFolder?: string; | ||
/** | ||
* (optional) For tools that scan files, which extensions should we include | ||
@@ -63,0 +68,0 @@ * Default: ["html", "htm", "svg"] |
{ | ||
"name": "accessibility-checker", | ||
"version": "3.1.40", | ||
"version": "3.1.41", | ||
"description": "An automated testing tools for accessibility testing using Puppeteer, Selenium, or Zombie", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -122,2 +122,6 @@ # accessibility-checker | ||
baselineFolder: test/baselines | ||
# optional - Where the tool can read/write cached files (ace-node.js / archive.json) | ||
# Default: `${os.tmpdir()}/accessibility-checker/` | ||
cacheFolder: /tmp/accessibility-checker | ||
``` | ||
@@ -144,2 +148,3 @@ | ||
baselineFolder: "test/baselines", | ||
cacheFolder: "/tmp/accessibility-checker" | ||
}; | ||
@@ -146,0 +151,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1506216
10643
413
14