Skip to content

Commit c5ea765

Browse files
committed
feat(analyzer): implement project analysis service
- Analyze package.json and detect 50+ frameworks - Detect architecture patterns from directory structure - Parse TypeScript, ESLint, Prettier config files - Sample and categorize source code files - NestJS service integrating all analyzers - Comprehensive test coverage Enables automatic config generation from project analysis. close #21
1 parent 9981b9d commit c5ea765

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

mcp-server/src/analyzer/code.sampler.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ describe('code.sampler', () => {
3434
expect(detectLanguage('main.py')).toBe('python');
3535
});
3636

37+
it('should detect Vue and Svelte files', () => {
38+
expect(detectLanguage('App.vue')).toBe('vue');
39+
expect(detectLanguage('Component.svelte')).toBe('svelte');
40+
});
41+
3742
it('should return unknown for unrecognized extensions', () => {
3843
expect(detectLanguage('file.xyz')).toBe('unknown');
3944
expect(detectLanguage('noextension')).toBe('unknown');

mcp-server/src/analyzer/code.sampler.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ export const LANGUAGE_EXTENSIONS: Record<string, string> = {
7676
// GraphQL
7777
'.graphql': 'graphql',
7878
'.gql': 'graphql',
79+
80+
// Framework-specific
81+
'.vue': 'vue',
82+
'.svelte': 'svelte',
7983
};
8084

8185
/**

0 commit comments

Comments
 (0)