Command line helper for Shopware, WordPress and various other server environment needs.
cli shopware bookstack wordpress
at develop 33 lines 933 B view raw
1import { defineCommand } from "citty"; 2import { Bookstack } from "../../utils/services/Bookstack"; 3 4export default defineCommand({ 5 meta: { 6 name: "update", 7 description: 8 "Updates a BookStack instance to the latest stable release.", 9 }, 10 args: { 11 directory: { 12 type: "positional", 13 description: 14 "The directory which contains your BookStack instance.", 15 required: true, 16 }, 17 database: { 18 type: "enum", 19 description: 20 "The type of database used by your BookStack instance.", 21 options: ["mysql"], 22 default: "mysql", 23 required: true, 24 }, 25 }, 26 run: async ({ args }) => { 27 const service = await Bookstack.from(args.directory); 28 29 if (args.database === "mysql") { 30 console.log(service.getDatabaseConfig()); 31 } 32 }, 33});