check-my-toolkit 0.1.0 → 0.1.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.
- package/README.md +157 -1
- package/dist/code/index.d.ts.map +1 -1
- package/dist/code/index.js +10 -6
- package/dist/code/index.js.map +1 -1
- package/dist/code/tools/tsc.d.ts +1 -0
- package/dist/code/tools/tsc.d.ts.map +1 -1
- package/dist/code/tools/tsc.js +18 -14
- package/dist/code/tools/tsc.js.map +1 -1
- package/dist/config/loader.d.ts +2 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +68 -62
- package/dist/config/loader.js.map +1 -1
- package/dist/config/schema.d.ts +0 -714
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +16 -16
- package/dist/config/schema.js.map +1 -1
- package/dist/output/index.d.ts.map +1 -1
- package/dist/output/index.js +19 -21
- package/dist/output/index.js.map +1 -1
- package/package.json +10 -2
- package/dist/code/audit.d.ts +0 -14
- package/dist/code/audit.d.ts.map +0 -1
- package/dist/code/audit.js +0 -130
- package/dist/code/audit.js.map +0 -1
- package/dist/code/linting.d.ts +0 -10
- package/dist/code/linting.d.ts.map +0 -1
- package/dist/code/linting.js +0 -233
- package/dist/code/linting.js.map +0 -1
- package/dist/code/types.d.ts +0 -6
- package/dist/code/types.d.ts.map +0 -1
- package/dist/code/types.js +0 -132
- package/dist/code/types.js.map +0 -1
- package/dist/src/cli.d.ts +0 -3
- package/dist/src/cli.d.ts.map +0 -1
- package/dist/src/cli.js +0 -116
- package/dist/src/cli.js.map +0 -1
- package/dist/src/code/index.d.ts +0 -13
- package/dist/src/code/index.d.ts.map +0 -1
- package/dist/src/code/index.js +0 -53
- package/dist/src/code/index.js.map +0 -1
- package/dist/src/code/tools/base.d.ts +0 -52
- package/dist/src/code/tools/base.d.ts.map +0 -1
- package/dist/src/code/tools/base.js +0 -83
- package/dist/src/code/tools/base.js.map +0 -1
- package/dist/src/code/tools/eslint.d.ts +0 -15
- package/dist/src/code/tools/eslint.d.ts.map +0 -1
- package/dist/src/code/tools/eslint.js +0 -79
- package/dist/src/code/tools/eslint.js.map +0 -1
- package/dist/src/code/tools/index.d.ts +0 -5
- package/dist/src/code/tools/index.d.ts.map +0 -1
- package/dist/src/code/tools/index.js +0 -5
- package/dist/src/code/tools/index.js.map +0 -1
- package/dist/src/code/tools/ruff.d.ts +0 -26
- package/dist/src/code/tools/ruff.d.ts.map +0 -1
- package/dist/src/code/tools/ruff.js +0 -149
- package/dist/src/code/tools/ruff.js.map +0 -1
- package/dist/src/code/tools/tsc.d.ts +0 -21
- package/dist/src/code/tools/tsc.d.ts.map +0 -1
- package/dist/src/code/tools/tsc.js +0 -94
- package/dist/src/code/tools/tsc.js.map +0 -1
- package/dist/src/config/index.d.ts +0 -3
- package/dist/src/config/index.d.ts.map +0 -1
- package/dist/src/config/index.js +0 -3
- package/dist/src/config/index.js.map +0 -1
- package/dist/src/config/loader.d.ts +0 -22
- package/dist/src/config/loader.d.ts.map +0 -1
- package/dist/src/config/loader.js +0 -124
- package/dist/src/config/loader.js.map +0 -1
- package/dist/src/config/schema.d.ts +0 -503
- package/dist/src/config/schema.d.ts.map +0 -1
- package/dist/src/config/schema.js +0 -190
- package/dist/src/config/schema.js.map +0 -1
- package/dist/src/index.d.ts +0 -8
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -16
- package/dist/src/index.js.map +0 -1
- package/dist/src/output/index.d.ts +0 -15
- package/dist/src/output/index.d.ts.map +0 -1
- package/dist/src/output/index.js +0 -96
- package/dist/src/output/index.js.map +0 -1
- package/dist/src/types/index.d.ts +0 -96
- package/dist/src/types/index.d.ts.map +0 -1
- package/dist/src/types/index.js +0 -89
- package/dist/src/types/index.js.map +0 -1
- package/dist/tests/e2e/e2e.test.d.ts +0 -2
- package/dist/tests/e2e/e2e.test.d.ts.map +0 -1
- package/dist/tests/e2e/e2e.test.js +0 -398
- package/dist/tests/e2e/e2e.test.js.map +0 -1
package/dist/code/linting.js
DELETED
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
import * as fs from "node:fs";
|
|
2
|
-
import * as path from "node:path";
|
|
3
|
-
import { execa } from "execa";
|
|
4
|
-
/**
|
|
5
|
-
* Run ESLint and return violations
|
|
6
|
-
*/
|
|
7
|
-
export async function runESLint(projectRoot) {
|
|
8
|
-
const startTime = Date.now();
|
|
9
|
-
const violations = [];
|
|
10
|
-
// Check if ESLint config exists
|
|
11
|
-
const eslintConfigs = [
|
|
12
|
-
"eslint.config.js",
|
|
13
|
-
"eslint.config.mjs",
|
|
14
|
-
"eslint.config.cjs",
|
|
15
|
-
".eslintrc.js",
|
|
16
|
-
".eslintrc.json",
|
|
17
|
-
".eslintrc.yml",
|
|
18
|
-
".eslintrc.yaml",
|
|
19
|
-
];
|
|
20
|
-
const hasConfig = eslintConfigs.some((config) => fs.existsSync(path.join(projectRoot, config)));
|
|
21
|
-
if (!hasConfig) {
|
|
22
|
-
return {
|
|
23
|
-
name: "ESLint",
|
|
24
|
-
rule: "code.linting",
|
|
25
|
-
passed: true,
|
|
26
|
-
violations: [],
|
|
27
|
-
skipped: true,
|
|
28
|
-
skipReason: "No ESLint config found",
|
|
29
|
-
duration: Date.now() - startTime,
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
try {
|
|
33
|
-
// Run ESLint with JSON output
|
|
34
|
-
const result = await execa("npx", ["eslint", ".", "--format", "json"], {
|
|
35
|
-
cwd: projectRoot,
|
|
36
|
-
reject: false,
|
|
37
|
-
timeout: 5 * 60 * 1000, // 5 minutes
|
|
38
|
-
});
|
|
39
|
-
// Parse JSON output
|
|
40
|
-
let eslintResults = [];
|
|
41
|
-
try {
|
|
42
|
-
eslintResults = JSON.parse(result.stdout);
|
|
43
|
-
}
|
|
44
|
-
catch {
|
|
45
|
-
// If we can't parse JSON, ESLint might have crashed
|
|
46
|
-
if (result.exitCode !== 0 && result.stderr) {
|
|
47
|
-
return {
|
|
48
|
-
name: "ESLint",
|
|
49
|
-
rule: "code.linting",
|
|
50
|
-
passed: false,
|
|
51
|
-
violations: [
|
|
52
|
-
{
|
|
53
|
-
rule: "code.linting.eslint",
|
|
54
|
-
tool: "eslint",
|
|
55
|
-
message: `ESLint error: ${result.stderr}`,
|
|
56
|
-
severity: "error",
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
skipped: false,
|
|
60
|
-
duration: Date.now() - startTime,
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
// Convert to violations
|
|
65
|
-
for (const fileResult of eslintResults) {
|
|
66
|
-
for (const msg of fileResult.messages) {
|
|
67
|
-
violations.push({
|
|
68
|
-
rule: "code.linting.eslint",
|
|
69
|
-
tool: "eslint",
|
|
70
|
-
file: path.relative(projectRoot, fileResult.filePath),
|
|
71
|
-
line: msg.line,
|
|
72
|
-
column: msg.column,
|
|
73
|
-
message: msg.message,
|
|
74
|
-
code: msg.ruleId ?? undefined,
|
|
75
|
-
severity: msg.severity === 2 ? "error" : "warning",
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return {
|
|
80
|
-
name: "ESLint",
|
|
81
|
-
rule: "code.linting",
|
|
82
|
-
passed: violations.length === 0,
|
|
83
|
-
violations,
|
|
84
|
-
skipped: false,
|
|
85
|
-
duration: Date.now() - startTime,
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
catch (error) {
|
|
89
|
-
// ESLint not installed or other error
|
|
90
|
-
const errorMessage = error instanceof Error ? error.message : "Unknown error";
|
|
91
|
-
if (errorMessage.includes("ENOENT") || errorMessage.includes("not found")) {
|
|
92
|
-
return {
|
|
93
|
-
name: "ESLint",
|
|
94
|
-
rule: "code.linting",
|
|
95
|
-
passed: true,
|
|
96
|
-
violations: [],
|
|
97
|
-
skipped: true,
|
|
98
|
-
skipReason: "ESLint not installed",
|
|
99
|
-
duration: Date.now() - startTime,
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
return {
|
|
103
|
-
name: "ESLint",
|
|
104
|
-
rule: "code.linting",
|
|
105
|
-
passed: false,
|
|
106
|
-
violations: [
|
|
107
|
-
{
|
|
108
|
-
rule: "code.linting.eslint",
|
|
109
|
-
tool: "eslint",
|
|
110
|
-
message: `ESLint error: ${errorMessage}`,
|
|
111
|
-
severity: "error",
|
|
112
|
-
},
|
|
113
|
-
],
|
|
114
|
-
skipped: false,
|
|
115
|
-
duration: Date.now() - startTime,
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Run Ruff and return violations
|
|
121
|
-
*/
|
|
122
|
-
export async function runRuff(projectRoot) {
|
|
123
|
-
const startTime = Date.now();
|
|
124
|
-
const violations = [];
|
|
125
|
-
// Check if there are any Python files
|
|
126
|
-
try {
|
|
127
|
-
const result = await execa("find", [".", "-name", "*.py", "-type", "f"], {
|
|
128
|
-
cwd: projectRoot,
|
|
129
|
-
reject: false,
|
|
130
|
-
});
|
|
131
|
-
if (!result.stdout.trim()) {
|
|
132
|
-
return {
|
|
133
|
-
name: "Ruff",
|
|
134
|
-
rule: "code.linting",
|
|
135
|
-
passed: true,
|
|
136
|
-
violations: [],
|
|
137
|
-
skipped: true,
|
|
138
|
-
skipReason: "No Python files found",
|
|
139
|
-
duration: Date.now() - startTime,
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
catch {
|
|
144
|
-
// Continue anyway
|
|
145
|
-
}
|
|
146
|
-
try {
|
|
147
|
-
// Run Ruff with JSON output
|
|
148
|
-
const result = await execa("ruff", ["check", ".", "--output-format", "json"], {
|
|
149
|
-
cwd: projectRoot,
|
|
150
|
-
reject: false,
|
|
151
|
-
timeout: 5 * 60 * 1000, // 5 minutes
|
|
152
|
-
});
|
|
153
|
-
// Parse JSON output
|
|
154
|
-
let ruffResults = [];
|
|
155
|
-
try {
|
|
156
|
-
if (result.stdout.trim()) {
|
|
157
|
-
ruffResults = JSON.parse(result.stdout);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
catch {
|
|
161
|
-
// If we can't parse JSON, Ruff might have crashed
|
|
162
|
-
if (result.exitCode !== 0 && result.stderr) {
|
|
163
|
-
return {
|
|
164
|
-
name: "Ruff",
|
|
165
|
-
rule: "code.linting",
|
|
166
|
-
passed: false,
|
|
167
|
-
violations: [
|
|
168
|
-
{
|
|
169
|
-
rule: "code.linting.ruff",
|
|
170
|
-
tool: "ruff",
|
|
171
|
-
message: `Ruff error: ${result.stderr}`,
|
|
172
|
-
severity: "error",
|
|
173
|
-
},
|
|
174
|
-
],
|
|
175
|
-
skipped: false,
|
|
176
|
-
duration: Date.now() - startTime,
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
// Convert to violations
|
|
181
|
-
for (const msg of ruffResults) {
|
|
182
|
-
violations.push({
|
|
183
|
-
rule: "code.linting.ruff",
|
|
184
|
-
tool: "ruff",
|
|
185
|
-
file: path.relative(projectRoot, msg.filename),
|
|
186
|
-
line: msg.location.row,
|
|
187
|
-
column: msg.location.column,
|
|
188
|
-
message: msg.message,
|
|
189
|
-
code: msg.code,
|
|
190
|
-
severity: "error",
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
return {
|
|
194
|
-
name: "Ruff",
|
|
195
|
-
rule: "code.linting",
|
|
196
|
-
passed: violations.length === 0,
|
|
197
|
-
violations,
|
|
198
|
-
skipped: false,
|
|
199
|
-
duration: Date.now() - startTime,
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
catch (error) {
|
|
203
|
-
// Ruff not installed or other error
|
|
204
|
-
const errorMessage = error instanceof Error ? error.message : "Unknown error";
|
|
205
|
-
if (errorMessage.includes("ENOENT") || errorMessage.includes("not found")) {
|
|
206
|
-
return {
|
|
207
|
-
name: "Ruff",
|
|
208
|
-
rule: "code.linting",
|
|
209
|
-
passed: true,
|
|
210
|
-
violations: [],
|
|
211
|
-
skipped: true,
|
|
212
|
-
skipReason: "Ruff not installed",
|
|
213
|
-
duration: Date.now() - startTime,
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
return {
|
|
217
|
-
name: "Ruff",
|
|
218
|
-
rule: "code.linting",
|
|
219
|
-
passed: false,
|
|
220
|
-
violations: [
|
|
221
|
-
{
|
|
222
|
-
rule: "code.linting.ruff",
|
|
223
|
-
tool: "ruff",
|
|
224
|
-
message: `Ruff error: ${errorMessage}`,
|
|
225
|
-
severity: "error",
|
|
226
|
-
},
|
|
227
|
-
],
|
|
228
|
-
skipped: false,
|
|
229
|
-
duration: Date.now() - startTime,
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
//# sourceMappingURL=linting.js.map
|
package/dist/code/linting.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"linting.js","sourceRoot":"","sources":["../../src/code/linting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAiB9B;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,WAAmB;IACjD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC7B,MAAM,UAAU,GAAgB,EAAE,CAAC;IAEnC,gCAAgC;IAChC,MAAM,aAAa,GAAG;QACpB,kBAAkB;QAClB,mBAAmB;QACnB,mBAAmB;QACnB,cAAc;QACd,gBAAgB;QAChB,eAAe;QACf,gBAAgB;KACjB,CAAC;IAEF,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAEhG,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO;YACL,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ources":["../../src/code/types.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,mBAAmB,CAAC;AAsCrE;;GAEG;AACH,wBAAsB,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CA4GtE"}
|
package/dist/code/types.js
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import * as fs from "node:fs";
|
|
2
|
-
import * as path from "node:path";
|
|
3
|
-
import { execa } from "execa";
|
|
4
|
-
/**
|
|
5
|
-
* Parse tsc output into structured diagnostics
|
|
6
|
-
* Format: file(line,col): error TSxxxx: message
|
|
7
|
-
*/
|
|
8
|
-
function parseTscOutput(output, projectRoot) {
|
|
9
|
-
const diagnostics = [];
|
|
10
|
-
const lines = output.split("\n");
|
|
11
|
-
// Regex to match tsc error format: file(line,col): error TSxxxx: message
|
|
12
|
-
const errorRegex = /^(.+?)\((\d+),(\d+)\):\s*error\s+TS(\d+):\s*(.+)$/;
|
|
13
|
-
for (const line of lines) {
|
|
14
|
-
const match = errorRegex.exec(line);
|
|
15
|
-
if (match) {
|
|
16
|
-
const [, filePath, lineNum, colNum, code, message] = match;
|
|
17
|
-
diagnostics.push({
|
|
18
|
-
file: path.relative(projectRoot, filePath),
|
|
19
|
-
line: parseInt(lineNum, 10),
|
|
20
|
-
column: parseInt(colNum, 10),
|
|
21
|
-
code: parseInt(code, 10),
|
|
22
|
-
message: message.trim(),
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return diagnostics;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Run TypeScript type checking and return violations
|
|
30
|
-
*/
|
|
31
|
-
export async function runTsc(projectRoot) {
|
|
32
|
-
const startTime = Date.now();
|
|
33
|
-
const violations = [];
|
|
34
|
-
// Check if tsconfig.json exists
|
|
35
|
-
const tsconfigPath = path.join(projectRoot, "tsconfig.json");
|
|
36
|
-
if (!fs.existsSync(tsconfigPath)) {
|
|
37
|
-
return {
|
|
38
|
-
name: "TypeScript",
|
|
39
|
-
rule: "code.types",
|
|
40
|
-
passed: true,
|
|
41
|
-
violations: [],
|
|
42
|
-
skipped: true,
|
|
43
|
-
skipReason: "No tsconfig.json found",
|
|
44
|
-
duration: Date.now() - startTime,
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
try {
|
|
48
|
-
// Run tsc with --noEmit to only check types
|
|
49
|
-
const result = await execa("npx", ["tsc", "--noEmit"], {
|
|
50
|
-
cwd: projectRoot,
|
|
51
|
-
reject: false,
|
|
52
|
-
timeout: 5 * 60 * 1000, // 5 minutes
|
|
53
|
-
});
|
|
54
|
-
// tsc exits with 0 if no errors, non-zero if errors
|
|
55
|
-
if (result.exitCode === 0) {
|
|
56
|
-
return {
|
|
57
|
-
name: "TypeScript",
|
|
58
|
-
rule: "code.types",
|
|
59
|
-
passed: true,
|
|
60
|
-
violations: [],
|
|
61
|
-
skipped: false,
|
|
62
|
-
duration: Date.now() - startTime,
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
// Parse the output for errors
|
|
66
|
-
const diagnostics = parseTscOutput(result.stdout, projectRoot);
|
|
67
|
-
// Convert to violations
|
|
68
|
-
for (const diag of diagnostics) {
|
|
69
|
-
violations.push({
|
|
70
|
-
rule: "code.types.tsc",
|
|
71
|
-
tool: "tsc",
|
|
72
|
-
file: diag.file,
|
|
73
|
-
line: diag.line,
|
|
74
|
-
column: diag.column,
|
|
75
|
-
message: diag.message,
|
|
76
|
-
code: `TS${diag.code}`,
|
|
77
|
-
severity: "error",
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
// If we couldn't parse any diagnostics but tsc failed, report the raw output
|
|
81
|
-
if (violations.length === 0 && result.exitCode !== 0) {
|
|
82
|
-
const errorOutput = result.stdout || result.stderr;
|
|
83
|
-
if (errorOutput) {
|
|
84
|
-
violations.push({
|
|
85
|
-
rule: "code.types.tsc",
|
|
86
|
-
tool: "tsc",
|
|
87
|
-
message: `TypeScript error: ${errorOutput.slice(0, 500)}`,
|
|
88
|
-
severity: "error",
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return {
|
|
93
|
-
name: "TypeScript",
|
|
94
|
-
rule: "code.types",
|
|
95
|
-
passed: violations.length === 0,
|
|
96
|
-
violations,
|
|
97
|
-
skipped: false,
|
|
98
|
-
duration: Date.now() - startTime,
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
catch (error) {
|
|
102
|
-
// tsc not installed or other error
|
|
103
|
-
const errorMessage = error instanceof Error ? error.message : "Unknown error";
|
|
104
|
-
if (errorMessage.includes("ENOENT") || errorMessage.includes("not found")) {
|
|
105
|
-
return {
|
|
106
|
-
name: "TypeScript",
|
|
107
|
-
rule: "code.types",
|
|
108
|
-
passed: true,
|
|
109
|
-
violations: [],
|
|
110
|
-
skipped: true,
|
|
111
|
-
skipReason: "TypeScript not installed",
|
|
112
|
-
duration: Date.now() - startTime,
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
return {
|
|
116
|
-
name: "TypeScript",
|
|
117
|
-
rule: "code.types",
|
|
118
|
-
passed: false,
|
|
119
|
-
violations: [
|
|
120
|
-
{
|
|
121
|
-
rule: "code.types.tsc",
|
|
122
|
-
tool: "tsc",
|
|
123
|
-
message: `TypeScript error: ${errorMessage}`,
|
|
124
|
-
severity: "error",
|
|
125
|
-
},
|
|
126
|
-
],
|
|
127
|
-
skipped: false,
|
|
128
|
-
duration: Date.now() - startTime,
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
//# sourceMappingURL=types.js.map
|
package/dist/code/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/code/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAA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,EAAE,KAAK;YACb,UAAU,EAAE;gBACV;oBACE,IAAI,EAAE,gBAAgB;oBACtB,IAAI,EAAE,KAAK;oBACX,OAAO,EAAE,qBAAqB,YAAY,EAAE;oBAC5C,QAAQ,EAAE,OAAO;iBAClB;aACF;YACD,OAAO,EAAE,KAAK;YACd,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;SACjC,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/dist/src/cli.d.ts
DELETED
package/dist/src/cli.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":""}
|
package/dist/src/cli.js
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { Command } from "commander";
|
|
3
|
-
import { auditCodeConfig, runCodeChecks } from "./code/index.js";
|
|
4
|
-
import { ConfigError, getProjectRoot, loadConfig } from "./config/index.js";
|
|
5
|
-
import { formatOutput } from "./output/index.js";
|
|
6
|
-
import { ExitCode } from "./types/index.js";
|
|
7
|
-
const VERSION = "0.1.0";
|
|
8
|
-
const program = new Command();
|
|
9
|
-
program
|
|
10
|
-
.name("cm")
|
|
11
|
-
.description("Unified project health checks - code, process, and stack")
|
|
12
|
-
.version(VERSION);
|
|
13
|
-
// Code subcommand
|
|
14
|
-
const codeCommand = new Command("code").description("Code quality checks");
|
|
15
|
-
// cm code check
|
|
16
|
-
codeCommand
|
|
17
|
-
.command("check")
|
|
18
|
-
.description("Run linting and type checking tools")
|
|
19
|
-
.option("-c, --config <path>", "Path to check.toml config file")
|
|
20
|
-
.option("-f, --format <format>", "Output format: text or json", "text")
|
|
21
|
-
.action(async (options) => {
|
|
22
|
-
try {
|
|
23
|
-
const { config, configPath } = loadConfig(options.config);
|
|
24
|
-
const projectRoot = getProjectRoot(configPath);
|
|
25
|
-
const domainResult = await runCodeChecks(projectRoot, config);
|
|
26
|
-
const result = {
|
|
27
|
-
version: VERSION,
|
|
28
|
-
configPath,
|
|
29
|
-
domains: {
|
|
30
|
-
code: domainResult,
|
|
31
|
-
},
|
|
32
|
-
summary: {
|
|
33
|
-
totalViolations: domainResult.violationCount,
|
|
34
|
-
exitCode: domainResult.violationCount > 0 ? ExitCode.VIOLATIONS_FOUND : ExitCode.SUCCESS,
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
process.stdout.write(`${formatOutput(result, options.format)}\n`);
|
|
38
|
-
process.exit(result.summary.exitCode);
|
|
39
|
-
}
|
|
40
|
-
catch (error) {
|
|
41
|
-
if (error instanceof ConfigError) {
|
|
42
|
-
console.error(`Config error: ${error.message}`);
|
|
43
|
-
process.exit(ExitCode.CONFIG_ERROR);
|
|
44
|
-
}
|
|
45
|
-
console.error(`Error: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
46
|
-
process.exit(ExitCode.RUNTIME_ERROR);
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
// cm code audit
|
|
50
|
-
codeCommand
|
|
51
|
-
.command("audit")
|
|
52
|
-
.description("Verify linting and type checking configs exist")
|
|
53
|
-
.option("-c, --config <path>", "Path to check.toml config file")
|
|
54
|
-
.option("-f, --format <format>", "Output format: text or json", "text")
|
|
55
|
-
.action(async (options) => {
|
|
56
|
-
try {
|
|
57
|
-
const { config, configPath } = loadConfig(options.config);
|
|
58
|
-
const projectRoot = getProjectRoot(configPath);
|
|
59
|
-
const domainResult = await auditCodeConfig(projectRoot, config);
|
|
60
|
-
const result = {
|
|
61
|
-
version: VERSION,
|
|
62
|
-
configPath,
|
|
63
|
-
domains: {
|
|
64
|
-
code: domainResult,
|
|
65
|
-
},
|
|
66
|
-
summary: {
|
|
67
|
-
totalViolations: domainResult.violationCount,
|
|
68
|
-
exitCode: domainResult.violationCount > 0 ? ExitCode.VIOLATIONS_FOUND : ExitCode.SUCCESS,
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
process.stdout.write(`${formatOutput(result, options.format)}\n`);
|
|
72
|
-
process.exit(result.summary.exitCode);
|
|
73
|
-
}
|
|
74
|
-
catch (error) {
|
|
75
|
-
if (error instanceof ConfigError) {
|
|
76
|
-
console.error(`Config error: ${error.message}`);
|
|
77
|
-
process.exit(ExitCode.CONFIG_ERROR);
|
|
78
|
-
}
|
|
79
|
-
console.error(`Error: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
80
|
-
process.exit(ExitCode.RUNTIME_ERROR);
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
program.addCommand(codeCommand);
|
|
84
|
-
// cm validate - top-level command to validate check.toml
|
|
85
|
-
program
|
|
86
|
-
.command("validate")
|
|
87
|
-
.description("Validate check.toml configuration file")
|
|
88
|
-
.option("-c, --config <path>", "Path to check.toml config file")
|
|
89
|
-
.option("-f, --format <format>", "Output format: text or json", "text")
|
|
90
|
-
.action((options) => {
|
|
91
|
-
try {
|
|
92
|
-
const { configPath } = loadConfig(options.config);
|
|
93
|
-
if (options.format === "json") {
|
|
94
|
-
process.stdout.write(`${JSON.stringify({ valid: true, configPath }, null, 2)}\n`);
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
process.stdout.write(`✓ Valid: ${configPath}\n`);
|
|
98
|
-
}
|
|
99
|
-
process.exit(ExitCode.SUCCESS);
|
|
100
|
-
}
|
|
101
|
-
catch (error) {
|
|
102
|
-
if (error instanceof ConfigError) {
|
|
103
|
-
if (options.format === "json") {
|
|
104
|
-
process.stdout.write(`${JSON.stringify({ valid: false, error: error.message }, null, 2)}\n`);
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
console.error(`✗ Invalid: ${error.message}`);
|
|
108
|
-
}
|
|
109
|
-
process.exit(ExitCode.CONFIG_ERROR);
|
|
110
|
-
}
|
|
111
|
-
console.error(`Error: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
112
|
-
process.exit(ExitCode.RUNTIME_ERROR);
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
program.parse();
|
|
116
|
-
//# sourceMappingURL=cli.js.map
|
package/dist/src/cli.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,eAAe,EAAC,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAC,cAAc,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAqB,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAmB,MAAM,kBAAkB,CAAC;AAE7D,MAAM,OAAO,GAAG,OAAO,CAAC;AAExB,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,IAAI,CAAC;KACV,WAAW,CAAC,0DAA0D,CAAC;KACvE,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,kBAAkB;AAClB,MAAM,WAAW,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;AAE3E,gBAAgB;AAChB,WAAW;KACR,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,qCAAqC,CAAC;KAClD,MAAM,CAAC,qBAAqB,EAAE,gCAAgC,CAAC;KAC/D,MAAM,CAAC,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,CAAC;KACtE,MAAM,CAAC,KAAK,EAAE,OAA4C,EAAE,EAAE;IAC7D,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC1D,MAAM,WAAW,GAAG,cAAc,CAAC,UAAU,CAAC,CAAC;QAE/C,MAAM,YAAY,GAAG,MAAM,aAAa,CAAC,WAA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QACD,OAAO,CAAC,KAAK,CAAC,UAAU,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC;QACpF,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;IACvC,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
package/dist/src/code/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type Config } from "../config/index.js";
|
|
2
|
-
import { DomainResult } from "../types/index.js";
|
|
3
|
-
export { ESLintRunner, RuffRunner, TscRunner } from "./tools/index.js";
|
|
4
|
-
export { BaseToolRunner } from "./tools/index.js";
|
|
5
|
-
/**
|
|
6
|
-
* Run all code checks based on configuration
|
|
7
|
-
*/
|
|
8
|
-
export declare function runCodeChecks(projectRoot: string, config: Config): Promise<DomainResult>;
|
|
9
|
-
/**
|
|
10
|
-
* Audit code configuration (check that configs exist without running tools)
|
|
11
|
-
*/
|
|
12
|
-
export declare function auditCodeConfig(projectRoot: string, config: Config): Promise<DomainResult>;
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/code/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAEL,YAAY,EAEb,MAAM,mBAAmB,CAAC;AAS3B,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAuBlD;;GAEG;AACH,wBAAsB,aAAa,CACjC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,YAAY,CAAC,CAIvB;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,YAAY,CAAC,CAIvB"}
|
package/dist/src/code/index.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { DomainResult, } from "../types/index.js";
|
|
2
|
-
import { ESLintRunner, RuffRunner, TscRunner } from "./tools/index.js";
|
|
3
|
-
// Tool runner instances
|
|
4
|
-
const eslint = new ESLintRunner();
|
|
5
|
-
const ruff = new RuffRunner();
|
|
6
|
-
const tsc = new TscRunner();
|
|
7
|
-
// Export tool runners for direct access
|
|
8
|
-
export { ESLintRunner, RuffRunner, TscRunner } from "./tools/index.js";
|
|
9
|
-
export { BaseToolRunner } from "./tools/index.js";
|
|
10
|
-
/** Check if a tool is enabled in config */
|
|
11
|
-
function isEnabled(toolConfig) {
|
|
12
|
-
return toolConfig?.enabled === true;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Get enabled tools based on configuration
|
|
16
|
-
*/
|
|
17
|
-
function getEnabledTools(config) {
|
|
18
|
-
const code = config.code ?? {};
|
|
19
|
-
const linting = code.linting ?? {};
|
|
20
|
-
const types = code.types ?? {};
|
|
21
|
-
const tools = [];
|
|
22
|
-
if (isEnabled(linting.eslint))
|
|
23
|
-
tools.push(eslint);
|
|
24
|
-
if (isEnabled(linting.ruff))
|
|
25
|
-
tools.push(ruff);
|
|
26
|
-
if (isEnabled(types.tsc))
|
|
27
|
-
tools.push(tsc);
|
|
28
|
-
return tools;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Run all code checks based on configuration
|
|
32
|
-
*/
|
|
33
|
-
export async function runCodeChecks(projectRoot, config) {
|
|
34
|
-
const tools = getEnabledTools(config);
|
|
35
|
-
const checks = await runTools(tools, projectRoot, "run");
|
|
36
|
-
return DomainResult.fromChecks("code", checks);
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Audit code configuration (check that configs exist without running tools)
|
|
40
|
-
*/
|
|
41
|
-
export async function auditCodeConfig(projectRoot, config) {
|
|
42
|
-
const tools = getEnabledTools(config);
|
|
43
|
-
const checks = await runTools(tools, projectRoot, "audit");
|
|
44
|
-
return DomainResult.fromChecks("code", checks);
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Run tools in parallel
|
|
48
|
-
*/
|
|
49
|
-
async function runTools(tools, projectRoot, mode) {
|
|
50
|
-
const promises = tools.map((tool) => mode === "run" ? tool.run(projectRoot) : tool.audit(projectRoot));
|
|
51
|
-
return Promise.all(promises);
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/code/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,YAAY,GAEb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEvE,wBAAwB;AACxB,MAAM,MAAM,GAAG,IAAI,YAAY,EAAE,CAAC;AAClC,MAAM,IAAI,GAAG,IAAI,UAAU,EAAE,CAAC;AAC9B,MAAM,GAAG,GAAG,IAAI,SAAS,EAAE,CAAC;AAE5B,wCAAwC;AACxC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,2CAA2C;AAC3C,SAAS,SAAS,CAAC,UAA6C;IAC9D,OAAO,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;AACtC,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CAAC,MAAc;IACrC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;IAC/B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC;IACnC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,E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,CAAC,CACjE,CAAC;IACF,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { CheckResult, type IToolRunner, type Violation } from "../../types/index.js";
|
|
2
|
-
/**
|
|
3
|
-
* Abstract base class for tool runners.
|
|
4
|
-
* Provides common functionality for checking configs and handling errors.
|
|
5
|
-
*/
|
|
6
|
-
export declare abstract class BaseToolRunner implements IToolRunner {
|
|
7
|
-
abstract readonly name: string;
|
|
8
|
-
abstract readonly rule: string;
|
|
9
|
-
abstract readonly toolId: string;
|
|
10
|
-
abstract readonly configFiles: string[];
|
|
11
|
-
/**
|
|
12
|
-
* Check if any of the config files exist
|
|
13
|
-
*/
|
|
14
|
-
protected hasConfig(projectRoot: string): boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Find which config file exists (if any)
|
|
17
|
-
*/
|
|
18
|
-
protected findConfig(projectRoot: string): string | null;
|
|
19
|
-
/**
|
|
20
|
-
* Check if an error indicates the tool is not installed
|
|
21
|
-
*/
|
|
22
|
-
protected isNotInstalledError(error: unknown): boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Create a skip result for when config is missing
|
|
25
|
-
*/
|
|
26
|
-
protected skipNoConfig(duration: number): CheckResult;
|
|
27
|
-
/**
|
|
28
|
-
* Create a skip result for when tool is not installed
|
|
29
|
-
*/
|
|
30
|
-
protected skipNotInstalled(duration: number): CheckResult;
|
|
31
|
-
/**
|
|
32
|
-
* Create a pass result
|
|
33
|
-
*/
|
|
34
|
-
protected pass(duration: number): CheckResult;
|
|
35
|
-
/**
|
|
36
|
-
* Create a fail result from violations
|
|
37
|
-
*/
|
|
38
|
-
protected fail(violations: Violation[], duration: number): CheckResult;
|
|
39
|
-
/**
|
|
40
|
-
* Create a result from violations (pass if empty, fail otherwise)
|
|
41
|
-
*/
|
|
42
|
-
protected fromViolations(violations: Violation[], duration: number): CheckResult;
|
|
43
|
-
/**
|
|
44
|
-
* Run the tool - must be implemented by subclasses
|
|
45
|
-
*/
|
|
46
|
-
abstract run(projectRoot: string): Promise<CheckResult>;
|
|
47
|
-
/**
|
|
48
|
-
* Default audit implementation - checks if config exists
|
|
49
|
-
*/
|
|
50
|
-
audit(projectRoot: string): Promise<CheckResult>;
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=base.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/code/tools/base.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,WAAW,EACX,KAAK,WAAW,EAChB,KAAK,SAAS,EACf,MAAM,sBAAsB,CAAC;AAE9B;;;GAGG;AACH,8BAAsB,cAAe,YAAW,WAAW;IACzD,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;IAExC;;OAEG;IACH,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO;IAMjD;;OAEG;IACH,SAAS,CAAC,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IASxD;;OAEG;IACH,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAMtD;;OAEG;IACH,SAAS,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW;IASrD;;OAEG;IACH,SAAS,CAAC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW;IASzD;;OAEG;IACH,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW;IAI7C;;OAEG;IACH,SAAS,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,EAAE,EA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