@diegovelasquezweb/a11y-engine 0.11.53 → 0.11.54

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diegovelasquezweb/a11y-engine",
3
- "version": "0.11.53",
3
+ "version": "0.11.54",
4
4
  "description": "WCAG 2.2 accessibility audit engine — scanner, analyzer, and report builders",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -32,6 +32,9 @@
32
32
  "CHANGELOG.md",
33
33
  "LICENSE"
34
34
  ],
35
+ "scripts": {
36
+ "test": "vitest run"
37
+ },
35
38
  "dependencies": {
36
39
  "@axe-core/playwright": "^4.11.1",
37
40
  "axe-core": "^4.11.1",
@@ -41,7 +44,5 @@
41
44
  "devDependencies": {
42
45
  "vitest": "^4.0.18"
43
46
  },
44
- "scripts": {
45
- "test": "vitest run"
46
- }
47
- }
47
+ "packageManager": "pnpm@10.22.0+sha512.bf049efe995b28f527fd2b41ae0474ce29186f7edcb3bf545087bd61fbbebb2bf75362d1307fda09c2d288e1e499787ac12d4fcb617a974718a6051f2eee741c"
48
+ }
File without changes
@@ -150,7 +150,7 @@ function getPatternCandidateFile(projectDir, finding) {
150
150
  return { abs, rel: finding.file, content };
151
151
  }
152
152
 
153
- function buildPatternAiInput({ finding, candidate, projectHints }) {
153
+ function buildPatternAiInput({ finding, candidate, cssFiles = [], projectHints }) {
154
154
  // Extract the exact line(s) containing the pattern match so Claude has an
155
155
  // unambiguous search anchor instead of inferring it from the full file.
156
156
  const fileLines = candidate.content.split("\n");
@@ -224,7 +224,10 @@ function buildPatternAiInput({ finding, candidate, projectHints }) {
224
224
  fixDescription: finding.fix_description || "",
225
225
  fixCode: finding.fix_code || "",
226
226
  },
227
- files: [{ filePath: candidate.rel, content: candidate.content.slice(0, 12000) }],
227
+ files: [
228
+ { filePath: candidate.rel, content: candidate.content.slice(0, 12000) },
229
+ ...cssFiles.map((f) => ({ filePath: f.rel, content: f.content.slice(0, 12000) })),
230
+ ],
228
231
  ...(projectHints ? { projectContext: projectHints } : {}),
229
232
  };
230
233
  }
@@ -682,8 +685,15 @@ export async function applyFindingFix(input) {
682
685
  });
683
686
  }
684
687
 
685
- const aiInput = buildPatternAiInput({ finding, candidate, projectHints });
686
- const candidateSet = new Set([candidate.rel]);
688
+ const allProjectFiles = listFilesRecursive(projectDir).map((abs) => ({
689
+ abs,
690
+ rel: path.relative(projectDir, abs),
691
+ content: fs.readFileSync(abs, "utf8"),
692
+ }));
693
+ const cssFiles = allProjectFiles.filter((f) => /\.(css|scss|sass)$/.test(f.rel));
694
+
695
+ const aiInput = buildPatternAiInput({ finding, candidate, cssFiles, projectHints });
696
+ const candidateSet = new Set([candidate.rel, ...cssFiles.map((f) => f.rel)]);
687
697
 
688
698
  let patchOutput = null;
689
699
  let claudeUsage = { input_tokens: 0, output_tokens: 0 };
File without changes
File without changes
package/assets/.DS_Store DELETED
Binary file