fix: pre-build FTS5 index for Docker compatibility

- Add FTS5 pre-creation in fetch-templates.ts before data import
- Create prebuild-fts5.ts script to ensure FTS5 tables exist
- Improve logging in template-repository.ts for better debugging
- Add npm script 'prebuild:fts5' for manual FTS5 setup

This ensures template search works consistently in Docker mode
where runtime FTS5 table creation might fail due to permissions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
czlonkowski
2025-07-10 12:49:25 +02:00
parent e237669458
commit c9aadfcb30
5 changed files with 231 additions and 33 deletions

View File

@@ -26,6 +26,7 @@
"update:n8n:check": "node scripts/update-n8n-deps.js --dry-run",
"fetch:templates": "node dist/scripts/fetch-templates.js",
"fetch:templates:robust": "node dist/scripts/fetch-templates-robust.js",
"prebuild:fts5": "npx tsx scripts/prebuild-fts5.ts",
"test:templates": "node dist/scripts/test-templates.js",
"test:workflow-validation": "node dist/scripts/test-workflow-validation.js",
"test:template-validation": "node dist/scripts/test-template-validation.js",
@@ -40,6 +41,9 @@
"test:workflow-diff": "node dist/scripts/test-workflow-diff.js",
"test:transactional-diff": "node dist/scripts/test-transactional-diff.js",
"test:tools-documentation": "node dist/scripts/test-tools-documentation.js",
"test:search-improvements": "node dist/scripts/test-search-improvements.js",
"test:fts5-search": "node dist/scripts/test-fts5-search.js",
"migrate:fts5": "node dist/scripts/migrate-nodes-fts.js",
"test:mcp:update-partial": "node dist/scripts/test-mcp-n8n-update-partial.js",
"test:update-partial:debug": "node dist/scripts/test-update-partial-debug.js",
"test:auth-logging": "tsx scripts/test-auth-logging.ts",