"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@oclif/core");
const buildProcessor_1 = require("../build/buildProcessor");
class Validate extends core_1.Command {
    async catch(error) {
        core_1.CliUx.ux.action.stop("error");
        this.error(error.message ?? error);
        this.exit(error.code);
    }
    async run() {
        let buildProcessor = new buildProcessor_1.BuildProcessor(process.cwd(), this, (status) => {
            core_1.CliUx.ux.action.start(status);
        });
        await buildProcessor.validate();
        core_1.CliUx.ux.action.stop();
        console.log("\r\nTokenScript validated successfully!");
    }
}
exports.default = Validate;
Validate.description = 'Validate an existing .tsml';
Validate.flags = {};
Validate.args = [];
