mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-07 15:52:52 +03:00
This commit is contained in:
committed by
GitHub
parent
db68c9b790
commit
d486ed1643
@@ -221,7 +221,7 @@ export async function openDatabaseAsync(
|
||||
return sync;
|
||||
}
|
||||
|
||||
console.warn("[DB] Drivers síncronos indisponíveis — usando sql.js (WASM)");
|
||||
console.warn("[DB] Synchronous drivers unavailable — falling back to sql.js (WASM)");
|
||||
const adapter = await preInitSqlJs(filePath);
|
||||
console.log(`[DB] Driver: sql.js | file: ${filePath}`);
|
||||
return adapter;
|
||||
|
||||
@@ -1278,8 +1278,8 @@ export async function ensureDbInitialized(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
// Nenhum driver síncrono — pré-inicializar sql.js (WASM, async)
|
||||
console.warn("[DB] Pré-inicializando sql.js WASM (drivers síncronos indisponíveis)...");
|
||||
// No synchronous driver available — pre-initialize sql.js (WASM, async)
|
||||
console.warn("[DB] Pre-initializing sql.js WASM (synchronous drivers unavailable)...");
|
||||
await preInitSqlJs(SQLITE_FILE);
|
||||
// Agora getSqlJsAdapter() retornará o adapter, e getDbInstance() vai usá-lo
|
||||
getDbInstance();
|
||||
|
||||
Reference in New Issue
Block a user