import { defineCommand } from "citty"; import { Bookstack } from "../../utils/services/Bookstack"; export default defineCommand({ meta: { name: "update", description: "Updates a BookStack instance to the latest stable release.", }, args: { directory: { type: "positional", description: "The directory which contains your BookStack instance.", required: true, }, database: { type: "enum", description: "The type of database used by your BookStack instance.", options: ["mysql"], default: "mysql", required: true, }, }, run: async ({ args }) => { const service = await Bookstack.from(args.directory); if (args.database === "mysql") { console.log(service.getDatabaseConfig()); } }, });