code-auditor-mcp 1.3.1 → 1.6.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.
- package/README.md +133 -2
- package/dist/analyzers/solidAnalyzer.d.ts +5 -1
- package/dist/analyzers/solidAnalyzer.d.ts.map +1 -1
- package/dist/analyzers/solidAnalyzer.js +174 -2
- package/dist/analyzers/solidAnalyzer.js.map +1 -1
- package/dist/codeIndexDb.d.ts +47 -0
- package/dist/codeIndexDb.d.ts.map +1 -1
- package/dist/codeIndexDb.js +432 -5
- package/dist/codeIndexDb.js.map +1 -1
- package/dist/codeIndexService.d.ts +26 -0
- package/dist/codeIndexService.d.ts.map +1 -1
- package/dist/codeIndexService.js +60 -0
- package/dist/codeIndexService.js.map +1 -1
- package/dist/functionScanner.d.ts.map +1 -1
- package/dist/functionScanner.js +76 -6
- package/dist/functionScanner.js.map +1 -1
- package/dist/mcp-standalone.js +14 -4
- package/dist/mcp-standalone.js.map +1 -1
- package/dist/mcp-tools/workflowGuide.d.ts.map +1 -1
- package/dist/mcp-tools/workflowGuide.js +45 -0
- package/dist/mcp-tools/workflowGuide.js.map +1 -1
- package/dist/mcp.js +3 -3
- package/dist/mcp.js.map +1 -1
- package/dist/search/QueryParser.d.ts +2 -0
- package/dist/search/QueryParser.d.ts.map +1 -1
- package/dist/search/QueryParser.js +191 -26
- package/dist/search/QueryParser.js.map +1 -1
- package/dist/types.d.ts +135 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +16 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/astUtils.d.ts +17 -1
- package/dist/utils/astUtils.d.ts.map +1 -1
- package/dist/utils/astUtils.js +121 -0
- package/dist/utils/astUtils.js.map +1 -1
- package/dist/utils/componentPatterns.d.ts +22 -0
- package/dist/utils/componentPatterns.d.ts.map +1 -0
- package/dist/utils/componentPatterns.js +273 -0
- package/dist/utils/componentPatterns.js.map +1 -0
- package/dist/utils/componentResponsibility.d.ts +39 -0
- package/dist/utils/componentResponsibility.d.ts.map +1 -0
- package/dist/utils/componentResponsibility.js +487 -0
- package/dist/utils/componentResponsibility.js.map +1 -0
- package/dist/utils/dependencyExtractor.d.ts +30 -0
- package/dist/utils/dependencyExtractor.d.ts.map +1 -0
- package/dist/utils/dependencyExtractor.js +237 -0
- package/dist/utils/dependencyExtractor.js.map +1 -0
- package/package.json +16 -15
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
import * as ts from 'typescript';
|
|
2
|
+
import { ResponsibilityType } from '../types.js';
|
|
3
|
+
import { extractHooks } from './reactDetection.js';
|
|
4
|
+
/**
|
|
5
|
+
* Detects and categorizes responsibilities within a React component
|
|
6
|
+
*/
|
|
7
|
+
export function detectComponentResponsibilities(sourceFile, component, metadata) {
|
|
8
|
+
const responsibilities = [];
|
|
9
|
+
const seenTypes = new Set();
|
|
10
|
+
// Analyze different aspects of the component
|
|
11
|
+
const hookResponsibilities = analyzeHookUsage(sourceFile, component, metadata);
|
|
12
|
+
const eventResponsibilities = analyzeEventHandlers(sourceFile, component);
|
|
13
|
+
const effectResponsibilities = analyzeEffects(sourceFile, component);
|
|
14
|
+
const renderingResponsibilities = analyzeRenderingLogic(sourceFile, component);
|
|
15
|
+
// Combine and deduplicate responsibilities
|
|
16
|
+
[...hookResponsibilities, ...eventResponsibilities, ...effectResponsibilities, ...renderingResponsibilities]
|
|
17
|
+
.forEach(resp => {
|
|
18
|
+
// Check if this is a duplicate type
|
|
19
|
+
if (seenTypes.has(resp.type)) {
|
|
20
|
+
// Merge indicators if same type
|
|
21
|
+
const existing = responsibilities.find(r => r.type === resp.type);
|
|
22
|
+
if (existing) {
|
|
23
|
+
existing.indicators.push(...resp.indicators);
|
|
24
|
+
// Upgrade severity if needed
|
|
25
|
+
if (resp.severity === 'unrelated' && existing.severity !== 'unrelated') {
|
|
26
|
+
existing.severity = 'unrelated';
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
seenTypes.add(resp.type);
|
|
32
|
+
responsibilities.push(resp);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
return responsibilities;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Identifies data fetching patterns in code
|
|
39
|
+
*/
|
|
40
|
+
export function containsDataFetching(node) {
|
|
41
|
+
let hasDataFetching = false;
|
|
42
|
+
const checkNode = (n) => {
|
|
43
|
+
// Check for fetch, axios, API calls
|
|
44
|
+
if (ts.isCallExpression(n)) {
|
|
45
|
+
const callText = n.expression.getText();
|
|
46
|
+
if (callText.includes('fetch') ||
|
|
47
|
+
callText.includes('axios') ||
|
|
48
|
+
callText.includes('api') ||
|
|
49
|
+
callText.includes('http') ||
|
|
50
|
+
callText.includes('request')) {
|
|
51
|
+
hasDataFetching = true;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
// Check for async/await patterns
|
|
55
|
+
if (ts.isAwaitExpression(n)) {
|
|
56
|
+
hasDataFetching = true;
|
|
57
|
+
}
|
|
58
|
+
ts.forEachChild(n, checkNode);
|
|
59
|
+
};
|
|
60
|
+
checkNode(node);
|
|
61
|
+
return hasDataFetching;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Identifies form handling patterns
|
|
65
|
+
*/
|
|
66
|
+
export function containsFormHandling(node, sourceFile) {
|
|
67
|
+
let hasFormHandling = false;
|
|
68
|
+
const checkNode = (n) => {
|
|
69
|
+
// Check for form-related method calls
|
|
70
|
+
if (ts.isCallExpression(n)) {
|
|
71
|
+
const callText = n.expression.getText();
|
|
72
|
+
if (callText.includes('preventDefault') ||
|
|
73
|
+
callText.includes('handleSubmit') ||
|
|
74
|
+
callText.includes('validate') ||
|
|
75
|
+
callText.includes('setFieldValue')) {
|
|
76
|
+
hasFormHandling = true;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
// Check for form state patterns
|
|
80
|
+
if (ts.isIdentifier(n)) {
|
|
81
|
+
const text = n.getText();
|
|
82
|
+
if (text.includes('form') || text.includes('Field') || text.includes('input')) {
|
|
83
|
+
hasFormHandling = true;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
ts.forEachChild(n, checkNode);
|
|
87
|
+
};
|
|
88
|
+
checkNode(node);
|
|
89
|
+
return hasFormHandling;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Identifies business logic patterns
|
|
93
|
+
*/
|
|
94
|
+
export function containsBusinessLogic(node) {
|
|
95
|
+
let hasBusinessLogic = false;
|
|
96
|
+
let statementCount = 0;
|
|
97
|
+
let hasComplexConditions = false;
|
|
98
|
+
const checkNode = (n) => {
|
|
99
|
+
// Count statements in functions
|
|
100
|
+
if (ts.isBlock(n)) {
|
|
101
|
+
statementCount += n.statements.length;
|
|
102
|
+
}
|
|
103
|
+
// Check for complex conditions
|
|
104
|
+
if (ts.isIfStatement(n) || ts.isConditionalExpression(n)) {
|
|
105
|
+
// Check if condition is complex
|
|
106
|
+
const conditionText = n.getFullText();
|
|
107
|
+
if (conditionText.includes('&&') && conditionText.includes('||')) {
|
|
108
|
+
hasComplexConditions = true;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
// Check for calculations or transformations
|
|
112
|
+
if (ts.isBinaryExpression(n)) {
|
|
113
|
+
const operator = n.operatorToken.kind;
|
|
114
|
+
if (operator === ts.SyntaxKind.AsteriskToken ||
|
|
115
|
+
operator === ts.SyntaxKind.SlashToken ||
|
|
116
|
+
operator === ts.SyntaxKind.PercentToken) {
|
|
117
|
+
hasBusinessLogic = true;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
// Check for array operations suggesting data transformation
|
|
121
|
+
if (ts.isCallExpression(n) && ts.isPropertyAccessExpression(n.expression)) {
|
|
122
|
+
const methodName = n.expression.name.getText();
|
|
123
|
+
if (['map', 'filter', 'reduce', 'sort', 'groupBy'].includes(methodName)) {
|
|
124
|
+
hasBusinessLogic = true;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
ts.forEachChild(n, checkNode);
|
|
128
|
+
};
|
|
129
|
+
checkNode(node);
|
|
130
|
+
// Consider it business logic if there are complex conditions or many statements
|
|
131
|
+
return hasBusinessLogic || (statementCount > 10 && hasComplexConditions);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Helper to determine if responsibilities are related
|
|
135
|
+
*/
|
|
136
|
+
export function areResponsibilitiesRelated(resp1, resp2) {
|
|
137
|
+
// Same responsibility is always related
|
|
138
|
+
if (resp1 === resp2)
|
|
139
|
+
return true;
|
|
140
|
+
const relatedGroups = [
|
|
141
|
+
// Form-related
|
|
142
|
+
[ResponsibilityType.FormHandling, ResponsibilityType.UIState, ResponsibilityType.EventHandling, ResponsibilityType.ErrorHandling],
|
|
143
|
+
// Data-related
|
|
144
|
+
[ResponsibilityType.DataFetching, ResponsibilityType.DataTransformation, ResponsibilityType.Subscriptions, ResponsibilityType.ErrorHandling],
|
|
145
|
+
// Auth-related
|
|
146
|
+
[ResponsibilityType.Authentication, ResponsibilityType.Routing, ResponsibilityType.ErrorHandling],
|
|
147
|
+
// UI-related
|
|
148
|
+
[ResponsibilityType.UIState, ResponsibilityType.Layout, ResponsibilityType.EventHandling],
|
|
149
|
+
// Business logic often relates to data
|
|
150
|
+
[ResponsibilityType.BusinessLogic, ResponsibilityType.DataTransformation, ResponsibilityType.UIState],
|
|
151
|
+
];
|
|
152
|
+
return relatedGroups.some(group => group.includes(resp1) && group.includes(resp2));
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Analyzes hook usage to identify responsibilities
|
|
156
|
+
*/
|
|
157
|
+
export function analyzeHookUsage(sourceFile, component, metadata) {
|
|
158
|
+
const responsibilities = [];
|
|
159
|
+
const hooks = metadata?.hooks || extractHooks(component, sourceFile);
|
|
160
|
+
// Group hooks by type
|
|
161
|
+
const stateHooks = hooks.filter(h => h.name === 'useState' || h.name === 'useReducer');
|
|
162
|
+
const effectHooks = hooks.filter(h => h.name === 'useEffect' || h.name === 'useLayoutEffect');
|
|
163
|
+
const contextHooks = hooks.filter(h => h.name === 'useContext');
|
|
164
|
+
const routerHooks = hooks.filter(h => h.name === 'useRouter' || h.name === 'useNavigate' || h.name === 'useParams');
|
|
165
|
+
const customHooks = hooks.filter(h => h.customHook);
|
|
166
|
+
// Analyze state management
|
|
167
|
+
if (stateHooks.length > 0) {
|
|
168
|
+
const stateIndicators = [];
|
|
169
|
+
let hasFormState = false;
|
|
170
|
+
let hasUIState = false;
|
|
171
|
+
let hasBusinessState = false;
|
|
172
|
+
// Analyze state variable names to categorize
|
|
173
|
+
stateHooks.forEach(hook => {
|
|
174
|
+
// Try to get the state variable name from the hook call
|
|
175
|
+
const parent = hook.line ? findNodeAtLine(component, hook.line) : null;
|
|
176
|
+
if (parent && ts.isVariableDeclaration(parent)) {
|
|
177
|
+
const name = parent.name.getText();
|
|
178
|
+
stateIndicators.push(name);
|
|
179
|
+
// Categorize based on name patterns
|
|
180
|
+
if (name.match(/form|input|field|value|error|validation/i)) {
|
|
181
|
+
hasFormState = true;
|
|
182
|
+
}
|
|
183
|
+
else if (name.match(/open|show|visible|selected|active|hover|focus/i)) {
|
|
184
|
+
hasUIState = true;
|
|
185
|
+
}
|
|
186
|
+
else if (name.match(/data|result|user|account|product|cart/i)) {
|
|
187
|
+
hasBusinessState = true;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
// Add appropriate responsibilities
|
|
192
|
+
if (hasFormState && stateHooks.length > 3) {
|
|
193
|
+
responsibilities.push({
|
|
194
|
+
type: ResponsibilityType.FormHandling,
|
|
195
|
+
indicators: stateIndicators.filter(i => i.match(/form|input|field/i)),
|
|
196
|
+
severity: 'related',
|
|
197
|
+
details: `${stateHooks.length} state hooks for form management`
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
if (hasUIState) {
|
|
201
|
+
responsibilities.push({
|
|
202
|
+
type: ResponsibilityType.UIState,
|
|
203
|
+
indicators: stateIndicators.filter(i => i.match(/open|show|visible|selected/i)),
|
|
204
|
+
severity: hasFormState ? 'related' : 'mixed',
|
|
205
|
+
details: `UI state management detected`
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
if (hasBusinessState) {
|
|
209
|
+
responsibilities.push({
|
|
210
|
+
type: ResponsibilityType.BusinessLogic,
|
|
211
|
+
indicators: stateIndicators.filter(i => i.match(/data|result|user|account/i)),
|
|
212
|
+
severity: 'unrelated',
|
|
213
|
+
details: `Business state mixed with UI component`
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
// Analyze router hooks
|
|
218
|
+
if (routerHooks.length > 0) {
|
|
219
|
+
responsibilities.push({
|
|
220
|
+
type: ResponsibilityType.Routing,
|
|
221
|
+
indicators: routerHooks.map(h => h.name),
|
|
222
|
+
severity: 'mixed',
|
|
223
|
+
line: routerHooks[0].line,
|
|
224
|
+
details: 'Navigation logic in component'
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
// Analyze custom hooks for mixed responsibilities
|
|
228
|
+
if (customHooks.length > 0) {
|
|
229
|
+
customHooks.forEach(hook => {
|
|
230
|
+
// Categorize based on hook name
|
|
231
|
+
if (hook.name.match(/useAuth|useUser|usePermission/i)) {
|
|
232
|
+
responsibilities.push({
|
|
233
|
+
type: ResponsibilityType.Authentication,
|
|
234
|
+
indicators: [hook.name],
|
|
235
|
+
severity: 'mixed',
|
|
236
|
+
line: hook.line
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
else if (hook.name.match(/useFetch|useQuery|useApi|useData/i)) {
|
|
240
|
+
responsibilities.push({
|
|
241
|
+
type: ResponsibilityType.DataFetching,
|
|
242
|
+
indicators: [hook.name],
|
|
243
|
+
severity: 'mixed',
|
|
244
|
+
line: hook.line
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
return responsibilities;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Analyzes useEffect hooks for side effects and data fetching
|
|
253
|
+
*/
|
|
254
|
+
export function analyzeEffects(sourceFile, component) {
|
|
255
|
+
const responsibilities = [];
|
|
256
|
+
ts.forEachChild(component, function visit(node) {
|
|
257
|
+
if (ts.isCallExpression(node) &&
|
|
258
|
+
ts.isIdentifier(node.expression) &&
|
|
259
|
+
(node.expression.text === 'useEffect' || node.expression.text === 'useLayoutEffect')) {
|
|
260
|
+
const effectBody = node.arguments[0];
|
|
261
|
+
if (effectBody) {
|
|
262
|
+
// Check for data fetching
|
|
263
|
+
if (containsDataFetching(effectBody)) {
|
|
264
|
+
const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());
|
|
265
|
+
responsibilities.push({
|
|
266
|
+
type: ResponsibilityType.DataFetching,
|
|
267
|
+
indicators: ['fetch in useEffect', 'async data loading'],
|
|
268
|
+
severity: 'mixed',
|
|
269
|
+
line: line + 1,
|
|
270
|
+
details: 'Data fetching in effect hook'
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
// Check for subscriptions
|
|
274
|
+
if (effectBody.getText().match(/addEventListener|subscribe|on\(/)) {
|
|
275
|
+
const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());
|
|
276
|
+
responsibilities.push({
|
|
277
|
+
type: ResponsibilityType.Subscriptions,
|
|
278
|
+
indicators: ['event subscription', 'listener setup'],
|
|
279
|
+
severity: 'mixed',
|
|
280
|
+
line: line + 1
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
// Check for side effects (analytics, logging)
|
|
284
|
+
if (effectBody.getText().match(/track|analytics|log|console|gtag|ga\(/i)) {
|
|
285
|
+
const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());
|
|
286
|
+
responsibilities.push({
|
|
287
|
+
type: ResponsibilityType.SideEffects,
|
|
288
|
+
indicators: ['analytics', 'tracking', 'logging'],
|
|
289
|
+
severity: 'unrelated',
|
|
290
|
+
line: line + 1,
|
|
291
|
+
details: 'Analytics/logging side effects'
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
ts.forEachChild(node, visit);
|
|
297
|
+
});
|
|
298
|
+
return responsibilities;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Helper to find a node at a specific line number
|
|
302
|
+
*/
|
|
303
|
+
function findNodeAtLine(root, targetLine) {
|
|
304
|
+
let result = null;
|
|
305
|
+
function visit(node) {
|
|
306
|
+
if (result)
|
|
307
|
+
return;
|
|
308
|
+
const sourceFile = node.getSourceFile();
|
|
309
|
+
if (sourceFile) {
|
|
310
|
+
const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());
|
|
311
|
+
if (line + 1 === targetLine) {
|
|
312
|
+
result = node;
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
ts.forEachChild(node, visit);
|
|
317
|
+
}
|
|
318
|
+
visit(root);
|
|
319
|
+
return result;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Analyzes event handlers in a component
|
|
323
|
+
*/
|
|
324
|
+
export function analyzeEventHandlers(sourceFile, component) {
|
|
325
|
+
const responsibilities = [];
|
|
326
|
+
const eventHandlers = [];
|
|
327
|
+
ts.forEachChild(component, function visit(node) {
|
|
328
|
+
// Check JSX attributes for event handlers
|
|
329
|
+
if (ts.isJsxAttribute(node) && ts.isIdentifier(node.name)) {
|
|
330
|
+
const attrName = node.name.text;
|
|
331
|
+
if (attrName.startsWith('on')) {
|
|
332
|
+
const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());
|
|
333
|
+
// Calculate complexity of the handler
|
|
334
|
+
let complexity = 0;
|
|
335
|
+
if (node.initializer && ts.isJsxExpression(node.initializer)) {
|
|
336
|
+
const expr = node.initializer.expression;
|
|
337
|
+
if (expr) {
|
|
338
|
+
// Inline function or arrow function
|
|
339
|
+
if (ts.isFunctionExpression(expr) || ts.isArrowFunction(expr)) {
|
|
340
|
+
complexity = calculateHandlerComplexity(expr);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
eventHandlers.push({
|
|
345
|
+
name: attrName,
|
|
346
|
+
complexity,
|
|
347
|
+
line: line + 1
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
// Check for method definitions that look like event handlers
|
|
352
|
+
if ((ts.isMethodDeclaration(node) || ts.isPropertyDeclaration(node)) && node.name) {
|
|
353
|
+
const name = node.name.getText();
|
|
354
|
+
if (name.match(/^(handle|on)[A-Z]/)) {
|
|
355
|
+
const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());
|
|
356
|
+
const complexity = ts.isMethodDeclaration(node) && node.body
|
|
357
|
+
? calculateHandlerComplexity(node)
|
|
358
|
+
: 0;
|
|
359
|
+
eventHandlers.push({ name, complexity, line: line + 1 });
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
ts.forEachChild(node, visit);
|
|
363
|
+
});
|
|
364
|
+
// Analyze the collected event handlers
|
|
365
|
+
if (eventHandlers.length > 0) {
|
|
366
|
+
// Check for complex business logic in handlers
|
|
367
|
+
const complexHandlers = eventHandlers.filter(h => h.complexity > 10);
|
|
368
|
+
if (complexHandlers.length > 0) {
|
|
369
|
+
responsibilities.push({
|
|
370
|
+
type: ResponsibilityType.BusinessLogic,
|
|
371
|
+
indicators: complexHandlers.map(h => `${h.name} (${h.complexity} lines)`),
|
|
372
|
+
severity: 'unrelated',
|
|
373
|
+
line: complexHandlers[0].line,
|
|
374
|
+
details: 'Complex business logic in event handlers'
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
// Check for mixed event handling concerns
|
|
378
|
+
const handlerTypes = new Set();
|
|
379
|
+
eventHandlers.forEach(h => {
|
|
380
|
+
if (h.name.match(/submit|form/i))
|
|
381
|
+
handlerTypes.add('form');
|
|
382
|
+
if (h.name.match(/click|mouse|touch/i))
|
|
383
|
+
handlerTypes.add('ui');
|
|
384
|
+
if (h.name.match(/scroll|resize|load/i))
|
|
385
|
+
handlerTypes.add('browser');
|
|
386
|
+
if (h.name.match(/key|input|change/i))
|
|
387
|
+
handlerTypes.add('input');
|
|
388
|
+
});
|
|
389
|
+
if (handlerTypes.size > 2 || eventHandlers.length > 7) {
|
|
390
|
+
responsibilities.push({
|
|
391
|
+
type: ResponsibilityType.EventHandling,
|
|
392
|
+
indicators: eventHandlers.map(h => h.name),
|
|
393
|
+
severity: handlerTypes.has('form') ? 'mixed' : 'unrelated',
|
|
394
|
+
details: `${eventHandlers.length} event handlers across ${handlerTypes.size} categories`
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
return responsibilities;
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Calculates the complexity of an event handler
|
|
402
|
+
*/
|
|
403
|
+
function calculateHandlerComplexity(node) {
|
|
404
|
+
let lineCount = 0;
|
|
405
|
+
const sourceFile = node.getSourceFile();
|
|
406
|
+
if (sourceFile && node.getStart() && node.getEnd()) {
|
|
407
|
+
const start = sourceFile.getLineAndCharacterOfPosition(node.getStart());
|
|
408
|
+
const end = sourceFile.getLineAndCharacterOfPosition(node.getEnd());
|
|
409
|
+
lineCount = end.line - start.line + 1;
|
|
410
|
+
}
|
|
411
|
+
// Also check for complexity indicators
|
|
412
|
+
let hasBusinessLogic = containsBusinessLogic(node);
|
|
413
|
+
return hasBusinessLogic ? lineCount * 1.5 : lineCount;
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Analyzes rendering logic and JSX complexity
|
|
417
|
+
*/
|
|
418
|
+
export function analyzeRenderingLogic(sourceFile, component) {
|
|
419
|
+
const responsibilities = [];
|
|
420
|
+
let jsxElementCount = 0;
|
|
421
|
+
let conditionalRenderCount = 0;
|
|
422
|
+
let hasComplexStyling = false;
|
|
423
|
+
let hasLayoutLogic = false;
|
|
424
|
+
ts.forEachChild(component, function visit(node) {
|
|
425
|
+
// Count JSX elements
|
|
426
|
+
if (ts.isJsxElement(node) || ts.isJsxSelfClosingElement(node)) {
|
|
427
|
+
jsxElementCount++;
|
|
428
|
+
// Check for layout components
|
|
429
|
+
const tagName = ts.isJsxElement(node)
|
|
430
|
+
? node.openingElement.tagName.getText()
|
|
431
|
+
: node.tagName.getText();
|
|
432
|
+
if (tagName.match(/Grid|Flex|Layout|Container|Row|Col/i)) {
|
|
433
|
+
hasLayoutLogic = true;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
// Check for conditional rendering
|
|
437
|
+
if (ts.isConditionalExpression(node) && node.parent &&
|
|
438
|
+
(ts.isJsxExpression(node.parent) || ts.isReturnStatement(node.parent))) {
|
|
439
|
+
conditionalRenderCount++;
|
|
440
|
+
}
|
|
441
|
+
// Check for complex styling logic
|
|
442
|
+
if (ts.isJsxAttribute(node) && node.name && node.name.getText() === 'style') {
|
|
443
|
+
if (node.initializer && ts.isJsxExpression(node.initializer)) {
|
|
444
|
+
const styleExpr = node.initializer.expression;
|
|
445
|
+
if (styleExpr && !ts.isObjectLiteralExpression(styleExpr)) {
|
|
446
|
+
// Dynamic style calculation
|
|
447
|
+
hasComplexStyling = true;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
// Check for className with complex logic
|
|
452
|
+
if (ts.isJsxAttribute(node) && node.name && node.name.getText() === 'className') {
|
|
453
|
+
if (node.initializer && ts.isJsxExpression(node.initializer)) {
|
|
454
|
+
const classExpr = node.initializer.expression;
|
|
455
|
+
if (classExpr && !ts.isStringLiteral(classExpr)) {
|
|
456
|
+
// Dynamic className
|
|
457
|
+
hasComplexStyling = true;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
ts.forEachChild(node, visit);
|
|
462
|
+
});
|
|
463
|
+
// Add layout responsibility only if it's significant
|
|
464
|
+
// Don't flag basic styling in forms or simple components
|
|
465
|
+
if ((hasLayoutLogic && jsxElementCount > 20) || (hasComplexStyling && !hasLayoutLogic)) {
|
|
466
|
+
responsibilities.push({
|
|
467
|
+
type: ResponsibilityType.Layout,
|
|
468
|
+
indicators: [
|
|
469
|
+
hasLayoutLogic ? 'layout components' : '',
|
|
470
|
+
hasComplexStyling ? 'complex styling logic' : ''
|
|
471
|
+
].filter(Boolean),
|
|
472
|
+
severity: 'related',
|
|
473
|
+
details: 'Layout and styling logic'
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
// Check for overly complex rendering
|
|
477
|
+
if (jsxElementCount > 50 || conditionalRenderCount > 5) {
|
|
478
|
+
responsibilities.push({
|
|
479
|
+
type: ResponsibilityType.UIState,
|
|
480
|
+
indicators: [`${jsxElementCount} JSX elements`, `${conditionalRenderCount} conditionals`],
|
|
481
|
+
severity: 'mixed',
|
|
482
|
+
details: 'Complex rendering logic'
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
return responsibilities;
|
|
486
|
+
}
|
|
487
|
+
//# sourceMappingURL=componentResponsibility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"componentResponsibility.js","sourceRoot":"","sources":["../../src/utils/componentResponsibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAEL,kBAAkB,EAGnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD;;GAEG;AACH,MAAM,UAAU,+BAA+B,CAC7C,UAAyB,EACzB,SAAkB,EAClB,QAA4B;IAE5B,MAAM,gBAAgB,GAA8B,EAAE,CAAC;IACvD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAsB,CAAC;IAEhD,6CAA6C;IAC7C,MAAM,oBAAoB,GAAG,gBAAgB,CAAC,UAAU,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC/E,MAAM,qBAAqB,GAAG,oBAAoB,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAC1E,MAAM,sBAAsB,GAAG,cAAc,CAAC,UAAU,EAAE,SAAS,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B,CAAC,CAAC,CAAC;IAEH,qDAAqD;IACrD,yDAAyD;IACzD,IAAI,CAAC,cAAc,IAAI,eAAe,GAAG,EAAE,CAAC,IAAI,CAAC,iBAAiB,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC;QACvF,gBAAgB,CAAC,IAAI,CAAC;YACpB,IAAI,EAAE,kBAAkB,CAAC,MAAM;YAC/B,UAAU,EAAE;gBACV,cAAc,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE;gBACzC,iBAAiB,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE;aACjD,CAAC,MAAM,CAAC,OAAO,CAAC;YACjB,QAAQ,EAAE,SAAS;YACnB,OAAO,EAAE,0BAA0B;SACpC,CAAC,CAAC;IACL,CAAC;IAED,qCAAqC;IACrC,IAAI,eAAe,GAAG,EAAE,IAAI,sBAAsB,GAAG,CAAC,EAAE,CAAC;QACvD,gBAAgB,CAAC,IAAI,CAAC;YACpB,IAAI,EAAE,kBAAkB,CAAC,OAAO;YAChC,UAAU,EAAE,CAAC,GAAG,eAAe,eAAe,EAAE,GAAG,sBAAsB,eAAe,CAAC;YACzF,QAAQ,EAAE,OAAO;YACjB,OAAO,EAAE,yBAAyB;SACnC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dependency extraction utilities for function-level dependency tracking
|
|
3
|
+
*/
|
|
4
|
+
import * as ts from 'typescript';
|
|
5
|
+
import { FunctionCall, ImportMapping, UsageInfo } from '../types.js';
|
|
6
|
+
/**
|
|
7
|
+
* Extract all function calls within a given AST node
|
|
8
|
+
*/
|
|
9
|
+
export declare function extractFunctionCalls(node: ts.Node, sourceFile: ts.SourceFile, importMap: Map<string, ImportMapping>): FunctionCall[];
|
|
10
|
+
/**
|
|
11
|
+
* Build a map of imports from import statements
|
|
12
|
+
*/
|
|
13
|
+
export declare function buildImportMap(sourceFile: ts.SourceFile): Map<string, ImportMapping>;
|
|
14
|
+
/**
|
|
15
|
+
* Resolve a call expression to get call information
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveCallExpression(callExpr: ts.CallExpression, sourceFile: ts.SourceFile, importMap: Map<string, ImportMapping>): FunctionCall | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Extract identifier usage within a function to determine which imports are actually used
|
|
20
|
+
*/
|
|
21
|
+
export declare function extractIdentifierUsage(node: ts.Node, sourceFile: ts.SourceFile, importMap: Map<string, ImportMapping>): Map<string, UsageInfo>;
|
|
22
|
+
/**
|
|
23
|
+
* Get all local function names defined in the file
|
|
24
|
+
*/
|
|
25
|
+
export declare function getLocalFunctionNames(sourceFile: ts.SourceFile): Set<string>;
|
|
26
|
+
/**
|
|
27
|
+
* Normalize a function call target for consistent naming
|
|
28
|
+
*/
|
|
29
|
+
export declare function normalizeCallTarget(callee: string, filePath: string, localFunctions: Set<string>): string;
|
|
30
|
+
//# sourceMappingURL=dependencyExtractor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependencyExtractor.d.ts","sourceRoot":"","sources":["../../src/utils/dependencyExtractor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAkB,SAAS,EAAE,MAAM,aAAa,CAAC;AAErF;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,UAAU,EAAE,EAAE,CAAC,UAAU,EACzB,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,GACpC,YAAY,EAAE,CAehB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CA4EpF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,EAAE,CAAC,cAAc,EAC3B,UAAU,EAAE,EAAE,CAAC,UAAU,EACzB,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,GACpC,YAAY,GAAG,SAAS,CAgC1B;AAiCD;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,UAAU,EAAE,EAAE,CAAC,UAAU,EACzB,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,GACpC,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAmCxB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,CA6B5E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,GAC1B,MAAM,CAaR"}
|