auditor-lambda 0.3.9 → 0.3.10

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.
@@ -19,51 +19,53 @@ export function runAutoFixExecutor(bundle, root) {
19
19
  }
20
20
  }
21
21
  const executedTools = [];
22
- // TS / JS
22
+ // JS, TS, HTML, CSS, JSON, YAML, MD
23
23
  if (extensions.has("ts") ||
24
24
  extensions.has("js") ||
25
25
  extensions.has("tsx") ||
26
- extensions.has("jsx")) {
26
+ extensions.has("jsx") ||
27
+ extensions.has("html") ||
28
+ extensions.has("css") ||
29
+ extensions.has("json") ||
30
+ extensions.has("yml") ||
31
+ extensions.has("yaml") ||
32
+ extensions.has("md")) {
27
33
  if (tryRunConfiguredFormatter(root, [
28
34
  ...resolveNodeTool(root, join("node_modules", "prettier", "bin", "prettier.cjs"), ["--write", "."], "prettier --write ."),
29
35
  { command: "prettier", args: ["--write", "."], display: "prettier --write ." },
30
- ]))
36
+ { command: "npx", args: ["--yes", "prettier", "--write", "."], display: "npx --yes prettier --write ." },
37
+ ])) {
31
38
  executedTools.push("prettier");
32
- if (tryRunConfiguredFormatter(root, [
33
- ...resolveNodeTool(root, join("node_modules", "eslint", "bin", "eslint.js"), ["--fix", "."], "eslint --fix ."),
34
- { command: "eslint", args: ["--fix", "."], display: "eslint --fix ." },
35
- ]))
36
- executedTools.push("eslint");
39
+ }
37
40
  }
38
41
  // Python
39
42
  if (extensions.has("py")) {
40
43
  if (tryRunConfiguredFormatter(root, [
41
44
  { command: "black", args: ["."], display: "black ." },
42
45
  { command: "python", args: ["-m", "black", "."], display: "python -m black ." },
46
+ { command: "uvx", args: ["black", "."], display: "uvx black ." },
47
+ { command: "pipx", args: ["run", "black", "."], display: "pipx run black ." },
43
48
  ])) {
44
49
  executedTools.push("black");
45
50
  }
51
+ }
52
+ // SQL
53
+ if (extensions.has("sql")) {
46
54
  if (tryRunConfiguredFormatter(root, [
47
- {
48
- command: "autopep8",
49
- args: ["--in-place", "--recursive", "."],
50
- display: "autopep8 --in-place --recursive .",
51
- },
52
- {
53
- command: "python",
54
- args: ["-m", "autopep8", "--in-place", "--recursive", "."],
55
- display: "python -m autopep8 --in-place --recursive .",
56
- },
55
+ { command: "sqlfluff", args: ["fix", "--force", "."], display: "sqlfluff fix --force ." },
56
+ { command: "uvx", args: ["sqlfluff", "fix", "--force", "."], display: "uvx sqlfluff fix --force ." },
57
+ { command: "pipx", args: ["run", "sqlfluff", "fix", "--force", "."], display: "pipx run sqlfluff fix --force ." },
57
58
  ])) {
58
- executedTools.push("autopep8");
59
+ executedTools.push("sqlfluff");
59
60
  }
60
61
  }
61
62
  // Go
62
63
  if (extensions.has("go")) {
63
64
  if (tryRunConfiguredFormatter(root, [
64
65
  { command: "gofmt", args: ["-w", "."], display: "gofmt -w ." },
65
- ]))
66
+ ])) {
66
67
  executedTools.push("gofmt");
68
+ }
67
69
  }
68
70
  const resultsArtifact = {
69
71
  executed_tools: executedTools,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auditor-lambda",
3
- "version": "0.3.9",
3
+ "version": "0.3.10",
4
4
  "private": false,
5
5
  "description": "Portable hybrid code-auditing framework for arbitrary repositories.",
6
6
  "type": "module",
@@ -20,6 +20,7 @@
20
20
  ],
21
21
  "scripts": {
22
22
  "postinstall": "node scripts/postinstall.mjs",
23
+ "update-languages": "node scripts/update-languages.mjs",
23
24
  "build": "tsc -p tsconfig.json",
24
25
  "check": "tsc -p tsconfig.json --noEmit",
25
26
  "test": "npm run build && node --test tests/*.test.mjs",
@@ -67,6 +68,7 @@
67
68
  "devDependencies": {
68
69
  "@types/node": "^24.3.0",
69
70
  "ajv": "^8.17.1",
71
+ "linguist-languages": "^9.3.2",
70
72
  "typescript": "^5.9.2"
71
73
  }
72
74
  }