@axe-core/webdriverjs 4.8.2-fdc3361.0 → 4.8.3-854eeb3.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.
@@ -0,0 +1,84 @@
1
+ import { WebDriver } from 'selenium-webdriver';
2
+ import { AxeResults, SerialFrameSelector, RunOptions, Spec } from 'axe-core';
3
+
4
+ interface BuilderOptions {
5
+ noSandbox?: boolean;
6
+ logIframeErrors?: boolean;
7
+ }
8
+ type CallbackFunction = (error: Error | null, results: AxeResults | null) => void;
9
+
10
+ declare class AxeBuilder {
11
+ private driver;
12
+ private axeSource;
13
+ private includes;
14
+ private excludes;
15
+ private option;
16
+ private config;
17
+ private builderOptions;
18
+ private legacyMode;
19
+ private errorUrl;
20
+ constructor(driver: WebDriver, axeSource?: string | null, builderOptions?: BuilderOptions);
21
+ /**
22
+ * Selector to include in analysis.
23
+ * This may be called any number of times.
24
+ */
25
+ include(selector: SerialFrameSelector): this;
26
+ /**
27
+ * Selector to exclude in analysis.
28
+ * This may be called any number of times.
29
+ */
30
+ exclude(selector: SerialFrameSelector): this;
31
+ /**
32
+ * Set options to be passed into axe-core
33
+ */
34
+ options(options: RunOptions): this;
35
+ /**
36
+ * Limit analysis to only the specified rules.
37
+ * Cannot be used with `AxeBuilder#withTags`
38
+ */
39
+ withRules(rules: string | string[]): this;
40
+ /**
41
+ * Limit analysis to only specified tags.
42
+ * Cannot be used with `AxeBuilder#withRules`
43
+ */
44
+ withTags(tags: string | string[]): this;
45
+ /**
46
+ * Set the list of rules to skip when running an analysis.
47
+ */
48
+ disableRules(rules: string | string[]): this;
49
+ /**
50
+ * Set configuration for `axe-core`.
51
+ * This value is passed directly to `axe.configure()`
52
+ */
53
+ configure(config: Spec): this;
54
+ /**
55
+ * Performs an analysis and retrieves results.
56
+ */
57
+ analyze(callback?: CallbackFunction): Promise<AxeResults>;
58
+ /**
59
+ * Use frameMessenger with <same_origin_only>
60
+ *
61
+ * This disables use of axe.runPartial() which is called in each frame, and
62
+ * axe.finishRun() which is called in a blank page. This uses axe.run() instead,
63
+ * but with the restriction that cross-origin frames will not be tested.
64
+ */
65
+ setLegacyMode(legacyMode?: boolean): this;
66
+ /**
67
+ * Analyzes the page, returning a promise
68
+ */
69
+ private analyzePromise;
70
+ /**
71
+ * Use axe.run() to get results from the page
72
+ */
73
+ private runLegacy;
74
+ /**
75
+ * Get partial results from the current context and its child frames
76
+ */
77
+ private runPartialRecursive;
78
+ /**
79
+ * Use axe.finishRun() to turn partial results into actual results
80
+ */
81
+ private finishRun;
82
+ }
83
+
84
+ export { AxeBuilder, AxeBuilder as default };
package/dist/index.js CHANGED
@@ -532,3 +532,16 @@ ${error2}`
532
532
  0 && (module.exports = {
533
533
  AxeBuilder
534
534
  });
535
+
536
+ if (module.exports.default) {
537
+ var ___default_export = module.exports.default;
538
+ var ___export_entries = Object.entries(module.exports);
539
+ module.exports = ___default_export;
540
+ ___export_entries.forEach(([key, value]) => {
541
+ if (module.exports[key]) {
542
+ throw new Error(`Export "${key}" already exists on default export`);
543
+ }
544
+
545
+ module.exports[key] = value;
546
+ });
547
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axe-core/webdriverjs",
3
- "version": "4.8.2-fdc3361.0+fdc3361",
3
+ "version": "4.8.3-854eeb3.0+854eeb3",
4
4
  "description": "Provides a method to inject and analyze web pages using axe",
5
5
  "contributors": [
6
6
  {
@@ -49,7 +49,10 @@
49
49
  "prebuild": "rimraf dist",
50
50
  "build": "tsup src/index.ts --dts --format esm,cjs",
51
51
  "test": "mocha --timeout 60000 -r ts-node/register 'test/**.spec.ts'",
52
+ "test:export": "npm run test:esm && npm run test:commonjs && npm run test:ts",
52
53
  "test:esm": "node test/esmTest.mjs",
54
+ "test:commonjs": "node test/commonjsTest.js",
55
+ "test:ts": "tsc test/tsTest.ts --noEmit --skipLibCheck --esModuleInterop",
53
56
  "coverage": "nyc npm run test",
54
57
  "prepare": "npm run build"
55
58
  },
@@ -70,20 +73,19 @@
70
73
  "@types/chromedriver": "^81.0.1",
71
74
  "@types/express": "^4.17.14",
72
75
  "@types/mocha": "^10.0.0",
73
- "@types/node": "^18.8.3",
76
+ "@types/node": "^20.8.10",
74
77
  "@types/selenium-webdriver": "^4.1.5",
75
- "@types/test-listen": "^1.1.0",
78
+ "async-listen": "^3.0.1",
76
79
  "axe-test-fixtures": "github:dequelabs/axe-test-fixtures#v1",
77
80
  "chai": "^4.3.6",
78
81
  "chromedriver": "latest",
79
82
  "express": "^4.18.2",
80
83
  "mocha": "^10.0.0",
81
84
  "nyc": "^15.1.0",
82
- "rimraf": "^3.0.2",
85
+ "rimraf": "^5.0.5",
83
86
  "selenium-webdriver": "^4.8.1",
84
- "test-listen": "^1.1.0",
85
87
  "ts-node": "^10.9.1",
86
- "tsup": "^6.7.0",
88
+ "tsup": "^7.2.0",
87
89
  "typescript": "^4.8.4"
88
90
  },
89
91
  "dependencies": {
@@ -111,5 +113,5 @@
111
113
  "functions": 85,
112
114
  "lines": 85
113
115
  },
114
- "gitHead": "fdc3361b2c1da1257adeb9871554ff4051fa72db"
116
+ "gitHead": "854eeb31d9b540ed30d602452c1d833600ecad20"
115
117
  }