fix: исключить graphify-out* бэкап-дирки из walk (не переобрабатывать)

This commit is contained in:
Зарубин Филипп
2026-06-17 00:22:52 +03:00
parent 3d463ef1b4
commit 081988af7b
+2 -2
View File
@@ -41,7 +41,7 @@ const REPORT_PATH = path.join(GRAPHIFY_OUT, 'GRAPH_REPORT.md')
const ANALYSIS_PATH = path.join(GRAPHIFY_OUT, '.graphify_analysis.json') const ANALYSIS_PATH = path.join(GRAPHIFY_OUT, '.graphify_analysis.json')
const MANIFEST_PATH = path.join(GRAPHIFY_OUT, 'manifest.json') const MANIFEST_PATH = path.join(GRAPHIFY_OUT, 'manifest.json')
const NEEDS_UPDATE_PATH = path.join(GRAPHIFY_OUT, 'needs_update') const NEEDS_UPDATE_PATH = path.join(GRAPHIFY_OUT, 'needs_update')
const EXCLUDED_DIRS = new Set(['.git', '.obsidian', 'graphify-out']) const EXCLUDED_DIRS = new Set(['.git', '.obsidian'])
function normalizeOllamaBaseUrl(value) { function normalizeOllamaBaseUrl(value) {
const raw = String(value || process.env.OLLAMA_BASE_URL || 'http://127.0.0.1:11434').trim().replace(/\/+$/, '') const raw = String(value || process.env.OLLAMA_BASE_URL || 'http://127.0.0.1:11434').trim().replace(/\/+$/, '')
@@ -57,7 +57,7 @@ function rel(file) {
async function walk(dir) { async function walk(dir) {
const out = [] const out = []
for (const item of await fs.readdir(dir, { withFileTypes: true }).catch(() => [])) { for (const item of await fs.readdir(dir, { withFileTypes: true }).catch(() => [])) {
if (EXCLUDED_DIRS.has(item.name)) continue if (EXCLUDED_DIRS.has(item.name) || item.name.startsWith('graphify-out')) continue
const p = path.join(dir, item.name) const p = path.join(dir, item.name)
if (item.isDirectory()) out.push(...await walk(p)) if (item.isDirectory()) out.push(...await walk(p))
else if (item.isFile()) out.push(p) else if (item.isFile()) out.push(p)