"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
require("core-js/modules/es.array.iterator.js");
require("core-js/modules/es.promise.js");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.UIBuildCmd = void 0;
function _defineProperty2() {
  const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
  _defineProperty2 = function () {
    return data;
  };
  return data;
}
function _exceptions() {
  const data = require("./exceptions");
  _exceptions = function () {
    return data;
  };
  return data;
}
class UIBuildCmd {
  constructor(
  /**
   * access to the extension instance.
   */
  ui) {
    this.ui = ui;
    (0, _defineProperty2().default)(this, "name", 'ui-build [type]');
    (0, _defineProperty2().default)(this, "description", 'build production assets for deployment.');
    (0, _defineProperty2().default)(this, "alias", 'c');
    (0, _defineProperty2().default)(this, "group", 'development');
    (0, _defineProperty2().default)(this, "options", []);
    (0, _defineProperty2().default)(this, "private", true);
  }
  async report([type]) {
    // teambit.workspace/variants should be the one to take care of component patterns.
    const stats = await this.ui.build(type);
    if (!stats) throw new (_exceptions().UnknownBuildError)();
    return stats.toString();
  }
}
exports.UIBuildCmd = UIBuildCmd;

//# sourceMappingURL=ui-build.cmd.js.map