"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.taskRnvHelp = exports["default"] = void 0;var _logger = require("../../core/systemManager/logger");
var _constants = require("../../core/constants");
var _engineManager = require("../../core/engineManager");

var taskRnvHelp = function taskRnvHelp(c) {
  (0, _logger.logTask)('taskRnvHelp');

  // PARAMS
  var optsString = '';

  _constants.PARAMS.withAll().forEach(function (param) {
    var cmd = '';
    if (param.shortcut) {
      cmd += "-".concat(param.shortcut, ", ");
    }
    cmd += "--".concat(param.key);
    if (param.value) {
      if (param.isRequired) {
        cmd += " <".concat(param.value, ">");
      } else {
        cmd += " [".concat(param.value, "]");
      }
    }
    optsString += (0, _logger.chalk)().grey("".concat(cmd, ", ").concat(param.description, "\n"));
  });

  // TASKS
  var commands = [];
  var engines = (0, _engineManager.getRegisteredEngines)(c);

  engines.forEach(function (engine) {
    Object.values(engine.tasks).forEach(function (_ref) {var task = _ref.task;
      commands.push(task);
    });
  });
  var cmdsString = commands.join(', ');


  (0, _logger.logToSummary)("\n".concat(
  (0, _logger.chalk)().bold.white('COMMANDS:'), "\n\n").concat(

  cmdsString, "\n\n").concat(

  (0, _logger.chalk)().bold.white('OPTIONS:'), "\n\n").concat(

  optsString, "\n"));

};exports.taskRnvHelp = taskRnvHelp;var _default =

{
  description: 'Display generic help',
  fn: taskRnvHelp,
  task: 'help',
  params: _constants.PARAMS.withBase(),
  platforms: [],
  isGlobalScope: true };exports["default"] = _default;
//# sourceMappingURL=task.rnv.help.js.map