import { Flags } from '@oclif/core';
import LocalScriptCommand from '../../lib/scripts/localScriptCommand.js';
import ScriptRunner from '../../lib/scripts/scriptRunner.js';
export default class ScriptsRun extends LocalScriptCommand {
    static args = LocalScriptCommand.args;
    static description = 'Run a script';
    static descriptionGerund = 'Running script';
    static flags = {
        "no-cache": Flags.boolean({
            char: 'n',
            default: false,
            description: "Disable build artifact caching",
            required: false,
        }),
        "run-spec": Flags.string({ char: 'r', description: "Run spec to use for execution", required: false })
    };
    async runImpl() {
        const runner = new ScriptRunner(this.srcPath, this.parsedFlags['run-spec'], this.parsedFlags['no-cache']);
        await runner.run();
    }
}
