@axe-core/watcher 2.4.0 → 3.0.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/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /*! Copyright Deque 2021-2023 All Rights Reserved */
2
- export { puppeteerConfig, PuppeteerController, wrapPuppeteer } from './puppeteer';
2
+ export { puppeteerConfig, PuppeteerController, wrapPuppeteer, wrapPuppeteerPage } from './puppeteer';
3
3
  export { wdioConfig, wdioTestRunner, WdioController, wrapWdio } from './wdio';
4
4
  export { webdriverConfig, WebdriverController, wrapWebdriver } from './webdriver';
5
- export { playwrightConfig, PlaywrightController, wrapPlaywright } from './playwright';
5
+ export { playwrightConfig, PlaywrightController, wrapPlaywright, wrapPlaywrightPage } from './playwright';
6
6
  export { default as playwrightTest } from './playwrightTest';
7
7
  export { cypressConfig } from './cypress';
package/dist/index.js CHANGED
@@ -4,11 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  return (mod && mod.__esModule) ? mod : { "default": mod };
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.cypressConfig = exports.playwrightTest = exports.wrapPlaywright = exports.PlaywrightController = exports.playwrightConfig = exports.wrapWebdriver = exports.WebdriverController = exports.webdriverConfig = exports.wrapWdio = exports.WdioController = exports.wdioTestRunner = exports.wdioConfig = exports.wrapPuppeteer = exports.PuppeteerController = exports.puppeteerConfig = void 0;
7
+ exports.cypressConfig = exports.playwrightTest = exports.wrapPlaywrightPage = exports.wrapPlaywright = exports.PlaywrightController = exports.playwrightConfig = exports.wrapWebdriver = exports.WebdriverController = exports.webdriverConfig = exports.wrapWdio = exports.WdioController = exports.wdioTestRunner = exports.wdioConfig = exports.wrapPuppeteerPage = exports.wrapPuppeteer = exports.PuppeteerController = exports.puppeteerConfig = void 0;
8
8
  var puppeteer_1 = require("./puppeteer");
9
9
  Object.defineProperty(exports, "puppeteerConfig", { enumerable: true, get: function () { return puppeteer_1.puppeteerConfig; } });
10
10
  Object.defineProperty(exports, "PuppeteerController", { enumerable: true, get: function () { return puppeteer_1.PuppeteerController; } });
11
11
  Object.defineProperty(exports, "wrapPuppeteer", { enumerable: true, get: function () { return puppeteer_1.wrapPuppeteer; } });
12
+ Object.defineProperty(exports, "wrapPuppeteerPage", { enumerable: true, get: function () { return puppeteer_1.wrapPuppeteerPage; } });
12
13
  var wdio_1 = require("./wdio");
13
14
  Object.defineProperty(exports, "wdioConfig", { enumerable: true, get: function () { return wdio_1.wdioConfig; } });
14
15
  Object.defineProperty(exports, "wdioTestRunner", { enumerable: true, get: function () { return wdio_1.wdioTestRunner; } });
@@ -22,6 +23,7 @@ var playwright_1 = require("./playwright");
22
23
  Object.defineProperty(exports, "playwrightConfig", { enumerable: true, get: function () { return playwright_1.playwrightConfig; } });
23
24
  Object.defineProperty(exports, "PlaywrightController", { enumerable: true, get: function () { return playwright_1.PlaywrightController; } });
24
25
  Object.defineProperty(exports, "wrapPlaywright", { enumerable: true, get: function () { return playwright_1.wrapPlaywright; } });
26
+ Object.defineProperty(exports, "wrapPlaywrightPage", { enumerable: true, get: function () { return playwright_1.wrapPlaywrightPage; } });
25
27
  var playwrightTest_1 = require("./playwrightTest");
26
28
  Object.defineProperty(exports, "playwrightTest", { enumerable: true, get: function () { return __importDefault(playwrightTest_1).default; } });
27
29
  var cypress_1 = require("./cypress");
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;;;;AAEpD,yCAIoB;AAHlB,4GAAA,eAAe,OAAA;AACf,gHAAA,mBAAmB,OAAA;AACnB,0GAAA,aAAa,OAAA;AAEf,+BAA6E;AAApE,kGAAA,UAAU,OAAA;AAAE,sGAAA,cAAc,OAAA;AAAE,sGAAA,cAAc,OAAA;AAAE,gGAAA,QAAQ,OAAA;AAC7D,yCAIoB;AAHlB,4GAAA,eAAe,OAAA;AACf,gHAAA,mBAAmB,OAAA;AACnB,0GAAA,aAAa,OAAA;AAEf,2CAIqB;AAHnB,8GAAA,gBAAgB,OAAA;AAChB,kHAAA,oBAAoB,OAAA;AACpB,4GAAA,cAAc,OAAA;AAEhB,mDAA4D;AAAnD,iIAAA,OAAO,OAAkB;AAClC,qCAAyC;AAAhC,wGAAA,aAAa,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;;;;AAEpD,yCAKoB;AAJlB,4GAAA,eAAe,OAAA;AACf,gHAAA,mBAAmB,OAAA;AACnB,0GAAA,aAAa,OAAA;AACb,8GAAA,iBAAiB,OAAA;AAEnB,+BAA6E;AAApE,kGAAA,UAAU,OAAA;AAAE,sGAAA,cAAc,OAAA;AAAE,sGAAA,cAAc,OAAA;AAAE,gGAAA,QAAQ,OAAA;AAC7D,yCAIoB;AAHlB,4GAAA,eAAe,OAAA;AACf,gHAAA,mBAAmB,OAAA;AACnB,0GAAA,aAAa,OAAA;AAEf,2CAKqB;AAJnB,8GAAA,gBAAgB,OAAA;AAChB,kHAAA,oBAAoB,OAAA;AACpB,4GAAA,cAAc,OAAA;AACd,gHAAA,kBAAkB,OAAA;AAEpB,mDAA4D;AAAnD,iIAAA,OAAO,OAAkB;AAClC,qCAAyC;AAAhC,wGAAA,aAAa,OAAA"}
@@ -1,7 +1,6 @@
1
- import type { LaunchOptions, Page } from 'playwright-core';
1
+ import type { LaunchOptions, Page, BrowserContext } from 'playwright-core';
2
2
  import { type Configuration } from './util';
3
3
  import Controller from './Controller';
4
- import { wrapBrowserContext } from './playwrightWrapping';
5
4
  /** Options for configuring Playwright and @axe-core/watcher. */
6
5
  export declare type Options = Configuration & LaunchOptions;
7
6
  /**
@@ -15,4 +14,8 @@ export declare class PlaywrightController extends Controller {
15
14
  constructor(driver: Page);
16
15
  protected executeScript<T>(fn: string | (() => Promise<T>), ...args: unknown[]): Promise<T>;
17
16
  }
18
- export { wrapBrowserContext as wrapPlaywright };
17
+ /**
18
+ * @deprecated `wrapPlaywright` is deprecated and may not work as intended. Please use `wrapPlaywrightPage` instead.
19
+ */
20
+ export declare const wrapPlaywright: (browserContext: BrowserContext, playwrightController: PlaywrightController) => BrowserContext;
21
+ export { wrapPage as wrapPlaywrightPage } from './playwrightWrapping';
@@ -23,11 +23,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
23
23
  return (mod && mod.__esModule) ? mod : { "default": mod };
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.wrapPlaywright = exports.PlaywrightController = exports.playwrightConfig = void 0;
26
+ exports.wrapPlaywrightPage = exports.wrapPlaywright = exports.PlaywrightController = exports.playwrightConfig = void 0;
27
27
  const util_1 = require("./util");
28
28
  const Controller_1 = __importDefault(require("./Controller"));
29
- const playwrightWrapping_1 = require("./playwrightWrapping");
30
- Object.defineProperty(exports, "wrapPlaywright", { enumerable: true, get: function () { return playwrightWrapping_1.wrapBrowserContext; } });
31
29
  /**
32
30
  * Creates a Playwright config that uses axe extension
33
31
  *
@@ -58,4 +56,23 @@ class PlaywrightController extends Controller_1.default {
58
56
  }
59
57
  }
60
58
  exports.PlaywrightController = PlaywrightController;
59
+ /**
60
+ * @deprecated `wrapPlaywright` is deprecated and may not work as intended. Please use `wrapPlaywrightPage` instead.
61
+ */
62
+ const wrapPlaywright = (
63
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
64
+ browserContext,
65
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
66
+ playwrightController) => {
67
+ throw new Error(`
68
+ \`wrapPlaywright\` is deprecated and may not work as intended. Please use \`wrapPlaywrightPage\` instead. Example:\n
69
+ let page = await browserContext.newPage()
70
+ const controller = new PlaywrightController(page)
71
+ // Use the new wrapped \`page\` object
72
+ page = wrapPlaywrightPage(page, controller)
73
+ `);
74
+ };
75
+ exports.wrapPlaywright = wrapPlaywright;
76
+ var playwrightWrapping_1 = require("./playwrightWrapping");
77
+ Object.defineProperty(exports, "wrapPlaywrightPage", { enumerable: true, get: function () { return playwrightWrapping_1.wrapPage; } });
61
78
  //# sourceMappingURL=playwright.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"playwright.js","sourceRoot":"","sources":["../src/playwright.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iCAKe;AACf,8DAAqC;AACrC,6DAAyD;AAgD1B,+FAhDtB,uCAAkB,OAgDkB;AA3C7C;;;;GAIG;AAEH,SAAgB,gBAAgB,CAAC,IAAa;IAC5C,MAAM,EAAE,GAAG,KAAgB,IAAI,EAAf,MAAM,UAAK,IAAI,EAAzB,OAAkB,CAAO,CAAA;IAC/B,IAAI,EAAE,IAAI,GAAG,EAAE,EAAE,GAAG,MAAM,CAAA;IAE1B,IAAA,qBAAc,EAAC,GAAG,CAAC,CAAA;IAEnB,IAAI,MAAM,CAAC,QAAQ,EAAE;QACnB,MAAM,IAAI,gCAAyB,EAAE,CAAA;KACtC;IAED,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,oBAAa,CAAC,CAAA;IAEjC,uCACK,MAAM,KACT,QAAQ,EAAE,KAAK,EACf,IAAI,IACL;AACH,CAAC;AAjBD,4CAiBC;AAED,MAAa,oBAAqB,SAAQ,oBAAU;IAGlD,YAAY,MAAY;QACtB,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEe,aAAa,CAC3B,EAA+B,EAC/B,GAAG,IAAe;;YAElB,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,IAAI,EAAE,CAAA;YACxB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAI,EAAE,EAAE,GAAG,CAAC,CAAA;YACrD,OAAO,MAAM,CAAA;QACf,CAAC;KAAA;CACF;AAhBD,oDAgBC"}
1
+ {"version":3,"file":"playwright.js","sourceRoot":"","sources":["../src/playwright.ts"],"names":[],"mappings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
59
  yield context.close();
60
60
  }),
61
- page: ({ page, context }, use) => __awaiter(void 0, void 0, void 0, function* () {
61
+ page: ({ page }, use) => __awaiter(void 0, void 0, void 0, function* () {
62
62
  controller = new playwright_1.PlaywrightController(page);
63
- (0, playwright_1.wrapPlaywright)(context, controller);
63
+ page = (0, playwright_1.wrapPlaywrightPage)(page, controller);
64
64
  yield use(page);
65
65
  })
66
66
  });
@@ -1 +1 @@
1
- {"version":3,"file":"playwrightTest.js","sourceRoot":"","sources":["../src/playwrightTest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAUA,6CAIqB;AACrB,iCAAsD;AAYtD;;;;;;GAMG;AAEH,MAAM,cAAc,GAAG,CAAC,OAAgB,EAAe,EAAE;IACvD,IAAI,UAAU,GAAgC,IAAI,CAAA;IAClD,MAAM,EAAE,GAAG,KAAgB,OAAO,EAAlB,MAAM,UAAK,OAAO;IAElC,4DAA4D;IAC5D,oDAAoD;MAH9C,OAAkB,CAAU,CAAA;IAElC,4DAA4D;IAC5D,oDAAoD;IACpD,IAAI,IAAU,CAAA;IACd,IAAI,QAAsC,CAAA;IAC1C,IAAI;QACF,CAAC;QAAA,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAA;KAC1D;IAAC,OAAO,KAAK,EAAE;QACd,MAAM,IAAI,KAAK,CACb,mCAAmC,GAAI,KAAe,CAAC,OAAO,CAC/D,CAAA;KACF;IAED,IAAA,qBAAc,EAAC,GAAG,CAAC,CAAA;IAEnB,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC;QACvB,0EAA0E;QAC1E,EAAE;QACF,mEAAmE;QACnE,EAAE;QACF,4CAA4C;QAC5C,OAAO,EAAE,CAAO,EAAE,EAAE,GAAG,EAAE,EAAE;YACzB,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,uBAAuB,CAAC,EAAE,kCACpD,MAAM,KACT,IAAI,E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ED,kBAAe,cAAc,CAAA"}
@@ -1,7 +1,6 @@
1
- import type { LaunchOptions, BrowserLaunchArgumentOptions, BrowserConnectOptions, Page } from 'puppeteer';
1
+ import type { LaunchOptions, BrowserLaunchArgumentOptions, BrowserConnectOptions, Page, BrowserContext } from 'puppeteer';
2
2
  import { type Configuration } from './util';
3
3
  import Controller from './Controller';
4
- export { wrapBrowserContext as wrapPuppeteer } from './puppeteerWrapping';
5
4
  declare type Options = LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions;
6
5
  /**
7
6
  * Creates a Puppeteer config that uses axe extension.
@@ -14,3 +13,8 @@ export declare class PuppeteerController extends Controller {
14
13
  constructor(driver: Page);
15
14
  protected executeScript<T>(fn: string | (() => Promise<T>), ...args: unknown[]): Promise<T>;
16
15
  }
16
+ /**
17
+ * @deprecated `wrapPuppeteer` is deprecated and may not work as intended. Please use `wrapPuppeteerPage` instead.
18
+ */
19
+ export declare const wrapPuppeteer: (browserContext: BrowserContext, controller: PuppeteerController) => BrowserContext;
20
+ export { wrapPage as wrapPuppeteerPage } from './puppeteerWrapping';
package/dist/puppeteer.js CHANGED
@@ -23,11 +23,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
23
23
  return (mod && mod.__esModule) ? mod : { "default": mod };
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.PuppeteerController = exports.puppeteerConfig = exports.wrapPuppeteer = void 0;
26
+ exports.wrapPuppeteerPage = exports.wrapPuppeteer = exports.PuppeteerController = exports.puppeteerConfig = void 0;
27
27
  const util_1 = require("./util");
28
28
  const Controller_1 = __importDefault(require("./Controller"));
29
- var puppeteerWrapping_1 = require("./puppeteerWrapping");
30
- Object.defineProperty(exports, "wrapPuppeteer", { enumerable: true, get: function () { return puppeteerWrapping_1.wrapBrowserContext; } });
31
29
  /**
32
30
  * Creates a Puppeteer config that uses axe extension.
33
31
  *
@@ -57,4 +55,23 @@ class PuppeteerController extends Controller_1.default {
57
55
  }
58
56
  }
59
57
  exports.PuppeteerController = PuppeteerController;
58
+ /**
59
+ * @deprecated `wrapPuppeteer` is deprecated and may not work as intended. Please use `wrapPuppeteerPage` instead.
60
+ */
61
+ const wrapPuppeteer = (
62
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
63
+ browserContext,
64
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
65
+ controller) => {
66
+ throw new Error(`
67
+ \`wrapPuppeteer\` is deprecated and may not work as intended. Please use \`wrapPuppeteerPage\` instead. Example:\n
68
+ let page = await browser.newPage()
69
+ const controller = new PuppeteerController(page)
70
+ // Use the new wrapped \`page\` object
71
+ page = wrapPuppeteerPage(page, controller)
72
+ `);
73
+ };
74
+ exports.wrapPuppeteer = wrapPuppeteer;
75
+ var puppeteerWrapping_1 = require("./puppeteerWrapping");
76
+ Object.defineProperty(exports, "wrapPuppeteerPage", { enumerable: true, get: function () { return puppeteerWrapping_1.wrapPage; } });
60
77
  //# sourceMappingURL=puppeteer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"puppeteer.js","sourceRoot":"","sources":["../src/puppeteer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,iCAKe;AACf,8DAAqC;AAErC,yDAAyE;AAAhE,kHAAA,kBAAkB,OAAiB;AAM5C;;;;GAIG;AAEH,SAAgB,eAAe,CAAC,IAA6B;IAC3D,MAAM,EAAE,GAAG,KAAgB,IAAI,EAAf,MAAM,UAAK,IAAI,EAAzB,OAAkB,CAAO,CAAA;IAC/B,IAAI,EAAE,IAAI,GAAG,EAAE,EAAE,GAAG,MAAM,CAAA;IAE1B,IAAA,qBAAc,EAAC,GAAG,CAAC,CAAA;IAEnB,IAAI,MAAM,CAAC,QAAQ,EAAE;QACnB,MAAM,IAAI,gCAAyB,EAAE,CAAA;KACtC;IAED,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,oBAAa,CAAC,CAAA;IAEjC,uCACK,MAAM,KACT,QAAQ,EAAE,KAAK,EACf,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