var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports.taskRnvRun=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _platformManager=require("../core/platformManager");
var _logger=require("../core/systemManager/logger");
var _constants=require("../core/constants");




var _sdkElectron=require("../sdk-electron");
var _engineManager=require("../core/engineManager");

var taskRnvRun=function taskRnvRun(c,parentTask,originTask){var platform,port,target,hosted;return _regenerator.default.async(function taskRnvRun$(_context){while(1){switch(_context.prev=_context.next){case 0:
platform=c.platform;
port=c.runtime.port;
target=c.runtime.target;
hosted=c.program.hosted;
(0,_logger.logTask)('taskRnvRun',"parent:"+parentTask+" port:"+port+" target:"+target+" hosted:"+hosted);_context.next=7;return _regenerator.default.awrap(

(0,_engineManager.executeOrSkipTask)(c,_constants.TASK_CONFIGURE,_constants.TASK_RUN,originTask));case 7:_context.t0=

platform;_context.next=_context.t0===
_constants.MACOS?10:_context.t0===
_constants.WINDOWS?10:11;break;case 10:return _context.abrupt("return",
(0,_sdkElectron.runElectron)(c));case 11:return _context.abrupt("return",

(0,_platformManager.logErrorPlatform)(c));case 12:case"end":return _context.stop();}}},null,null,null,Promise);};exports.taskRnvRun=taskRnvRun;var _default=



{
description:'Run your app on target device or emulator',
fn:taskRnvRun,
task:'run',
params:_constants.PARAMS.withBase(_constants.PARAMS.withConfigure(_constants.PARAMS.withRun())),
platforms:[
_constants.MACOS,
_constants.WINDOWS]};exports.default=_default;
//# sourceMappingURL=task.rnv.run.js.map