mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
- Add @opencode-manager/workspace-plugin package - Add API tokens management with scoped access control - Add workspace-plugin routes for project discovery - Add bearer token authentication for external access - Add proxy WebSocket support for remote workspaces - Add frontend UI for API token management - Update documentation with workspace plugin guide
23 lines
461 B
TypeScript
23 lines
461 B
TypeScript
import { DatabaseSync } from 'node:sqlite'
|
|
|
|
export class Database extends DatabaseSync {
|
|
constructor(path: string) {
|
|
super(path)
|
|
}
|
|
|
|
run(sql: string, ...params: unknown[]): void {
|
|
if (params.length === 0) {
|
|
this.exec(sql)
|
|
return
|
|
}
|
|
const stmt = this.prepare(sql)
|
|
stmt.run(...(params as never[]))
|
|
}
|
|
|
|
query(sql: string): ReturnType<DatabaseSync['prepare']> {
|
|
return this.prepare(sql)
|
|
}
|
|
}
|
|
|
|
export default { Database }
|