sniff-qa 0.8.1 → 0.9.1

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 (176) hide show
  1. package/.claude-plugin/icon.png +0 -0
  2. package/.claude-plugin/plugin.json +9 -2
  3. package/CHANGELOG.md +73 -0
  4. package/NOTICE +7 -4
  5. package/README.md +169 -102
  6. package/THIRD-PARTY-NOTICES.md +1800 -0
  7. package/dist/{accessibility-JXRMWF5Y.js → accessibility-42JOUOGH.js} +8 -2
  8. package/dist/{anthropic-api-ZR3UEB3Z.js → anthropic-api-VSG2X6FS.js} +7 -5
  9. package/dist/assert-budget-WG4BRCLX.js +10 -0
  10. package/dist/{caps-G3ZGJI7B.js → caps-YZPFNPIN.js} +3 -2
  11. package/dist/{chunk-VEI2O6AK.js → chunk-33JL2AB5.js} +14 -6
  12. package/dist/{chunk-7ZOFYET5.js → chunk-3E4W4H6S.js} +36 -16
  13. package/dist/{chunk-EGANHIIE.js → chunk-3NR2K5B3.js} +49 -5
  14. package/dist/chunk-3ROWRVZE.js +422 -0
  15. package/dist/{chunk-MYWWSM3V.js → chunk-3YFE3H23.js} +2 -1
  16. package/dist/{chunk-MMISGY2Q.js → chunk-4F6ZXOPE.js} +2 -1
  17. package/dist/chunk-A4TTASVS.js +27862 -0
  18. package/dist/{chunk-IXDUD2UG.js → chunk-AA744N7E.js} +2 -1
  19. package/dist/chunk-DZMX3VT2.js +267 -0
  20. package/dist/{chunk-NG2IGCAK.js → chunk-FR5QCJLH.js} +2 -1
  21. package/dist/{chunk-GV27IOMC.js → chunk-GC47B6MM.js} +2 -1
  22. package/dist/chunk-HP4TY3UY.js +80 -0
  23. package/dist/chunk-LZAPYYNR.js +4595 -0
  24. package/dist/{chunk-ZM6MGWO4.js → chunk-NBJLMLDA.js} +2 -1
  25. package/dist/chunk-RAGYZ54R.js +15480 -0
  26. package/dist/{chunk-GX36BPK7.js → chunk-RSGFFRXQ.js} +2 -2
  27. package/dist/chunk-SOBWDC35.js +38 -0
  28. package/dist/{chunk-CZKMOAXU.js → chunk-US4HFUCH.js} +3 -2
  29. package/dist/chunk-YM22FEIA.js +5807 -0
  30. package/dist/{ci-ISCWZJD3.js → ci-F6FUXT3O.js} +5 -3
  31. package/dist/{classifier-MWQMQ727.js → classifier-5FQ2FBTO.js} +3 -1
  32. package/dist/{claude-code-ZFTBQXY4.js → claude-code-J43C22IR.js} +7 -5
  33. package/dist/{claude-exploration-provider-QJH6IPYU.js → claude-exploration-provider-EWQNNE7D.js} +4 -3
  34. package/dist/cli/index.js +87 -35
  35. package/dist/compiler-sfc.cjs-JX56AWNS.js +48568 -0
  36. package/dist/crawl-KN7SW753.js +26 -0
  37. package/dist/{crawl-command-RDWGHZC4.js → crawl-command-Y45FIXNK.js} +14 -9
  38. package/dist/{cross-reference-MHNPSLEN.js → cross-reference-XOOBW6UZ.js} +3 -1
  39. package/dist/{dev-server-detector-XQ5AYPDT.js → dev-server-detector-FMFVKDJR.js} +3 -1
  40. package/dist/{discover-QKGMYPHK.js → discover-HA63UA4K.js} +20 -18
  41. package/dist/dist-3CYER35S.js +8 -0
  42. package/dist/{domain-UQ34YE4B.js → domain-FU3WIW64.js} +45 -30
  43. package/dist/{edge-cases-ZADKDZHL.js → edge-cases-B6IV3IKK.js} +3 -1
  44. package/dist/{element-extractor-OZTFBVKZ.js → element-extractor-QAG4MRUO.js} +18 -6
  45. package/dist/engine-AXB5O4ZH.js +39 -0
  46. package/dist/ensure-browsers-TNMHMLRS.js +147 -0
  47. package/dist/errors-NWB25P4K.js +8 -0
  48. package/dist/esm-IMWPYLSN.js +3469 -0
  49. package/dist/{fix-R33D34NP.js → fix-IXOEHAOS.js} +12 -5
  50. package/dist/{flakiness-OLJAY7CS.js → flakiness-7SSSM4SW.js} +3 -2
  51. package/dist/flakiness-CBKV4U54.js +12 -0
  52. package/dist/formatter-N4CC7SCM.js +176 -0
  53. package/dist/{framework-detector-ISSM2Q2I.js → framework-detector-4ZVHNT7N.js} +3 -1
  54. package/dist/generator-GGJYWYI2.js +8 -0
  55. package/dist/index.d.ts +15 -5
  56. package/dist/index.js +9 -6
  57. package/dist/{init-IQKT4ANC.js → init-POX5ZJ6V.js} +4 -2
  58. package/dist/json-4VOVHDQG.js +10 -0
  59. package/dist/{junit-GL44ATRR.js → junit-V24COOSR.js} +3 -1
  60. package/dist/{llm-VJAI6H6G.js → llm-TZ2WZGRZ.js} +3 -1
  61. package/dist/{loader-Z2DUGG5Z.js → loader-AMM63AOJ.js} +12 -3
  62. package/dist/mcp/server.js +13049 -73
  63. package/dist/{model-SP6HJN6J.js → model-BL2AID5Q.js} +6 -5
  64. package/dist/page-hooks-SECSGZR6.js +14 -0
  65. package/dist/{page-state-extractor-GYYLYRFR.js → page-state-extractor-AP4FQVLY.js} +3 -1
  66. package/dist/{performance-7HWKY5O2.js → performance-JVEYVBTV.js} +9 -3
  67. package/dist/{persistence-XLFJ5EY4.js → persistence-SHKJVSIS.js} +5 -4
  68. package/dist/{persistence-KTCRIGHU.js → persistence-SQ6QT3HP.js} +3 -1
  69. package/dist/picocolors-3W2AX5TJ.js +6 -0
  70. package/dist/pixelmatch-GATIVDQX.js +188 -0
  71. package/dist/png-HTC2G4ZG.js +2093 -0
  72. package/dist/{prompt-builder-D3FBH534.js → prompt-builder-EI2BFKLZ.js} +4 -2
  73. package/dist/{provider-BCKFVPTN.js → provider-O3UOALQH.js} +14 -12
  74. package/dist/{quality-run-YAURB242.js → quality-run-CTLX5YA5.js} +12 -10
  75. package/dist/{redaction-CHAIVPCF.js → redaction-QNBV5QZ3.js} +4 -3
  76. package/dist/{registry-5XCXUAYJ.js → registry-JBBTSD7I.js} +3 -1
  77. package/dist/{repo-analyzer-4OURSITY.js → repo-analyzer-4XITIIAF.js} +6 -4
  78. package/dist/{report-SDZWX25B.js → report-4UVJL7QV.js} +3 -1
  79. package/dist/{report-7FQFH4HW.js → report-BOVSPRCR.js} +8 -6
  80. package/dist/{response-parser-PUGNWF7S.js → response-parser-GHVJSYXQ.js} +3 -2
  81. package/dist/{route-discoverer-QBZCRQLJ.js → route-discoverer-ZXYJQIYE.js} +15 -8
  82. package/dist/{runner-RDVVIGBU.js → runner-DOLCFA3S.js} +10 -5
  83. package/dist/{runner-QHSYX7J2.js → runner-MCSDHFLN.js} +12 -7
  84. package/dist/{runner-AXZXNWYH.js → runner-MUBXHOIG.js} +10 -4
  85. package/dist/{scenarios-I7YYVTD2.js → scenarios-T2U6ZDRL.js} +3 -1
  86. package/dist/sdk-FQKA5HSQ.js +7184 -0
  87. package/dist/{source-5LS2B7TN.js → source-T5MHBY5G.js} +14 -7
  88. package/dist/{tiebreak-L5UFNKU2.js → tiebreak-SXBXPT7B.js} +3 -1
  89. package/dist/{unified-YSOTPG5B.js → unified-NUR2X5JV.js} +23 -21
  90. package/dist/{update-baselines-JYKUUIZG.js → update-baselines-TMERPIDV.js} +4 -2
  91. package/dist/version-FEHABGAH.js +10 -0
  92. package/dist/{visual-EUZG2STF.js → visual-XHFPFQFX.js} +5 -3
  93. package/dist/{workflow-template-6DADGPHA.js → workflow-template-7C5CCK67.js} +13 -7
  94. package/dist/{write-report-6RJWN54I.js → write-report-6Q4MXBYD.js} +5 -4
  95. package/package.json +21 -14
  96. package/dist/accessibility-JXRMWF5Y.js.map +0 -1
  97. package/dist/anthropic-api-ZR3UEB3Z.js.map +0 -1
  98. package/dist/assert-budget-NBF3JYM7.js +0 -9
  99. package/dist/assert-budget-NBF3JYM7.js.map +0 -1
  100. package/dist/caps-G3ZGJI7B.js.map +0 -1
  101. package/dist/chunk-7ZOFYET5.js.map +0 -1
  102. package/dist/chunk-CZKMOAXU.js.map +0 -1
  103. package/dist/chunk-EGANHIIE.js.map +0 -1
  104. package/dist/chunk-GV27IOMC.js.map +0 -1
  105. package/dist/chunk-GX36BPK7.js.map +0 -1
  106. package/dist/chunk-IXDUD2UG.js.map +0 -1
  107. package/dist/chunk-MMISGY2Q.js.map +0 -1
  108. package/dist/chunk-MYWWSM3V.js.map +0 -1
  109. package/dist/chunk-NG2IGCAK.js.map +0 -1
  110. package/dist/chunk-VEI2O6AK.js.map +0 -1
  111. package/dist/chunk-ZM6MGWO4.js.map +0 -1
  112. package/dist/ci-ISCWZJD3.js.map +0 -1
  113. package/dist/classifier-MWQMQ727.js.map +0 -1
  114. package/dist/claude-code-ZFTBQXY4.js.map +0 -1
  115. package/dist/claude-exploration-provider-QJH6IPYU.js.map +0 -1
  116. package/dist/cli/index.js.map +0 -1
  117. package/dist/crawl-ZXZRF4Q7.js +0 -15
  118. package/dist/crawl-ZXZRF4Q7.js.map +0 -1
  119. package/dist/crawl-command-RDWGHZC4.js.map +0 -1
  120. package/dist/cross-reference-MHNPSLEN.js.map +0 -1
  121. package/dist/dev-server-detector-XQ5AYPDT.js.map +0 -1
  122. package/dist/discover-QKGMYPHK.js.map +0 -1
  123. package/dist/domain-UQ34YE4B.js.map +0 -1
  124. package/dist/edge-cases-ZADKDZHL.js.map +0 -1
  125. package/dist/element-extractor-OZTFBVKZ.js.map +0 -1
  126. package/dist/ensure-browsers-AYKMLUHV.js +0 -86
  127. package/dist/ensure-browsers-AYKMLUHV.js.map +0 -1
  128. package/dist/errors-RFEOR527.js +0 -7
  129. package/dist/errors-RFEOR527.js.map +0 -1
  130. package/dist/fix-R33D34NP.js.map +0 -1
  131. package/dist/flakiness-OLJAY7CS.js.map +0 -1
  132. package/dist/flakiness-OVC7KGN2.js +0 -11
  133. package/dist/flakiness-OVC7KGN2.js.map +0 -1
  134. package/dist/formatter-HC3LT3VH.js +0 -146
  135. package/dist/formatter-HC3LT3VH.js.map +0 -1
  136. package/dist/framework-detector-ISSM2Q2I.js.map +0 -1
  137. package/dist/generator-HIFV67NI.js +0 -7
  138. package/dist/generator-HIFV67NI.js.map +0 -1
  139. package/dist/index.js.map +0 -1
  140. package/dist/init-IQKT4ANC.js.map +0 -1
  141. package/dist/json-YDWEB33Q.js +0 -8
  142. package/dist/json-YDWEB33Q.js.map +0 -1
  143. package/dist/junit-GL44ATRR.js.map +0 -1
  144. package/dist/llm-VJAI6H6G.js.map +0 -1
  145. package/dist/loader-Z2DUGG5Z.js.map +0 -1
  146. package/dist/mcp/server.js.map +0 -1
  147. package/dist/model-SP6HJN6J.js.map +0 -1
  148. package/dist/page-hooks-6RALVZB5.js +0 -13
  149. package/dist/page-hooks-6RALVZB5.js.map +0 -1
  150. package/dist/page-state-extractor-GYYLYRFR.js.map +0 -1
  151. package/dist/performance-7HWKY5O2.js.map +0 -1
  152. package/dist/persistence-KTCRIGHU.js.map +0 -1
  153. package/dist/persistence-XLFJ5EY4.js.map +0 -1
  154. package/dist/prompt-builder-D3FBH534.js.map +0 -1
  155. package/dist/provider-BCKFVPTN.js.map +0 -1
  156. package/dist/quality-run-YAURB242.js.map +0 -1
  157. package/dist/redaction-CHAIVPCF.js.map +0 -1
  158. package/dist/registry-5XCXUAYJ.js.map +0 -1
  159. package/dist/repo-analyzer-4OURSITY.js.map +0 -1
  160. package/dist/report-7FQFH4HW.js.map +0 -1
  161. package/dist/report-SDZWX25B.js.map +0 -1
  162. package/dist/response-parser-PUGNWF7S.js.map +0 -1
  163. package/dist/route-discoverer-QBZCRQLJ.js.map +0 -1
  164. package/dist/runner-AXZXNWYH.js.map +0 -1
  165. package/dist/runner-QHSYX7J2.js.map +0 -1
  166. package/dist/runner-RDVVIGBU.js.map +0 -1
  167. package/dist/scenarios-I7YYVTD2.js.map +0 -1
  168. package/dist/source-5LS2B7TN.js.map +0 -1
  169. package/dist/tiebreak-L5UFNKU2.js.map +0 -1
  170. package/dist/unified-YSOTPG5B.js.map +0 -1
  171. package/dist/update-baselines-JYKUUIZG.js.map +0 -1
  172. package/dist/version-FLE7ZHDX.js +0 -7
  173. package/dist/version-FLE7ZHDX.js.map +0 -1
  174. package/dist/visual-EUZG2STF.js.map +0 -1
  175. package/dist/workflow-template-6DADGPHA.js.map +0 -1
  176. package/dist/write-report-6RJWN54I.js.map +0 -1
@@ -1,7 +1,15 @@
1
+ import { createRequire as __sniffCreateRequire } from 'node:module'; const require = __sniffCreateRequire(import.meta.url);
2
+ import {
3
+ require_out
4
+ } from "./chunk-YM22FEIA.js";
5
+ import {
6
+ __toESM
7
+ } from "./chunk-SOBWDC35.js";
8
+
1
9
  // src/cli/commands/fix.ts
10
+ var import_fast_glob = __toESM(require_out(), 1);
2
11
  import { readFile, writeFile } from "fs/promises";
3
12
  import { relative } from "path";
4
- import fg from "fast-glob";
5
13
  var FIXABLE_RULES = [
6
14
  {
7
15
  id: "debug-debugger",
@@ -15,14 +23,14 @@ var FIXABLE_RULES = [
15
23
  }
16
24
  ];
17
25
  async function fixCommand(options) {
18
- const pc = (await import("picocolors")).default;
26
+ const pc = (await import("./picocolors-3W2AX5TJ.js")).default;
19
27
  if (!options.json) {
20
- const { getVersion } = await import("./version-FLE7ZHDX.js");
28
+ const { getVersion } = await import("./version-FEHABGAH.js");
21
29
  console.log(`
22
30
  ${pc.bold("sniff")} v${getVersion()} --fix
23
31
  `);
24
32
  }
25
- const files = await fg(["**/*.{ts,tsx,js,jsx}"], {
33
+ const files = await (0, import_fast_glob.default)(["**/*.{ts,tsx,js,jsx}"], {
26
34
  cwd: options.rootDir,
27
35
  ignore: [
28
36
  "**/node_modules/**",
@@ -107,4 +115,3 @@ ${pc.bold("sniff")} v${getVersion()} --fix
107
115
  export {
108
116
  fixCommand
109
117
  };
110
- //# sourceMappingURL=fix-R33D34NP.js.map
@@ -1,6 +1,8 @@
1
+ import { createRequire as __sniffCreateRequire } from 'node:module'; const require = __sniffCreateRequire(import.meta.url);
1
2
  import {
2
3
  computeFlakeStatus
3
- } from "./chunk-ZM6MGWO4.js";
4
+ } from "./chunk-NBJLMLDA.js";
5
+ import "./chunk-SOBWDC35.js";
4
6
 
5
7
  // src/discovery/report/flakiness.ts
6
8
  function buildScenarioTestId(scenarioId, baseUrl) {
@@ -50,4 +52,3 @@ export {
50
52
  markQuarantinedScenarios,
51
53
  shouldFailCi
52
54
  };
53
- //# sourceMappingURL=flakiness-OLJAY7CS.js.map
@@ -0,0 +1,12 @@
1
+ import { createRequire as __sniffCreateRequire } from 'node:module'; const require = __sniffCreateRequire(import.meta.url);
2
+ import {
3
+ buildTestId,
4
+ buildTestRunRecords,
5
+ computeFlakeStatus
6
+ } from "./chunk-NBJLMLDA.js";
7
+ import "./chunk-SOBWDC35.js";
8
+ export {
9
+ buildTestId,
10
+ buildTestRunRecords,
11
+ computeFlakeStatus
12
+ };
@@ -0,0 +1,176 @@
1
+ import { createRequire as __sniffCreateRequire } from 'node:module'; const require = __sniffCreateRequire(import.meta.url);
2
+ import {
3
+ require_picocolors
4
+ } from "./chunk-HP4TY3UY.js";
5
+ import {
6
+ __toESM
7
+ } from "./chunk-SOBWDC35.js";
8
+
9
+ // src/cli/formatter.ts
10
+ var import_picocolors = __toESM(require_picocolors(), 1);
11
+ var SEVERITY_ORDER = ["critical", "high", "medium", "low", "info"];
12
+ var severityColors = {
13
+ critical: import_picocolors.default.red,
14
+ high: import_picocolors.default.red,
15
+ medium: import_picocolors.default.yellow,
16
+ low: import_picocolors.default.cyan,
17
+ info: import_picocolors.default.gray
18
+ };
19
+ var severityIcons = {
20
+ critical: "X",
21
+ high: "!",
22
+ medium: "~",
23
+ low: "-",
24
+ info: "i"
25
+ };
26
+ function groupBySeverity(findings) {
27
+ const groups = {
28
+ critical: [],
29
+ high: [],
30
+ medium: [],
31
+ low: [],
32
+ info: []
33
+ };
34
+ for (const finding of findings) {
35
+ groups[finding.severity].push(finding);
36
+ }
37
+ return groups;
38
+ }
39
+ var FAILING = ["critical", "high"];
40
+ function verdictHeader(findings) {
41
+ if (findings.length === 0) {
42
+ return [`${import_picocolors.default.bold("VERDICT")} ${import_picocolors.default.green("PASS")}: no issues found`];
43
+ }
44
+ const groups = groupBySeverity(findings);
45
+ const counts = SEVERITY_ORDER.filter((sev) => groups[sev].length > 0).map((sev) => `${groups[sev].length} ${sev}`).join(", ");
46
+ const failing = findings.some((f) => FAILING.includes(f.severity));
47
+ const word = failing ? import_picocolors.default.red("FAIL") : import_picocolors.default.green("PASS");
48
+ const gate = failing ? "" : ", none at a failing severity";
49
+ const lines = [
50
+ `${import_picocolors.default.bold("VERDICT")} ${word}: ${findings.length} issue${findings.length === 1 ? "" : "s"} (${counts})${gate}`,
51
+ ""
52
+ ];
53
+ const first = [...findings].sort((a, b) => SEVERITY_ORDER.indexOf(a.severity) - SEVERITY_ORDER.indexOf(b.severity)).slice(0, 3);
54
+ lines.push(first.length === findings.length ? "Fix these:" : "Fix these first:");
55
+ first.forEach((f, i) => {
56
+ const where = isBrowserFinding(f) ? f.url : `${f.filePath}:${f.line}`;
57
+ lines.push(` ${i + 1}. ${f.message} in ${where} [${f.severity}]`);
58
+ });
59
+ return lines;
60
+ }
61
+ function formatFindings(findings) {
62
+ if (findings.length === 0) {
63
+ return verdictHeader(findings).join("\n");
64
+ }
65
+ const lines = verdictHeader(findings);
66
+ const groups = groupBySeverity(findings);
67
+ for (const severity of SEVERITY_ORDER) {
68
+ const group = groups[severity];
69
+ if (group.length === 0) continue;
70
+ const color = severityColors[severity];
71
+ const icon = severityIcons[severity];
72
+ lines.push("");
73
+ lines.push(color(`${icon} ${severity.toUpperCase()} (${group.length})`));
74
+ for (const finding of group) {
75
+ lines.push(
76
+ ` ${import_picocolors.default.dim(finding.filePath)}:${import_picocolors.default.yellow(String(finding.line))} ${finding.message}`
77
+ );
78
+ lines.push(` ${import_picocolors.default.dim(finding.snippet)}`);
79
+ }
80
+ }
81
+ const parts = [];
82
+ for (const severity of SEVERITY_ORDER) {
83
+ const count = groups[severity].length;
84
+ if (count > 0) {
85
+ parts.push(severityColors[severity](`${count} ${severity}`));
86
+ }
87
+ }
88
+ lines.push("");
89
+ lines.push(`Found ${import_picocolors.default.bold(String(findings.length))} issues: ${parts.join(", ")}`);
90
+ return lines.join("\n");
91
+ }
92
+ var SCANNER_DISPLAY_NAMES = {
93
+ "e2e/": "Browser Tests",
94
+ "a11y/": "Accessibility",
95
+ "visual/": "Visual Regression",
96
+ "perf/": "Performance",
97
+ "source/": "Source Code"
98
+ };
99
+ function getScannerPrefix(ruleId) {
100
+ for (const prefix of Object.keys(SCANNER_DISPLAY_NAMES)) {
101
+ if (ruleId.startsWith(prefix)) {
102
+ return prefix;
103
+ }
104
+ }
105
+ return "other/";
106
+ }
107
+ function isBrowserFinding(finding) {
108
+ return "url" in finding && "viewport" in finding;
109
+ }
110
+ function formatBrowserFindings(findings) {
111
+ if (findings.length === 0) {
112
+ return verdictHeader(findings).join("\n");
113
+ }
114
+ const lines = verdictHeader(findings);
115
+ const scannerGroups = /* @__PURE__ */ new Map();
116
+ for (const finding of findings) {
117
+ const prefix = getScannerPrefix(finding.ruleId);
118
+ if (!scannerGroups.has(prefix)) {
119
+ scannerGroups.set(prefix, []);
120
+ }
121
+ scannerGroups.get(prefix).push(finding);
122
+ }
123
+ let scannerCount = 0;
124
+ for (const [prefix, groupFindings] of scannerGroups) {
125
+ scannerCount++;
126
+ const displayName = SCANNER_DISPLAY_NAMES[prefix] ?? prefix.replace("/", "");
127
+ lines.push("");
128
+ lines.push(import_picocolors.default.blue(import_picocolors.default.bold(`[${displayName}]`)));
129
+ const sorted = [...groupFindings].sort(
130
+ (a, b) => SEVERITY_ORDER.indexOf(a.severity) - SEVERITY_ORDER.indexOf(b.severity)
131
+ );
132
+ for (const finding of sorted) {
133
+ const color = severityColors[finding.severity];
134
+ const icon = severityIcons[finding.severity];
135
+ const vpLabel = isBrowserFinding(finding) ? ` ${import_picocolors.default.magenta(`[${finding.viewport}]`)}` : "";
136
+ lines.push(
137
+ ` ${color(`${icon}`)} ${color(finding.severity.toUpperCase())}${vpLabel} ${finding.message}`
138
+ );
139
+ lines.push(
140
+ ` ${import_picocolors.default.dim(finding.filePath)}:${import_picocolors.default.yellow(String(finding.line))}`
141
+ );
142
+ if (finding.snippet) {
143
+ lines.push(` ${import_picocolors.default.dim(finding.snippet)}`);
144
+ }
145
+ if (isBrowserFinding(finding) && finding.screenshotPath) {
146
+ lines.push(` ${import_picocolors.default.dim(import_picocolors.default.underline(finding.screenshotPath))}`);
147
+ }
148
+ if (isBrowserFinding(finding) && finding.fixSuggestion) {
149
+ lines.push(` ${import_picocolors.default.green("Fix:")} ${finding.fixSuggestion}`);
150
+ }
151
+ }
152
+ }
153
+ const parts = [];
154
+ const groups = groupBySeverity(findings);
155
+ for (const severity of SEVERITY_ORDER) {
156
+ const count = groups[severity].length;
157
+ if (count > 0) {
158
+ parts.push(severityColors[severity](`${count} ${severity}`));
159
+ }
160
+ }
161
+ lines.push("");
162
+ lines.push(
163
+ `Found ${import_picocolors.default.bold(String(findings.length))} issues across ${scannerCount} scanners: ${parts.join(", ")}`
164
+ );
165
+ return lines.join("\n");
166
+ }
167
+ function formatProgress(viewport, url, findingCount) {
168
+ const suffix = findingCount === 0 ? import_picocolors.default.green("0 findings") : import_picocolors.default.yellow(`${findingCount} finding${findingCount !== 1 ? "s" : ""}`);
169
+ return ` ${import_picocolors.default.dim(`[${viewport}]`)} ${import_picocolors.default.dim(url)}... done (${suffix})`;
170
+ }
171
+ export {
172
+ formatBrowserFindings,
173
+ formatFindings,
174
+ formatProgress,
175
+ verdictHeader
176
+ };
@@ -1,3 +1,6 @@
1
+ import { createRequire as __sniffCreateRequire } from 'node:module'; const require = __sniffCreateRequire(import.meta.url);
2
+ import "./chunk-SOBWDC35.js";
3
+
1
4
  // src/analyzers/framework-detector.ts
2
5
  import { readFile, access } from "fs/promises";
3
6
  import { join } from "path";
@@ -92,4 +95,3 @@ async function detectFrameworks(rootDir) {
92
95
  export {
93
96
  detectFrameworks
94
97
  };
95
- //# sourceMappingURL=framework-detector-ISSM2Q2I.js.map
@@ -0,0 +1,8 @@
1
+ import { createRequire as __sniffCreateRequire } from 'node:module'; const require = __sniffCreateRequire(import.meta.url);
2
+ import {
3
+ generateTests
4
+ } from "./chunk-US4HFUCH.js";
5
+ import "./chunk-SOBWDC35.js";
6
+ export {
7
+ generateTests
8
+ };
package/dist/index.d.ts CHANGED
@@ -350,12 +350,22 @@ declare function renderHtmlReport(report: CrawlReport, opts?: {
350
350
  title?: string;
351
351
  }): string;
352
352
 
353
+ interface ReportTextOptions {
354
+ /** Show `uncertain` findings too. */
355
+ all?: boolean;
356
+ /**
357
+ * The real exit decision, when the caller has it (`--fail-on` plus the
358
+ * assert budget). Left out, the verdict fails on a critical or high finding.
359
+ */
360
+ failed?: boolean;
361
+ /** Screenshot paths under this folder print relative to it. */
362
+ cwd?: string;
363
+ }
353
364
  /**
354
- * Render a CrawlReport as a readable CLI summary. By default `uncertain`
355
- * findings are hidden (shown with `all: true`).
365
+ * Render a CrawlReport for the terminal. The order is fixed: the verdict, the
366
+ * findings to fix first, then every finding by severity. By default
367
+ * `uncertain` findings are hidden (shown with `all: true`).
356
368
  */
357
- declare function formatReportText(report: CrawlReport, opts?: {
358
- all?: boolean;
359
- }): string;
369
+ declare function formatReportText(report: CrawlReport, opts?: ReportTextOptions): string;
360
370
 
361
371
  export { type AIProvider, type AnalysisResult, type ComponentInfo, type Confidence, type CrawlOptions, type CrawlReport, type ElementInfo, type Finding, type FrameworkInfo, type GeneratedTest, type QaFinding, type Reproduction, type RouteInfo, type RouteTestContext, type Severity, type SniffConfig, type SniffUserConfig, defineConfig, formatReportText, generateTests, renderHtmlReport, runCrawl };
package/dist/index.js CHANGED
@@ -1,15 +1,19 @@
1
+ import { createRequire as __sniffCreateRequire } from 'node:module'; const require = __sniffCreateRequire(import.meta.url);
1
2
  import {
2
3
  generateTests
3
- } from "./chunk-CZKMOAXU.js";
4
+ } from "./chunk-US4HFUCH.js";
4
5
  import {
5
6
  formatReportText,
6
7
  runCrawl
7
- } from "./chunk-7ZOFYET5.js";
8
+ } from "./chunk-3E4W4H6S.js";
8
9
  import {
9
10
  renderHtmlReport
10
- } from "./chunk-EGANHIIE.js";
11
- import "./chunk-GX36BPK7.js";
12
- import "./chunk-IXDUD2UG.js";
11
+ } from "./chunk-3NR2K5B3.js";
12
+ import "./chunk-DZMX3VT2.js";
13
+ import "./chunk-RSGFFRXQ.js";
14
+ import "./chunk-33JL2AB5.js";
15
+ import "./chunk-AA744N7E.js";
16
+ import "./chunk-SOBWDC35.js";
13
17
 
14
18
  // src/config/define-config.ts
15
19
  function defineConfig(config) {
@@ -22,4 +26,3 @@ export {
22
26
  renderHtmlReport,
23
27
  runCrawl
24
28
  };
25
- //# sourceMappingURL=index.js.map
@@ -1,3 +1,6 @@
1
+ import { createRequire as __sniffCreateRequire } from 'node:module'; const require = __sniffCreateRequire(import.meta.url);
2
+ import "./chunk-SOBWDC35.js";
3
+
1
4
  // src/cli/commands/init.ts
2
5
  import { writeFile, readFile, access } from "fs/promises";
3
6
  import { join } from "path";
@@ -89,7 +92,7 @@ function filenameFor(flavor) {
89
92
  }
90
93
  }
91
94
  async function initCommand(options) {
92
- const { cosmiconfig } = await import("cosmiconfig");
95
+ const { cosmiconfig } = await import("./dist-3CYER35S.js");
93
96
  const cwd = process.cwd();
94
97
  const explorer = cosmiconfig("sniff", {
95
98
  searchPlaces: [
@@ -145,4 +148,3 @@ export {
145
148
  detectInitFlavor,
146
149
  initCommand
147
150
  };
148
- //# sourceMappingURL=init-IQKT4ANC.js.map
@@ -0,0 +1,10 @@
1
+ import { createRequire as __sniffCreateRequire } from 'node:module'; const require = __sniffCreateRequire(import.meta.url);
2
+ import "./chunk-SOBWDC35.js";
3
+
4
+ // src/report/json.ts
5
+ function generateJsonReport(report) {
6
+ return JSON.stringify(report, null, 2);
7
+ }
8
+ export {
9
+ generateJsonReport
10
+ };
@@ -1,3 +1,6 @@
1
+ import { createRequire as __sniffCreateRequire } from 'node:module'; const require = __sniffCreateRequire(import.meta.url);
2
+ import "./chunk-SOBWDC35.js";
3
+
1
4
  // src/report/junit.ts
2
5
  function xmlEscape(s) {
3
6
  return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
@@ -49,4 +52,3 @@ function generateJunitReport(report) {
49
52
  export {
50
53
  generateJunitReport
51
54
  };
52
- //# sourceMappingURL=junit-GL44ATRR.js.map
@@ -1,3 +1,6 @@
1
+ import { createRequire as __sniffCreateRequire } from 'node:module'; const require = __sniffCreateRequire(import.meta.url);
2
+ import "./chunk-SOBWDC35.js";
3
+
1
4
  // src/discovery/llm/cache.ts
2
5
  import { createHash } from "crypto";
3
6
  import { mkdir, readFile, writeFile } from "fs/promises";
@@ -123,4 +126,3 @@ export {
123
126
  resolveDiscoveryLLM,
124
127
  writeLlmCache
125
128
  };
126
- //# sourceMappingURL=llm-VJAI6H6G.js.map
@@ -1,5 +1,15 @@
1
+ import { createRequire as __sniffCreateRequire } from 'node:module'; const require = __sniffCreateRequire(import.meta.url);
2
+ import {
3
+ require_dist
4
+ } from "./chunk-LZAPYYNR.js";
5
+ import "./chunk-3ROWRVZE.js";
6
+ import "./chunk-HP4TY3UY.js";
7
+ import {
8
+ __toESM
9
+ } from "./chunk-SOBWDC35.js";
10
+
1
11
  // src/config/loader.ts
2
- import { cosmiconfig } from "cosmiconfig";
12
+ var import_cosmiconfig = __toESM(require_dist(), 1);
3
13
 
4
14
  // src/config/schema.ts
5
15
  import { z } from "zod";
@@ -164,7 +174,7 @@ var sniffConfigSchema = z.object({
164
174
 
165
175
  // src/config/loader.ts
166
176
  async function loadConfig(searchFrom) {
167
- const explorer = cosmiconfig("sniff", {
177
+ const explorer = (0, import_cosmiconfig.cosmiconfig)("sniff", {
168
178
  searchPlaces: [
169
179
  "package.json",
170
180
  ".sniffrc",
@@ -195,4 +205,3 @@ ${formatted}`);
195
205
  export {
196
206
  loadConfig
197
207
  };
198
- //# sourceMappingURL=loader-Z2DUGG5Z.js.map