var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports.taskRnvHooksList=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _logger=require("../core/systemManager/logger");
var _prompt=require("../cli/prompt");
var _buildHooks=require("../core/projectManager/buildHooks");
var _engineManager=require("../core/engineManager");
var _constants=require("../core/constants");


var taskRnvHooksList=function taskRnvHooksList(c,parentTask,originTask){var hookOpts,hooksAsString,pipeOpts;return _regenerator.default.async(function taskRnvHooksList$(_context){while(1){switch(_context.prev=_context.next){case 0:
(0,_logger.logTask)('taskRnvHooksList');_context.next=3;return _regenerator.default.awrap(

(0,_engineManager.executeTask)(c,_constants.TASK_PROJECT_CONFIGURE,_constants.TASK_HOOKS_LIST,originTask));case 3:_context.next=5;return _regenerator.default.awrap(

(0,_buildHooks.buildHooks)(c));case 5:if(!

c.buildHooks){_context.next=11;break;}
hookOpts=(0,_prompt.generateOptions)(c.buildHooks);
hooksAsString="\n"+'Hooks:'+"\n"+hookOpts.asString;

if(c.buildPipes){
pipeOpts=(0,_prompt.generateOptions)(c.buildPipes);
hooksAsString+="\n"+'Pipes:'+"\n"+pipeOpts.asString;
}
(0,_logger.logToSummary)(hooksAsString);return _context.abrupt("return",
true);case 11:return _context.abrupt("return",

Promise.reject('Your buildHooks object is empty!'));case 12:case"end":return _context.stop();}}},null,null,null,Promise);};exports.taskRnvHooksList=taskRnvHooksList;var _default=


{
description:'Get list of all available hooks',
fn:taskRnvHooksList,
task:_constants.TASK_HOOKS_LIST,
params:_constants.PARAMS.withBase(),
platforms:[],
skipAppConfig:true,
skipPlatforms:true};exports.default=_default;
//# sourceMappingURL=task.rnv.hooks.list.js.map