@axe-core/watcher 3.14.2-next.ffe74e2a → 3.14.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. package/dist/Controller.js +1 -0
  2. package/dist/Controller.js.map +1 -1
  3. package/dist/EventForwarder.js +7 -0
  4. package/dist/EventForwarder.js.map +1 -1
  5. package/dist/createDebugger.js +15 -0
  6. package/dist/createDebugger.js.map +1 -1
  7. package/dist/cypress.js +45 -0
  8. package/dist/cypress.js.map +1 -1
  9. package/dist/cypressCommands.js +68 -2
  10. package/dist/cypressCommands.js.map +1 -1
  11. package/dist/git.js +16 -0
  12. package/dist/git.js.map +1 -1
  13. package/dist/playwright.js +13 -1
  14. package/dist/playwright.js.map +1 -1
  15. package/dist/playwrightTest.js +15 -0
  16. package/dist/playwrightTest.js.map +1 -1
  17. package/dist/playwrightWrapping.js +11 -0
  18. package/dist/playwrightWrapping.js.map +1 -1
  19. package/dist/puppeteer.js +13 -1
  20. package/dist/puppeteer.js.map +1 -1
  21. package/dist/puppeteerWrapping.js +13 -2
  22. package/dist/puppeteerWrapping.js.map +1 -1
  23. package/dist/sendResultsToServer.js +15 -0
  24. package/dist/sendResultsToServer.js.map +1 -1
  25. package/dist/utils/constants.js +3 -0
  26. package/dist/utils/constants.js.map +1 -1
  27. package/dist/utils/initializeSession.js +7 -0
  28. package/dist/utils/initializeSession.js.map +1 -1
  29. package/dist/utils/initializeSession.test.js +6 -0
  30. package/dist/utils/initializeSession.test.js.map +1 -1
  31. package/dist/utils/mergeChromeArgs.js +40 -0
  32. package/dist/utils/mergeChromeArgs.js.map +1 -1
  33. package/dist/utils/mergeChromeArgs.test.js +3 -0
  34. package/dist/utils/mergeChromeArgs.test.js.map +1 -1
  35. package/dist/utils/proxyHandlers.js +19 -0
  36. package/dist/utils/proxyHandlers.js.map +1 -1
  37. package/dist/utils/proxyHandlers.test.js +1 -0
  38. package/dist/utils/proxyHandlers.test.js.map +1 -1
  39. package/dist/utils/readVariables.js +4 -0
  40. package/dist/utils/readVariables.js.map +1 -1
  41. package/dist/utils/updateAutoAnalyze.js +5 -0
  42. package/dist/utils/updateAutoAnalyze.js.map +1 -1
  43. package/dist/utils/validateAxeRunContext.js +16 -0
  44. package/dist/utils/validateAxeRunContext.js.map +1 -1
  45. package/dist/utils/validateAxeRunContext.test.js +3 -0
  46. package/dist/utils/validateAxeRunContext.test.js.map +1 -1
  47. package/dist/utils/validateAxeRunOptions.js +51 -0
  48. package/dist/utils/validateAxeRunOptions.js.map +1 -1
  49. package/dist/utils/validateAxeRunOptions.test.js +15 -0
  50. package/dist/utils/validateAxeRunOptions.test.js.map +1 -1
  51. package/dist/utils/writeExtensionManifest.js +1 -0
  52. package/dist/utils/writeExtensionManifest.js.map +1 -1
  53. package/dist/utils/writeVariables.js +14 -1
  54. package/dist/utils/writeVariables.js.map +1 -1
  55. package/dist/utils/writeVariables.test.js +1 -0
  56. package/dist/utils/writeVariables.test.js.map +1 -1
  57. package/dist/wdio.d.ts +3 -5
  58. package/dist/wdio.js +20 -0
  59. package/dist/wdio.js.map +1 -1
  60. package/dist/webdriver.js +12 -1
  61. package/dist/webdriver.js.map +1 -1
  62. package/extension/background.js +1 -1
  63. package/extension/content.js +1 -1
  64. package/package.json +5 -5
@@ -1,11 +1,36 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const constants_1 = require("./constants");
4
+ // Extension flags for Chrome
4
5
  const DISABLE_OTHER_EXTENSIONS_FLAG = '--disable-extensions-except';
5
6
  const LOAD_EXTENSION_FLAG = '--load-extension';
7
+ /**
8
+ * A helper function to merge the user provided arguments with the extension args
9
+ * for Chrome.
10
+ *
11
+ * @param args The user provided arguments to merge with the extension args.
12
+ * @param disableOtherExtensions Whether to disable other extensions.
13
+ * @returns The merged arguments to pass to Chrome.
14
+ */
6
15
  function mergeChromeArgs(userArgs, { disableOtherExtensions }) {
16
+ /**
17
+ * It's possible for the user to do:
18
+ * `--load-extension=/path/A, --load-extension=/path/B`
19
+ *
20
+ * We only want to append our extension path onto
21
+ * the last occurrence of `--load-extension`.
22
+ */
7
23
  let loadExtensionFlagIndex = -1;
8
24
  let disableExtensionsFlagIndex = -1;
25
+ /**
26
+ * We do not want to modify the user's args directly.
27
+ * We only want to modify and merge the extension args
28
+ * with the user's args if they exist.
29
+ *
30
+ * It's possible for some integrations like WebDriverJS
31
+ * to optionally include the `--` prefix in the flag,
32
+ * when we check for the extension flag we need to account for this.
33
+ */
9
34
  for (const [index, arg] of userArgs.entries()) {
10
35
  if (arg.includes(LOAD_EXTENSION_FLAG) || arg.includes('load-extension')) {
11
36
  loadExtensionFlagIndex = index;
@@ -15,14 +40,29 @@ function mergeChromeArgs(userArgs, { disableOtherExtensions }) {
15
40
  disableExtensionsFlagIndex = index;
16
41
  }
17
42
  }
43
+ // The user has provided a `--load-extension` flag
44
+ // We want to append our extension path to the list of extensions.
18
45
  if (loadExtensionFlagIndex !== -1) {
19
46
  userArgs[loadExtensionFlagIndex] += `,${constants_1.PATH_TO_EXTENSION}`;
20
47
  }
21
48
  else {
22
49
  userArgs.push(`${LOAD_EXTENSION_FLAG}=${constants_1.PATH_TO_EXTENSION}`);
23
50
  }
51
+ // If the user has already disabled other extensions, we want to append
52
+ // our extension path to the list of disabled extensions.
24
53
  if (disableExtensionsFlagIndex !== -1) {
25
54
  userArgs[disableExtensionsFlagIndex] += `,${constants_1.PATH_TO_EXTENSION}`;
55
+ /**
56
+ * Puppeteer and Playwright by default include `--disable-extensions` which
57
+ * disables all extensions. We need to explicitly enable the axe-core/watcher
58
+ * extension.
59
+ *
60
+ * @see https://github.com/GoogleChrome/chrome-launcher/blob/main/docs/chrome-flags-for-tools.md#sources
61
+ *
62
+ * Cypress does not include `--disable-extensions` by default but does include
63
+ * their own extension outside of `--load-extension` so we do not able to disable it
64
+ * when injecting the axe-core/watcher extension.
65
+ */
26
66
  }
27
67
  else if (disableOtherExtensions) {
28
68
  userArgs.push(`${DISABLE_OTHER_EXTENSIONS_FLAG}=${constants_1.PATH_TO_EXTEN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QAAQ,CAAC,0BAA0B,CAAC,IAAI,IAAI,6BAAiB,EAAE,CAAA;QAE/D;;;;;;;;;;WAUG;IACL,CAAC;SAAM,IAAI,sBAAsB,EAAE,CAAC;QAClC,QAAQ,CAAC,IAAI,CAAC,GAAG,6BAA6B,IAAI,6BAAiB,EAAE,CAAC,CAAA;IACxE,CAAC;IAED,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED,kBAAe,eAAe,CAAA"}
@@ -137,6 +137,7 @@ describe('mergeChromeArgs', () => {
137
137
  chai_1.assert.lengthOf(args, 4);
138
138
  chai_1.assert.equal(foo, 'foo=bar');
139
139
  chai_1.assert.equal(loadExtension1, 'load-extension=baz');
140
+ // We append onto the last occurrence of the flag
140
141
  chai_1.assert.equal(loadExtension2, `load-extension=qux,${constants_1.PATH_TO_EXTENSION}`);
141
142
  chai_1.assert.equal(disableExtensionsExcept, `--disable-extensions-except=${constants_1.PATH_TO_EXTENSION}`);
142
143
  });
@@ -182,6 +183,7 @@ describe('mergeChromeArgs', () => {
182
183
  chai_1.assert.lengthOf(args, 3);
183
184
  chai_1.assert.equal(foo, 'foo=bar');
184
185
  chai_1.assert.equal(loadExtension1, 'load-extension=baz');
186
+ // We append onto the last occurrence of the flag
185
187
  chai_1.assert.equal(loadExtension2, `load-extension=qux,${constants_1.PATH_TO_EXTENSION}`);
186
188
  });
187
189
  describe('and some values are comma-separated', () => {
@@ -228,6 +230,7 @@ describe('mergeChromeArgs', () => {
228
230
  chai_1.assert.lengthOf(args, 4);
229
231
  chai_1.assert.equal(foo, 'foo=bar');
230
232
  chai_1.assert.equal(disableExtensionsExcept1, 'disable-extensions-except=baz');
233
+ // We append onto the last occurrence of the flag
231
234
  chai_1.assert.equal(disableExtensionsExcept2, `--disable-extensions-except=qux,${constants_1.PATH_TO_EXTENSION}`);
232
235
  chai_1.assert.equal(loadExtension, `--load-extension=${constants_1.PATH_TO_EXTENSION}`);
233
236
  });
@@ -1 +1 @@
1
- {"version":3,"file":"mergeChrome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EAAE,CACxC,CAAA;wBACH,CAAC,CAAC,CAAA;wBAEF,QAAQ,CAAC,qCAAqC,EAAE,GAAG,EAAE;4BACnD,EAAE,CAAC,wEAAwE,EAAE,GAAG,EAAE;gCAChF,MAAM,IAAI,GAAG,IAAA,yBAAe,EAC1B;oCACE,SAAS;oCACT,aAAa;oCACb,wCAAwC;iCACzC,EACD;oCACE,sBAAsB,EAAE,KAAK;iCAC9B,CACF,CAAA;gCAED,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,uBAAuB,EAAE,aAAa,CAAC,GACxD,IAAI,CAAA;gCAEN,aAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;gCACxB,aAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;gCAC7B,aAAM,CAAC,KAAK,CAAC,IAAI,EAAE,aAAa,CAAC,CAAA;gCACjC,aAAM,CAAC,KAAK,CACV,uBAAuB,EACvB,0CAA0C,6BAAiB,EAAE,CAC9D,CAAA;gCACD,aAAM,CAAC,KAAK,CACV,aAAa,EACb,oBAAoB,6BAAiB,EAAE,CACxC,CAAA;4BACH,CAAC,CAAC,CAAA;wBACJ,CAAC,CAAC,CAAA;oBACJ,CAAC,CAAC,CAAA;gBACJ,CAAC,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.proxiedGetWithoutAnalyze = exports.proxiedGetFuncWithAnalyze = exports.markAsWrapped = exports.isWrapped = void 0;
4
4
  const kWrapped = Symbol('axe watcher wrapped');
5
+ /** Is the given object wrapped? */
5
6
  const isWrapped = (o) => {
6
7
  if (!o) {
7
8
  return false;
@@ -9,6 +10,7 @@ const isWrapped = (o) => {
9
10
  return o[kWrapped] === true;
10
11
  };
11
12
  exports.isWrapped = isWrapped;
13
+ /** Mark the given object as wrapped. */
12
14
  const markAsWrapped = (o) => {
13
15
  Object.defineProperty(o, kWrapped, {
14
16
  configurable: false,
@@ -22,6 +24,9 @@ const proxiedGetFuncWithAnalyze = (target, prop, controller) => async (...args)
22
24
  __Method: prop,
23
25
  __UserRequestedAnalyze: false
24
26
  });
27
+ // We use .call(target, ...) for the same reason that
28
+ // proxiedGetWithoutAnalyze uses .bind(target), see below.
29
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
25
30
  const result = await target[prop].call(target, ...args);
26
31
  return result;
27
32
  };
@@ -29,8 +34,22 @@ exports.proxiedGetFuncWithAnalyze = proxiedGetFuncWithAnalyze;
29
34
  const proxiedGetWithoutAnalyze = (target, prop) => {
30
35
  const original = target[prop];
31
36
  if (typeof original === 'function') {
37
+ // Override the proxied function with the original function bound to the target.
38
+ // This allows the "this" context to mimic the original object, rather than the proxy.
39
+ // Doing it this way still satisfies if:
40
+ // 1. The original function uses a private field of the target,
41
+ // it will throw an error if we try to call it in the context of
42
+ // a proxy rather than the original object. See #1052.
43
+ // 2. The original function is implemented in terms of a different
44
+ // method which we *do* wrap, we *don't* want to hook that inner
45
+ // call with an analyze(); we want to be intentional about the
46
+ // specific user-facing methods that we hook.
32
47
  const originalFnName = original.name;
33
48
  const boundNameOverride = {
49
+ // ends up identical to the original; JavaScript names anonymous functions
50
+ // in objects after the key they're bound to.
51
+ // @see https://github.com/dequelabs/jazzband/issues/1107
52
+ // @see https://stackoverflow.com/a/41854075
34
53
  [originalFnName]: function (...args) {
35
54
  return original.call(target, ...args);
36
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"proxyHandlers.js","sourceRoot":"","sources":["../../src/utils/proxyHandlers.ts"],"names":[],"mappings":";;;AAEA,MAAM,QAAQ,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAA;AAOvC,MAAM,SAAS,GAAG,CAAI,CAA4B,EAAW,EAAE;IACpE,IAAI,CAAC,CAAC,EAAE,CAAC;QACP,OAA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AI,CAAC,CAAA;IAE7B,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;QACnC,gFAAgF;QAChF,sFAAsF;QACtF,wCAAwC;QACxC,+DAA+D;QAC/D,mEAAmE;QACnE,yDAAyD;QACzD,kEAAkE;QAClE,mEAAmE;QACnE,iEAAiE;QACjE,gDAAgD;QAChD,MAAM,cAAc,GAAG,QAAQ,CAAC,IAAI,CAAA;QACpC,MAAM,iBAAiB,GAAG;YACxB,0EAA0E;YAC1E,6CAA6C;YAC7C,yDAAyD;YACzD,4CAA4C;YAC5C,CAAC,cAAc,CAAC,EAAE,UAAU,GAAG,IAAe;gBAC5C,OAAO,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAA;YACvC,CAAC;SACF,CAAA;QAED,OAAO,iBAAiB,CAAC,cAAc,CAAC,CAAA;IAC1C,CAAC;IAED,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAA;AAhCY,QAAA,wBAAwB,4BAgCpC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  require("mocha");
4
4
  const chai_1 = require("chai");
5
5
  const proxyHandlers_1 = require("./proxyHandlers");
6
+ // Regression test for https://github.com/dequelabs/jazzband/issues/1107
6
7
  describe('proxiedGetWithoutAnalyze', () => {
7
8
  it('should ensure proxied function names match originals', () => {
8
9
  class Original {
@@ -1 +1 @@
1
- {"version":3,"file":"proxyHandlers.test.js","sourceRoot":"","sources":["../../src/utils/proxyHandlers.test.ts"],"names":[],"mappings":";;AAAA,iBAAc;AACd,+BAA6B;AAC7B,mDAA0D;AAG1D,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,EAAE,CAAC,sDAAsD,EAAE,GAAG,EAAE;QAC9D,MAAM,QAAQ;YAAd;gBACE,YAAO,GAAG,GAAG,EAAE,CAAC,OAAO,CAAA;YAIzB,CAAC;YAHC,MAAM;gBACJ,OAAO,OAAO,CAAA;YAChB,CAAC;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AA;QACF,aAAM,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;QACzD,aAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QACvD,aAAM,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;IACnE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -5,6 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const fs_1 = __importDefault(require("fs"));
7
7
  const constants_1 = require("./constants");
8
+ /**
9
+ * Read the `variables` JSON file from the @axe-core/watcher extension.
10
+ * @returns The variables stored in the extension variables file.
11
+ */
8
12
  function readVariables() {
9
13
  const fileContents = fs_1.default.readFileSync(constants_1.PATH_TO_EXTENSION_VARIABLES, 'utf-8');
10
14
  return JSON.parse(fileContents);
@@ -1 +1 @@
1
- {"version":3,"file":"readVariables.js","sourceRoot":"","sources":["../../src/utils/readVariables.ts"],"names":[],"mappings":";;;;;AAAA,4CAAmB;AACnB,2CAAyD;AAQzD,SAAS,aAAa;IACpB,MAAM,YAAY,GAAG,YAAE,CAAC,YAAY,CAAC,uCAA2B,EAAE,OAAO,CAAC,CAAA;IAC1E,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;AACjC,CAAC;AAED,kBAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"readVariables.js","sourceRoot":"","sources":["../../src/utils/readVariables.ts"],"names":[],"mappings":";;;;;AAAA,4CAAmB;AACnB,2CAAyD;AAGzD;;;GAGG;AAEH,SAAS,aAAa;IACpB,MAAM,YAAY,GAAG,YAAE,CAAC,YAAY,CAAC,uCAA2B,EAAE,OAAO,CAAC,CAAA;IAC1E,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;AACjC,CAAC;AAED,kBAAe,aAAa,CAAA"}
@@ -6,6 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const fs_1 = __importDefault(require("fs"));
7
7
  const constants_1 = require("./constants");
8
8
  const readVariables_1 = __importDefault(require("./readVariables"));
9
+ /**
10
+ * Update the `auto_analyze` variable in the @axe-core/watcher extension variables file.
11
+ *
12
+ * @param val The new value for the auto_analyze variable.
13
+ */
9
14
  function updateAutoAnalyze(val) {
10
15
  const variables = (0, readVariables_1.default)();
11
16
  variables.auto_analyze = val;
@@ -1 +1 @@
1
- {"version":3,"file":"updateAutoAnalyze.js","sourceRoot":"","sources":["../../src/utils/updateAutoAnalyze.ts"],"names":[],"mappings":";;;;;AAAA,4CAAmB;AACnB,2CAAyD;AACzD,oEAA2C;AAQ3C,SAAS,iBAAiB,CAAC,GAAY;IACrC,MAAM,SAAS,GAAG,IAAA,uBAAa,GAAE,CAAA;IACjC,SAAS,CAAC,YAAY,GAAG,GAAG,CAAA;IAC5B,YAAE,CAAC,aAAa,CAAC,uCAA2B,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAA;AAC1E,CAAC;AAED,kBAAe,iBAAiB,CAAA"}
1
+ {"version":3,"file":"updateAutoAnalyze.js","sourceRoot":"","sources":["../../src/utils/updateAutoAnalyze.ts"],"names":[],"mappings":";;;;;AAAA,4CAAmB;AACnB,2CAAyD;AACzD,oEAA2C;AAE3C;;;;GAIG;AAEH,SAAS,iBAAiB,CAAC,GAAY;IACrC,MAAM,SAAS,GAAG,IAAA,uBAAa,GAAE,CAAA;IACjC,SAAS,CAAC,YAAY,GAAG,GAAG,CAAA;IAC5B,YAAE,CAAC,aAAa,CAAC,uCAA2B,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAA;AAC1E,CAAC;AAED,kBAAe,iBAAiB,CAAA"}
@@ -15,28 +15,44 @@ function validateAxeRunContext(runContext = undefined) {
15
15
  `);
16
16
  }
17
17
  }
18
+ /**
19
+ * Validates the context object for the `runContext` parameter of the `axe.run` method.
20
+ * Borrowed from axe-core's original implementation.
21
+ *
22
+ * @see https://github.com/dequelabs/axe-core/blob/0577a74fab385a590b31c9118f3da7ad55051097/lib/core/base/context/normalize-context.js#L92
23
+ *
24
+ * Removed `window.node` check
25
+ *
26
+ * @param contextSpec - The context object to validate
27
+ * @returns `true` if the context object is valid, `false` otherwise
28
+ */
18
29
  function isContextObject(contextSpec) {
19
30
  return ['include', 'exclude'].some(prop => objectHasOwn(contextSpec, prop) &&
20
31
  isContextProp(contextSpec[prop]));
21
32
  }
33
+ //@see https://github.com/dequelabs/axe-core/blob/0577a74fab385a590b31c9118f3da7ad55051097/lib/core/base/context/normalize-context.js#L98
22
34
  function isContextProp(contextList) {
23
35
  return (typeof contextList === 'string' ||
24
36
  isLabelledFramesSelector(contextList) ||
25
37
  isLabelledShadowDomSelector(contextList) ||
26
38
  isArrayLike(contextList));
27
39
  }
40
+ // @see https://github.com/dequelabs/axe-core/blob/0577a74fab385a590b31c9118f3da7ad55051097/lib/core/base/context/normalize-context.js#L178-L184
28
41
  function objectHasOwn(obj, prop) {
29
42
  if (!obj || typeof obj !== 'object') {
30
43
  return false;
31
44
  }
32
45
  return Object.prototype.hasOwnProperty.call(obj, prop);
33
46
  }
47
+ //@see https://github.com/dequelabs/axe-core/blob/0577a74fab385a590b31c9118f3da7ad55051097/lib/core/base/context/normalize-context.js#L108
34
48
  function isLabelledFramesSelector(selector) {
35
49
  return objectHasOwn(selector, 'fromFrames');
36
50
  }
51
+ //@see https://github.com/dequelabs/axe-core/blob/0577a74fab385a590b31c9118f3da7ad55051097/lib/core/base/context/normalize-context.js#L112
37
52
  function isLabelledShadowDomSelector(selector) {
38
53
  return objectHasOwn(selector, 'fromShadowDom');
39
54
  }
55
+ // @see https://github.com/dequelabs/axe-core/blob/0577a74fab385a590b31c9118f3da7ad55051097/lib/core/base/context/normalize-context.js#L160C1-L168C2
40
56
  function isArrayLike(arr) {
41
57
  return arr && typeof arr === 'object' && typeof arr.length === 'number';
42
58
  }
@@ -1 +1 @@
1
- {"version":3,"file":"validateAxeRunContext.js","sourceRoot":"","sources":["../../src/utils/validateAxeRunContext.ts"],"names":[],"mappings":";;AAEA,sDAkBC;AAlBD,SAAgB,qBAAqB,CACnC,aAAyC,SAAS;IAElD,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAM;IACR,CAAC;IAED,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CACb;;;;;;OAMC,CACF,CAAA;IACH,CAAC;AACH,CAAC;AAaD,SAAS,eAAe,CAAC,WAA2B;IAClD,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,IAAI,CAChC,IAAI,CAAC,EAAE,CACL,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC;QAC/B,aAAa,CAAC,WAAW,CAAC,IAA4B,CAAC,CAAC,CAC3D,CAAA;AACH,CAAC;AAGD,SAAS,aAAa,CACpB,WAAiD;IAEjD,OAAO,CACL,OAAO,WAAW,KAAK,QAAQ;QAC/B,wBAAwB,CAAC,WAAW,CAAC;QACrC,2BAA2B,CAAC,WAAW,CAAC;QACxC,WAAW,CAAC,WAAW,CAAC,CACzB,CAAA;AACH,CAAC;AAGD,SAAS,YAAY,CAAC,GAAY,EAAE,IAAiB;IACnD,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QACpC,OAAO,KAAK,CAAA;IACd,CAAC;IACD,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;AACxD,CAAC;AAGD,SAAS,wBAAwB,CAAC,QAAiB;IACjD,OAAO,YAAY,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAA;AAC7C,CAAC;AAGD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I,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;AACxD,CAAC;AAED,0IAA0I;AAC1I,SAAS,wBAAwB,CAAC,QAAiB;IACjD,OAAO,YAAY,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAA;AAC7C,CAAC;AAED,0IAA0I;AAC1I,SAAS,2BAA2B,CAAC,QAAiB;IACpD,OAAO,YAAY,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAA;AAChD,CAAC;AAED,oJAAoJ;AACpJ,SAAS,WAAW,CAAC,GAAc;IACjC,OAAO,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,CAAC,MAAM,KAAK,QAAQ,CAAA;AACzE,CAAC"}
@@ -78,16 +78,19 @@ describe('validateAxeRunContext', () => {
78
78
  describe('and does not have an `include` or `exclude` property', () => {
79
79
  describe('and is not a string', () => {
80
80
  it('throws an error', () => {
81
+ //@ts-expect-error - Testing invalid input
81
82
  chai_1.assert.throws(() => (0, validateAxeRunContext_1.validateAxeRunContext)(1));
82
83
  });
83
84
  });
84
85
  describe('and is not an array of strings', () => {
85
86
  it('throws an error', () => {
87
+ //@ts-expect-error - Testing invalid input
86
88
  chai_1.assert.throws(() => (0, validateAxeRunContext_1.validateAxeRunContext)([1, 2]));
87
89
  });
88
90
  });
89
91
  describe('and does not have a `fromFrames` or `fromShadowDom` property', () => {
90
92
  it('throws an error', () => {
93
+ //@ts-expect-error - Testing invalid input
91
94
  chai_1.assert.throws(() => (0, validateAxeRunContext_1.validateAxeRunContext)({ a: 'a' }));
92
95
  });
93
96
  });
@@ -1 +1 @@
1
- {"version":3,"file":"validateAxeRunContext.test.js","sourceRoot":"","sources":["../../src/utils/validateAxeRunContext.test.ts"],"names":[],"mappings":";;AAAA,iBAAc;AACd,+BAA6B;AAC7B,mEAA+D;AAE/D,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACrC,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAAE;QAC/C,EAAE,CAA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AAC,MAAM,CAAC,GAAG,EAAE,CAAC,IAAA,6CAAqB,EAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;gBACpD,CAAC,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;YAEF,QAAQ,CAAC,8DAA8D,EAAE,GAAG,EAAE;gBAC5E,EAAE,CAAC,iBAAiB,EAAE,GAAG,EAAE;oBACzB,0CAA0C;oBAC1C,aAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,IAAA,6CAAqB,EAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAA;gBACxD,CAAC,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -8,6 +8,13 @@ const VALID_RUN_ONLY_TYPES = [
8
8
  'tag',
9
9
  'tags'
10
10
  ];
11
+ /**
12
+ * We only provide a subset of axe-core's RunOptions.
13
+ * We want to sanitize the user's input to ensure they are not providing
14
+ * any invalid properties that are outside of the subset we provide.
15
+ *
16
+ * @param runOptions The user's run options.
17
+ */
11
18
  function validateAxeRunOptions(runOptions = undefined) {
12
19
  if (!runOptions) {
13
20
  return;
@@ -36,12 +43,29 @@ function validateAxeRunOptions(runOptions = undefined) {
36
43
  }
37
44
  }
38
45
  }
46
+ /** Helper functions */
47
+ /** Checks if the value provided is an object */
39
48
  function isObject(value) {
40
49
  return value !== null && typeof value === 'object' && !Array.isArray(value);
41
50
  }
51
+ /** Checks if the value provided is a boolean */
42
52
  function isBoolean(value) {
43
53
  return typeof value === 'boolean';
44
54
  }
55
+ /**
56
+ * Validate the user's `rules` object and its values. As a user can provide:
57
+ * @example
58
+ * {
59
+ * rules: {
60
+ * 'ruleId1': { enabled: false },
61
+ * 'ruleId2': { enabled: false }
62
+ * 'ruleId3': { enabled: false }
63
+ * // ...
64
+ * }
65
+ * }
66
+ *
67
+ * @param rules The user's rules object.
68
+ */
45
69
  function validateRulesProperty(rules) {
46
70
  if (!isObject(rules)) {
47
71
  throw new Error('`rules` property must be an object. Full example: `{ rules: { "ruleId": { enabled: false } } }`');
@@ -49,6 +73,7 @@ function validateRulesProperty(rules) {
49
73
  if (!Object.keys(rules).length) {
50
74
  throw new Error('`rules` object must contain at least one key-value pair. Full example: `{ rules: { "ruleId": { enabled: false } } }`');
51
75
  }
76
+ // Validate each K:V pair in the `rules` object e.g. { 'ruleId': { enabled: false } }
52
77
  for (const ruleKey of Object.keys(rules)) {
53
78
  const ruleValue = rules[ruleKey];
54
79
  if (!isObject(ruleValue)) {
@@ -65,6 +90,32 @@ function validateRulesProperty(rules) {
65
90
  }
66
91
  }
67
92
  }
93
+ /**
94
+ * Validate the user's `runOnly` configuration. A user can provide:
95
+ * @example
96
+ * {
97
+ * runOnly: {
98
+ * type: 'rule',
99
+ * values: ['ruleId1', 'ruleId2', 'ruleId3']
100
+ * }
101
+ * }
102
+ *
103
+ * OR
104
+ *
105
+ * @example
106
+ * {
107
+ * runOnly: ['ruleId1', 'ruleId2', 'ruleId3']
108
+ * }
109
+ *
110
+ * OR
111
+ *
112
+ * @example
113
+ * {
114
+ * runOnly: 'ruleId1'
115
+ * }
116
+ *
117
+ * @param runOnly The user's runOnly object, array, or string.
118
+ */
68
119
  function validateRunOnlyProperty(runOnly) {
69
120
  const isRunOnlyObject = isObject(runOnly);
70
121
  const isRunOnlyArray = Array.isArray(runOnly);
@@ -1 +1 @@
1
- {"version":3,"file":"validateAxeRunOptions.js","sourceRoot":"","sources":["../../src/utils/validateAxeRunOptions.ts"],"names":[],"mappings":";;AAmBA,sDAqCC;AAKD,4BAEC;AA1DD,MAAM,oBAAoB,GAA+B;IACvD,OAAO;IACP,MAAM;IACN,KAAK;IACL,MAAM;CACP,CAAA;AASD,SAAgB,qBAAqB,CACnC,aAAqC,SAAS;IAE9C,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAM;IACR,CAAC;IAED,MAAM,cAAc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CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,EAAE,CAAC;YACrD,MAAM,IAAI,KAAK,CACb,2FAA2F,CAC5F,CAAA;QACH,CAAC;IACH,CAAC;IAED,IAAI,eAAe,EAAE,CAAC;QACpB,IAAI,CAAC,CAAC,MAAM,IAAI,OAAO,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CACb,kHAAkH,CACnH,CAAA;QACH,CAAC;QAED,IAAI,CAAC,CAAC,QAAQ,IAAI,OAAO,CAAC,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CACb,oHAAoH,CACrH,CAAA;QACH,CAAC;QAED,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACjD,MAAM,IAAI,KAAK,CACb,wEAAwE,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC1G,CAAA;QACH,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YACnC,MAAM,IAAI,KAAK,CACb,wHAAwH,CACzH,CAAA;QACH,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CACb,uIAAuI,CACxI,CAAA;QACH,CAAC;QAED,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,EAAE,CAAC;YAC5D,MAAM,IAAI,KAAK,CACb,iIAAiI,CAClI,CAAA;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"validateAxeRunOptions.js","sourceRoot":"","sources":["../../src/utils/validateAxeRunOptions.ts"],"names":[],"mappings":";;AAmBA,sDAqCC;AAKD,4BAEC;AA1DD,MAAM,oBAAoB,GAA+B;IACvD,OAAO;IACP,MAAM;IACN,KAAK;IACL,MAAM;CACP,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,CACb,iIAAiI,CAClI,CAAA;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -14,6 +14,7 @@ describe('validateAxeRunOptions', () => {
14
14
  describe('given an option that has not been exposed to be configured', () => {
15
15
  it('throws', () => {
16
16
  chai_1.assert.throws(() => {
17
+ //@ts-expect-error - testing invalid input
17
18
  (0, validateAxeRunOptions_1.validateAxeRunOptions)({ a: 'a' });
18
19
  }, /Invalid property found in `runOptions`/i);
19
20
  });
@@ -22,6 +23,7 @@ describe('validateAxeRunOptions', () => {
22
23
  describe('when `ancestry` is not a boolean', () => {
23
24
  it('throws', () => {
24
25
  chai_1.assert.throws(() => {
26
+ //@ts-expect-error - testing invalid input
25
27
  (0, validateAxeRunOptions_1.validateAxeRunOptions)({ ancestry: 'a' });
26
28
  }, /`ancestry` property must be a boolean./i);
27
29
  });
@@ -38,6 +40,7 @@ describe('validateAxeRunOptions', () => {
38
40
  describe('when `rules` is not an object', () => {
39
41
  it('throws', () => {
40
42
  chai_1.assert.throws(() => {
43
+ //@ts-expect-error - testing invalid input
41
44
  (0, validateAxeRunOptions_1.validateAxeRunOptions)({ rules: 'a' });
42
45
  }, /`rules` property must be an object./i);
43
46
  });
@@ -45,6 +48,7 @@ describe('validateAxeRunOptions', () => {
45
48
  describe('when `rules` is an array', () => {
46
49
  it('throws', () => {
47
50
  chai_1.assert.throws(() => {
51
+ //@ts-expect-error - testing invalid input
48
52
  (0, validateAxeRunOptions_1.validateAxeRunOptions)({ rules: ['a'] });
49
53
  }, /`rules` property must be an object./i);
50
54
  });
@@ -61,6 +65,7 @@ describe('validateAxeRunOptions', () => {
61
65
  describe('and the value is not an object', () => {
62
66
  it('throws', () => {
63
67
  chai_1.assert.throws(() => {
68
+ //@ts-expect-error - testing invalid input
64
69
  (0, validateAxeRunOptions_1.validateAxeRunOptions)({ rules: { a: 'a' } });
65
70
  }, /The value of the `a` key in the `rules` object must be an object./i);
66
71
  });
@@ -69,6 +74,7 @@ describe('validateAxeRunOptions', () => {
69
74
  describe('and the value has no properties', () => {
70
75
  it('throws', () => {
71
76
  chai_1.assert.throws(() => {
77
+ //@ts-expect-error - testing invalid input
72
78
  (0, validateAxeRunOptions_1.validateAxeRunOptions)({ rules: { a: {} } });
73
79
  }, /The `a` key in the `rules` object must only contain the `enabled` property./i);
74
80
  });
@@ -77,6 +83,7 @@ describe('validateAxeRunOptions', () => {
77
83
  describe('and the value does not have an `enabled` property', () => {
78
84
  it('throws', () => {
79
85
  chai_1.assert.throws(() => {
86
+ //@ts-expect-error - testing invalid input
80
87
  (0, validateAxeRunOptions_1.validateAxeRunOptions)({ rules: { a: { b: 'a' } } });
81
88
  }, /The `a` key in the `rules` object must contain an `enabled` property./i);
82
89
  });
@@ -85,6 +92,7 @@ describe('validateAxeRunOptions', () => {
85
92
  describe('and the `enabled` property is not a boolean', () => {
86
93
  it('throws', () => {
87
94
  chai_1.assert.throws(() => {
95
+ //@ts-expect-error - testing invalid input
88
96
  (0, validateAxeRunOptions_1.validateAxeRunOptions)({ rules: { a: { enabled: 'a' } } });
89
97
  }, /The `enabled` property of the `a` key in the `rules` object must be a boolean./i);
90
98
  });
@@ -122,6 +130,7 @@ describe('validateAxeRunOptions', () => {
122
130
  describe('and the array is not an array of strings', () => {
123
131
  it('throws', () => {
124
132
  chai_1.assert.throws(() => {
133
+ //@ts-expect-error - testing invalid input
125
134
  (0, validateAxeRunOptions_1.validateAxeRunOptions)({ runOnly: ['a', 1] });
126
135
  }, /`runOnly` array must contain only strings./i);
127
136
  });
@@ -138,6 +147,7 @@ describe('validateAxeRunOptions', () => {
138
147
  describe('when `runOnly` is not a string, array or object', () => {
139
148
  it('throws', () => {
140
149
  chai_1.assert.throws(() => {
150
+ //@ts-expect-error - testing invalid input
141
151
  (0, validateAxeRunOptions_1.validateAxeRunOptions)({ runOnly: 1 });
142
152
  }, /`runOnly` property must be an object, an array, or a string./i);
143
153
  });
@@ -146,6 +156,7 @@ describe('validateAxeRunOptions', () => {
146
156
  describe('and the object has no `type` property', () => {
147
157
  it('throws', () => {
148
158
  chai_1.assert.throws(() => {
159
+ //@ts-expect-error - testing invalid input
149
160
  (0, validateAxeRunOptions_1.validateAxeRunOptions)({ runOnly: {} });
150
161
  }, /`runOnly` object must contain a `type` property./i);
151
162
  });
@@ -153,6 +164,7 @@ describe('validateAxeRunOptions', () => {
153
164
  describe('and the object has no `values` property', () => {
154
165
  it('throws', () => {
155
166
  chai_1.assert.throws(() => {
167
+ //@ts-expect-error - testing invalid input
156
168
  (0, validateAxeRunOptions_1.validateAxeRunOptions)({ runOnly: { type: 'rule' } });
157
169
  }, /`runOnly` object must contain a `values` property./i);
158
170
  });
@@ -160,6 +172,7 @@ describe('validateAxeRunOptions', () => {
160
172
  describe('and the object has an invalid `type` property', () => {
161
173
  it('throws', () => {
162
174
  chai_1.assert.throws(() => {
175
+ //@ts-expect-error - testing invalid input
163
176
  (0, validateAxeRunOptions_1.validateAxeRunOptions)({ runOnly: { type: 'a', values: ['a'] } });
164
177
  }, /`runOnly` object's `type` property must be one of the following:/i);
165
178
  });
@@ -168,6 +181,7 @@ describe('validateAxeRunOptions', () => {
168
181
  describe('and the `values` property is not an array', () => {
169
182
  it('throws', () => {
170
183
  chai_1.assert.throws(() => {
184
+ //@ts-expect-error - testing invalid input
171
185
  (0, validateAxeRunOptions_1.validateAxeRunOptions)({ runOnly: { type: 'rule', values: 'a' } });
172
186
  }, /`runOnly` object's `values` property must be an array./i);
173
187
  });
@@ -183,6 +197,7 @@ describe('validateAxeRunOptions', () => {
183
197
  it('throws', () => {
184
198
  chai_1.assert.throws(() => {
185
199
  (0, validateAxeRunOptions_1.validateAxeRunOptions)({
200
+ //@ts-expect-error - testing invalid input
186
201
  runOnly: { type: 'rule', values: ['a', 1] }
187
202
  });
188
203
  }, /`runOnly` object's `values` property must contain only strings./i);
@@ -1 +1 @@
1
- {"version":3,"file":"validateAxeRunOptions.test.js","sourceRoot":"","sources":["../../src/utils/validateAxeRunOptions.test.ts"],"names":[],"mappings":";;AA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