feat: implement universal Node.js compatibility with automatic database adapter fallback

This commit is contained in:
czlonkowski
2025-06-12 23:51:47 +02:00
parent 66f5d74e42
commit b476d36275
20 changed files with 16668 additions and 4772 deletions

View File

@@ -3,7 +3,7 @@
* Copyright (c) 2024 AiAdvisors Romuald Czlonkowski
* Licensed under the Sustainable Use License v1.0
*/
import Database from 'better-sqlite3';
import { createDatabaseAdapter } from '../database/database-adapter';
interface NodeRow {
node_type: string;
@@ -25,7 +25,7 @@ interface NodeRow {
}
async function validate() {
const db = new Database('./data/nodes.db');
const db = await createDatabaseAdapter('./data/nodes.db');
console.log('🔍 Validating critical nodes...\n');