@validate.qa/runner 1.0.100 → 1.0.102

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.
Files changed (31) hide show
  1. package/README.md +3 -0
  2. package/dist/{chunk-MBKGTELT.mjs → chunk-3JM6XTSZ.mjs} +1862 -530
  3. package/dist/{chunk-2XD63NU5.mjs → chunk-4WLP3RWN.mjs} +941 -86
  4. package/dist/{chunk-MHFP3QXU.mjs → chunk-5DFBEL72.mjs} +1 -1
  5. package/dist/{chunk-II7QW7MZ.mjs → chunk-BXLEPT4M.mjs} +31 -18
  6. package/dist/{chunk-MAO6ADAO.mjs → chunk-CBVHPYVJ.mjs} +62 -2
  7. package/dist/{chunk-5P4ANVDY.mjs → chunk-DN3O6EYT.mjs} +43073 -23357
  8. package/dist/{chunk-GIIIVO2W.mjs → chunk-E2RRAE27.mjs} +155 -11
  9. package/dist/chunk-E2VEMBQQ.mjs +291 -0
  10. package/dist/{chunk-HMUC3DKS.mjs → chunk-HJ6FKHMM.mjs} +2281 -2
  11. package/dist/{chunk-WDXLAZ2J.mjs → chunk-PWFWMVZU.mjs} +3 -2
  12. package/dist/{chunk-6NIT2CCH.mjs → chunk-ZZYBRIBT.mjs} +18 -12
  13. package/dist/cli.js +139723 -114754
  14. package/dist/cli.mjs +536 -247
  15. package/dist/credential-mcp-server.js +1761 -358
  16. package/dist/credential-mcp-server.mjs +3 -3
  17. package/dist/discovery-mcp-server.js +1874 -379
  18. package/dist/discovery-mcp-server.mjs +4 -4
  19. package/dist/dist-52M5RDZ6.mjs +17 -0
  20. package/dist/inbox-mcp-server.js +1902 -505
  21. package/dist/inbox-mcp-server.mjs +3 -3
  22. package/dist/route-seed-worker.js +3976 -356
  23. package/dist/route-seed-worker.mjs +14 -7
  24. package/dist/run-write-guard-preload.js +2908 -572
  25. package/dist/run-write-guard-preload.mjs +5 -285
  26. package/dist/run-write-guard.js +2908 -572
  27. package/dist/run-write-guard.mjs +3 -3
  28. package/dist/spec-driver.js +1 -1
  29. package/dist/spec-driver.mjs +1 -1
  30. package/package.json +4 -3
  31. package/dist/dist-DFNLMH6L.mjs +0 -16
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  dist_exports,
3
3
  init_dist
4
- } from "./chunk-MBKGTELT.mjs";
4
+ } from "./chunk-3JM6XTSZ.mjs";
5
5
  import {
6
6
  __commonJS,
7
7
  __require,
@@ -440,6 +440,7 @@ var require_route_manifest = __commonJS({
440
440
  exports.renderRouteManifestChecklist = renderRouteManifestChecklist;
441
441
  exports.renderRepoReadsChecklist = renderRepoReadsChecklist;
442
442
  exports.buildRepoReadsRouteAllowlist = buildRepoReadsRouteAllowlist;
443
+ var shared_1 = (init_dist(), __toCommonJS(dist_exports));
443
444
  var promises_1 = __require("fs/promises");
444
445
  var node_path_1 = __require("path");
445
446
  var untrusted_knowledge_js_1 = require_untrusted_knowledge();
@@ -494,7 +495,7 @@ var require_route_manifest = __commonJS({
494
495
  }
495
496
  function collapsePath(path) {
496
497
  const collapsed = path.replace(/\/{2,}/g, "/");
497
- return collapsed.length > 1 ? collapsed.replace(/\/+$/, "") : collapsed;
498
+ return collapsed.length > 1 ? (0, shared_1.stripTrailingSlashes)(collapsed) : collapsed;
498
499
  }
499
500
  function normalizeManifestPath(raw) {
500
501
  const text = str(raw, 500);
@@ -2,11 +2,11 @@ import {
2
2
  require_google_signin,
3
3
  require_harness_init_script,
4
4
  require_test_inbox_broker
5
- } from "./chunk-MAO6ADAO.mjs";
5
+ } from "./chunk-CBVHPYVJ.mjs";
6
6
  import {
7
7
  dist_exports,
8
8
  init_dist
9
- } from "./chunk-MBKGTELT.mjs";
9
+ } from "./chunk-3JM6XTSZ.mjs";
10
10
  import {
11
11
  __commonJS,
12
12
  __require,
@@ -33,6 +33,7 @@ var require_browser_config = __commonJS({
33
33
  exports.fullChromiumCloudLaunch = fullChromiumCloudLaunch;
34
34
  exports.chooseCloudBrowser = chooseCloudBrowser;
35
35
  exports.appTimezoneConfigLine = appTimezoneConfigLine;
36
+ exports.discoveryTimezoneId = discoveryTimezoneId;
36
37
  exports.getMCPBrowserConfig = getMCPBrowserConfig;
37
38
  exports.getPlaywrightLaunchOptions = getPlaywrightLaunchOptions;
38
39
  exports.getLaunchOptions = getLaunchOptions;
@@ -251,7 +252,7 @@ var require_browser_config = __commonJS({
251
252
  try {
252
253
  (0, fs_1.cpSync)(localStateSrc, (0, path_1.join)(tempDir, "Local State"));
253
254
  } catch (err) {
254
- throw new Error(`Cannot copy Chrome profile (${err instanceof Error ? err.message : String(err)}). Quit Google Chrome completely, or use getChromeUserDataDirSource() for seeding.`);
255
+ throw new Error(`Cannot copy Chrome profile (${err instanceof Error ? err.message : String(err)}). Quit Google Chrome completely, or use getChromeUserDataDirSource() for seeding.`, { cause: err });
255
256
  }
256
257
  }
257
258
  for (const file of essentialFiles) {
@@ -442,6 +443,10 @@ var require_browser_config = __commonJS({
442
443
  const zone = (0, shared_1.appTimezoneFromVariables)(vars);
443
444
  return zone ? `timezoneId: ${JSON.stringify(zone)},` : "";
444
445
  }
446
+ function discoveryTimezoneId(ctx) {
447
+ const vars = ctx.variableContext;
448
+ return (0, shared_1.appTimezoneFromVariables)(vars?.publicTestVariables) ?? (0, shared_1.appTimezoneFromVariables)(vars?.allTestVariables);
449
+ }
445
450
  function getMCPBrowserConfig(opts) {
446
451
  const userDataDir = opts?.forceIsolated ? null : getTestUserDataDir();
447
452
  const timezoneOption = opts?.timezoneId ? { timezoneId: opts.timezoneId } : {};
@@ -553,11 +558,13 @@ var require_proc_table = __commonJS({
553
558
  "../runner-core/dist/utils/proc-table.js"(exports) {
554
559
  "use strict";
555
560
  Object.defineProperty(exports, "__esModule", { value: true });
561
+ exports.PS_MAX_BUFFER = void 0;
556
562
  exports.isMissingBinaryError = isMissingBinaryError;
557
563
  exports.parseProcStat = parseProcStat;
558
564
  exports.readProcRssKb = readProcRssKb;
559
565
  exports.readProcTable = readProcTable;
560
566
  var node_fs_1 = __require("fs");
567
+ exports.PS_MAX_BUFFER = 32 * 1024 * 1024;
561
568
  var CLOCK_TICKS_PER_SECOND = 100;
562
569
  function isMissingBinaryError(error) {
563
570
  return error?.code === "ENOENT";
@@ -643,14 +650,13 @@ var require_kill_tree = __commonJS({
643
650
  var proc_table_js_1 = require_proc_table();
644
651
  var execFileAsync = (0, node_util_1.promisify)(node_child_process_1.execFile);
645
652
  var PS_TIMEOUT_MS = 2e3;
646
- var PS_BUFFER = 1024 * 1024;
647
653
  async function listProcessRows(timeoutMs = PS_TIMEOUT_MS) {
648
654
  const controller = new AbortController();
649
655
  const timer = setTimeout(() => controller.abort(), timeoutMs);
650
656
  timer.unref?.();
651
657
  try {
652
658
  const { stdout } = await execFileAsync("ps", ["-A", "-o", "pid=,ppid=,command="], {
653
- maxBuffer: PS_BUFFER,
659
+ maxBuffer: proc_table_js_1.PS_MAX_BUFFER,
654
660
  signal: controller.signal
655
661
  });
656
662
  const rows = [];
@@ -687,7 +693,7 @@ var require_kill_tree = __commonJS({
687
693
  timer.unref?.();
688
694
  try {
689
695
  const { stdout } = await execFileAsync("ps", ["-A", "-o", "pid=,ppid=,pgid=,stat="], {
690
- maxBuffer: PS_BUFFER,
696
+ maxBuffer: proc_table_js_1.PS_MAX_BUFFER,
691
697
  signal: controller.signal
692
698
  });
693
699
  const tree = /* @__PURE__ */ new Map();
@@ -797,15 +803,15 @@ var require_kill_tree = __commonJS({
797
803
  const rows = await listProcessRows(timeoutMs);
798
804
  return new Set(rows.filter((row) => row.ppid === parentPid && commandRegex.test(row.command)).map((row) => row.pid));
799
805
  } catch {
800
- return /* @__PURE__ */ new Set();
806
+ return null;
801
807
  }
802
808
  }
803
809
  var chromiumLaunchTail = Promise.resolve();
804
810
  async function launchWithChromiumRootPid(launch, options = {}) {
805
811
  const run = async () => {
806
- const prior = await snapshotMatchingChildren(process.pid, options.commandRegex, options.timeoutMs).catch(() => /* @__PURE__ */ new Set());
812
+ const prior = await snapshotMatchingChildren(process.pid, options.commandRegex, options.timeoutMs).catch(() => null);
807
813
  const value = await launch();
808
- const rootPid = await findNewChromiumChildPid(process.pid, prior, options).catch(() => null);
814
+ const rootPid = prior ? await findNewChromiumChildPid(process.pid, prior, options).catch(() => null) : null;
809
815
  return { value, rootPid };
810
816
  };
811
817
  const turn = chromiumLaunchTail.then(run);
@@ -1252,7 +1258,7 @@ var require_runs_dir = __commonJS({
1252
1258
  } catch (error) {
1253
1259
  if (error.code === "EEXIST" && resolvesFrom(runsDir) === own)
1254
1260
  return;
1255
- throw new Error(`Could not link ${link} to the runner's node_modules (${error.message}). Set RUNS_DIR to a writable folder outside node_modules that can resolve @playwright/test.`);
1261
+ throw new Error(`Could not link ${link} to the runner's node_modules (${error.message}). Set RUNS_DIR to a writable folder outside node_modules that can resolve @playwright/test.`, { cause: error });
1256
1262
  }
1257
1263
  }
1258
1264
  }
@@ -3178,7 +3184,7 @@ var require_survey_door_harvester = __commonJS({
3178
3184
  }
3179
3185
  if (!payload)
3180
3186
  continue;
3181
- const cleaned = payload.replace(/^\s*```(json)?\s*\n?/, "").replace(/\n?```\s*$/, "").trim();
3187
+ const cleaned = payload.replace(/^\s*```(json)?\s*\n?/i, "").replace(/\n?```\s*$/, "").trim();
3182
3188
  if (!cleaned)
3183
3189
  continue;
3184
3190
  try {
@@ -5736,9 +5742,9 @@ export {
5736
5742
  require_survey_door_harvester,
5737
5743
  require_self_account_guard,
5738
5744
  require_test_user_identity_guard,
5745
+ require_mcp_redaction_secrets,
5739
5746
  require_playwright_mcp_server,
5740
5747
  require_mcp_rooted_client,
5741
- require_mcp_redaction_secrets,
5742
5748
  require_proc_table,
5743
5749
  require_kill_tree,
5744
5750
  require_playwright_mcp_config,