# v0.4.28 (2026-05-10)

## Features
- Add bun:sqlite adapter with automatic runtime detection (Bun/Node)
- Add bulk API key import (format: `name|sk-key`, one per line)
## Fixes
- Fix add API key for custom providers
This commit is contained in:
decolua
2026-05-10 08:44:14 +07:00
parent b39eb61c33
commit 530dc9cb3b
14 changed files with 282 additions and 71 deletions

View File

@@ -86,14 +86,15 @@ export async function createSqlJsAdapter(filePath) {
}
function transaction(fn) {
db.exec("BEGIN");
const sp = `sp_${Math.random().toString(36).slice(2)}`;
db.exec(`SAVEPOINT ${sp}`);
try {
const result = fn();
db.exec("COMMIT");
db.exec(`RELEASE ${sp}`);
scheduleSave();
return result;
} catch (e) {
db.exec("ROLLBACK");
try { db.exec(`ROLLBACK TO ${sp}`); db.exec(`RELEASE ${sp}`); } catch {}
throw e;
}
}