Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@axe-core/watcher

Package Overview
Dependencies
Maintainers
0
Versions
897
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@axe-core/watcher - npm Package Compare versions

Comparing version 3.16.0 to 3.16.1-next.14350035

dist/utils/assertVariablesWereWritten.d.ts

6

dist/Controller.d.ts

@@ -5,2 +5,6 @@ import type { Debugger } from 'debug';

debugLoggerName: string;
/** The name of the integration. Used for variables assertion */
integrationName?: string;
/** Configuration function name. Use for variables assertion */
configurationFunction?: string;
}

@@ -11,3 +15,3 @@ declare abstract class Controller {

protected debugLogger: Debugger;
constructor({ debugLoggerName }: ControllerParams);
constructor({ debugLoggerName, integrationName, configurationFunction }: ControllerParams);
start(): Promise<void>;

@@ -14,0 +18,0 @@ stop(): Promise<void>;

85

dist/Controller.js

@@ -6,57 +6,62 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const updateAutoAnalyze_1 = __importDefault(require("./utils/updateAutoAnalyze"));
const readVariables_1 = __importDefault(require("./utils/readVariables"));
const sendResultsToServer_1 = __importDefault(require("./sendResultsToServer"));
const createDebugger_1 = __importDefault(require("./createDebugger"));
const assertVariablesWereWritten_1 = require("./utils/assertVariablesWereWritten");
class Controller {
constructor({ debugLoggerName }) {
this.isStopped = false;
constructor({ debugLoggerName, integrationName, configurationFunction }) {
(0, assertVariablesWereWritten_1.assertVariablesWereWritten)(integrationName, configurationFunction);
const variables = (0, readVariables_1.default)();
this.isStopped = !(variables === null || variables === void 0 ? void 0 : variables.auto_analyze);
this.debugLogger = (0, createDebugger_1.default)(debugLoggerName);
}
async start() {
(0, updateAutoAnalyze_1.default)(true);
this.debugLogger(`Start: Invoked`);
this.isStopped = false;
await this.executeScript(() => {
if (!['http:', 'https:', 'file:'].includes(window.location.protocol)) {
return Promise.resolve();
}
return new Promise(resolve => {
const fn = () => {
window.removeEventListener('axe:start-auto-mode-done', fn);
resolve();
};
window.addEventListener('axe:start-auto-mode-done', fn);
const event = new CustomEvent('axe:start-auto-mode');
window.dispatchEvent(event);
});
});
return Promise.resolve();
}
async stop() {
(0, updateAutoAnalyze_1.default)(false);
this.isStopped = true;
await this.executeScript(() => {
this.debugLogger(`Stop: Invoked (${this.isStopped ? 'not analyzing' : 'may analyze implicitly'})`);
if (this.isStopped) {
return Promise.resolve();
}
const result = await this.executeScript(() => {
if (!['http:', 'https:', 'file:'].includes(window.location.protocol)) {
return Promise.resolve();
return Promise.resolve({ message: 'Skipped - Invalid protocol' });
}
return new Promise(resolve => {
const fn = () => {
window.removeEventListener('axe:stop-auto-mode-done', fn);
resolve();
const fn = (event) => {
window.removeEventListener('axe:manual-mode-analyze-done', fn);
resolve(event.detail);
};
window.addEventListener('axe:stop-auto-mode-done', fn);
const event = new CustomEvent('axe:stop-auto-mode');
window.addEventListener('axe:manual-mode-analyze-done', fn);
const event = new CustomEvent('axe:manual-mode-analyze', {
detail: { userRequestedAnalyze: false }
});
window.dispatchEvent(event);
});
});
this.debugLogger(`Stop: ${result.message}`);
this.isStopped = true;
}
async analyze({ __Method, __UserRequestedAnalyze = true } = {}) {
this.debugLogger(`Analyze: Invoked${__Method ? ` - ${__Method}` : ''}`);
this.debugLogger(`Analyze: Invoked${__Method ? ` - ${__Method}` : ''}`, {
isStopped: this.isStopped,
userRequestedAnalyze: __UserRequestedAnalyze
});
if (this.isStopped && !__UserRequestedAnalyze) {
this.debugLogger('Analyze: Skipped', {
isStopped: this.isStopped,
__UserRequestedAnalyze
userRequestedAnalyze: __UserRequestedAnalyze
});
return;
}
const result = await this.executeScript((userRequestedAnalyze) => {
const result = await this.executeScript(({ userRequestedAnalyze, isStopped }) => {
if (!['http:', 'https:', 'file:'].includes(window.location.protocol)) {
if (userRequestedAnalyze) {
return Promise.resolve({
message: `Cannot perform analysis - invalid protocol: ${window.location.protocol}`,
error: true
});
}
return Promise.resolve({ message: 'Skipped - Invalid protocol' });

@@ -71,12 +76,18 @@ }

const event = new CustomEvent('axe:manual-mode-analyze', {
detail: { userRequestedAnalyze }
detail: { userRequestedAnalyze, isStopped }
});
window.dispatchEvent(event);
});
}, __UserRequestedAnalyze);
}, {
userRequestedAnalyze: __UserRequestedAnalyze,
isStopped: this.isStopped
});
this.debugLogger(`Analyze: ${result.message}`);
if (result.error) {
throw new Error(result.message);
}
}
async flush() {
this.debugLogger('Flush: Invoked (may analyze implicitly)');
const results = await this.executeScript(() => {
this.debugLogger(`Flush: Invoked (${this.isStopped ? 'auto-analysis stopped' : 'may analyze implicitly'})`);
const results = await this.executeScript((isStopped) => {
if (!['http:', 'https:', 'file:'].includes(window.location.protocol)) {

@@ -97,6 +108,8 @@ return Promise.resolve([]);

window.addEventListener('axe:flush-end', onFlushEnd);
const event = new CustomEvent('axe:flush-start');
const event = new CustomEvent('axe:flush-start', {
detail: { isStopped }
});
window.dispatchEvent(event);
});
});
}, this.isStopped);
this.debugLogger(`Flush: Received ${results.length} results`);

@@ -103,0 +116,0 @@ await (0, sendResultsToServer_1.default)({

import { type Configuration } from './utils/writeVariables';
export declare const cypressConfigRunFlag = "__AXE_WATCHER_CYPRESS_CONFIG_RUN";
export declare const cypressConfigAutoAnalyzeFlag = "__AXE_WATCHER_AUTO_ANALYZE";
/**

@@ -3,0 +5,0 @@ * Create a Cypress config that uses the axe Watcher extension.

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.cypressConfig = void 0;
exports.cypressConfig = exports.cypressConfigAutoAnalyzeFlag = exports.cypressConfigRunFlag = void 0;
const sendResultsToServer_1 = __importDefault(require("./sendResultsToServer"));

@@ -15,4 +15,6 @@ const EventForwarder_1 = __importDefault(require("./EventForwarder"));

const createDebugger_1 = __importDefault(require("./createDebugger"));
const checkUserArgs_1 = require("./utils/checkUserArgs");
const debugLogger = (0, createDebugger_1.default)('CypressController');
const cypressConfigRunFlag = '__AXE_WATCHER_CYPRESS_CONFIG_RUN';
exports.cypressConfigRunFlag = '__AXE_WATCHER_CYPRESS_CONFIG_RUN';
exports.cypressConfigAutoAnalyzeFlag = '__AXE_WATCHER_AUTO_ANALYZE';
const cypressConfig = (config) => {

@@ -36,3 +38,3 @@ var _a;

userConfig.e2e.env = Object.assign({}, userConfig.e2e.env, {
[cypressConfigRunFlag]: true
[exports.cypressConfigRunFlag]: true
});

@@ -42,3 +44,3 @@ }

userConfig.env = Object.assign({}, userConfig.env, {
[cypressConfigRunFlag]: true
[exports.cypressConfigRunFlag]: true
});

@@ -51,2 +53,5 @@ }

}
userConfig.env = Object.assign({}, userConfig.env, {
[exports.cypressConfigAutoAnalyzeFlag]: axe.autoAnalyze === undefined ? true : axe.autoAnalyze
});
return {

@@ -63,3 +68,3 @@ ...userConfig,

userNodeEventConfig.env = Object.assign({}, userNodeEventConfig.env, {
[cypressConfigRunFlag]: true
[exports.cypressConfigRunFlag]: true
});

@@ -93,2 +98,3 @@ }

const existingArgs = launchOptions.args;
(0, checkUserArgs_1.checkUserArgs)(existingArgs);
launchOptions.args = (0, mergeChromeArgs_1.default)(existingArgs, {

@@ -95,0 +101,0 @@ disableOtherExtensions: false

@@ -5,3 +5,4 @@ "use strict";

const cypressConfigRunFlag = '__AXE_WATCHER_CYPRESS_CONFIG_RUN';
let isStopped = false;
const cypressConfigAutoAnalyzeFlag = '__AXE_WATCHER_AUTO_ANALYZE';
let isStopped = !Cypress.env(cypressConfigAutoAnalyzeFlag);
exports.WRAPPED_COMMANDS = [

@@ -79,3 +80,5 @@ 'blur',

function axeWatcherFlushCommand() {
logDebugAxeWatcher({ message: 'Flush: Invoked (may analyze implicitly)' });
logDebugAxeWatcher({
message: `Flush: Invoked (${isStopped ? 'will not' : 'may'} analyze implicitly)`
});
cy.window().then(win => {

@@ -97,3 +100,5 @@ if (!shouldAnalyzeLocation(win.location)) {

win.addEventListener('axe:result', onAxeResult);
const event = new CustomEvent('axe:flush-start');
const event = new CustomEvent('axe:flush-start', {
detail: { isStopped }
});
win.dispatchEvent(event);

@@ -109,13 +114,28 @@ }).then(results => {

};
function axeWatcherAnalyzeCommand({ __Method, __UserRequestedAnalyze = true } = {}) {
function axeWatcherAnalyzeCommand(subject, { __Method, __UserRequestedAnalyze = true } = {}) {
const userRequestedAnalyze = __UserRequestedAnalyze;
const message = userRequestedAnalyze
? 'User requested analysis'
: `Invoked${__Method ? ` - ${__Method}` : ''}`;
logDebugAxeWatcher({
message: `Analyze: Invoked${__Method ? ` - ${__Method}` : ''}`
message: `Analyze: ${message}`
});
const userRequestedAnalyze = __UserRequestedAnalyze;
cy.window().then(win => {
if (!shouldAnalyzeLocation(win.location)) {
return Promise.resolve({ message: `Skipped - Invalid protocol` });
logDebugAxeWatcher({
message: `Analyze: Skipped - invalid protocol`
});
if (userRequestedAnalyze) {
return Promise.reject(new Error(`Cannot perform manual analysis - invalid protocol: ${win.location.protocol}`));
}
return Promise.resolve({
message: `Skipped - Invalid protocol`,
subject
});
}
if (isStopped && !userRequestedAnalyze) {
return Promise.resolve({ message: `Skipped (Manual mode)` });
logDebugAxeWatcher({
message: `Analyze: Skipped - manual mode`
});
return Promise.resolve({ message: `Skipped (Manual mode)`, subject });
}

@@ -125,3 +145,3 @@ return new Promise(resolve => {

win.removeEventListener('axe:manual-mode-analyze-done', fn);
resolve(event.detail);
resolve({ message: event.detail.message, subject });
};

@@ -135,38 +155,41 @@ win.addEventListener('axe:manual-mode-analyze-done', fn);

logDebugAxeWatcher({ message: `Analyze: ${result === null || result === void 0 ? void 0 : result.message}` });
if (result === null || result === void 0 ? void 0 : result.subject) {
return result.subject;
}
});
});
}
function axeWatcherStartCommand() {
cy.window().then(win => {
if (!shouldAnalyzeLocation(win.location)) {
return Promise.resolve();
}
return new Promise(resolve => {
const fn = () => {
win.removeEventListener('axe:start-auto-mode-done', fn);
resolve();
};
win.addEventListener('axe:start-auto-mode-done', fn);
const event = new CustomEvent('axe:start-auto-mode');
win.dispatchEvent(event);
}).then(() => {
isStopped = false;
});
function axeWatcherStartCommand(subject) {
cy.window().then(() => {
logDebugAxeWatcher({ message: `Start: Invoked` });
isStopped = false;
return Promise.resolve(subject);
});
}
function axeWatcherStopCommand() {
function axeWatcherStopCommand(subject) {
logDebugAxeWatcher({ message: `Stop: Invoked` });
cy.window().then(win => {
if (!shouldAnalyzeLocation(win.location)) {
return Promise.resolve();
logDebugAxeWatcher({
message: `Stop: Skipped - invalid protocol`
});
return Promise.resolve({
message: `Skipped - Invalid protocol`,
subject
});
}
return new Promise(resolve => {
const fn = () => {
win.removeEventListener('axe:stop-auto-mode-done', fn);
resolve();
const fn = (event) => {
win.removeEventListener('axe:manual-mode-analyze-done', fn);
resolve({ message: event.detail.message, subject });
};
win.addEventListener('axe:stop-auto-mode-done', fn);
const event = new CustomEvent('axe:stop-auto-mode');
win.addEventListener('axe:manual-mode-analyze-done', fn);
const event = new CustomEvent('axe:manual-mode-analyze');
win.dispatchEvent(event);
}).then(() => {
}).then(result => {
logDebugAxeWatcher({ message: `Stop: ${result === null || result === void 0 ? void 0 : result.message}` });
isStopped = true;
if (result === null || result === void 0 ? void 0 : result.subject) {
return result.subject;
}
});

@@ -176,11 +199,11 @@ });

if (!doesCypressCommandExist('axeAnalyze')) {
Cypress.Commands.add('axeAnalyze', axeWatcherAnalyzeCommand);
Cypress.Commands.add('axeWatcherAnalyze', { prevSubject: 'optional' }, axeWatcherAnalyzeCommand);
}
Cypress.Commands.add('axeFlush', axeWatcherFlushCommand);
Cypress.Commands.add('axeStop', axeWatcherStopCommand);
Cypress.Commands.add('axeStart', axeWatcherStartCommand);
Cypress.Commands.add('axeWatcherAnalyze', axeWatcherAnalyzeCommand);
Cypress.Commands.add('axeWatcherStart', axeWatcherStartCommand);
Cypress.Commands.add('axeWatcherStop', axeWatcherStopCommand);
Cypress.Commands.add('axeStop', { prevSubject: 'optional' }, axeWatcherStopCommand);
Cypress.Commands.add('axeStart', { prevSubject: 'optional' }, axeWatcherStartCommand);
Cypress.Commands.add('axeWatcherAnalyze', { prevSubject: 'optional' }, axeWatcherAnalyzeCommand);
Cypress.Commands.add('axeWatcherStart', { prevSubject: 'optional' }, axeWatcherStartCommand);
Cypress.Commands.add('axeWatcherStop', { prevSubject: 'optional' }, axeWatcherStopCommand);
Cypress.Commands.add('axeWatcherFlush', axeWatcherFlushCommand);
//# sourceMappingURL=cypressCommands.js.map

@@ -6,3 +6,3 @@ /*! Copyright Deque 2021-2023 All Rights Reserved */

export { playwrightConfig, PlaywrightController, wrapPlaywright, wrapPlaywrightPage } from './playwright';
export { default as playwrightTest } from './playwrightTest';
export { default as playwrightTest, type PageWithAxeWatcher as PlaywrightTestPageWithAxeWatcher } from './playwrightTest';
export { cypressConfig } from './cypress';

@@ -12,5 +12,7 @@ "use strict";

const writeVariables_1 = __importDefault(require("./utils/writeVariables"));
const checkUserArgs_1 = require("./utils/checkUserArgs");
function playwrightConfig(opts) {
const { axe, ...config } = opts;
let { args = [] } = config;
(0, checkUserArgs_1.checkUserArgs)(args);
(0, writeVariables_1.default)(axe);

@@ -30,3 +32,7 @@ if (config.headless) {

constructor(driver) {
super({ debugLoggerName: 'PlaywrightController' });
super({
debugLoggerName: 'PlaywrightController',
integrationName: 'Playwright',
configurationFunction: 'playwrightConfig()'
});
this.driver = driver;

@@ -33,0 +39,0 @@ }

@@ -1,4 +0,10 @@

import type { TestType, PlaywrightTestArgs, PlaywrightTestOptions, PlaywrightWorkerArgs, PlaywrightWorkerOptions, Expect } from '@playwright/test';
import { type Options } from './playwright';
type Test = TestType<PlaywrightTestArgs & PlaywrightTestOptions, PlaywrightWorkerArgs & PlaywrightWorkerOptions>;
import type { TestType, Page, PlaywrightTestArgs, PlaywrightTestOptions, PlaywrightWorkerArgs, PlaywrightWorkerOptions, Expect } from '@playwright/test';
import { PlaywrightController, type Options } from './playwright';
export type PageWithAxeWatcher = Page & {
axeWatcher: PlaywrightController;
};
type Test = TestType<PlaywrightTestArgs & PlaywrightTestOptions & Fixtures, PlaywrightWorkerArgs & PlaywrightWorkerOptions>;
type Fixtures = {
page: PageWithAxeWatcher;
};
interface ReturnValue {

@@ -5,0 +11,0 @@ test: Test;

@@ -9,2 +9,3 @@ "use strict";

const writeVariables_1 = __importDefault(require("./utils/writeVariables"));
const checkUserArgs_1 = require("./utils/checkUserArgs");
const playwrightTest = (options) => {

@@ -22,2 +23,3 @@ let controller = null;

}
(0, checkUserArgs_1.checkUserArgs)(config.args || []);
(0, writeVariables_1.default)(axe);

@@ -36,10 +38,12 @@ const test = base.extend({

page: async ({ page }, use) => {
controller = new playwright_1.PlaywrightController(page);
page = (0, playwright_1.wrapPlaywrightPage)(page, controller);
controller = page.axeWatcher;
if (!controller) {
controller = new playwright_1.PlaywrightController(page);
page.axeWatcher = controller;
page = (0, playwright_1.wrapPlaywrightPage)(page, controller);
}
await use(page);
await controller.flush();
}
});
test.afterEach(async () => {
await (controller === null || controller === void 0 ? void 0 : controller.flush());
});
const expect = test.expect;

@@ -46,0 +50,0 @@ return { test, expect };

@@ -12,4 +12,5 @@ import type { Browser, BrowserContext, ElementHandle, Frame, FrameLocator, JSHandle, Keyboard, Locator, Mouse, Page, Touchscreen } from 'playwright-core';

export declare const wrapJSHandle: (jsHandle: PossiblyWrapped<JSHandle>, controller: PlaywrightController) => JSHandle;
export declare const wrapSmartHandle: (smartHandle: PossiblyWrapped<JSHandle | ElementHandle>, controller: PlaywrightController) => JSHandle | ElementHandle;
export declare const wrapKeyboard: (keyboard: PossiblyWrapped<Keyboard>, controller: PlaywrightController) => Keyboard;
export declare const wrapMouse: (mouse: PossiblyWrapped<Mouse>, controller: PlaywrightController) => Mouse;
export declare const wrapTouchscreen: (touchscreen: PossiblyWrapped<Touchscreen>, controller: PlaywrightController) => Touchscreen;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.wrapTouchscreen = exports.wrapMouse = exports.wrapKeyboard = exports.wrapJSHandle = exports.wrapLocator = exports.wrapFrameLocator = exports.wrapFrame = exports.wrapElementHandle = exports.wrapPage = exports.wrapBrowser = exports.wrapBrowserContext = void 0;
exports.wrapTouchscreen = exports.wrapMouse = exports.wrapKeyboard = exports.wrapSmartHandle = exports.wrapJSHandle = exports.wrapLocator = exports.wrapFrameLocator = exports.wrapFrame = exports.wrapElementHandle = exports.wrapPage = exports.wrapBrowser = exports.wrapBrowserContext = void 0;
const proxyHandlers_1 = require("./utils/proxyHandlers");

@@ -100,2 +100,5 @@ const wrapBrowserContext = (browserContext, controller) => {

};
case 'addScriptTag':
case 'addStyleTag':
return (0, proxyHandlers_1.proxiedGetFuncWithAnalyzeWrapped)(target, prop, controller);
case 'waitForSelector':

@@ -111,4 +114,2 @@ return async (...args) => {

case '$eval':
case 'addScriptTag':
case 'addStyleTag':
case 'bringToFront':

@@ -149,3 +150,3 @@ case 'check':

const handle = await target[prop](...args);
return (0, exports.wrapJSHandle)(handle, controller);
return (0, exports.wrapSmartHandle)(handle, controller);
};

@@ -281,3 +282,3 @@ case 'frame':

const el = await target.evaluateHandle(...args);
return (0, exports.wrapJSHandle)(el, controller);
return (0, exports.wrapSmartHandle)(el, controller);
};

@@ -440,3 +441,3 @@ case 'childFrames':

const handle = await target.evaluateHandle(...args);
return (0, exports.wrapJSHandle)(handle, controller);
return (0, exports.wrapSmartHandle)(handle, controller);
};

@@ -499,3 +500,3 @@ case 'and':

const handle = await target.evaluateHandle(...args);
return (0, exports.wrapJSHandle)(handle, controller);
return (0, exports.wrapSmartHandle)(handle, controller);
};

@@ -511,2 +512,9 @@ default:

exports.wrapJSHandle = wrapJSHandle;
const wrapSmartHandle = (smartHandle, controller) => {
if ('$' in smartHandle) {
return (0, exports.wrapElementHandle)(smartHandle, controller);
}
return (0, exports.wrapJSHandle)(smartHandle, controller);
};
exports.wrapSmartHandle = wrapSmartHandle;
const wrapKeyboard = (keyboard, controller) => {

@@ -513,0 +521,0 @@ if ((0, proxyHandlers_1.isWrapped)(keyboard)) {

@@ -12,2 +12,3 @@ "use strict";

const writeVariables_1 = __importDefault(require("./utils/writeVariables"));
const checkUserArgs_1 = require("./utils/checkUserArgs");
function headlessNotSupportedError(config) {

@@ -25,2 +26,3 @@ if (!(config === null || config === void 0 ? void 0 : config.headless) || config.headless === 'new') {

let { args = [] } = config;
(0, checkUserArgs_1.checkUserArgs)(args);
(0, writeVariables_1.default)(axe);

@@ -38,3 +40,7 @@ headlessNotSupportedError(config);

constructor(driver) {
super({ debugLoggerName: 'PuppeteerController' });
super({
debugLoggerName: 'PuppeteerController',
integrationName: 'Puppeteer',
configurationFunction: 'puppeteerConfig()'
});
this.driver = driver;

@@ -41,0 +47,0 @@ }

@@ -1,2 +0,3 @@

import type { AxeResults, ElementContext, RunOptions } from 'axe-core';
import type { AxeResults, ElementContext } from 'axe-core';
import type { RunOptions } from './utils/validateAxeRunOptions';
import type debug from 'debug';

@@ -3,0 +4,0 @@ /**

import type Controller from '../Controller';
import { type PlaywrightController } from '../playwright';
declare const kWrapped: unique symbol;

@@ -11,3 +12,4 @@ export type PossiblyWrapped<T> = T & {

export declare const proxiedGetFuncWithAnalyze: <T>(target: T, prop: keyof T, controller: Controller) => (...args: unknown[]) => Promise<unknown>;
export declare const proxiedGetFuncWithAnalyzeWrapped: <T>(target: T, prop: keyof T, controller: PlaywrightController) => (...args: unknown[]) => Promise<unknown>;
export declare const proxiedGetWithoutAnalyze: <T>(target: T, prop: keyof T) => unknown;
export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.proxiedGetWithoutAnalyze = exports.proxiedGetFuncWithAnalyze = exports.markAsWrapped = exports.isWrapped = void 0;
exports.proxiedGetWithoutAnalyze = exports.proxiedGetFuncWithAnalyzeWrapped = exports.proxiedGetFuncWithAnalyze = exports.markAsWrapped = exports.isWrapped = void 0;
const playwrightWrapping_1 = require("../playwrightWrapping");
const kWrapped = Symbol('axe watcher wrapped');

@@ -29,2 +30,14 @@ const isWrapped = (o) => {

exports.proxiedGetFuncWithAnalyze = proxiedGetFuncWithAnalyze;
const proxiedGetFuncWithAnalyzeWrapped = (target, prop, controller) => async (...args) => {
await controller.analyze({
__Method: prop,
__UserRequestedAnalyze: false
});
const result = await target[prop].call(target, ...args);
if (!result) {
return null;
}
return (0, playwrightWrapping_1.wrapElementHandle)(result, controller);
};
exports.proxiedGetFuncWithAnalyzeWrapped = proxiedGetFuncWithAnalyzeWrapped;
const proxiedGetWithoutAnalyze = (target, prop) => {

@@ -31,0 +44,0 @@ const original = target[prop];

@@ -1,2 +0,2 @@

import type { RunOptions as AxeRunOptions } from 'axe-core';
import type { RunOptions as AxeRunOptions } from './runOptions';
export type RunOptions = Pick<AxeRunOptions, 'runOnly' | 'rules' | 'ancestry'>;

@@ -3,0 +3,0 @@ /**

@@ -15,2 +15,3 @@ "use strict";

const mergeChromeArgs_1 = __importDefault(require("./utils/mergeChromeArgs"));
const checkUserArgs_1 = require("./utils/checkUserArgs");
const noop = () => {

@@ -26,2 +27,3 @@ };

}
(0, checkUserArgs_1.checkUserArgs)(args);
return {

@@ -62,2 +64,3 @@ ...options,

}
(0, checkUserArgs_1.checkUserArgs)(args);
chromeOpts.args = (0, mergeChromeArgs_1.default)(args, { disableOtherExtensions: false });

@@ -88,3 +91,7 @@ const { onPrepare = noop, onComplete = noop } = config;

constructor(driver) {
super({ debugLoggerName: 'WdioController' });
super({
debugLoggerName: 'WdioController',
integrationName: 'WDIO',
configurationFunction: 'wdioConfig()'
});
this.driver = driver;

@@ -91,0 +98,0 @@ }

@@ -12,2 +12,3 @@ "use strict";

const mergeChromeArgs_1 = __importDefault(require("./utils/mergeChromeArgs"));
const checkUserArgs_1 = require("./utils/checkUserArgs");
var webdriverWrapping_1 = require("./webdriverWrapping");

@@ -22,2 +23,3 @@ Object.defineProperty(exports, "wrapWebdriver", { enumerable: true, get: function () { return webdriverWrapping_1.wrapDriver; } });

const existingArgs = (((_a = opts === null || opts === void 0 ? void 0 : opts.options_) === null || _a === void 0 ? void 0 : _a.args) || []);
(0, checkUserArgs_1.checkUserArgs)(existingArgs);
opts.options_.args = (0, mergeChromeArgs_1.default)(existingArgs, {

@@ -33,3 +35,7 @@ disableOtherExtensions: false

constructor(driver) {
super({ debugLoggerName: 'WebdriverController' });
super({
debugLoggerName: 'WebdriverController',
integrationName: 'WebDriver',
configurationFunction: 'webdriverConfig()'
});
this.driver = driver;

@@ -36,0 +42,0 @@ }

@@ -1,2 +0,2 @@

/*! axe v4.10.0
/*! axe v4.10.2
* Copyright (c) 2015 - 2024 Deque Systems, Inc.

@@ -3,0 +3,0 @@ *

{
"name": "@axe-core/watcher",
"version": "3.16.0",
"version": "3.16.1-next.14350035",
"description": "",

@@ -9,3 +9,4 @@ "license": "UNLICENSED",

"dist",
"extension"
"extension",
"LICENSES-3RD-PARTY.md"
],

@@ -29,3 +30,3 @@ "scripts": {

"devDependencies": {
"@deque/advanced-rule-recorder": "^1.23.0-next.c02eede3",
"@deque/advanced-rule-recorder": "^1.25.0-next.44cf60d4",
"@playwright/test": "^1.45.0",

@@ -46,3 +47,3 @@ "@types/body-parser": "^1.19.2",

"@wdio/types": "^9.0.4",
"axe-core": "^4.10.0",
"axe-core": "^4.10.2",
"axe-test-fixtures": "github:dequelabs/axe-test-fixtures#v1",

@@ -55,3 +56,3 @@ "body-parser": "^1.20.1",

"express": "^4.18.2",
"jsdom": "^24.0.0",
"jsdom": "^25.0.1",
"mocha": "^10.4.0",

@@ -66,3 +67,3 @@ "morgan": "^1.10.0",

"selenium-webdriver": "^4.11.1",
"sinon": "^18.0.0",
"sinon": "^19.0.2",
"tempy": "1",

@@ -73,2 +74,2 @@ "ts-node": "^10.9.1",

}
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc