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 _configParser=require("../core/configManager/configParser");
var _runtimeParser=require("../core/configManager/runtimeParser");
var _engineManager=require("../core/engineManager");

var _migrator=require("../core/projectManager/migrator");

var _engineCore=_interopRequireDefault(require("../engine-core"));

var run=function run(c){var result,taskInstance;return _regenerator.default.async(function run$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.next=2;return _regenerator.default.awrap(
(0,_engineManager.registerEngine)(c,_engineCore.default));case 2:_context.next=4;return _regenerator.default.awrap(
(0,_runtimeParser.configureRuntimeDefaults)(c));case 4:_context.next=6;return _regenerator.default.awrap(
(0,_migrator.checkAndMigrateProject)(c));case 6:_context.next=8;return _regenerator.default.awrap(
(0,_configParser.parseRenativeConfigs)(c));case 8:_context.next=10;return _regenerator.default.awrap(
(0,_engineManager.loadEngineConfigs)(c));case 10:result=_context.sent;if(
result){_context.next=14;break;}_context.next=14;return _regenerator.default.awrap(
(0,_configParser.parseRenativeConfigs)(c));case 14:_context.next=16;return _regenerator.default.awrap(


(0,_engineManager.registerPlatformEngine)(c,c.platform));case 16:_context.next=18;return _regenerator.default.awrap(
(0,_engineManager.findSuitableTask)(c));case 18:taskInstance=_context.sent;_context.next=21;return _regenerator.default.awrap(

(0,_engineManager.registerMissingPlatformEngines)(c,taskInstance));case 21:_context.next=23;return _regenerator.default.awrap(

(0,_engineManager.initializeTask)(c,taskInstance.task));case 23:case"end":return _context.stop();}}},null,null,null,Promise);};var _default=


run;exports.default=_default;
//# sourceMappingURL=index.js.map