@axe-core/cli 4.8.0 → 4.8.1-5bfd440.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.
Files changed (63) hide show
  1. package/dist/package.json +91 -0
  2. package/dist/src/bin/cli.d.ts +2 -0
  3. package/dist/src/bin/cli.js +40 -0
  4. package/dist/src/bin/cli.js.map +1 -0
  5. package/dist/src/bin/cli.test.d.ts +1 -0
  6. package/dist/src/bin/cli.test.js +259 -0
  7. package/dist/src/bin/cli.test.js.map +1 -0
  8. package/dist/src/bin/index.d.ts +5 -0
  9. package/dist/src/bin/index.js +168 -0
  10. package/dist/src/bin/index.js.map +1 -0
  11. package/dist/src/lib/axe-test-urls.d.ts +4 -0
  12. package/dist/src/lib/axe-test-urls.js +89 -0
  13. package/dist/src/lib/axe-test-urls.js.map +1 -0
  14. package/dist/src/lib/axe-test-urls.test.d.ts +1 -0
  15. package/dist/src/lib/axe-test-urls.test.js +73 -0
  16. package/dist/src/lib/axe-test-urls.test.js.map +1 -0
  17. package/dist/src/lib/events.d.ts +10 -0
  18. package/dist/src/lib/events.js +54 -0
  19. package/dist/src/lib/events.js.map +1 -0
  20. package/dist/src/lib/events.test.d.ts +1 -0
  21. package/dist/src/lib/events.test.js +31 -0
  22. package/dist/src/lib/events.test.js.map +1 -0
  23. package/{src/lib/index.ts → dist/src/lib/index.d.ts} +0 -1
  24. package/dist/src/lib/index.js +36 -0
  25. package/dist/src/lib/index.js.map +1 -0
  26. package/dist/src/lib/utils.d.ts +15 -0
  27. package/dist/src/lib/utils.js +127 -0
  28. package/dist/src/lib/utils.js.map +1 -0
  29. package/dist/src/lib/utils.test.d.ts +1 -0
  30. package/dist/src/lib/utils.test.js +165 -0
  31. package/dist/src/lib/utils.test.js.map +1 -0
  32. package/dist/src/lib/webdriver.d.ts +4 -0
  33. package/dist/src/lib/webdriver.js +50 -0
  34. package/dist/src/lib/webdriver.js.map +1 -0
  35. package/dist/src/lib/webdriver.test.d.ts +1 -0
  36. package/dist/src/lib/webdriver.test.js +102 -0
  37. package/dist/src/lib/webdriver.test.js.map +1 -0
  38. package/dist/src/testutils/index.d.ts +19 -0
  39. package/dist/src/testutils/index.js +51 -0
  40. package/dist/src/testutils/index.js.map +1 -0
  41. package/dist/src/types.d.ts +37 -0
  42. package/dist/src/types.js +18 -0
  43. package/dist/src/types.js.map +1 -0
  44. package/package.json +7 -3
  45. package/.eslintrc.js +0 -18
  46. package/CHANGELOG.md +0 -221
  47. package/src/bin/cli.test.ts +0 -420
  48. package/src/bin/cli.ts +0 -86
  49. package/src/bin/index.ts +0 -216
  50. package/src/lib/axe-test-urls.test.ts +0 -73
  51. package/src/lib/axe-test-urls.ts +0 -98
  52. package/src/lib/events.test.ts +0 -26
  53. package/src/lib/events.ts +0 -68
  54. package/src/lib/utils.test.ts +0 -160
  55. package/src/lib/utils.ts +0 -147
  56. package/src/lib/webdriver.test.ts +0 -104
  57. package/src/lib/webdriver.ts +0 -43
  58. package/src/testutils/axe-core@2.5.0.js +0 -18929
  59. package/src/testutils/index.ts +0 -47
  60. package/src/testutils/simple-clean.html +0 -11
  61. package/src/testutils/simple.html +0 -12
  62. package/src/types.ts +0 -42
  63. package/tsconfig.json +0 -19
@@ -1,47 +0,0 @@
1
- import execa from 'execa';
2
- import path from 'path';
3
- import fs from 'fs';
4
-
5
- const TS_NODE = require.resolve('ts-node/dist/bin.js');
6
- const CLI = path.resolve(__dirname, '..', 'bin', 'cli.ts');
7
- const PROJECT_FILE = path.join(__dirname, '..', 'tsconfig.json');
8
-
9
- /**
10
- * Run the CLI with the given `args`.
11
- *
12
- * Will not reject if the CLI exits with a non-zero exit code. It is expected that you check the `.exitCode` value yourself.
13
- *
14
- * @param args CLI arguments to pass
15
- */
16
-
17
- const runCLI = (...args: string[]): Promise<execa.ExecaChildProcess<string>> =>
18
- runCLIWithOptions(args, { reject: false });
19
-
20
- export default runCLI;
21
-
22
- /**
23
- * Run the CLI with the given `args` and `options`.
24
- *
25
- * Set `DEBUG_CLI_TESTS` for additional debugging support (logging).
26
- *
27
- * @param args CLI arguments to pass
28
- * @param options Options for `execa`
29
- */
30
-
31
- export const runCLIWithOptions = async (
32
- args: string[],
33
- options: execa.Options
34
- ): Promise<execa.ExecaChildProcess<string>> => {
35
- if ('DEBUG_CLI_TESTS' in process.env) {
36
- console.log('cli', args.join(' '));
37
- }
38
-
39
- const result = await execa(TS_NODE, [CLI, ...args], options);
40
-
41
- if ('DEBUG_CLI_TESTS' in process.env) {
42
- fs.writeFileSync('./stdout.txt', result.stdout);
43
- fs.writeFileSync('./stderr.txt', result.stderr);
44
- }
45
-
46
- return result;
47
- };
@@ -1,11 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Document</title>
7
- </head>
8
- <body>
9
- <h1>This is a document.</h1>
10
- </body>
11
- </html>
@@ -1,12 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Document</title>
7
- </head>
8
- <body>
9
- <h1>This is a document.</h1>
10
- <marquee>This is bad.</marquee>
11
- </body>
12
- </html>
package/src/types.ts DELETED
@@ -1,42 +0,0 @@
1
- import type { AxeResults } from 'axe-core';
2
- import type { WebDriver, Builder } from 'selenium-webdriver';
3
-
4
- export * from './lib';
5
-
6
- export interface EventParams {
7
- silentMode: boolean;
8
- timer: boolean;
9
- cliReporter: (...args: unknown[]) => void;
10
- verbose: boolean;
11
- exit: boolean;
12
- }
13
-
14
- export interface EventResponse {
15
- startTimer: (message: string) => void;
16
- endTimer: (message: string) => void;
17
- waitingMessage: (loadDelayTime: number) => void;
18
- onTestStart: (url: string) => void;
19
- onTestComplete: (results: AxeResults) => void;
20
- }
21
-
22
- export interface WebdriverConfigParams {
23
- browser: string;
24
- timeout: number;
25
- chromedriverPath?: string;
26
- chromePath?: string;
27
- path?: string;
28
- chromeOptions?: string[];
29
- builder?: Builder;
30
- }
31
-
32
- export interface ConfigParams {
33
- driver: WebDriver;
34
- timer?: boolean;
35
- loadDelay?: number;
36
- axeSource?: string;
37
- include?: string | string[];
38
- exclude?: string | string[];
39
- tags?: string | string[];
40
- rules?: string | string[];
41
- disable?: string | string[];
42
- }
package/tsconfig.json DELETED
@@ -1,19 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "types": ["node"],
4
- "outDir": "./dist/",
5
- "sourceMap": true,
6
- "noImplicitAny": true,
7
- "strictNullChecks": true,
8
- "moduleResolution": "node",
9
- "resolveJsonModule": true,
10
- "module": "commonjs",
11
- "target": "ES2015",
12
- "allowJs": true,
13
- "lib": ["dom", "ES2015", "esnext.asynciterable"],
14
- "esModuleInterop": true,
15
- "skipLibCheck": true,
16
- "declaration": true
17
- },
18
- "include": ["./src/lib", "./src/bin"]
19
- }