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-next.2d5fc7a2 to 3.16.0-next.2da9c996

dist/testutils.d.ts

2

dist/playwright.js

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

const writeVariables_1 = __importDefault(require("./utils/writeVariables"));
const assertVariablesWereWritten_1 = require("./utils/assertVariablesWereWritten");
function playwrightConfig(opts) {

@@ -31,2 +32,3 @@ const { axe, ...config } = opts;

super({ debugLoggerName: 'PlaywrightController' });
(0, assertVariablesWereWritten_1.assertVariablesWereWritten)('Playwright', 'playwrightConfig()');
this.driver = driver;

@@ -33,0 +35,0 @@ }

@@ -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;

22

dist/playwrightWrapping.js
"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 assertVariablesWereWritten_1 = require("./utils/assertVariablesWereWritten");
function headlessNotSupportedError(config) {

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

super({ debugLoggerName: 'PuppeteerController' });
(0, assertVariablesWereWritten_1.assertVariablesWereWritten)('Puppeteer', 'puppeteerConfig()');
this.driver = driver;

@@ -40,0 +42,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];

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

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

@@ -87,2 +88,3 @@ };

super({ debugLoggerName: 'WdioController' });
(0, assertVariablesWereWritten_1.assertVariablesWereWritten)('WDIO', 'wdioConfig()');
this.driver = driver;

@@ -89,0 +91,0 @@ }

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

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

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

super({ debugLoggerName: 'WebdriverController' });
(0, assertVariablesWereWritten_1.assertVariablesWereWritten)('WebDriver', 'webdriverConfig()');
this.driver = driver;

@@ -35,0 +37,0 @@ }

{
"name": "@axe-core/watcher",
"version": "3.16.0-next.2d5fc7a2",
"version": "3.16.0-next.2da9c996",
"description": "",

@@ -5,0 +5,0 @@ "license": "UNLICENSED",

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

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