@axe-core/cli 4.7.4-alpha.409 → 4.7.4-f03670b.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/package.json +8 -11
- package/src/bin/cli.test.ts +14 -1
- package/src/bin/cli.ts +4 -0
- package/src/bin/index.ts +35 -3
- package/src/lib/utils.test.ts +45 -15
- package/src/lib/utils.ts +21 -17
- package/src/lib/webdriver.ts +5 -0
- package/src/types.ts +1 -0
- package/dist/package.json +0 -91
- package/dist/src/bin/cli.d.ts +0 -2
- package/dist/src/bin/cli.js +0 -39
- package/dist/src/bin/cli.js.map +0 -1
- package/dist/src/bin/cli.test.d.ts +0 -1
- package/dist/src/bin/cli.test.js +0 -251
- package/dist/src/bin/cli.test.js.map +0 -1
- package/dist/src/bin/index.d.ts +0 -5
- package/dist/src/bin/index.js +0 -138
- package/dist/src/bin/index.js.map +0 -1
- package/dist/src/lib/axe-test-urls.d.ts +0 -4
- package/dist/src/lib/axe-test-urls.js +0 -89
- package/dist/src/lib/axe-test-urls.js.map +0 -1
- package/dist/src/lib/axe-test-urls.test.d.ts +0 -1
- package/dist/src/lib/axe-test-urls.test.js +0 -73
- package/dist/src/lib/axe-test-urls.test.js.map +0 -1
- package/dist/src/lib/events.d.ts +0 -10
- package/dist/src/lib/events.js +0 -54
- package/dist/src/lib/events.js.map +0 -1
- package/dist/src/lib/events.test.d.ts +0 -1
- package/dist/src/lib/events.test.js +0 -31
- package/dist/src/lib/events.test.js.map +0 -1
- package/dist/src/lib/index.d.ts +0 -4
- package/dist/src/lib/index.js +0 -36
- package/dist/src/lib/index.js.map +0 -1
- package/dist/src/lib/utils.d.ts +0 -15
- package/dist/src/lib/utils.js +0 -120
- package/dist/src/lib/utils.js.map +0 -1
- package/dist/src/lib/utils.test.d.ts +0 -1
- package/dist/src/lib/utils.test.js +0 -140
- package/dist/src/lib/utils.test.js.map +0 -1
- package/dist/src/lib/webdriver.d.ts +0 -4
- package/dist/src/lib/webdriver.js +0 -46
- package/dist/src/lib/webdriver.js.map +0 -1
- package/dist/src/lib/webdriver.test.d.ts +0 -1
- package/dist/src/lib/webdriver.test.js +0 -102
- package/dist/src/lib/webdriver.test.js.map +0 -1
- package/dist/src/testutils/index.d.ts +0 -19
- package/dist/src/testutils/index.js +0 -51
- package/dist/src/testutils/index.js.map +0 -1
- package/dist/src/types.d.ts +0 -36
- package/dist/src/types.js +0 -18
- package/dist/src/types.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axe-core/cli",
|
|
3
|
-
"version": "4.7.4-
|
|
3
|
+
"version": "4.7.4-f03670b.0+f03670b",
|
|
4
4
|
"description": "A CLI for accessibility testing using axe-core",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Wilco Fiers",
|
|
@@ -32,8 +32,7 @@
|
|
|
32
32
|
"prebuild": "rimraf dist",
|
|
33
33
|
"build": "tsc",
|
|
34
34
|
"test": "mocha --timeout 60000 -r ts-node/register 'src/**/**.test.ts'",
|
|
35
|
-
"coverage": "nyc npm run test"
|
|
36
|
-
"prepare": "npm run build"
|
|
35
|
+
"coverage": "nyc npm run test"
|
|
37
36
|
},
|
|
38
37
|
"keywords": [
|
|
39
38
|
"axe-core",
|
|
@@ -44,9 +43,9 @@
|
|
|
44
43
|
"testing"
|
|
45
44
|
],
|
|
46
45
|
"dependencies": {
|
|
47
|
-
"@axe-core/webdriverjs": "4.7.4-
|
|
48
|
-
"axe-core": "
|
|
49
|
-
"chromedriver": "
|
|
46
|
+
"@axe-core/webdriverjs": "4.7.4-f03670b.0+f03670b",
|
|
47
|
+
"axe-core": "~4.8.2",
|
|
48
|
+
"chromedriver": "latest",
|
|
50
49
|
"colors": "^1.4.0",
|
|
51
50
|
"commander": "^9.4.1",
|
|
52
51
|
"selenium-webdriver": "^4.8.1"
|
|
@@ -55,15 +54,13 @@
|
|
|
55
54
|
"@types/chai": "^4.3.3",
|
|
56
55
|
"@types/chromedriver": "^81.0.1",
|
|
57
56
|
"@types/mocha": "^10.0.0",
|
|
58
|
-
"@types/mock-fs": "^4.13.1",
|
|
59
57
|
"@types/selenium-webdriver": "^4.1.5",
|
|
60
58
|
"chai": "^4.3.6",
|
|
61
59
|
"execa": "5.1.0",
|
|
62
60
|
"mocha": "^10.0.0",
|
|
63
|
-
"mock-fs": "^5.1.4",
|
|
64
61
|
"nyc": "^15.1.0",
|
|
65
62
|
"rimraf": "^3.0.2",
|
|
66
|
-
"tempy": "1.0.0",
|
|
63
|
+
"tempy": "^1.0.0",
|
|
67
64
|
"ts-node": "^10.9.1",
|
|
68
65
|
"typescript": "^4.8.4"
|
|
69
66
|
},
|
|
@@ -77,7 +74,7 @@
|
|
|
77
74
|
"html"
|
|
78
75
|
],
|
|
79
76
|
"statements": 95,
|
|
80
|
-
"branches":
|
|
77
|
+
"branches": 91,
|
|
81
78
|
"functions": 94,
|
|
82
79
|
"lines": 95,
|
|
83
80
|
"exclude": [
|
|
@@ -87,5 +84,5 @@
|
|
|
87
84
|
"src/testutils"
|
|
88
85
|
]
|
|
89
86
|
},
|
|
90
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "f03670beb2c3f46c698a3d607de6bdae7565d79d"
|
|
91
88
|
}
|
package/src/bin/cli.test.ts
CHANGED
|
@@ -391,7 +391,9 @@ describe('cli', () => {
|
|
|
391
391
|
});
|
|
392
392
|
});
|
|
393
393
|
|
|
394
|
-
|
|
394
|
+
// disabled during conversion to npm workspaces as the node_module install directory changed
|
|
395
|
+
// @see https://github.com/dequelabs/axe-core-npm/issues/822
|
|
396
|
+
describe.skip('--chromedriver-path', () => {
|
|
395
397
|
it('should throw error if path does not exist', async () => {
|
|
396
398
|
const result = await runCLI(
|
|
397
399
|
`file://${SIMPLE_HTML_FILE}`,
|
|
@@ -404,4 +406,15 @@ describe('cli', () => {
|
|
|
404
406
|
);
|
|
405
407
|
});
|
|
406
408
|
});
|
|
409
|
+
|
|
410
|
+
describe('--chrome-path', () => {
|
|
411
|
+
it('should throw error if path does not exist', async () => {
|
|
412
|
+
const result = await runCLI(
|
|
413
|
+
`file://${SIMPLE_HTML_FILE}`,
|
|
414
|
+
'--chrome-path="someinvalidpath"',
|
|
415
|
+
'--show-errors'
|
|
416
|
+
);
|
|
417
|
+
assert.include(result.stderr, 'no chrome binary at');
|
|
418
|
+
});
|
|
419
|
+
});
|
|
407
420
|
});
|
package/src/bin/cli.ts
CHANGED
package/src/bin/index.ts
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
import axeTestUrls from '../lib/axe-test-urls';
|
|
16
16
|
import event from '../lib/events';
|
|
17
17
|
import { startDriver } from '../lib/webdriver';
|
|
18
|
+
import { error as selenium_error } from 'selenium-webdriver';
|
|
18
19
|
|
|
19
20
|
const cli = async (
|
|
20
21
|
args: OptionValues,
|
|
@@ -36,7 +37,8 @@ const cli = async (
|
|
|
36
37
|
rules,
|
|
37
38
|
disable,
|
|
38
39
|
loadDelay,
|
|
39
|
-
chromedriverPath
|
|
40
|
+
chromedriverPath,
|
|
41
|
+
chromePath
|
|
40
42
|
} = args;
|
|
41
43
|
|
|
42
44
|
const showErrors = args.showErrors === true;
|
|
@@ -67,7 +69,8 @@ const cli = async (
|
|
|
67
69
|
browser: args.browser,
|
|
68
70
|
timeout,
|
|
69
71
|
chromeOptions,
|
|
70
|
-
chromedriverPath
|
|
72
|
+
chromedriverPath,
|
|
73
|
+
chromePath
|
|
71
74
|
};
|
|
72
75
|
|
|
73
76
|
args.driver = startDriver(driverConfigs);
|
|
@@ -106,8 +109,37 @@ const cli = async (
|
|
|
106
109
|
rules,
|
|
107
110
|
disable
|
|
108
111
|
};
|
|
112
|
+
let outcome;
|
|
109
113
|
try {
|
|
110
|
-
|
|
114
|
+
try {
|
|
115
|
+
outcome = await axeTestUrls(urls, testPageConfigParams, events);
|
|
116
|
+
} catch (e) {
|
|
117
|
+
if (e instanceof selenium_error.ScriptTimeoutError) {
|
|
118
|
+
console.error(error('Error: %s'), e.message);
|
|
119
|
+
console.log(`The timeout is currently configured to be ${timeout} seconds (you can change it with --timeout).`)
|
|
120
|
+
process.exit(2);
|
|
121
|
+
}
|
|
122
|
+
// Provide a more user-friendly error message when there's a ChromeDriver/Chrome version mismatch.
|
|
123
|
+
else if (
|
|
124
|
+
e instanceof selenium_error.SessionNotCreatedError &&
|
|
125
|
+
e.message.includes(
|
|
126
|
+
'This version of ChromeDriver only supports'
|
|
127
|
+
// This string has to match the error message printed by chromedriver, see
|
|
128
|
+
// https://chromium.googlesource.com/chromium/src/+/refs/tags/110.0.5481.194/chrome/test/chromedriver/chrome_launcher.cc#300.
|
|
129
|
+
)
|
|
130
|
+
) {
|
|
131
|
+
console.error(error('Error: %s'), e.message);
|
|
132
|
+
console.log(`\nPlease install a matching version of ChromeDriver and run axe with the --chromedriver-path option:
|
|
133
|
+
|
|
134
|
+
$ npm install -g chromedriver@<version>
|
|
135
|
+
$ axe --chromedriver-path $(npm root -g)/chromedriver/bin/chromedriver <url...>
|
|
136
|
+
|
|
137
|
+
(where <version> is the first number of the "current browser version" reported above.)`);
|
|
138
|
+
process.exit(2);
|
|
139
|
+
} else {
|
|
140
|
+
throw e;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
111
143
|
if (silentMode) {
|
|
112
144
|
process.stdout.write(JSON.stringify(outcome, null, 2));
|
|
113
145
|
return;
|
package/src/lib/utils.test.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import 'mocha';
|
|
2
2
|
import { assert } from 'chai';
|
|
3
|
-
import
|
|
3
|
+
import tempy from 'tempy';
|
|
4
|
+
import { join } from 'path';
|
|
5
|
+
import { mkdirSync, writeFileSync, rmSync } from 'fs';
|
|
4
6
|
import { dependencies } from '../../package.json';
|
|
5
7
|
import * as utils from './utils';
|
|
6
8
|
|
|
@@ -74,24 +76,52 @@ describe('utils', () => {
|
|
|
74
76
|
|
|
75
77
|
describe('getAxeSource', () => {
|
|
76
78
|
describe('mock file', () => {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
79
|
+
function setupTree() {
|
|
80
|
+
const tempDir = tempy.directory();
|
|
81
|
+
const parentDirname = join(tempDir, 'node_modules', 'axe-core');
|
|
82
|
+
mkdirSync(parentDirname, { recursive: true });
|
|
83
|
+
writeFileSync(join(parentDirname, 'axe.js'), 'parent');
|
|
84
|
+
|
|
85
|
+
const cliDirname = join(tempDir, 'packages', 'cli');
|
|
86
|
+
const nodeModDirname = join(
|
|
87
|
+
cliDirname,
|
|
88
|
+
'node_modules',
|
|
89
|
+
'axe-core'
|
|
90
|
+
);
|
|
91
|
+
mkdirSync(nodeModDirname, { recursive: true });
|
|
92
|
+
writeFileSync(join(nodeModDirname, 'axe.js'), 'node modules');
|
|
93
|
+
|
|
94
|
+
const cwdDirname = join(tempDir, 'packages', 'cli', 'lib');
|
|
95
|
+
mkdirSync(cwdDirname);
|
|
96
|
+
writeFileSync(join(cwdDirname, 'axe.js'), 'cwd');
|
|
97
|
+
return {
|
|
98
|
+
cliDirname,
|
|
99
|
+
parentDirname,
|
|
100
|
+
nodeModDirname,
|
|
101
|
+
cwdDirname
|
|
102
|
+
};
|
|
103
|
+
}
|
|
85
104
|
|
|
86
|
-
|
|
87
|
-
|
|
105
|
+
it('uses axe.js from the working directory if it exists', () => {
|
|
106
|
+
const { cwdDirname } = setupTree();
|
|
107
|
+
const axeSource = utils.getAxeSource(undefined, cwdDirname);
|
|
108
|
+
assert.include(axeSource, 'cwd');
|
|
88
109
|
});
|
|
89
|
-
it(
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
110
|
+
it("falls back to axe-core from the working directory's node_modules if axe.js doesn't exist in the working directory", () => {
|
|
111
|
+
const { cliDirname, cwdDirname } = setupTree();
|
|
112
|
+
rmSync(join(cwdDirname, 'axe.js'));
|
|
113
|
+
const axeSource = utils.getAxeSource(undefined, cliDirname);
|
|
114
|
+
assert.include(axeSource, 'node modules');
|
|
115
|
+
});
|
|
116
|
+
it("falls back to axe-core from our own package's node_modules if no working-directory based implementation exists", () => {
|
|
117
|
+
const { cwdDirname, nodeModDirname } = setupTree();
|
|
118
|
+
rmSync(join(cwdDirname, 'axe.js'));
|
|
119
|
+
rmSync(join(nodeModDirname, 'axe.js'));
|
|
120
|
+
const axeSource = utils.getAxeSource(undefined, cwdDirname);
|
|
121
|
+
assert.include(axeSource, 'parent');
|
|
93
122
|
});
|
|
94
123
|
});
|
|
124
|
+
|
|
95
125
|
it('given no axe source use local source', () => {
|
|
96
126
|
const axeSource = utils.getAxeSource();
|
|
97
127
|
assert.isNotNull(axeSource);
|
package/src/lib/utils.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import colors from 'colors';
|
|
4
|
-
import { AxeResults } from 'axe-core';
|
|
4
|
+
import type { AxeResults, UnlabelledFrameSelector } from 'axe-core';
|
|
5
5
|
|
|
6
6
|
export const saveOutcome = (
|
|
7
7
|
outcome: AxeResults | AxeResults[],
|
|
@@ -70,35 +70,39 @@ export const parseBrowser = (browser?: string): string | Error => {
|
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
-
export const getAxeSource = (
|
|
73
|
+
export const getAxeSource = (
|
|
74
|
+
axePath?: string,
|
|
75
|
+
dirname?: string
|
|
76
|
+
): string | void => {
|
|
74
77
|
// Abort if axePath should exist, and it isn't
|
|
75
78
|
if (axePath && !fs.existsSync(axePath)) {
|
|
76
79
|
return;
|
|
77
80
|
}
|
|
78
81
|
|
|
82
|
+
let cwd = dirname;
|
|
83
|
+
if (!cwd) {
|
|
84
|
+
cwd = process.cwd();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (!dirname) {
|
|
88
|
+
dirname = __dirname;
|
|
89
|
+
}
|
|
90
|
+
|
|
79
91
|
// Look for axe in current working directory
|
|
80
92
|
if (!axePath) {
|
|
81
|
-
axePath = path.join(
|
|
93
|
+
axePath = path.join(cwd, 'axe.js');
|
|
82
94
|
}
|
|
83
95
|
|
|
84
96
|
if (!fs.existsSync(axePath)) {
|
|
85
97
|
// Look for axe in CWD ./node_modules
|
|
86
|
-
axePath = path.join(
|
|
98
|
+
axePath = path.join(cwd, 'node_modules', 'axe-core', 'axe.js');
|
|
87
99
|
}
|
|
88
100
|
|
|
89
101
|
if (!fs.existsSync(axePath)) {
|
|
90
|
-
//
|
|
91
|
-
// to
|
|
92
|
-
//
|
|
93
|
-
axePath =
|
|
94
|
-
__dirname,
|
|
95
|
-
'..',
|
|
96
|
-
'..',
|
|
97
|
-
'..',
|
|
98
|
-
'node_modules',
|
|
99
|
-
'axe-core',
|
|
100
|
-
'axe.js'
|
|
101
|
-
);
|
|
102
|
+
// in local develop using npm workspaces axe-core is
|
|
103
|
+
// hoisted to the root, but when published axe-core
|
|
104
|
+
// will be in the node_modules for the cli
|
|
105
|
+
axePath = require.resolve('axe-core/axe.js');
|
|
102
106
|
}
|
|
103
107
|
|
|
104
108
|
return fs.readFileSync(axePath, 'utf-8');
|
|
@@ -114,7 +118,7 @@ export const splitList = (val: string): string[] => {
|
|
|
114
118
|
};
|
|
115
119
|
|
|
116
120
|
export const selectorToString = (
|
|
117
|
-
selectors:
|
|
121
|
+
selectors: UnlabelledFrameSelector,
|
|
118
122
|
separator?: string
|
|
119
123
|
): string => {
|
|
120
124
|
separator = separator || ' ';
|
package/src/lib/webdriver.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import path from 'path';
|
|
1
2
|
import chromedriver from 'chromedriver';
|
|
2
3
|
import { Builder, type WebDriver } from 'selenium-webdriver';
|
|
3
4
|
import chrome from 'selenium-webdriver/chrome';
|
|
@@ -21,6 +22,10 @@ const startDriver = async (
|
|
|
21
22
|
}, options);
|
|
22
23
|
}
|
|
23
24
|
|
|
25
|
+
if (config.chromePath) {
|
|
26
|
+
options.setChromeBinaryPath(path.resolve(config.chromePath));
|
|
27
|
+
}
|
|
28
|
+
|
|
24
29
|
builder = new Builder()
|
|
25
30
|
.forBrowser('chrome')
|
|
26
31
|
.setChromeOptions(options)
|
package/src/types.ts
CHANGED
package/dist/package.json
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@axe-core/cli",
|
|
3
|
-
"version": "4.7.4-alpha.409+eb99c15",
|
|
4
|
-
"description": "A CLI for accessibility testing using axe-core",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "Wilco Fiers",
|
|
7
|
-
"organization": "Deque Systems, Inc.",
|
|
8
|
-
"url": "http://github.com/wilcofiers/"
|
|
9
|
-
},
|
|
10
|
-
"contributors": [
|
|
11
|
-
{
|
|
12
|
-
"name": "Michael Siek (me@michaelsiek.com)"
|
|
13
|
-
}
|
|
14
|
-
],
|
|
15
|
-
"repository": {
|
|
16
|
-
"type": "git",
|
|
17
|
-
"url": "https://github.com/dequelabs/axe-core-npm.git"
|
|
18
|
-
},
|
|
19
|
-
"license": "MPL-2.0",
|
|
20
|
-
"main": "dist/src/lib/index.js",
|
|
21
|
-
"typings": "dist/src/types.d.ts",
|
|
22
|
-
"bin": {
|
|
23
|
-
"axe": "./dist/src/bin/cli.js"
|
|
24
|
-
},
|
|
25
|
-
"publishConfig": {
|
|
26
|
-
"access": "public"
|
|
27
|
-
},
|
|
28
|
-
"engines": {
|
|
29
|
-
"node": ">=8"
|
|
30
|
-
},
|
|
31
|
-
"scripts": {
|
|
32
|
-
"prebuild": "rimraf dist",
|
|
33
|
-
"build": "tsc",
|
|
34
|
-
"test": "mocha --timeout 60000 -r ts-node/register 'src/**/**.test.ts'",
|
|
35
|
-
"coverage": "nyc npm run test",
|
|
36
|
-
"prepare": "npm run build"
|
|
37
|
-
},
|
|
38
|
-
"keywords": [
|
|
39
|
-
"axe-core",
|
|
40
|
-
"accessibility",
|
|
41
|
-
"a11y",
|
|
42
|
-
"wcag",
|
|
43
|
-
"cli",
|
|
44
|
-
"testing"
|
|
45
|
-
],
|
|
46
|
-
"dependencies": {
|
|
47
|
-
"@axe-core/webdriverjs": "4.7.4-alpha.409+eb99c15",
|
|
48
|
-
"axe-core": "^4.7.0",
|
|
49
|
-
"chromedriver": "^113.0.0",
|
|
50
|
-
"colors": "^1.4.0",
|
|
51
|
-
"commander": "^9.4.1",
|
|
52
|
-
"selenium-webdriver": "^4.8.1"
|
|
53
|
-
},
|
|
54
|
-
"devDependencies": {
|
|
55
|
-
"@types/chai": "^4.3.3",
|
|
56
|
-
"@types/chromedriver": "^81.0.1",
|
|
57
|
-
"@types/mocha": "^10.0.0",
|
|
58
|
-
"@types/mock-fs": "^4.13.1",
|
|
59
|
-
"@types/selenium-webdriver": "^4.1.5",
|
|
60
|
-
"chai": "^4.3.6",
|
|
61
|
-
"execa": "5.1.0",
|
|
62
|
-
"mocha": "^10.0.0",
|
|
63
|
-
"mock-fs": "^5.1.4",
|
|
64
|
-
"nyc": "^15.1.0",
|
|
65
|
-
"rimraf": "^3.0.2",
|
|
66
|
-
"tempy": "1.0.0",
|
|
67
|
-
"ts-node": "^10.9.1",
|
|
68
|
-
"typescript": "^4.8.4"
|
|
69
|
-
},
|
|
70
|
-
"nyc": {
|
|
71
|
-
"checkCoverage": true,
|
|
72
|
-
"extension": [
|
|
73
|
-
".ts"
|
|
74
|
-
],
|
|
75
|
-
"reporter": [
|
|
76
|
-
"text-summary",
|
|
77
|
-
"html"
|
|
78
|
-
],
|
|
79
|
-
"statements": 95,
|
|
80
|
-
"branches": 92,
|
|
81
|
-
"functions": 94,
|
|
82
|
-
"lines": 95,
|
|
83
|
-
"exclude": [
|
|
84
|
-
"dist",
|
|
85
|
-
"coverage",
|
|
86
|
-
"**/*.test.ts",
|
|
87
|
-
"src/testutils"
|
|
88
|
-
]
|
|
89
|
-
},
|
|
90
|
-
"gitHead": "eb99c1571486f66cae42c417943b6e70f15ec582"
|
|
91
|
-
}
|
package/dist/src/bin/cli.d.ts
DELETED
package/dist/src/bin/cli.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
-
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
const commander_1 = require("commander");
|
|
8
|
-
const package_json_1 = require("../../package.json");
|
|
9
|
-
const utils_1 = require("../lib/utils");
|
|
10
|
-
const _1 = __importDefault(require("."));
|
|
11
|
-
const program = new commander_1.Command();
|
|
12
|
-
program
|
|
13
|
-
.version(package_json_1.version)
|
|
14
|
-
.usage('<url...> [options]')
|
|
15
|
-
.option('-i, --include <list>', 'CSS selector of included elements, comma separated', utils_1.splitList)
|
|
16
|
-
.option('-e, --exclude <list>', 'CSS selector of excluded elements, comma separated', utils_1.splitList)
|
|
17
|
-
.option('-r, --rules <list>', 'IDs of rules to run, comma separated', utils_1.splitList)
|
|
18
|
-
.option('-t, --tags <list>', 'Tags of rules to run, comma separated', utils_1.splitList)
|
|
19
|
-
.option('-l, --disable <list>', 'IDs of rules to disable, comma separated', utils_1.splitList)
|
|
20
|
-
.option('-b, --browser [browser-name]', 'Which browser to run (Webdriver required)')
|
|
21
|
-
.option('-s, --save [filename]', 'Save the output as a JSON file. Filename is optional')
|
|
22
|
-
.option('-j, --stdout', 'Output results to STDOUT and silence all other output')
|
|
23
|
-
.option('-d, --dir <path>', 'Output directory')
|
|
24
|
-
.option('-a, --axe-source <path>', 'Path to axe.js file')
|
|
25
|
-
.option('-q, --exit', 'Exit with `1` failure code if any a11y tests fail')
|
|
26
|
-
.option('-v, --verbose', 'Output metadata like test tool name, version and environment')
|
|
27
|
-
.option('--load-delay <n>', 'Set how much time (milliseconds) axe will wait after page load before running the audit (default: 0)')
|
|
28
|
-
.option('--timeout <n>', 'Set how much time (seconds) axe has to run',
|
|
29
|
-
// @ts-ignore
|
|
30
|
-
90)
|
|
31
|
-
.option('--timer', 'Log the time it takes to run')
|
|
32
|
-
.option('--show-errors [boolean]', 'Display the full error stack', true)
|
|
33
|
-
// TODO: Replace this with a reporter option, this required adding
|
|
34
|
-
.option('--no-reporter', 'Turn the CLI reporter off')
|
|
35
|
-
.option('--chrome-options [options]', 'Options to provide to headless Chrome', utils_1.splitList)
|
|
36
|
-
.option('--chromedriver-path <path>', 'Absolute path to the desired chromedriver executable')
|
|
37
|
-
.action(_1.default);
|
|
38
|
-
program.parse(process.argv);
|
|
39
|
-
//# sourceMappingURL=cli.js.map
|
package/dist/src/bin/cli.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/bin/cli.ts"],"names":[],"mappings":";;;;;;AAEA,yCAAoC;AACpC,qDAA6C;AAC7C,wCAAyC;AACzC,yCAAoB;AAEpB,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,OAAO,CAAC,sBAAO,CAAC;KAChB,KAAK,CAAC,oBAAoB,CAAC;KAC3B,MAAM,CACL,sBAAsB,EACtB,oDAAoD,EACpD,iBAAS,CACV;KACA,MAAM,CACL,sBAAsB,EACtB,oDAAoD,EACpD,iBAAS,CACV;KACA,MAAM,CACL,oBAAoB,EACpB,sCAAsC,EACtC,iBAAS,CACV;KACA,MAAM,CACL,mBAAmB,EACnB,uCAAuC,EACvC,iBAAS,CACV;KACA,MAAM,CACL,sBAAsB,EACtB,0CAA0C,EAC1C,iBAAS,CACV;KACA,MAAM,CACL,8BAA8B,EAC9B,2CAA2C,CAC5C;KACA,MAAM,CACL,uBAAuB,EACvB,sDAAsD,CACvD;KACA,MAAM,CACL,cAAc,EACd,uDAAuD,CACxD;KACA,MAAM,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;KAC9C,MAAM,CAAC,yBAAyB,EAAE,qBAAqB,CAAC;KACxD,MAAM,CAAC,YAAY,EAAE,mDAAmD,CAAC;KACzE,MAAM,CACL,eAAe,EACf,8DAA8D,CAC/D;KACA,MAAM,CACL,kBAAkB,EAClB,sGAAsG,CACvG;KACA,MAAM,CACL,eAAe,EACf,4CAA4C;AAC5C,aAAa;AACb,EAAE,CACH;KACA,MAAM,CAAC,SAAS,EAAE,8BAA8B,CAAC;KACjD,MAAM,CAAC,yBAAyB,EAAE,8BAA8B,EAAE,IAAI,CAAC;IACxE,kEAAkE;KACjE,MAAM,CAAC,eAAe,EAAE,2BAA2B,CAAC;KACpD,MAAM,CACL,4BAA4B,EAC5B,uCAAuC,EACvC,iBAAS,CACV;KACA,MAAM,CACL,4BAA4B,EAC5B,sDAAsD,CACvD;KACA,MAAM,CAAC,UAAG,CAAC,CAAC;AAEf,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import 'mocha';
|