Fix git issue

This commit is contained in:
Colby McHenry
2026-02-14 02:14:48 -06:00
parent 8346440592
commit a9148e674e
3 changed files with 11 additions and 5 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "@colbymchenry/codegraph", "name": "@colbymchenry/codegraph",
"version": "0.5.3", "version": "0.5.5",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@colbymchenry/codegraph", "name": "@colbymchenry/codegraph",
"version": "0.5.3", "version": "0.5.5",
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@colbymchenry/codegraph", "name": "@colbymchenry/codegraph",
"version": "0.5.3", "version": "0.5.5",
"description": "Supercharge Claude Code with semantic code intelligence. 30% fewer tokens, 25% fewer tool calls, 100% local.", "description": "Supercharge Claude Code with semantic code intelligence. 30% fewer tokens, 25% fewer tool calls, 100% local.",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
+8 -2
View File
@@ -241,10 +241,16 @@ export function validateDirectory(projectRoot: string): {
return { valid: false, errors }; return { valid: false, errors };
} }
// Check for required files // Auto-repair missing .gitignore (non-critical file)
const gitignorePath = path.join(codegraphDir, '.gitignore'); const gitignorePath = path.join(codegraphDir, '.gitignore');
if (!fs.existsSync(gitignorePath)) { if (!fs.existsSync(gitignorePath)) {
errors.push('.gitignore missing in .codegraph directory'); try {
const gitignoreContent = `# CodeGraph data files\n# These are local to each machine and should not be committed\n\n# Database\n*.db\n*.db-wal\n*.db-shm\n\n# Cache\ncache/\n\n# Logs\n*.log\n\n# Hook markers\n.dirty\n`;
fs.writeFileSync(gitignorePath, gitignoreContent, 'utf-8');
} catch {
// Non-fatal: warn but don't block
errors.push('.gitignore missing in .codegraph directory and could not be created');
}
} }
return { return {