import BaseCommand from '../baseCommand.js';
import BuildHost from '../buildHost.js';
import CloudLoginManager from '../cloudLoginManager.js';
import constants from '../constants.js';
export default class BuildHostCommand extends BaseCommand {
    requiresBuildHost = true;
    async assertPrerequisites() {
        await super.assertPrerequisites();
        await new CloudLoginManager().login();
        if (this.requiresBuildHost && !(await BuildHost.get()).isProvisioned()) {
            throw new Error(`This operation requires you to provision the Build Host first. Please try \`${constants.APP_NAME} build-host provision --help\`.`);
        }
    }
}
