tui plugins (#19347)

This commit is contained in:
Sebastian
2026-03-27 15:00:26 +01:00
committed by GitHub
parent d8ad8338f5
commit 6274b0677c
91 changed files with 10544 additions and 898 deletions

View File

@@ -6,6 +6,7 @@ import { UI } from "../ui"
import { cmd } from "./cmd"
import { JsonMigration } from "../../storage/json-migration"
import { EOL } from "os"
import { errorMessage } from "../../util/error"
const QueryCommand = cmd({
command: "$0 [query]",
@@ -39,7 +40,7 @@ const QueryCommand = cmd({
}
}
} catch (err) {
UI.error(err instanceof Error ? err.message : String(err))
UI.error(errorMessage(err))
process.exit(1)
}
db.close()
@@ -100,7 +101,7 @@ const MigrateCommand = cmd({
}
} catch (err) {
if (tty) process.stderr.write("\x1b[?25h")
UI.error(`Migration failed: ${err instanceof Error ? err.message : String(err)}`)
UI.error(`Migration failed: ${errorMessage(err)}`)
process.exit(1)
} finally {
sqlite.close()