code-auditor-mcp 1.2.0 → 1.2.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/dist/analyzers/reactAnalyzer.d.ts +14 -0
- package/dist/analyzers/reactAnalyzer.d.ts.map +1 -0
- package/dist/analyzers/reactAnalyzer.js +481 -0
- package/dist/analyzers/reactAnalyzer.js.map +1 -0
- package/dist/auditRunner.d.ts.map +1 -1
- package/dist/auditRunner.js +4 -2
- package/dist/auditRunner.js.map +1 -1
- package/dist/codeIndexDb.d.ts.map +1 -1
- package/dist/codeIndexDb.js +65 -3
- package/dist/codeIndexDb.js.map +1 -1
- package/dist/componentScanner.d.ts +52 -0
- package/dist/componentScanner.d.ts.map +1 -0
- package/dist/componentScanner.js +293 -0
- package/dist/componentScanner.js.map +1 -0
- package/dist/functionScanner.d.ts.map +1 -1
- package/dist/functionScanner.js +125 -0
- package/dist/functionScanner.js.map +1 -1
- package/dist/mcp.js +8 -8
- package/dist/mcp.js.map +1 -1
- package/dist/search/QueryParser.d.ts.map +1 -1
- package/dist/search/QueryParser.js +43 -4
- package/dist/search/QueryParser.js.map +1 -1
- package/dist/types.d.ts +70 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/reactDetection.d.ts +43 -0
- package/dist/utils/reactDetection.d.ts.map +1 -0
- package/dist/utils/reactDetection.js +344 -0
- package/dist/utils/reactDetection.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Component Detection Utilities
|
|
3
|
+
* Provides AST-based detection of React components and their properties
|
|
4
|
+
*/
|
|
5
|
+
import * as ts from 'typescript';
|
|
6
|
+
import { ComponentMetadata, ComponentImport, HookUsage, PropDefinition } from '../types.js';
|
|
7
|
+
/**
|
|
8
|
+
* Check if a node is any type of React component
|
|
9
|
+
*/
|
|
10
|
+
export declare function isReactComponent(node: ts.Node): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Check if a node is a functional React component
|
|
13
|
+
*/
|
|
14
|
+
export declare function isFunctionalComponent(node: ts.Node): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Check if a node returns JSX elements
|
|
17
|
+
*/
|
|
18
|
+
export declare function returnsJSX(node: ts.Node): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Check if a node is a class component extending React.Component
|
|
21
|
+
*/
|
|
22
|
+
export declare function isClassComponent(node: ts.Node): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Extract hooks usage from a component node
|
|
25
|
+
*/
|
|
26
|
+
export declare function extractHooks(node: ts.Node, sourceFile: ts.SourceFile): HookUsage[];
|
|
27
|
+
/**
|
|
28
|
+
* Extract prop types from a component (TypeScript interfaces/types)
|
|
29
|
+
*/
|
|
30
|
+
export declare function extractPropTypes(node: ts.Node, sourceFile: ts.SourceFile, typeChecker?: ts.TypeChecker): PropDefinition[];
|
|
31
|
+
/**
|
|
32
|
+
* Extract component imports from a source file
|
|
33
|
+
*/
|
|
34
|
+
export declare function extractComponentImports(sourceFile: ts.SourceFile): ComponentImport[];
|
|
35
|
+
/**
|
|
36
|
+
* Detect the specific type of component (functional, class, memo, forwardRef)
|
|
37
|
+
*/
|
|
38
|
+
export declare function detectComponentType(node: ts.Node): ComponentMetadata['componentType'] | null;
|
|
39
|
+
/**
|
|
40
|
+
* Get component name from various declaration patterns
|
|
41
|
+
*/
|
|
42
|
+
export declare function getComponentName(node: ts.Node): string;
|
|
43
|
+
//# sourceMappingURL=reactDetection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactDetection.d.ts","sourceRoot":"","sources":["../../src/utils/reactDetection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE5F;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,OAAO,CAEvD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,OAAO,CAkB5D;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,OAAO,CAyBjD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,OAAO,CAkCvD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,SAAS,EAAE,CAuBlF;AAgBD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,WAAW,GAAG,cAAc,EAAE,CA4FzH;AAkBD;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,eAAe,EAAE,CAgDpF;AASD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,iBAAiB,CAAC,eAAe,CAAC,GAAG,IAAI,CA6B5F;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,MAAM,CAiCtD"}
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Component Detection Utilities
|
|
3
|
+
* Provides AST-based detection of React components and their properties
|
|
4
|
+
*/
|
|
5
|
+
import * as ts from 'typescript';
|
|
6
|
+
/**
|
|
7
|
+
* Check if a node is any type of React component
|
|
8
|
+
*/
|
|
9
|
+
export function isReactComponent(node) {
|
|
10
|
+
return isFunctionalComponent(node) || isClassComponent(node);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Check if a node is a functional React component
|
|
14
|
+
*/
|
|
15
|
+
export function isFunctionalComponent(node) {
|
|
16
|
+
if (ts.isFunctionDeclaration(node) || ts.isFunctionExpression(node)) {
|
|
17
|
+
return returnsJSX(node);
|
|
18
|
+
}
|
|
19
|
+
if (ts.isArrowFunction(node)) {
|
|
20
|
+
return returnsJSX(node);
|
|
21
|
+
}
|
|
22
|
+
// Check for variable declarations with arrow functions
|
|
23
|
+
if (ts.isVariableStatement(node)) {
|
|
24
|
+
const declaration = node.declarationList.declarations[0];
|
|
25
|
+
if (declaration && declaration.initializer && ts.isArrowFunction(declaration.initializer)) {
|
|
26
|
+
return returnsJSX(declaration.initializer);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a node returns JSX elements
|
|
33
|
+
*/
|
|
34
|
+
export function returnsJSX(node) {
|
|
35
|
+
let hasJSX = false;
|
|
36
|
+
function visit(child) {
|
|
37
|
+
if (ts.isJsxElement(child) || ts.isJsxFragment(child) ||
|
|
38
|
+
ts.isJsxSelfClosingElement(child)) {
|
|
39
|
+
hasJSX = true;
|
|
40
|
+
}
|
|
41
|
+
// Check return statements
|
|
42
|
+
if (ts.isReturnStatement(child) && child.expression) {
|
|
43
|
+
if (ts.isJsxElement(child.expression) ||
|
|
44
|
+
ts.isJsxFragment(child.expression) ||
|
|
45
|
+
ts.isJsxSelfClosingElement(child.expression)) {
|
|
46
|
+
hasJSX = true;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (!hasJSX) {
|
|
50
|
+
ts.forEachChild(child, visit);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
ts.forEachChild(node, visit);
|
|
54
|
+
return hasJSX;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Check if a node is a class component extending React.Component
|
|
58
|
+
*/
|
|
59
|
+
export function isClassComponent(node) {
|
|
60
|
+
if (!ts.isClassDeclaration(node)) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
// Check if class extends React.Component or React.PureComponent
|
|
64
|
+
if (node.heritageClauses) {
|
|
65
|
+
for (const clause of node.heritageClauses) {
|
|
66
|
+
if (clause.token === ts.SyntaxKind.ExtendsKeyword) {
|
|
67
|
+
for (const type of clause.types) {
|
|
68
|
+
const expression = type.expression;
|
|
69
|
+
// Check for React.Component or React.PureComponent
|
|
70
|
+
if (ts.isPropertyAccessExpression(expression)) {
|
|
71
|
+
const obj = expression.expression;
|
|
72
|
+
const prop = expression.name;
|
|
73
|
+
if (ts.isIdentifier(obj) && obj.text === 'React' &&
|
|
74
|
+
ts.isIdentifier(prop) && (prop.text === 'Component' || prop.text === 'PureComponent')) {
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// Check for Component (when imported directly)
|
|
79
|
+
if (ts.isIdentifier(expression) &&
|
|
80
|
+
(expression.text === 'Component' || expression.text === 'PureComponent')) {
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Extract hooks usage from a component node
|
|
91
|
+
*/
|
|
92
|
+
export function extractHooks(node, sourceFile) {
|
|
93
|
+
const hooks = [];
|
|
94
|
+
function visit(child) {
|
|
95
|
+
if (ts.isCallExpression(child)) {
|
|
96
|
+
const expression = child.expression;
|
|
97
|
+
// Check for hook calls (functions starting with 'use')
|
|
98
|
+
if (ts.isIdentifier(expression) && expression.text.startsWith('use')) {
|
|
99
|
+
const line = sourceFile.getLineAndCharacterOfPosition(expression.getStart()).line + 1;
|
|
100
|
+
hooks.push({
|
|
101
|
+
name: expression.text,
|
|
102
|
+
line,
|
|
103
|
+
customHook: !isBuiltInHook(expression.text)
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
ts.forEachChild(child, visit);
|
|
108
|
+
}
|
|
109
|
+
ts.forEachChild(node, visit);
|
|
110
|
+
return hooks;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Check if a hook name is a built-in React hook
|
|
114
|
+
*/
|
|
115
|
+
function isBuiltInHook(hookName) {
|
|
116
|
+
const builtInHooks = [
|
|
117
|
+
'useState', 'useEffect', 'useContext', 'useReducer', 'useCallback',
|
|
118
|
+
'useMemo', 'useRef', 'useImperativeHandle', 'useLayoutEffect',
|
|
119
|
+
'useDebugValue', 'useId', 'useDeferredValue', 'useTransition',
|
|
120
|
+
'useSyncExternalStore', 'useInsertionEffect'
|
|
121
|
+
];
|
|
122
|
+
return builtInHooks.includes(hookName);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Extract prop types from a component (TypeScript interfaces/types)
|
|
126
|
+
*/
|
|
127
|
+
export function extractPropTypes(node, sourceFile, typeChecker) {
|
|
128
|
+
const props = [];
|
|
129
|
+
// Handle variable declarations with type annotations (e.g., const Button: React.FC<Props>)
|
|
130
|
+
if (ts.isVariableDeclaration(node) && node.type && node.initializer) {
|
|
131
|
+
// Check if it's a React.FC<Props> type
|
|
132
|
+
if (ts.isTypeReferenceNode(node.type) && node.type.typeArguments?.length) {
|
|
133
|
+
const propsType = node.type.typeArguments[0];
|
|
134
|
+
if (ts.isTypeReferenceNode(propsType) && ts.isIdentifier(propsType.typeName)) {
|
|
135
|
+
// This is a reference to a Props interface, but without TypeChecker we can't resolve it
|
|
136
|
+
// Instead, check the function parameters for destructured props
|
|
137
|
+
if (ts.isArrowFunction(node.initializer) || ts.isFunctionExpression(node.initializer)) {
|
|
138
|
+
const firstParam = node.initializer.parameters[0];
|
|
139
|
+
if (firstParam && ts.isObjectBindingPattern(firstParam.name)) {
|
|
140
|
+
for (const element of firstParam.name.elements) {
|
|
141
|
+
if (ts.isBindingElement(element) && element.name && ts.isIdentifier(element.name)) {
|
|
142
|
+
props.push({
|
|
143
|
+
name: element.name.text,
|
|
144
|
+
type: 'any',
|
|
145
|
+
required: !element.dotDotDotToken && !element.initializer,
|
|
146
|
+
hasDefault: !!element.initializer
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
// For functional components, check the first parameter
|
|
156
|
+
if (ts.isFunctionDeclaration(node) || ts.isFunctionExpression(node) || ts.isArrowFunction(node)) {
|
|
157
|
+
const firstParam = node.parameters[0];
|
|
158
|
+
if (firstParam) {
|
|
159
|
+
// Check if parameter is destructured (common React pattern)
|
|
160
|
+
if (ts.isObjectBindingPattern(firstParam.name)) {
|
|
161
|
+
for (const element of firstParam.name.elements) {
|
|
162
|
+
if (ts.isBindingElement(element) && element.name && ts.isIdentifier(element.name)) {
|
|
163
|
+
props.push({
|
|
164
|
+
name: element.name.text,
|
|
165
|
+
type: 'any', // Without full type resolution
|
|
166
|
+
required: !element.dotDotDotToken && !element.initializer,
|
|
167
|
+
hasDefault: !!element.initializer
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
// Extract props from type annotation
|
|
173
|
+
if (firstParam.type) {
|
|
174
|
+
if (ts.isTypeLiteralNode(firstParam.type)) {
|
|
175
|
+
extractPropsFromTypeLiteral(firstParam.type, props);
|
|
176
|
+
}
|
|
177
|
+
else if (ts.isTypeReferenceNode(firstParam.type) && typeChecker) {
|
|
178
|
+
// Handle interface references
|
|
179
|
+
const symbol = typeChecker.getSymbolAtLocation(firstParam.type.typeName);
|
|
180
|
+
if (symbol) {
|
|
181
|
+
const type = typeChecker.getTypeOfSymbolAtLocation(symbol, firstParam.type);
|
|
182
|
+
const propSymbols = type.getProperties();
|
|
183
|
+
for (const propSymbol of propSymbols) {
|
|
184
|
+
const propType = typeChecker.getTypeOfSymbolAtLocation(propSymbol, propSymbol.valueDeclaration);
|
|
185
|
+
props.push({
|
|
186
|
+
name: propSymbol.getName(),
|
|
187
|
+
type: typeChecker.typeToString(propType),
|
|
188
|
+
required: !(propSymbol.flags & ts.SymbolFlags.Optional),
|
|
189
|
+
hasDefault: false // TODO: Detect default props
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
// For class components, check Props interface/type
|
|
198
|
+
if (ts.isClassDeclaration(node) && node.heritageClauses) {
|
|
199
|
+
// Look for Props type in extends clause (e.g., React.Component<Props>)
|
|
200
|
+
for (const clause of node.heritageClauses) {
|
|
201
|
+
if (clause.token === ts.SyntaxKind.ExtendsKeyword) {
|
|
202
|
+
for (const type of clause.types) {
|
|
203
|
+
if (type.typeArguments && type.typeArguments.length > 0) {
|
|
204
|
+
const propsType = type.typeArguments[0];
|
|
205
|
+
if (ts.isTypeLiteralNode(propsType)) {
|
|
206
|
+
extractPropsFromTypeLiteral(propsType, props);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return props;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Extract props from a TypeScript type literal
|
|
217
|
+
*/
|
|
218
|
+
function extractPropsFromTypeLiteral(typeLiteral, props) {
|
|
219
|
+
for (const member of typeLiteral.members) {
|
|
220
|
+
if (ts.isPropertySignature(member) && member.name && ts.isIdentifier(member.name)) {
|
|
221
|
+
props.push({
|
|
222
|
+
name: member.name.text,
|
|
223
|
+
type: member.type ? member.type.getText() : 'any',
|
|
224
|
+
required: !member.questionToken,
|
|
225
|
+
hasDefault: false
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Extract component imports from a source file
|
|
232
|
+
*/
|
|
233
|
+
export function extractComponentImports(sourceFile) {
|
|
234
|
+
const imports = [];
|
|
235
|
+
function visit(node) {
|
|
236
|
+
if (ts.isImportDeclaration(node)) {
|
|
237
|
+
const moduleSpecifier = node.moduleSpecifier;
|
|
238
|
+
if (ts.isStringLiteral(moduleSpecifier)) {
|
|
239
|
+
const importPath = moduleSpecifier.text;
|
|
240
|
+
// Check if it's likely a component import (local files, not node_modules)
|
|
241
|
+
if (importPath.startsWith('.') || importPath.startsWith('/')) {
|
|
242
|
+
const importClause = node.importClause;
|
|
243
|
+
if (importClause) {
|
|
244
|
+
// Default import
|
|
245
|
+
if (importClause.name) {
|
|
246
|
+
const name = importClause.name.text;
|
|
247
|
+
if (isComponentName(name)) {
|
|
248
|
+
imports.push({
|
|
249
|
+
name,
|
|
250
|
+
path: importPath,
|
|
251
|
+
isDefault: true
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
// Named imports
|
|
256
|
+
if (importClause.namedBindings && ts.isNamedImports(importClause.namedBindings)) {
|
|
257
|
+
for (const element of importClause.namedBindings.elements) {
|
|
258
|
+
const name = element.name.text;
|
|
259
|
+
if (isComponentName(name)) {
|
|
260
|
+
imports.push({
|
|
261
|
+
name,
|
|
262
|
+
path: importPath,
|
|
263
|
+
isDefault: false
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
ts.forEachChild(node, visit);
|
|
273
|
+
}
|
|
274
|
+
visit(sourceFile);
|
|
275
|
+
return imports;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Check if a name follows React component naming convention (PascalCase)
|
|
279
|
+
*/
|
|
280
|
+
function isComponentName(name) {
|
|
281
|
+
return /^[A-Z][a-zA-Z0-9]*$/.test(name);
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Detect the specific type of component (functional, class, memo, forwardRef)
|
|
285
|
+
*/
|
|
286
|
+
export function detectComponentType(node) {
|
|
287
|
+
// Check for memo wrapped components
|
|
288
|
+
if (ts.isCallExpression(node)) {
|
|
289
|
+
const expression = node.expression;
|
|
290
|
+
if ((ts.isIdentifier(expression) && expression.text === 'memo') ||
|
|
291
|
+
(ts.isPropertyAccessExpression(expression) &&
|
|
292
|
+
ts.isIdentifier(expression.expression) && expression.expression.text === 'React' &&
|
|
293
|
+
ts.isIdentifier(expression.name) && expression.name.text === 'memo')) {
|
|
294
|
+
return 'memo';
|
|
295
|
+
}
|
|
296
|
+
// Check for forwardRef
|
|
297
|
+
if ((ts.isIdentifier(expression) && expression.text === 'forwardRef') ||
|
|
298
|
+
(ts.isPropertyAccessExpression(expression) &&
|
|
299
|
+
ts.isIdentifier(expression.expression) && expression.expression.text === 'React' &&
|
|
300
|
+
ts.isIdentifier(expression.name) && expression.name.text === 'forwardRef')) {
|
|
301
|
+
return 'forwardRef';
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
if (isClassComponent(node)) {
|
|
305
|
+
return 'class';
|
|
306
|
+
}
|
|
307
|
+
if (isFunctionalComponent(node)) {
|
|
308
|
+
return 'functional';
|
|
309
|
+
}
|
|
310
|
+
return null;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Get component name from various declaration patterns
|
|
314
|
+
*/
|
|
315
|
+
export function getComponentName(node) {
|
|
316
|
+
// Function declaration
|
|
317
|
+
if (ts.isFunctionDeclaration(node) && node.name) {
|
|
318
|
+
return node.name.text;
|
|
319
|
+
}
|
|
320
|
+
// Class declaration
|
|
321
|
+
if (ts.isClassDeclaration(node) && node.name) {
|
|
322
|
+
return node.name.text;
|
|
323
|
+
}
|
|
324
|
+
// Variable declaration with arrow function or function expression
|
|
325
|
+
if (ts.isVariableStatement(node)) {
|
|
326
|
+
const declaration = node.declarationList.declarations[0];
|
|
327
|
+
if (declaration && ts.isIdentifier(declaration.name)) {
|
|
328
|
+
return declaration.name.text;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
// Variable declaration (direct)
|
|
332
|
+
if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name)) {
|
|
333
|
+
return node.name.text;
|
|
334
|
+
}
|
|
335
|
+
// For memo/forwardRef wrapped components, try to extract from the argument
|
|
336
|
+
if (ts.isCallExpression(node) && node.arguments.length > 0) {
|
|
337
|
+
const firstArg = node.arguments[0];
|
|
338
|
+
if (ts.isFunctionExpression(firstArg) && firstArg.name) {
|
|
339
|
+
return firstArg.name.text;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
return 'AnonymousComponent';
|
|
343
|
+
}
|
|
344
|
+
//# sourceMappingURL=reactDetection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactDetection.js","sourceRoot":"","sources":["../../src/utils/reactDetection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAGjC;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAa;IAC5C,OAAO,qBAAqB,CAAC,IAAI,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC;AAC/D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAa;IACjD,IAAI,EAAE,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC;QACpE,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED,IAAI,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;QAC7B,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED,uDAAuD;IACvD,IAAI,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC;QACjC,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QACzD,IAAI,WAAW,IAAI,WAAW,CAAC,WAA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1",
|
|
4
4
|
"description": "TypeScript/JavaScript code quality auditor with MCP server - Analyze code for SOLID principles, DRY violations, security patterns, and more",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|