@azerate/claudette-mcp 1.8.2 → 1.8.3
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 +1 -1
- package/dist/crawler.js +35 -12
- package/dist/logger-setup.js +26 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
MCP server for Claudette IDE - providing Claude with 40+ comprehensive workspace management tools.
|
|
4
4
|
|
|
5
|
-
> **v1.8.
|
|
5
|
+
> **v1.8.3** - Improved crawl tools: limited output to 50 issues (prioritizing errors/warnings), better exclusion patterns for dist/scripts/hooks/benchmarks folders.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
package/dist/crawler.js
CHANGED
|
@@ -5,7 +5,22 @@ import { join, extname, relative } from 'path';
|
|
|
5
5
|
// Default config
|
|
6
6
|
export const DEFAULT_CONFIG = {
|
|
7
7
|
enabled: ['quality', 'security', 'react', 'typescript'],
|
|
8
|
-
ignore: [
|
|
8
|
+
ignore: [
|
|
9
|
+
'node_modules',
|
|
10
|
+
'dist',
|
|
11
|
+
'dist-electron',
|
|
12
|
+
'dist-server',
|
|
13
|
+
'build',
|
|
14
|
+
'.git',
|
|
15
|
+
'coverage',
|
|
16
|
+
'*.min.js',
|
|
17
|
+
'*.map',
|
|
18
|
+
'scripts', // Dev scripts legitimately use console.log
|
|
19
|
+
'hooks', // Claude hooks use console.log for JSON output
|
|
20
|
+
'benchmarks', // Benchmarks use console for reporting
|
|
21
|
+
'templates', // Template files
|
|
22
|
+
'__mocks__', // Test mocks
|
|
23
|
+
],
|
|
9
24
|
include: ['*.ts', '*.tsx', '*.js', '*.jsx'],
|
|
10
25
|
thresholds: {
|
|
11
26
|
maxFileLength: 500,
|
|
@@ -138,7 +153,8 @@ export function findPatternMatches(content, pattern, filePath, rule, severity, m
|
|
|
138
153
|
}
|
|
139
154
|
return issues;
|
|
140
155
|
}
|
|
141
|
-
// Format crawl results for display
|
|
156
|
+
// Format crawl results for display (with output limiting)
|
|
157
|
+
const MAX_ISSUES_TO_SHOW = 50;
|
|
142
158
|
export function formatCrawlResult(result) {
|
|
143
159
|
const { category, issues, scannedFiles, duration } = result;
|
|
144
160
|
let output = `${category.toUpperCase()} CRAWL RESULTS\n`;
|
|
@@ -147,20 +163,24 @@ export function formatCrawlResult(result) {
|
|
|
147
163
|
output += `✅ No issues found!\n`;
|
|
148
164
|
}
|
|
149
165
|
else {
|
|
150
|
-
const errors = issues.filter(i => i.severity === 'error')
|
|
151
|
-
const warnings = issues.filter(i => i.severity === 'warning')
|
|
152
|
-
const infos = issues.filter(i => i.severity === 'info')
|
|
166
|
+
const errors = issues.filter(i => i.severity === 'error');
|
|
167
|
+
const warnings = issues.filter(i => i.severity === 'warning');
|
|
168
|
+
const infos = issues.filter(i => i.severity === 'info');
|
|
153
169
|
output += `Found ${issues.length} issue(s):\n`;
|
|
154
|
-
if (errors > 0)
|
|
155
|
-
output += ` 🔴 ${errors} error(s)\n`;
|
|
156
|
-
if (warnings > 0)
|
|
157
|
-
output += ` 🟡 ${warnings} warning(s)\n`;
|
|
158
|
-
if (infos > 0)
|
|
159
|
-
output += ` 🔵 ${infos} info(s)\n`;
|
|
170
|
+
if (errors.length > 0)
|
|
171
|
+
output += ` 🔴 ${errors.length} error(s)\n`;
|
|
172
|
+
if (warnings.length > 0)
|
|
173
|
+
output += ` 🟡 ${warnings.length} warning(s)\n`;
|
|
174
|
+
if (infos.length > 0)
|
|
175
|
+
output += ` 🔵 ${infos.length} info(s)\n`;
|
|
160
176
|
output += '\n';
|
|
177
|
+
// Prioritize: errors first, then warnings, then info
|
|
178
|
+
// Limit total output to MAX_ISSUES_TO_SHOW
|
|
179
|
+
const prioritizedIssues = [...errors, ...warnings, ...infos].slice(0, MAX_ISSUES_TO_SHOW);
|
|
180
|
+
const skippedCount = issues.length - prioritizedIssues.length;
|
|
161
181
|
// Group by file
|
|
162
182
|
const byFile = new Map();
|
|
163
|
-
for (const issue of
|
|
183
|
+
for (const issue of prioritizedIssues) {
|
|
164
184
|
const existing = byFile.get(issue.file) || [];
|
|
165
185
|
existing.push(issue);
|
|
166
186
|
byFile.set(issue.file, existing);
|
|
@@ -176,6 +196,9 @@ export function formatCrawlResult(result) {
|
|
|
176
196
|
}
|
|
177
197
|
output += '\n';
|
|
178
198
|
}
|
|
199
|
+
if (skippedCount > 0) {
|
|
200
|
+
output += `... and ${skippedCount} more issue(s) not shown (errors/warnings prioritized)\n\n`;
|
|
201
|
+
}
|
|
179
202
|
}
|
|
180
203
|
output += `────────────────────────────────────────\n`;
|
|
181
204
|
output += `Scanned: ${scannedFiles} files in ${duration}ms\n`;
|
package/dist/logger-setup.js
CHANGED
|
@@ -326,7 +326,29 @@ export function crawlConsoleLogs(workspacePath) {
|
|
|
326
326
|
const pattern = /console\.(log|debug|info|warn|error|trace)\s*\(([^)]*)\)/g;
|
|
327
327
|
// Get files to scan (reuse crawler logic)
|
|
328
328
|
const extensions = ['.ts', '.tsx', '.js', '.jsx'];
|
|
329
|
-
const ignoreDirs = [
|
|
329
|
+
const ignoreDirs = [
|
|
330
|
+
'node_modules',
|
|
331
|
+
'dist',
|
|
332
|
+
'dist-electron',
|
|
333
|
+
'dist-server',
|
|
334
|
+
'build',
|
|
335
|
+
'.next',
|
|
336
|
+
'coverage',
|
|
337
|
+
'scripts', // Dev scripts legitimately use console.log
|
|
338
|
+
'hooks', // Claude hooks MUST use console.log for JSON output
|
|
339
|
+
'benchmarks', // Benchmarks use console for reporting
|
|
340
|
+
'templates', // Template files
|
|
341
|
+
'__tests__', // Test files
|
|
342
|
+
];
|
|
343
|
+
const ignoreFiles = [
|
|
344
|
+
'vite.config.ts',
|
|
345
|
+
'vite.config.js',
|
|
346
|
+
'jest.config.ts',
|
|
347
|
+
'jest.config.js',
|
|
348
|
+
'vitest.config.ts',
|
|
349
|
+
'vitest.config.js',
|
|
350
|
+
'.eslintrc.js',
|
|
351
|
+
];
|
|
330
352
|
function scanDir(dir) {
|
|
331
353
|
const entries = readdirSync(dir, { withFileTypes: true });
|
|
332
354
|
for (const entry of entries) {
|
|
@@ -338,7 +360,9 @@ export function crawlConsoleLogs(workspacePath) {
|
|
|
338
360
|
}
|
|
339
361
|
else if (entry.isFile()) {
|
|
340
362
|
const ext = entry.name.substring(entry.name.lastIndexOf('.'));
|
|
341
|
-
|
|
363
|
+
const isIgnoredFile = ignoreFiles.includes(entry.name);
|
|
364
|
+
const isTestFile = entry.name.includes('.test.') || entry.name.includes('.spec.');
|
|
365
|
+
if (extensions.includes(ext) && !isIgnoredFile && !isTestFile) {
|
|
342
366
|
scanFile(fullPath);
|
|
343
367
|
}
|
|
344
368
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azerate/claudette-mcp",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.3",
|
|
4
4
|
"description": "MCP server for Claudette IDE - 40+ tools for TypeScript errors, git changes, workflow automation, testing, benchmarks, refactoring, code quality crawlers, logging setup, checkpoints, memory, and script management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|