sniff-qa 0.9.0 → 0.9.2

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 (172) hide show
  1. package/.claude-plugin/plugin.json +2 -2
  2. package/CHANGELOG.md +56 -0
  3. package/NOTICE +7 -4
  4. package/README.md +70 -20
  5. package/THIRD-PARTY-NOTICES.md +1800 -0
  6. package/dist/{accessibility-JXRMWF5Y.js → accessibility-42JOUOGH.js} +8 -2
  7. package/dist/{anthropic-api-7PHYF6PN.js → anthropic-api-VSG2X6FS.js} +7 -5
  8. package/dist/assert-budget-WG4BRCLX.js +10 -0
  9. package/dist/{caps-G3ZGJI7B.js → caps-YZPFNPIN.js} +3 -2
  10. package/dist/{chunk-VEI2O6AK.js → chunk-33JL2AB5.js} +14 -6
  11. package/dist/{chunk-64FUDSRY.js → chunk-3E4W4H6S.js} +8 -5
  12. package/dist/{chunk-T72SLMTY.js → chunk-3NR2K5B3.js} +2 -1
  13. package/dist/chunk-3ROWRVZE.js +422 -0
  14. package/dist/{chunk-MYWWSM3V.js → chunk-3YFE3H23.js} +2 -1
  15. package/dist/{chunk-MMISGY2Q.js → chunk-4F6ZXOPE.js} +2 -1
  16. package/dist/chunk-A4TTASVS.js +27862 -0
  17. package/dist/{chunk-IXDUD2UG.js → chunk-AA744N7E.js} +2 -1
  18. package/dist/chunk-DZMX3VT2.js +267 -0
  19. package/dist/{chunk-NG2IGCAK.js → chunk-FR5QCJLH.js} +2 -1
  20. package/dist/{chunk-GV27IOMC.js → chunk-GC47B6MM.js} +2 -1
  21. package/dist/chunk-HP4TY3UY.js +80 -0
  22. package/dist/chunk-LZAPYYNR.js +4595 -0
  23. package/dist/{chunk-ZM6MGWO4.js → chunk-NBJLMLDA.js} +2 -1
  24. package/dist/chunk-RAGYZ54R.js +15480 -0
  25. package/dist/{chunk-GX36BPK7.js → chunk-RSGFFRXQ.js} +2 -2
  26. package/dist/chunk-SOBWDC35.js +38 -0
  27. package/dist/{chunk-7BLJCICM.js → chunk-US4HFUCH.js} +3 -2
  28. package/dist/chunk-YM22FEIA.js +5807 -0
  29. package/dist/{ci-ISCWZJD3.js → ci-F6FUXT3O.js} +5 -3
  30. package/dist/{classifier-MWQMQ727.js → classifier-5FQ2FBTO.js} +3 -1
  31. package/dist/{claude-code-GJPWO6DN.js → claude-code-J43C22IR.js} +7 -5
  32. package/dist/{claude-exploration-provider-XOVJPJ23.js → claude-exploration-provider-EWQNNE7D.js} +3 -2
  33. package/dist/cli/index.js +69 -31
  34. package/dist/compiler-sfc.cjs-JX56AWNS.js +48568 -0
  35. package/dist/crawl-KN7SW753.js +26 -0
  36. package/dist/{crawl-command-JHZN4GK7.js → crawl-command-Y45FIXNK.js} +7 -6
  37. package/dist/{cross-reference-MHNPSLEN.js → cross-reference-XOOBW6UZ.js} +3 -1
  38. package/dist/{dev-server-detector-XQ5AYPDT.js → dev-server-detector-FMFVKDJR.js} +3 -1
  39. package/dist/{discover-QKGMYPHK.js → discover-HA63UA4K.js} +20 -18
  40. package/dist/dist-3CYER35S.js +8 -0
  41. package/dist/{domain-UQ34YE4B.js → domain-FU3WIW64.js} +45 -30
  42. package/dist/{edge-cases-ZADKDZHL.js → edge-cases-B6IV3IKK.js} +3 -1
  43. package/dist/{element-extractor-OZTFBVKZ.js → element-extractor-QAG4MRUO.js} +18 -6
  44. package/dist/engine-AXB5O4ZH.js +39 -0
  45. package/dist/{ensure-browsers-5NAQQMEC.js → ensure-browsers-TNMHMLRS.js} +59 -12
  46. package/dist/errors-NWB25P4K.js +8 -0
  47. package/dist/esm-IMWPYLSN.js +3469 -0
  48. package/dist/{fix-R33D34NP.js → fix-IXOEHAOS.js} +12 -5
  49. package/dist/{flakiness-OLJAY7CS.js → flakiness-7SSSM4SW.js} +3 -2
  50. package/dist/flakiness-CBKV4U54.js +12 -0
  51. package/dist/{formatter-4VI3ZX5Y.js → formatter-N4CC7SCM.js} +29 -22
  52. package/dist/{framework-detector-ISSM2Q2I.js → framework-detector-4ZVHNT7N.js} +3 -1
  53. package/dist/generator-GGJYWYI2.js +8 -0
  54. package/dist/index.js +9 -6
  55. package/dist/{init-IQKT4ANC.js → init-POX5ZJ6V.js} +4 -2
  56. package/dist/json-4VOVHDQG.js +10 -0
  57. package/dist/{junit-GL44ATRR.js → junit-V24COOSR.js} +3 -1
  58. package/dist/{llm-VJAI6H6G.js → llm-TZ2WZGRZ.js} +3 -1
  59. package/dist/{loader-Z2DUGG5Z.js → loader-AMM63AOJ.js} +12 -3
  60. package/dist/mcp/server.js +13035 -72
  61. package/dist/{model-SP6HJN6J.js → model-BL2AID5Q.js} +6 -5
  62. package/dist/page-hooks-SECSGZR6.js +14 -0
  63. package/dist/{page-state-extractor-GYYLYRFR.js → page-state-extractor-AP4FQVLY.js} +3 -1
  64. package/dist/{performance-7HWKY5O2.js → performance-JVEYVBTV.js} +9 -3
  65. package/dist/{persistence-XLFJ5EY4.js → persistence-SHKJVSIS.js} +5 -4
  66. package/dist/{persistence-KTCRIGHU.js → persistence-SQ6QT3HP.js} +3 -1
  67. package/dist/picocolors-3W2AX5TJ.js +6 -0
  68. package/dist/pixelmatch-GATIVDQX.js +188 -0
  69. package/dist/png-HTC2G4ZG.js +2093 -0
  70. package/dist/{prompt-builder-JT3GQBYP.js → prompt-builder-EI2BFKLZ.js} +3 -1
  71. package/dist/{provider-MMQ6EIBV.js → provider-O3UOALQH.js} +14 -12
  72. package/dist/{quality-run-KJMBBAQT.js → quality-run-CTLX5YA5.js} +12 -10
  73. package/dist/{redaction-CHAIVPCF.js → redaction-QNBV5QZ3.js} +4 -3
  74. package/dist/{registry-5XCXUAYJ.js → registry-JBBTSD7I.js} +3 -1
  75. package/dist/{repo-analyzer-4OURSITY.js → repo-analyzer-4XITIIAF.js} +6 -4
  76. package/dist/{report-SDZWX25B.js → report-4UVJL7QV.js} +3 -1
  77. package/dist/{report-XK2MCX2N.js → report-BOVSPRCR.js} +8 -6
  78. package/dist/{response-parser-PUGNWF7S.js → response-parser-GHVJSYXQ.js} +3 -2
  79. package/dist/{route-discoverer-QBZCRQLJ.js → route-discoverer-ZXYJQIYE.js} +15 -8
  80. package/dist/{runner-RDVVIGBU.js → runner-DOLCFA3S.js} +10 -5
  81. package/dist/{runner-QHSYX7J2.js → runner-MCSDHFLN.js} +12 -7
  82. package/dist/{runner-AXZXNWYH.js → runner-MUBXHOIG.js} +10 -4
  83. package/dist/{scenarios-I7YYVTD2.js → scenarios-T2U6ZDRL.js} +3 -1
  84. package/dist/sdk-FQKA5HSQ.js +7184 -0
  85. package/dist/{source-5LS2B7TN.js → source-T5MHBY5G.js} +14 -7
  86. package/dist/{tiebreak-L5UFNKU2.js → tiebreak-SXBXPT7B.js} +3 -1
  87. package/dist/{unified-OEGLPOGE.js → unified-NUR2X5JV.js} +23 -21
  88. package/dist/{update-baselines-JYKUUIZG.js → update-baselines-TMERPIDV.js} +4 -2
  89. package/dist/version-FEHABGAH.js +10 -0
  90. package/dist/{visual-EUZG2STF.js → visual-XHFPFQFX.js} +5 -3
  91. package/dist/{workflow-template-6DADGPHA.js → workflow-template-7C5CCK67.js} +13 -7
  92. package/dist/{write-report-Y4UPVXUO.js → write-report-6Q4MXBYD.js} +5 -4
  93. package/package.json +19 -10
  94. package/dist/accessibility-JXRMWF5Y.js.map +0 -1
  95. package/dist/anthropic-api-7PHYF6PN.js.map +0 -1
  96. package/dist/assert-budget-NBF3JYM7.js +0 -9
  97. package/dist/assert-budget-NBF3JYM7.js.map +0 -1
  98. package/dist/caps-G3ZGJI7B.js.map +0 -1
  99. package/dist/chunk-64FUDSRY.js.map +0 -1
  100. package/dist/chunk-7BLJCICM.js.map +0 -1
  101. package/dist/chunk-GV27IOMC.js.map +0 -1
  102. package/dist/chunk-GX36BPK7.js.map +0 -1
  103. package/dist/chunk-IXDUD2UG.js.map +0 -1
  104. package/dist/chunk-MMISGY2Q.js.map +0 -1
  105. package/dist/chunk-MYWWSM3V.js.map +0 -1
  106. package/dist/chunk-NG2IGCAK.js.map +0 -1
  107. package/dist/chunk-T72SLMTY.js.map +0 -1
  108. package/dist/chunk-VEI2O6AK.js.map +0 -1
  109. package/dist/chunk-ZM6MGWO4.js.map +0 -1
  110. package/dist/ci-ISCWZJD3.js.map +0 -1
  111. package/dist/classifier-MWQMQ727.js.map +0 -1
  112. package/dist/claude-code-GJPWO6DN.js.map +0 -1
  113. package/dist/claude-exploration-provider-XOVJPJ23.js.map +0 -1
  114. package/dist/cli/index.js.map +0 -1
  115. package/dist/crawl-XPHT3KIZ.js +0 -23
  116. package/dist/crawl-XPHT3KIZ.js.map +0 -1
  117. package/dist/crawl-command-JHZN4GK7.js.map +0 -1
  118. package/dist/cross-reference-MHNPSLEN.js.map +0 -1
  119. package/dist/dev-server-detector-XQ5AYPDT.js.map +0 -1
  120. package/dist/discover-QKGMYPHK.js.map +0 -1
  121. package/dist/domain-UQ34YE4B.js.map +0 -1
  122. package/dist/edge-cases-ZADKDZHL.js.map +0 -1
  123. package/dist/element-extractor-OZTFBVKZ.js.map +0 -1
  124. package/dist/ensure-browsers-5NAQQMEC.js.map +0 -1
  125. package/dist/errors-RFEOR527.js +0 -7
  126. package/dist/errors-RFEOR527.js.map +0 -1
  127. package/dist/fix-R33D34NP.js.map +0 -1
  128. package/dist/flakiness-OLJAY7CS.js.map +0 -1
  129. package/dist/flakiness-OVC7KGN2.js +0 -11
  130. package/dist/flakiness-OVC7KGN2.js.map +0 -1
  131. package/dist/formatter-4VI3ZX5Y.js.map +0 -1
  132. package/dist/framework-detector-ISSM2Q2I.js.map +0 -1
  133. package/dist/generator-AFHVMWC3.js +0 -7
  134. package/dist/generator-AFHVMWC3.js.map +0 -1
  135. package/dist/index.js.map +0 -1
  136. package/dist/init-IQKT4ANC.js.map +0 -1
  137. package/dist/json-YDWEB33Q.js +0 -8
  138. package/dist/json-YDWEB33Q.js.map +0 -1
  139. package/dist/junit-GL44ATRR.js.map +0 -1
  140. package/dist/llm-VJAI6H6G.js.map +0 -1
  141. package/dist/loader-Z2DUGG5Z.js.map +0 -1
  142. package/dist/mcp/server.js.map +0 -1
  143. package/dist/model-SP6HJN6J.js.map +0 -1
  144. package/dist/page-hooks-6RALVZB5.js +0 -13
  145. package/dist/page-hooks-6RALVZB5.js.map +0 -1
  146. package/dist/page-state-extractor-GYYLYRFR.js.map +0 -1
  147. package/dist/performance-7HWKY5O2.js.map +0 -1
  148. package/dist/persistence-KTCRIGHU.js.map +0 -1
  149. package/dist/persistence-XLFJ5EY4.js.map +0 -1
  150. package/dist/prompt-builder-JT3GQBYP.js.map +0 -1
  151. package/dist/provider-MMQ6EIBV.js.map +0 -1
  152. package/dist/quality-run-KJMBBAQT.js.map +0 -1
  153. package/dist/redaction-CHAIVPCF.js.map +0 -1
  154. package/dist/registry-5XCXUAYJ.js.map +0 -1
  155. package/dist/repo-analyzer-4OURSITY.js.map +0 -1
  156. package/dist/report-SDZWX25B.js.map +0 -1
  157. package/dist/report-XK2MCX2N.js.map +0 -1
  158. package/dist/response-parser-PUGNWF7S.js.map +0 -1
  159. package/dist/route-discoverer-QBZCRQLJ.js.map +0 -1
  160. package/dist/runner-AXZXNWYH.js.map +0 -1
  161. package/dist/runner-QHSYX7J2.js.map +0 -1
  162. package/dist/runner-RDVVIGBU.js.map +0 -1
  163. package/dist/scenarios-I7YYVTD2.js.map +0 -1
  164. package/dist/source-5LS2B7TN.js.map +0 -1
  165. package/dist/tiebreak-L5UFNKU2.js.map +0 -1
  166. package/dist/unified-OEGLPOGE.js.map +0 -1
  167. package/dist/update-baselines-JYKUUIZG.js.map +0 -1
  168. package/dist/version-FLE7ZHDX.js +0 -7
  169. package/dist/version-FLE7ZHDX.js.map +0 -1
  170. package/dist/visual-EUZG2STF.js.map +0 -1
  171. package/dist/workflow-template-6DADGPHA.js.map +0 -1
  172. package/dist/write-report-Y4UPVXUO.js.map +0 -1
@@ -1,3 +1,5 @@
1
+ import { createRequire as __sniffCreateRequire } from 'node:module'; const require = __sniffCreateRequire(import.meta.url);
2
+
1
3
  // src/core/errors.ts
2
4
  var SniffError = class extends Error {
3
5
  code;
@@ -11,4 +13,3 @@ var SniffError = class extends Error {
11
13
  export {
12
14
  SniffError
13
15
  };
14
- //# sourceMappingURL=chunk-IXDUD2UG.js.map
@@ -0,0 +1,267 @@
1
+ import { createRequire as __sniffCreateRequire } from 'node:module'; const require = __sniffCreateRequire(import.meta.url);
2
+ import {
3
+ getPackageJson,
4
+ getVersion
5
+ } from "./chunk-33JL2AB5.js";
6
+
7
+ // src/core/engine.ts
8
+ import {
9
+ existsSync,
10
+ mkdirSync,
11
+ readFileSync,
12
+ renameSync,
13
+ rmSync,
14
+ writeFileSync
15
+ } from "fs";
16
+ import { homedir } from "os";
17
+ import { dirname, join } from "path";
18
+ import { fileURLToPath, pathToFileURL } from "url";
19
+ import { spawn } from "child_process";
20
+ var ENGINE_PACKAGES = [
21
+ "playwright",
22
+ "playwright-core",
23
+ "@axe-core/playwright",
24
+ "lighthouse",
25
+ "chrome-launcher"
26
+ ];
27
+ var ENGINE_SIZE_MB = 200;
28
+ var COMPLETE_MARKER = ".sniff-engine-complete";
29
+ function engineInstallCommand(projects = []) {
30
+ const tail = projects.length > 0 ? ` ${projects.join(" ")}` : "";
31
+ return `npx -y sniff-qa@${getVersion()} install${tail}`;
32
+ }
33
+ var EngineMissingError = class extends Error {
34
+ constructor(packageName) {
35
+ super(
36
+ `The browser engine (${packageName}) is not installed yet. sniff downloads it once, about ${ENGINE_SIZE_MB} MB. Run: ${engineInstallCommand()}`
37
+ );
38
+ this.packageName = packageName;
39
+ this.name = "EngineMissingError";
40
+ }
41
+ packageName;
42
+ code = "SNIFF_ENGINE_MISSING";
43
+ };
44
+ function engineDir(env = process.env) {
45
+ if (env.SNIFF_ENGINE_DIR) return env.SNIFF_ENGINE_DIR;
46
+ const cacheRoot = env.XDG_CACHE_HOME || (process.platform === "win32" ? env.LOCALAPPDATA || join(homedir(), "AppData", "Local") : join(homedir(), ".cache"));
47
+ return join(cacheRoot, "sniff-qa", "engine", getVersion());
48
+ }
49
+ function engineInstalledAt(dir = engineDir()) {
50
+ return existsSync(join(dir, COMPLETE_MARKER));
51
+ }
52
+ function findPackageDir(name, fromDir) {
53
+ let dir = fromDir;
54
+ for (; ; ) {
55
+ const candidate = join(dir, "node_modules", ...name.split("/"));
56
+ if (existsSync(join(candidate, "package.json"))) return candidate;
57
+ const parent = dirname(dir);
58
+ if (parent === dir) return null;
59
+ dir = parent;
60
+ }
61
+ }
62
+ var HERE = dirname(fileURLToPath(import.meta.url));
63
+ function engineStatus(options = {}) {
64
+ const fromDir = options.fromDir ?? HERE;
65
+ if (ENGINE_PACKAGES.every((name) => findPackageDir(name, fromDir) !== null))
66
+ return "resolved";
67
+ return engineInstalledAt(options.dir ?? engineDir()) ? "engine-dir" : "missing";
68
+ }
69
+ function isModuleNotFound(err, name) {
70
+ const e = err;
71
+ if (!e || e.code !== "ERR_MODULE_NOT_FOUND" && e.code !== "MODULE_NOT_FOUND")
72
+ return false;
73
+ return String(e.message ?? "").includes(name);
74
+ }
75
+ async function importFromEngineDir(name, dir = engineDir()) {
76
+ const loader = await import(
77
+ /* @vite-ignore */
78
+ pathToFileURL(join(dir, "load.mjs")).href
79
+ );
80
+ return loader.load(name);
81
+ }
82
+ async function loadEngine(name, importer, options = {}) {
83
+ try {
84
+ return await importer();
85
+ } catch (err) {
86
+ if (!isModuleNotFound(err, name)) throw err;
87
+ const dir = options.dir ?? engineDir();
88
+ if (!engineInstalledAt(dir)) throw new EngineMissingError(name);
89
+ return importFromEngineDir(name, dir);
90
+ }
91
+ }
92
+ function engineDependencies(pkg = getPackageJson()) {
93
+ const peers = pkg?.engineDependencies ?? {};
94
+ const out = {};
95
+ for (const name of ENGINE_PACKAGES) {
96
+ const range = peers[name];
97
+ if (!range)
98
+ throw new Error(
99
+ `sniff's package.json does not list ${name} in peerDependencies`
100
+ );
101
+ out[name] = range;
102
+ }
103
+ return out;
104
+ }
105
+ function npmChildEnv(env = process.env) {
106
+ const out = {};
107
+ const drop = /* @__PURE__ */ new Set([
108
+ "npm_config_global",
109
+ "npm_config_location",
110
+ "npm_config_prefix",
111
+ "npm_config_package",
112
+ "npm_config_call",
113
+ "npm_config_yes",
114
+ "npm_config_save",
115
+ "npm_config_dry_run",
116
+ "npm_config_omit",
117
+ "npm_config_include",
118
+ "npm_config_production",
119
+ "npm_command",
120
+ "npm_lifecycle_event",
121
+ "npm_lifecycle_script"
122
+ ]);
123
+ for (const [k, v] of Object.entries(env)) {
124
+ if (!drop.has(k.toLowerCase())) out[k] = v;
125
+ }
126
+ return out;
127
+ }
128
+ var runNpm = (args, cwd, log) => new Promise((resolve, reject) => {
129
+ const execpath = process.env.npm_execpath;
130
+ const viaNode = !!execpath && /npm-cli\.(c?js)$/.test(execpath);
131
+ const child = spawn(
132
+ viaNode ? process.execPath : "npm",
133
+ viaNode ? [execpath, ...args] : args,
134
+ {
135
+ cwd,
136
+ env: npmChildEnv(),
137
+ stdio: ["ignore", "pipe", "pipe"],
138
+ shell: !viaNode && process.platform === "win32"
139
+ }
140
+ );
141
+ let tail = "";
142
+ const onData = (chunk) => {
143
+ const text = chunk.toString();
144
+ tail = (tail + text).slice(-4e3);
145
+ for (const line of text.split(/\r?\n/)) if (line.trim()) log(line);
146
+ };
147
+ child.stdout.on("data", onData);
148
+ child.stderr.on("data", onData);
149
+ child.on("error", reject);
150
+ child.on("close", (code) => {
151
+ if (code === 0) resolve();
152
+ else
153
+ reject(
154
+ new Error(
155
+ `npm ${args.join(" ")} exited with code ${code}
156
+ ${tail.trim()}`
157
+ )
158
+ );
159
+ });
160
+ });
161
+ var LOADER_SOURCE = "// Written by sniff-qa. Imports resolve against the node_modules next to this file.\nexport function load(name) {\n return import(name);\n}\n";
162
+ async function installEngine(options = {}) {
163
+ const dir = options.dir ?? engineDir();
164
+ if (engineInstalledAt(dir)) return dir;
165
+ const log = options.log ?? (() => {
166
+ });
167
+ const run = options.run ?? runNpm;
168
+ const tmp = `${dir}.tmp-${process.pid}-${Date.now()}`;
169
+ mkdirSync(tmp, { recursive: true });
170
+ try {
171
+ writeFileSync(
172
+ join(tmp, "package.json"),
173
+ JSON.stringify(
174
+ {
175
+ name: "sniff-qa-engine",
176
+ version: getVersion(),
177
+ private: true,
178
+ description: "Browser engine downloaded by sniff-qa. Safe to delete; sniff downloads it again when needed.",
179
+ dependencies: engineDependencies()
180
+ },
181
+ null,
182
+ 2
183
+ ) + "\n"
184
+ );
185
+ writeFileSync(join(tmp, "load.mjs"), LOADER_SOURCE);
186
+ await run(
187
+ [
188
+ "install",
189
+ "--prefix",
190
+ tmp,
191
+ "--omit=dev",
192
+ "--ignore-scripts",
193
+ "--no-audit",
194
+ "--no-fund",
195
+ "--no-update-notifier",
196
+ "--loglevel=error"
197
+ ],
198
+ tmp,
199
+ log
200
+ );
201
+ for (const name of ENGINE_PACKAGES) {
202
+ if (!existsSync(
203
+ join(tmp, "node_modules", ...name.split("/"), "package.json")
204
+ )) {
205
+ throw new Error(`npm finished but ${name} is missing from ${tmp}`);
206
+ }
207
+ }
208
+ writeFileSync(join(tmp, COMPLETE_MARKER), (/* @__PURE__ */ new Date()).toISOString() + "\n");
209
+ mkdirSync(dirname(dir), { recursive: true });
210
+ if (existsSync(dir) && !engineInstalledAt(dir))
211
+ rmSync(dir, { recursive: true, force: true });
212
+ try {
213
+ renameSync(tmp, dir);
214
+ } catch (err) {
215
+ if (!engineInstalledAt(dir)) throw err;
216
+ rmSync(tmp, { recursive: true, force: true });
217
+ }
218
+ return dir;
219
+ } catch (err) {
220
+ rmSync(tmp, { recursive: true, force: true });
221
+ throw err;
222
+ }
223
+ }
224
+ async function ensureEngine(options = {}) {
225
+ const status = engineStatus({ fromDir: options.fromDir, dir: options.dir });
226
+ if (status !== "missing") return status;
227
+ await installEngine(options);
228
+ return "engine-dir";
229
+ }
230
+ function playwrightCliPath(options = {}) {
231
+ const local = findPackageDir("playwright", options.fromDir ?? HERE);
232
+ const pkgDir = local ?? (() => {
233
+ const dir = options.dir ?? engineDir();
234
+ const candidate = join(dir, "node_modules", "playwright");
235
+ return engineInstalledAt(dir) && existsSync(join(candidate, "package.json")) ? candidate : null;
236
+ })();
237
+ if (!pkgDir) return null;
238
+ try {
239
+ const pkg = JSON.parse(
240
+ readFileSync(join(pkgDir, "package.json"), "utf-8")
241
+ );
242
+ const rel = pkg.bin?.playwright ?? "cli.js";
243
+ const cli = join(pkgDir, rel);
244
+ return existsSync(cli) ? cli : null;
245
+ } catch {
246
+ return null;
247
+ }
248
+ }
249
+
250
+ export {
251
+ ENGINE_PACKAGES,
252
+ ENGINE_SIZE_MB,
253
+ engineInstallCommand,
254
+ EngineMissingError,
255
+ engineDir,
256
+ engineInstalledAt,
257
+ findPackageDir,
258
+ engineStatus,
259
+ importFromEngineDir,
260
+ loadEngine,
261
+ engineDependencies,
262
+ npmChildEnv,
263
+ runNpm,
264
+ installEngine,
265
+ ensureEngine,
266
+ playwrightCliPath
267
+ };
@@ -1,3 +1,5 @@
1
+ import { createRequire as __sniffCreateRequire } from 'node:module'; const require = __sniffCreateRequire(import.meta.url);
2
+
1
3
  // src/core/assert-budget.ts
2
4
  var SEVERITY_KEYS = [
3
5
  ["critical", "maxCritical"],
@@ -42,4 +44,3 @@ export {
42
44
  evaluateSeverityBudget,
43
45
  printBudgetViolations
44
46
  };
45
- //# sourceMappingURL=chunk-NG2IGCAK.js.map
@@ -1,3 +1,5 @@
1
+ import { createRequire as __sniffCreateRequire } from 'node:module'; const require = __sniffCreateRequire(import.meta.url);
2
+
1
3
  // src/mcp/caps.ts
2
4
  var CAPABILITIES = ["scan", "walk", "discover", "report", "install"];
3
5
  var UNIFIED_MODES = ["walk", "scan", "run", "discover", "report"];
@@ -103,4 +105,3 @@ export {
103
105
  parseCaps,
104
106
  resolveTools
105
107
  };
106
- //# sourceMappingURL=chunk-GV27IOMC.js.map
@@ -0,0 +1,80 @@
1
+ import { createRequire as __sniffCreateRequire } from 'node:module'; const require = __sniffCreateRequire(import.meta.url);
2
+ import {
3
+ __commonJS
4
+ } from "./chunk-SOBWDC35.js";
5
+
6
+ // node_modules/picocolors/picocolors.js
7
+ var require_picocolors = __commonJS({
8
+ "node_modules/picocolors/picocolors.js"(exports, module) {
9
+ var p = process || {};
10
+ var argv = p.argv || [];
11
+ var env = p.env || {};
12
+ var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
13
+ var formatter = (open, close, replace = open) => (input) => {
14
+ let string = "" + input, index = string.indexOf(close, open.length);
15
+ return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
16
+ };
17
+ var replaceClose = (string, close, replace, index) => {
18
+ let result = "", cursor = 0;
19
+ do {
20
+ result += string.substring(cursor, index) + replace;
21
+ cursor = index + close.length;
22
+ index = string.indexOf(close, cursor);
23
+ } while (~index);
24
+ return result + string.substring(cursor);
25
+ };
26
+ var createColors = (enabled = isColorSupported) => {
27
+ let f = enabled ? formatter : () => String;
28
+ return {
29
+ isColorSupported: enabled,
30
+ reset: f("\x1B[0m", "\x1B[0m"),
31
+ bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
32
+ dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
33
+ italic: f("\x1B[3m", "\x1B[23m"),
34
+ underline: f("\x1B[4m", "\x1B[24m"),
35
+ inverse: f("\x1B[7m", "\x1B[27m"),
36
+ hidden: f("\x1B[8m", "\x1B[28m"),
37
+ strikethrough: f("\x1B[9m", "\x1B[29m"),
38
+ black: f("\x1B[30m", "\x1B[39m"),
39
+ red: f("\x1B[31m", "\x1B[39m"),
40
+ green: f("\x1B[32m", "\x1B[39m"),
41
+ yellow: f("\x1B[33m", "\x1B[39m"),
42
+ blue: f("\x1B[34m", "\x1B[39m"),
43
+ magenta: f("\x1B[35m", "\x1B[39m"),
44
+ cyan: f("\x1B[36m", "\x1B[39m"),
45
+ white: f("\x1B[37m", "\x1B[39m"),
46
+ gray: f("\x1B[90m", "\x1B[39m"),
47
+ bgBlack: f("\x1B[40m", "\x1B[49m"),
48
+ bgRed: f("\x1B[41m", "\x1B[49m"),
49
+ bgGreen: f("\x1B[42m", "\x1B[49m"),
50
+ bgYellow: f("\x1B[43m", "\x1B[49m"),
51
+ bgBlue: f("\x1B[44m", "\x1B[49m"),
52
+ bgMagenta: f("\x1B[45m", "\x1B[49m"),
53
+ bgCyan: f("\x1B[46m", "\x1B[49m"),
54
+ bgWhite: f("\x1B[47m", "\x1B[49m"),
55
+ blackBright: f("\x1B[90m", "\x1B[39m"),
56
+ redBright: f("\x1B[91m", "\x1B[39m"),
57
+ greenBright: f("\x1B[92m", "\x1B[39m"),
58
+ yellowBright: f("\x1B[93m", "\x1B[39m"),
59
+ blueBright: f("\x1B[94m", "\x1B[39m"),
60
+ magentaBright: f("\x1B[95m", "\x1B[39m"),
61
+ cyanBright: f("\x1B[96m", "\x1B[39m"),
62
+ whiteBright: f("\x1B[97m", "\x1B[39m"),
63
+ bgBlackBright: f("\x1B[100m", "\x1B[49m"),
64
+ bgRedBright: f("\x1B[101m", "\x1B[49m"),
65
+ bgGreenBright: f("\x1B[102m", "\x1B[49m"),
66
+ bgYellowBright: f("\x1B[103m", "\x1B[49m"),
67
+ bgBlueBright: f("\x1B[104m", "\x1B[49m"),
68
+ bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
69
+ bgCyanBright: f("\x1B[106m", "\x1B[49m"),
70
+ bgWhiteBright: f("\x1B[107m", "\x1B[49m")
71
+ };
72
+ };
73
+ module.exports = createColors();
74
+ module.exports.createColors = createColors;
75
+ }
76
+ });
77
+
78
+ export {
79
+ require_picocolors
80
+ };