aislop 0.4.0 → 0.5.0

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.
@@ -11,6 +11,8 @@ const buildJsonOutput = (results, scoreResult, fileCount, elapsedMs) => {
11
11
  elapsed: result.elapsed
12
12
  };
13
13
  return {
14
+ schemaVersion: "1",
15
+ cliVersion: APP_VERSION,
14
16
  version: APP_VERSION,
15
17
  score: scoreResult.score,
16
18
  label: scoreResult.label,
@@ -1,4 +1,4 @@
1
- import { r as APP_VERSION, t as ENGINE_INFO } from "./engine-info-s7Gy2StX.js";
1
+ import { n as ENGINE_INFO, t as APP_VERSION } from "./version-CxBRws3M.js";
2
2
 
3
3
  //#region src/output/json.ts
4
4
  const buildJsonOutput = (results, scoreResult, fileCount, elapsedMs) => {
@@ -10,6 +10,8 @@ const buildJsonOutput = (results, scoreResult, fileCount, elapsedMs) => {
10
10
  elapsed: result.elapsed
11
11
  };
12
12
  return {
13
+ schemaVersion: "1",
14
+ cliVersion: APP_VERSION,
13
15
  version: APP_VERSION,
14
16
  score: scoreResult.score,
15
17
  label: scoreResult.label,
@@ -0,0 +1,20 @@
1
+ import { createRequire } from "node:module";
2
+
3
+ //#region \0rolldown/runtime.js
4
+ var __defProp = Object.defineProperty;
5
+ var __exportAll = (all, no_symbols) => {
6
+ let target = {};
7
+ for (var name in all) {
8
+ __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ }
13
+ if (!no_symbols) {
14
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
15
+ }
16
+ return target;
17
+ };
18
+
19
+ //#endregion
20
+ export { __exportAll as t };
@@ -0,0 +1,59 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ //#region src/utils/subprocess.ts
4
+ const runSubprocess = (command, args, options = {}) => {
5
+ return new Promise((resolve, reject) => {
6
+ const child = spawn(command, args, {
7
+ cwd: options.cwd,
8
+ env: {
9
+ ...process.env,
10
+ ...options.env
11
+ },
12
+ stdio: [
13
+ "ignore",
14
+ "pipe",
15
+ "pipe"
16
+ ],
17
+ windowsHide: true
18
+ });
19
+ const stdoutBuffers = [];
20
+ const stderrBuffers = [];
21
+ child.stdout?.on("data", (buffer) => stdoutBuffers.push(buffer));
22
+ child.stderr?.on("data", (buffer) => stderrBuffers.push(buffer));
23
+ let settled = false;
24
+ let timer;
25
+ const finalize = (callback) => {
26
+ if (settled) return;
27
+ settled = true;
28
+ if (timer) clearTimeout(timer);
29
+ callback();
30
+ };
31
+ if (options.timeout && options.timeout > 0) {
32
+ timer = setTimeout(() => {
33
+ child.kill("SIGTERM");
34
+ setTimeout(() => child.kill("SIGKILL"), 1e3).unref();
35
+ finalize(() => reject(/* @__PURE__ */ new Error(`Command timed out after ${options.timeout}ms: ${command}`)));
36
+ }, options.timeout);
37
+ timer.unref();
38
+ }
39
+ child.once("error", (error) => finalize(() => reject(/* @__PURE__ */ new Error(`Failed to run ${command}: ${error.message}`))));
40
+ child.once("close", (code) => {
41
+ finalize(() => resolve({
42
+ stdout: Buffer.concat(stdoutBuffers).toString("utf-8").trim(),
43
+ stderr: Buffer.concat(stderrBuffers).toString("utf-8").trim(),
44
+ exitCode: code
45
+ }));
46
+ });
47
+ });
48
+ };
49
+ const isToolInstalled = async (tool) => {
50
+ try {
51
+ const result = await runSubprocess("which", [tool]);
52
+ return result.exitCode === 0 && result.stdout.length > 0;
53
+ } catch {
54
+ return false;
55
+ }
56
+ };
57
+
58
+ //#endregion
59
+ export { runSubprocess as n, isToolInstalled as t };
@@ -1,11 +1,3 @@
1
- //#region src/version.ts
2
- /**
3
- * Application version — injected at build time by tsdown from package.json.
4
- * The fallback should always match the "version" field in package.json.
5
- */
6
- const APP_VERSION = "0.4.0";
7
-
8
- //#endregion
9
1
  //#region src/output/engine-info.ts
10
2
  const ENGINE_INFO = {
11
3
  format: {
@@ -21,8 +13,8 @@ const ENGINE_INFO = {
21
13
  description: "Complexity limits, dead code detection, and duplication checks"
22
14
  },
23
15
  "ai-slop": {
24
- label: "Maintainability",
25
- description: "Over-abstraction, swallowed errors, and low-signal code patterns"
16
+ label: "AI Slop",
17
+ description: "Narrative comments, dead patterns, unsafe type casts, TODO stubs, generic names"
26
18
  },
27
19
  architecture: {
28
20
  label: "Architecture",
@@ -36,4 +28,12 @@ const ENGINE_INFO = {
36
28
  const getEngineLabel = (engine) => ENGINE_INFO[engine].label;
37
29
 
38
30
  //#endregion
39
- export { getEngineLabel as n, APP_VERSION as r, ENGINE_INFO as t };
31
+ //#region src/version.ts
32
+ /**
33
+ * Application version — injected at build time by tsdown from package.json.
34
+ * The fallback should always match the "version" field in package.json.
35
+ */
36
+ const APP_VERSION = "0.5.0";
37
+
38
+ //#endregion
39
+ export { ENGINE_INFO as n, getEngineLabel as r, APP_VERSION as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aislop",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Stop AI slop from shipping. A unified code quality CLI that catches the lazy patterns AI coding tools leave behind.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -61,21 +61,22 @@
61
61
  "packageManager": "pnpm@10.28.0",
62
62
  "dependencies": {
63
63
  "@biomejs/biome": "^2.4.5",
64
+ "@clack/prompts": "^1.2.0",
64
65
  "adm-zip": "^0.5.16",
65
66
  "commander": "^14.0.3",
66
67
  "expo-doctor": "^1.18.10",
67
68
  "knip": "^5.85.0",
68
- "ora": "^9.3.0",
69
69
  "oxlint": "^1.51.0",
70
70
  "picocolors": "^1.1.1",
71
71
  "tar": "^7.5.11",
72
+ "typescript": "^5.9.3",
73
+ "wcwidth": "^1.0.1",
72
74
  "yaml": "^2.8.2",
73
75
  "zod": "^4.3.6"
74
76
  },
75
77
  "devDependencies": {
76
78
  "@types/node": "^25.6.0",
77
79
  "tsdown": "^0.20.3",
78
- "typescript": "^5.9.3",
79
80
  "vitest": "^4.0.18"
80
81
  }
81
82
  }