Skip to content

Commit 5645174

Browse files
author
ContextForge
committed
fix(map): ignore ContextForge utility scripts in route extraction
- skip gen-context.js and gen-project-map.js in route-table analyzer - prevents false-positive '/path' routes from CLI/help strings - keeps PROJECT_MAP route table focused on application endpoints
1 parent 34e7c23 commit 5645174

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/map/route-table.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,18 @@ const path = require('path');
1515
const JS_EXTS = new Set(['.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs']);
1616
const PY_EXTS = new Set(['.py', '.pyw']);
1717

18+
function shouldSkipFile(rel) {
19+
const normalized = rel.replace(/\\/g, '/').toLowerCase();
20+
return /(^|\/)(gen-context|gen-project-map)\.js$/.test(normalized);
21+
}
22+
1823
function analyze(files, cwd) {
1924
const routes = [];
2025

2126
for (const filePath of files) {
2227
const ext = path.extname(filePath).toLowerCase();
2328
const rel = path.relative(cwd, filePath).replace(/\\/g, '/');
29+
if (shouldSkipFile(rel)) continue;
2430
let content;
2531
try { content = fs.readFileSync(filePath, 'utf8'); } catch (_) { continue; }
2632

0 commit comments

Comments
 (0)