var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _taskRnv=_interopRequireDefault(require("./task.rnv.run"));
var _taskRnv2=_interopRequireDefault(require("./task.rnv.package"));
var _taskRnv3=_interopRequireDefault(require("./task.rnv.build"));
var _taskRnv4=_interopRequireDefault(require("./task.rnv.configure"));
var _taskRnv5=_interopRequireDefault(require("./task.rnv.start"));
var _taskRnv6=_interopRequireDefault(require("./task.rnv.export"));
var _taskRnv7=_interopRequireDefault(require("./task.rnv.deploy"));
var _taskRnv8=_interopRequireDefault(require("./task.rnv.debug"));

var TASKS={};

var addTask=function addTask(taskInstance){
TASKS[taskInstance.task]=taskInstance;
};

addTask(_taskRnv.default);
addTask(_taskRnv2.default);
addTask(_taskRnv3.default);
addTask(_taskRnv4.default);
addTask(_taskRnv5.default);
addTask(_taskRnv6.default);
addTask(_taskRnv7.default);
addTask(_taskRnv8.default);

var executeTask=function executeTask(c,task,parentTask,originTask){return _regenerator.default.async(function executeTask$(_context){while(1){switch(_context.prev=_context.next){case 0:return _context.abrupt("return",TASKS[task].fn(c,parentTask,originTask));case 1:case"end":return _context.stop();}}},null,null,null,Promise);};

var hasTask=function hasTask(task,isProjectScope){var _TASKS$task;return isProjectScope?!!TASKS[task]:(_TASKS$task=TASKS[task])==null?void 0:_TASKS$task.isGlobalScope;};

var getTask=function getTask(task){return TASKS[task];};

var getSubTasks=function getSubTasks(task,exactMatch){return Object.values(TASKS).filter(function(v){return exactMatch?v.task.split(' ')[0]===task:v.task.startsWith(task);});};

var getTasks=function getTasks(){return Object.values(TASKS);};

var getId=function getId(){return'engine-rn';};var _default=

{
executeTask:executeTask,
addTask:addTask,
hasTask:hasTask,
getTask:getTask,
getSubTasks:getSubTasks,
getTasks:getTasks,
getId:getId};exports.default=_default;
//# sourceMappingURL=index.js.map