import { Colors, Path, FS, Compress, Base64 } from "../deps.ts"; import { getMeta, IMeta, log, getConfig } from "../global.ts"; import { ServerError } from "../helper/server_error.ts"; import { runScript } from "../helper/run_script.ts"; export default async function run(options: {}, name: string) { const { scripts } = await getMeta(); if (!scripts || !scripts[name]) { console.log(Colors.bold(Colors.red("Script not found:")), name); } else { let script = scripts[name]; if (!Array.isArray(script)) script = [script]; for (const s of script) { await runScript(s); } } }