gitnexus 1.6.3-rc.16 → 1.6.3-rc.17

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.
@@ -21,10 +21,14 @@ import { SupportedLanguages } from '../../_shared/index.js';
21
21
  */
22
22
  export function detectFrameworkFromPath(filePath) {
23
23
  // Normalize path separators and ensure leading slash for consistent matching
24
- let p = filePath.toLowerCase().replace(/\\/g, '/');
24
+ const originalPath = filePath.replace(/\\/g, '/');
25
+ let p = originalPath.toLowerCase();
25
26
  if (!p.startsWith('/')) {
26
27
  p = '/' + p; // Add leading slash so patterns like '/app/' match 'app/...'
27
28
  }
29
+ const originalPathWithLeadingSlash = originalPath.startsWith('/')
30
+ ? originalPath
31
+ : `/${originalPath}`;
28
32
  // ========== JAVASCRIPT / TYPESCRIPT FRAMEWORKS ==========
29
33
  // Next.js - Pages Router (high confidence)
30
34
  if (p.includes('/pages/') && !p.includes('/_') && !p.includes('/api/')) {
@@ -91,7 +95,7 @@ export function detectFrameworkFromPath(filePath) {
91
95
  if ((p.includes('/components/') || p.includes('/views/')) &&
92
96
  (p.endsWith('.tsx') || p.endsWith('.jsx'))) {
93
97
  // Only boost if PascalCase filename (likely a component, not util)
94
- const fileName = p.split('/').pop() || '';
98
+ const fileName = originalPathWithLeadingSlash.split('/').pop() || '';
95
99
  if (/^[A-Z]/.test(fileName)) {
96
100
  return { framework: 'react', entryPointMultiplier: 1.5, reason: 'react-component' };
97
101
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitnexus",
3
- "version": "1.6.3-rc.16",
3
+ "version": "1.6.3-rc.17",
4
4
  "description": "Graph-powered code intelligence for AI agents. Index any codebase, query via MCP or CLI.",
5
5
  "author": "Abhigyan Patwari",
6
6
  "license": "PolyForm-Noncommercial-1.0.0",