@validate.qa/runner 1.0.101 → 1.0.103
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/README.md +3 -0
- package/dist/{chunk-SN3PN4G4.mjs → chunk-36AWDKPL.mjs} +6 -2
- package/dist/{chunk-CYWHPXNZ.mjs → chunk-7SH3COMQ.mjs} +1 -1
- package/dist/{chunk-BBTK6OX6.mjs → chunk-BECCGMU4.mjs} +383 -11
- package/dist/{chunk-4SZC5ZX3.mjs → chunk-CG75I3ZZ.mjs} +25477 -5374
- package/dist/{chunk-TPU42VH2.mjs → chunk-CMM4DOXC.mjs} +10 -5
- package/dist/{chunk-M3VZGHZQ.mjs → chunk-NNJYKR3O.mjs} +22 -11
- package/dist/{chunk-IGXGSDE3.mjs → chunk-OTKJZIOD.mjs} +1298 -384
- package/dist/{chunk-CO5KHIVX.mjs → chunk-TK5KEGNW.mjs} +1 -1
- package/dist/{chunk-FQUH2PU2.mjs → chunk-WVLBQDFP.mjs} +140 -7
- package/dist/{chunk-2OKZY3WN.mjs → chunk-YI3ZC2XI.mjs} +2 -2
- package/dist/{chunk-XZUUBMP3.mjs → chunk-YIM746WO.mjs} +1 -1
- package/dist/cli.js +140692 -118903
- package/dist/cli.mjs +362 -108
- package/dist/credential-mcp-server.js +1402 -350
- package/dist/credential-mcp-server.mjs +3 -3
- package/dist/discovery-mcp-server.js +1330 -401
- package/dist/discovery-mcp-server.mjs +4 -4
- package/dist/dist-2G7YTNH5.mjs +17 -0
- package/dist/inbox-mcp-server.js +1676 -629
- package/dist/inbox-mcp-server.mjs +3 -3
- package/dist/route-seed-worker.js +1244 -330
- package/dist/route-seed-worker.mjs +4 -4
- package/dist/run-write-guard-preload.js +1622 -332
- package/dist/run-write-guard-preload.mjs +4 -4
- package/dist/run-write-guard.js +1622 -332
- package/dist/run-write-guard.mjs +3 -3
- package/dist/spec-driver.js +1 -1
- package/dist/spec-driver.mjs +1 -1
- package/package.json +3 -2
- package/dist/dist-VTPBY2C4.mjs +0 -17
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
dist_exports,
|
|
3
3
|
init_dist
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-OTKJZIOD.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__esm,
|
|
@@ -67455,23 +67455,79 @@ var require_harness_init_script = __commonJS({
|
|
|
67455
67455
|
exports.isHarnessInitConsoleLine = isHarnessInitConsoleLine;
|
|
67456
67456
|
exports.stripHarnessConsoleEntries = stripHarnessConsoleEntries;
|
|
67457
67457
|
var node_crypto_1 = __require("crypto");
|
|
67458
|
+
var shared_1 = (init_dist(), __toCommonJS(dist_exports));
|
|
67458
67459
|
exports.HARNESS_INIT_SOURCE_URL = `vqa-harness-init-${(0, node_crypto_1.randomBytes)(4).toString("hex")}.js`;
|
|
67460
|
+
var TRANSITION_LOOP_LIMIT = 8;
|
|
67461
|
+
var TRANSITION_LOOP_WINDOW_MS = 1e3;
|
|
67459
67462
|
function withHarnessSourceUrl(content) {
|
|
67460
67463
|
return `${content}
|
|
67461
67464
|
//# sourceURL=${exports.HARNESS_INIT_SOURCE_URL}`;
|
|
67462
67465
|
}
|
|
67463
67466
|
function buildAnimationDisablingSource(opts) {
|
|
67467
|
+
const finishTransitions = opts.finishTransitions ?? (0, shared_1.parseBoolFlag)(process.env.HARNESS_FINISH_CSS_TRANSITIONS);
|
|
67468
|
+
const css = finishTransitions ? "*, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; }" : "*, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; transition-delay: 0s !important; animation-delay: 0s !important; }";
|
|
67464
67469
|
return withHarnessSourceUrl(`(() => {
|
|
67470
|
+
// An error the browser throws for the page's own value, passed through one of the wrappers below (a bad
|
|
67471
|
+
// adoptedStyleSheets list, animate timing it refuses), is the app's: stock Playwright reports it as a page error.
|
|
67472
|
+
// Thrown from our wrapper, its top frame would be this script, and the console evidence drops such an error as
|
|
67473
|
+
// the runner's own. Our frames come out of its stack, so the app's call is the top frame, as without the harness.
|
|
67474
|
+
// (Under Error.stackTraceLimit the stack then has one or two frames fewer than stock's; the top frame is right.)
|
|
67475
|
+
const own = ${JSON.stringify(exports.HARNESS_INIT_SOURCE_URL)};
|
|
67476
|
+
const appError = (e) => {
|
|
67477
|
+
try {
|
|
67478
|
+
const stack = e !== null && typeof e === 'object' ? e.stack : undefined;
|
|
67479
|
+
if (typeof stack === 'string' && stack.includes(own)) e.stack = stack.split('\\n').filter((line) => !line.includes(own)).join('\\n');
|
|
67480
|
+
} catch (x) {}
|
|
67481
|
+
return e;
|
|
67482
|
+
};
|
|
67465
67483
|
// Layer 1: CSS transitions and animations - instant, not removed
|
|
67466
67484
|
// (duration 0s preserves final state; 'none' would prevent keyframes from completing)
|
|
67485
|
+
// The rule goes in a constructed stylesheet on document.adoptedStyleSheets, which adds no node to the DOM:
|
|
67486
|
+
// a <style> element changed what the test sees (locator('style') and 'head > *' counts, document.styleSheets,
|
|
67487
|
+
// an iframe's empty head), so a spec stock Playwright passes failed. The <style> is the fallback for a
|
|
67488
|
+
// browser with no constructable stylesheets.
|
|
67489
|
+
let adopted = false;
|
|
67467
67490
|
try {
|
|
67491
|
+
if (typeof CSSStyleSheet === 'function' && typeof Document === 'function' && 'adoptedStyleSheets' in Document.prototype) {
|
|
67492
|
+
const sheet = new CSSStyleSheet();
|
|
67493
|
+
sheet.replaceSync(${JSON.stringify(css)});
|
|
67494
|
+
document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];
|
|
67495
|
+
adopted = true;
|
|
67496
|
+
// A page that assigns the list without spreading it (document.adoptedStyleSheets = [mine]) would drop the
|
|
67497
|
+
// harness sheet and bring animations back: keep it, last, on every assignment. A bad value (not iterable,
|
|
67498
|
+
// or a list the browser refuses) goes to the browser, which throws its own error as the app's (appError).
|
|
67499
|
+
try {
|
|
67500
|
+
const desc = Object.getOwnPropertyDescriptor(Document.prototype, 'adoptedStyleSheets');
|
|
67501
|
+
if (desc && desc.get && desc.set) {
|
|
67502
|
+
Object.defineProperty(document, 'adoptedStyleSheets', {
|
|
67503
|
+
configurable: true,
|
|
67504
|
+
enumerable: desc.enumerable,
|
|
67505
|
+
get() { return desc.get.call(document); },
|
|
67506
|
+
set(value) {
|
|
67507
|
+
try {
|
|
67508
|
+
if (value === null || (typeof value !== 'object' && typeof value !== 'function') || typeof value[Symbol.iterator] !== 'function') {
|
|
67509
|
+
desc.set.call(document, value);
|
|
67510
|
+
return;
|
|
67511
|
+
}
|
|
67512
|
+
const list = [...value];
|
|
67513
|
+
desc.set.call(document, list.includes(sheet) ? list : [...list, sheet]);
|
|
67514
|
+
} catch (e) {
|
|
67515
|
+
throw appError(e);
|
|
67516
|
+
}
|
|
67517
|
+
},
|
|
67518
|
+
});
|
|
67519
|
+
}
|
|
67520
|
+
} catch (e) {}
|
|
67521
|
+
}
|
|
67522
|
+
} catch (e) {}
|
|
67523
|
+
if (!adopted) try {
|
|
67468
67524
|
let applied = false;
|
|
67469
67525
|
const apply = () => {
|
|
67470
67526
|
if (applied) return true;
|
|
67471
67527
|
const root = document.head || document.documentElement;
|
|
67472
67528
|
if (!root) return false;
|
|
67473
67529
|
const style = document.createElement('style');
|
|
67474
|
-
style.textContent =
|
|
67530
|
+
style.textContent = ${JSON.stringify(css)};
|
|
67475
67531
|
root.appendChild(style);
|
|
67476
67532
|
applied = true;
|
|
67477
67533
|
return true;
|
|
@@ -67493,19 +67549,96 @@ ${opts.hideWebdriver ? `
|
|
|
67493
67549
|
try {
|
|
67494
67550
|
Object.defineProperty(navigator, 'webdriver', { get: () => undefined });
|
|
67495
67551
|
} catch (e) {}
|
|
67552
|
+
` : ""}
|
|
67553
|
+
${finishTransitions ? `
|
|
67554
|
+
// Layer 1b: CSS transitions run, and are finished as they start, so transitionend fires.
|
|
67555
|
+
// - finish() is deferred to a task: called inside the transitionrun dispatch (or a microtask of it) after a
|
|
67556
|
+
// real input event, Chromium finishes the transition but never fires its transitionstart/transitionend.
|
|
67557
|
+
// - setTimeout and performance.now are the ones present when this script runs, before the page's own
|
|
67558
|
+
// scripts: fake timers the page installs later cannot hold a finish back.
|
|
67559
|
+
// - The subtree is walked only for a pseudo-element's transition (its animations hang off the element).
|
|
67560
|
+
// - An element whose same transition restarts more than ${TRANSITION_LOOP_LIMIT} times within ${TRANSITION_LOOP_WINDOW_MS} ms (an app that starts it again on
|
|
67561
|
+
// each transitionend: carousel, pulse) is left to run at its own pace from then on, instead of cycling at
|
|
67562
|
+
// frame rate for the rest of the run.
|
|
67563
|
+
try {
|
|
67564
|
+
const st = setTimeout;
|
|
67565
|
+
const perf = typeof performance === 'object' && performance && typeof performance.now === 'function' ? performance : null;
|
|
67566
|
+
const now = perf ? perf.now.bind(perf) : Date.now;
|
|
67567
|
+
const seen = new WeakMap();
|
|
67568
|
+
const looping = (el, key) => {
|
|
67569
|
+
let byKey = seen.get(el);
|
|
67570
|
+
if (!byKey) { byKey = new Map(); seen.set(el, byKey); }
|
|
67571
|
+
const t = now();
|
|
67572
|
+
let s = byKey.get(key);
|
|
67573
|
+
if (s && s.loop) return true;
|
|
67574
|
+
if (!s || t - s.since > ${TRANSITION_LOOP_WINDOW_MS}) { s = { n: 0, since: t, loop: false }; byKey.set(key, s); }
|
|
67575
|
+
s.n += 1;
|
|
67576
|
+
if (s.n > ${TRANSITION_LOOP_LIMIT}) s.loop = true;
|
|
67577
|
+
return s.loop;
|
|
67578
|
+
};
|
|
67579
|
+
window.addEventListener('transitionrun', (ev) => {
|
|
67580
|
+
try {
|
|
67581
|
+
const el = ev && ev.target;
|
|
67582
|
+
if (!el || typeof el.getAnimations !== 'function' || typeof CSSTransition !== 'function') return;
|
|
67583
|
+
const pseudo = ev.pseudoElement || '';
|
|
67584
|
+
if (looping(el, ev.propertyName + '|' + pseudo)) return;
|
|
67585
|
+
for (const a of (pseudo ? el.getAnimations({ subtree: true }) : el.getAnimations())) {
|
|
67586
|
+
if (a instanceof CSSTransition && a.transitionProperty === ev.propertyName && a.effect
|
|
67587
|
+
&& a.effect.target === el && (a.effect.pseudoElement || '') === pseudo) {
|
|
67588
|
+
st(() => { try { a.finish(); } catch (e) {} }, 0);
|
|
67589
|
+
}
|
|
67590
|
+
}
|
|
67591
|
+
} catch (e) {}
|
|
67592
|
+
}, true);
|
|
67593
|
+
} catch (e) {}
|
|
67496
67594
|
` : ""}
|
|
67497
67595
|
// Layer 2: Web Animations API - make instant instead of no-op
|
|
67498
67596
|
// (preserves animation completion callbacks that app code may depend on)
|
|
67597
|
+
// Timing the browser refuses (a negative, NaN or non-'auto' duration, a delay that is not finite) goes to the
|
|
67598
|
+
// browser as the page wrote it: zeroed, it raised no TypeError, so a page error stock Playwright reports was hidden.
|
|
67599
|
+
// Options that are not a plain object (an array, a class instance) keep what they inherit: the browser reads
|
|
67600
|
+
// every timing member through the prototype chain, and an array's inherited fill() is a TypeError. A copy kept
|
|
67601
|
+
// only own properties, so the error was hidden; a proxy overrides only duration and delay.
|
|
67499
67602
|
try {
|
|
67500
67603
|
const origAnimate = Element.prototype.animate;
|
|
67604
|
+
const refused = (options) => {
|
|
67605
|
+
try {
|
|
67606
|
+
if (options === undefined || options === null) return false;
|
|
67607
|
+
if (typeof options !== 'object' && typeof options !== 'function') return !(Number(options) >= 0);
|
|
67608
|
+
const duration = options.duration;
|
|
67609
|
+
if (duration !== undefined && duration !== 'auto' && !(typeof duration === 'number' && duration >= 0)) return true;
|
|
67610
|
+
const delay = options.delay;
|
|
67611
|
+
return delay !== undefined && !Number.isFinite(Number(delay));
|
|
67612
|
+
} catch (e) {
|
|
67613
|
+
return true;
|
|
67614
|
+
}
|
|
67615
|
+
};
|
|
67616
|
+
const instant = (options) => {
|
|
67617
|
+
try {
|
|
67618
|
+
// Plain: its prototype is null or an Object.prototype (of any frame's realm), so it inherits no timing.
|
|
67619
|
+
const proto = Object.getPrototypeOf(options);
|
|
67620
|
+
if (proto !== null && Object.getPrototypeOf(proto) !== null && typeof Proxy === 'function') {
|
|
67621
|
+
// The proxy's target is an empty object, not the options: a target with a read-only, non-configurable
|
|
67622
|
+
// duration or delay (a frozen instance, Object.create with a descriptor) would make returning 0 a proxy
|
|
67623
|
+
// invariant TypeError. Every other member is read from the options, the options as the receiver.
|
|
67624
|
+
return new Proxy({}, { get: (_target, key) => (key === 'duration' || key === 'delay' ? 0 : Reflect.get(options, key)) });
|
|
67625
|
+
}
|
|
67626
|
+
} catch (e) {}
|
|
67627
|
+
return Object.assign({}, options, { duration: 0, delay: 0 });
|
|
67628
|
+
};
|
|
67501
67629
|
if (typeof origAnimate === 'function') {
|
|
67502
67630
|
Element.prototype.animate = function (keyframes, options) {
|
|
67503
|
-
|
|
67504
|
-
options
|
|
67505
|
-
|
|
67506
|
-
|
|
67631
|
+
try {
|
|
67632
|
+
if (refused(options)) return origAnimate.call(this, keyframes, options);
|
|
67633
|
+
if (typeof options === 'object' && options !== null) {
|
|
67634
|
+
options = instant(options);
|
|
67635
|
+
} else {
|
|
67636
|
+
options = 0; // covers number, undefined, and any other type
|
|
67637
|
+
}
|
|
67638
|
+
return origAnimate.call(this, keyframes, options);
|
|
67639
|
+
} catch (e) {
|
|
67640
|
+
throw appError(e);
|
|
67507
67641
|
}
|
|
67508
|
-
return origAnimate.call(this, keyframes, options);
|
|
67509
67642
|
};
|
|
67510
67643
|
}
|
|
67511
67644
|
} catch (e) {}
|