refactor: migrate from node-sqlite3-wasm to better-sqlite3
Replace all db.run(sql, [params]) calls with db.prepare(sql).run(...params) across all source modules and test files. Also remove the node-sqlite3-wasm import from tests/db.test.ts and update the type annotation accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,10 +19,9 @@ async function main(): Promise<void> {
|
||||
|
||||
if (userCount.count === 0) {
|
||||
const hash = bcrypt.hashSync('admin', 10);
|
||||
db.run(
|
||||
`INSERT INTO users (username, password_hash) VALUES (?, ?)`,
|
||||
['admin', hash]
|
||||
);
|
||||
db.prepare(
|
||||
`INSERT INTO users (username, password_hash) VALUES (?, ?)`
|
||||
).run('admin', hash);
|
||||
console.log('Created default admin user (admin/admin)');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user