var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.rnvLog=exports.rnvDeploy=exports.rnvExport=exports.rnvBuild=exports.rnvPackage=exports.rnvRun=exports.rnvDebug=exports.rnvStart=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));

var _chalk=_interopRequireDefault(require("chalk"));
var _betterOpn=_interopRequireDefault(require("better-opn"));
var _ip=_interopRequireDefault(require("ip"));
var _path=_interopRequireDefault(require("path"));

var _common=require("../common");















var _constants=require("../constants");


















var _apple=require("./apple");






var _web=require("./web");
var _tizen=require("./tizen");
var _webos=require("./webos");
var _firefox=require("./firefox");
var _electron=require("./electron");



var _setupTools=_interopRequireDefault(require("../setupTools"));
var _android=require("./android");






var _fileutils=require("../systemTools/fileutils");
var _exec=require("../systemTools/exec");
var _bundler=require("./bundler");
var _logger=require("../systemTools/logger");
var _config=_interopRequireDefault(require("../config"));
var _analytics=_interopRequireDefault(require("../systemTools/analytics"));
var _prompt=require("../../dist/systemTools/prompt");

var isRunningOnWindows=process.platform==='win32';

var keepRNVRunning=false;






var rnvStart=function rnvStart(c){var platform,port,hosted,hostIp,startCmd;return _regenerator.default.async(function rnvStart$(_context){while(1){switch(_context.prev=_context.next){case 0:
platform=c.platform;
port=c.runtime.port;
hosted=c.program.hosted;

(0,_common.logTask)("rnvStart:"+platform+":"+port+":"+hosted+":"+_config.default.isWebHostEnabled);

if(_config.default.isWebHostEnabled&&hosted){
hostIp=isRunningOnWindows?'127.0.0.1':'0.0.0.0';
(0,_common.waitForWebpack)(c,port).
then(function(){return(0,_betterOpn.default)("http://"+hostIp+":"+port+"/");}).
catch(_common.logError);
}_context.t0=

platform;_context.next=_context.t0===
_constants.MACOS?8:_context.t0===
_constants.WINDOWS?8:_context.t0===



_constants.WEB?11:_context.t0===
_constants.TIZEN?11:_context.t0===
_constants.WEBOS?11:_context.t0===
_constants.TIZEN_MOBILE?11:_context.t0===
_constants.TIZEN_WATCH?11:14;break;case 8:_context.next=10;return _regenerator.default.awrap((0,_common.configureIfRequired)(c,platform));case 10:return _context.abrupt("return",(0,_electron.runElectronDevServer)(c,platform,port));case 11:_context.next=13;return _regenerator.default.awrap(
(0,_common.configureIfRequired)(c,platform));case 13:return _context.abrupt("return",
(0,_web.runWeb)(c,platform,port));case 14:if(!

hosted){_context.next=16;break;}return _context.abrupt("return",
(0,_common.logError)('This platform does not support hosted mode',true));case 16:



startCmd="node ./node_modules/react-native/local-cli/cli.js start --sourceExts "+(0,_common.getSourceExts)(c).join(',')+" --port "+c.runtime.port+" --config=metro.config.js";
if(c.program.reset){
startCmd+=' --reset-cache';
}_context.next=20;return _regenerator.default.awrap(

(0,_exec.executeAsync)(c,startCmd,{stdio:'inherit',silent:true}));case 20:case"end":return _context.stop();}}});};exports.rnvStart=rnvStart;


var runWeinre=function runWeinre(c){return(0,_exec.executeAsync)(c,'npx weinre --boundHost -all-');};

var rnvDebug=function rnvDebug(c){return _regenerator.default.async(function rnvDebug$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:
(0,_common.logTask)("rnvDebug:"+c.platform);_context2.next=3;return _regenerator.default.awrap(

(0,_common.isPlatformSupported)(c));case 3:_context2.next=5;return _regenerator.default.awrap(
(0,_common.isBuildSchemeSupported)(c));case 5:_context2.next=7;return _regenerator.default.awrap(
runWeinre(c));case 7:case"end":return _context2.stop();}}});};exports.rnvDebug=rnvDebug;



var rnvRun=function rnvRun(c){return _regenerator.default.async(function rnvRun$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:
(0,_common.logTask)("rnvRun:"+c.platform);_context3.next=3;return _regenerator.default.awrap(

(0,_common.isPlatformSupported)(c));case 3:_context3.next=5;return _regenerator.default.awrap(
(0,_common.isBuildSchemeSupported)(c));case 5:_context3.next=7;return _regenerator.default.awrap(
_rnvRunWithPlatform(c));case 7:case"end":return _context3.stop();}}});};exports.rnvRun=rnvRun;


var rnvPackage=function rnvPackage(c){return _regenerator.default.async(function rnvPackage$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:
(0,_common.logTask)("rnvPackage:"+c.platform);_context4.next=3;return _regenerator.default.awrap(

(0,_common.isPlatformSupported)(c));case 3:_context4.next=5;return _regenerator.default.awrap(
(0,_common.isBuildSchemeSupported)(c));case 5:_context4.next=7;return _regenerator.default.awrap(
_rnvPackageWithPlatform(c));case 7:case"end":return _context4.stop();}}});};exports.rnvPackage=rnvPackage;


var rnvBuild=function rnvBuild(c){return _regenerator.default.async(function rnvBuild$(_context5){while(1){switch(_context5.prev=_context5.next){case 0:
(0,_common.logTask)("rnvBuild:"+c.platform);_context5.next=3;return _regenerator.default.awrap(

(0,_common.isPlatformSupported)(c));case 3:_context5.next=5;return _regenerator.default.awrap(
(0,_common.isBuildSchemeSupported)(c));case 5:_context5.next=7;return _regenerator.default.awrap(
_rnvBuildWithPlatform(c));case 7:case"end":return _context5.stop();}}});};exports.rnvBuild=rnvBuild;


var rnvExport=function rnvExport(c){return _regenerator.default.async(function rnvExport$(_context6){while(1){switch(_context6.prev=_context6.next){case 0:
(0,_common.logTask)("rnvExport:"+c.platform);_context6.next=3;return _regenerator.default.awrap(

(0,_common.isPlatformSupported)(c));case 3:_context6.next=5;return _regenerator.default.awrap(
(0,_common.isBuildSchemeSupported)(c));case 5:_context6.next=7;return _regenerator.default.awrap(
_rnvExportWithPlatform(c));case 7:case"end":return _context6.stop();}}});};exports.rnvExport=rnvExport;


var rnvDeploy=function rnvDeploy(c){return _regenerator.default.async(function rnvDeploy$(_context7){while(1){switch(_context7.prev=_context7.next){case 0:
(0,_common.logTask)("rnvDeploy:"+c.platform);_context7.next=3;return _regenerator.default.awrap(

(0,_common.isPlatformSupported)(c));case 3:_context7.next=5;return _regenerator.default.awrap(
(0,_common.isBuildSchemeSupported)(c));case 5:_context7.next=7;return _regenerator.default.awrap(
_rnvDeployWithPlatform(c));case 7:case"end":return _context7.stop();}}});};exports.rnvDeploy=rnvDeploy;


var rnvLog=function rnvLog(c){return _regenerator.default.async(function rnvLog$(_context8){while(1){switch(_context8.prev=_context8.next){case 0:_context8.t0=
c.platform;_context8.next=_context8.t0===
_constants.ANDROID?3:_context8.t0===
_constants.ANDROID_TV?3:_context8.t0===
_constants.ANDROID_WEAR?3:_context8.t0===


_constants.IOS?6:_context8.t0===
_constants.TVOS?6:9;break;case 3:_context8.next=5;return _regenerator.default.awrap((0,_android.runAndroidLog)(c));case 5:return _context8.abrupt("return");case 6:_context8.next=8;return _regenerator.default.awrap(
(0,_apple.runAppleLog)(c));case 8:return _context8.abrupt("return");case 9:



(0,_common.logErrorPlatform)(c,c.platform);case 10:case"end":return _context8.stop();}}});};exports.rnvLog=rnvLog;







var _configureHostedIfRequired=function _configureHostedIfRequired(c,platform){var _c$paths,project,rnv;return _regenerator.default.async(function _configureHostedIfRequired$(_context9){while(1){switch(_context9.prev=_context9.next){case 0:
if(_config.default.isWebHostEnabled){
(0,_common.logDebug)('Running hosted build');_c$paths=
c.paths,project=_c$paths.project,rnv=_c$paths.rnv;
(0,_fileutils.copyFolderContentsRecursiveSync)(_path.default.join(rnv.dir,'supportFiles','appShell'),_path.default.join(project.dir,'platformBuilds',c.runtime.appId+"_"+platform,'public'));
(0,_common.writeCleanFile)(_path.default.join(rnv.dir,'supportFiles','appShell','index.html'),_path.default.join(project.dir,'platformBuilds',c.runtime.appId+"_"+platform,'public','index.html'),[
{pattern:'{{DEV_SERVER}}',override:"http://"+_ip.default.address()+":"+c.runtime.port}]);

}case 1:case"end":return _context9.stop();}}});};


var startBundlerIfRequired=function startBundlerIfRequired(c){var bundleAssets,isRunning;return _regenerator.default.async(function startBundlerIfRequired$(_context10){while(1){switch(_context10.prev=_context10.next){case 0:
bundleAssets=(0,_common.getConfigProp)(c,c.platform,'bundleAssets');if(!(
bundleAssets===true)){_context10.next=3;break;}return _context10.abrupt("return");case 3:_context10.next=5;return _regenerator.default.awrap(

(0,_bundler.isBundlerRunning)(c));case 5:isRunning=_context10.sent;if(
isRunning){_context10.next=13;break;}
rnvStart(c);
keepRNVRunning=true;_context10.next=11;return _regenerator.default.awrap(
(0,_bundler.waitForBundler)(c));case 11:_context10.next=15;break;case 13:_context10.next=15;return _regenerator.default.awrap(

(0,_common.confirmActiveBundler)(c));case 15:case"end":return _context10.stop();}}});};



var waitForBundlerIfRequired=function waitForBundlerIfRequired(c){var bundleAssets;return _regenerator.default.async(function waitForBundlerIfRequired$(_context11){while(1){switch(_context11.prev=_context11.next){case 0:
bundleAssets=(0,_common.getConfigProp)(c,c.platform,'bundleAssets');if(!(
bundleAssets===true)){_context11.next=3;break;}return _context11.abrupt("return");case 3:if(!

keepRNVRunning){_context11.next=5;break;}return _context11.abrupt("return",new Promise(function(){}));case 5:return _context11.abrupt("return",
true);case 6:case"end":return _context11.stop();}}});};


var _rnvRunWithPlatform=function _rnvRunWithPlatform(c){var platform,port,target,hosted,throwErr,setupInstance,_setupInstance,_setupInstance2;return _regenerator.default.async(function _rnvRunWithPlatform$(_context12){while(1){switch(_context12.prev=_context12.next){case 0:
(0,_common.logTask)("_rnvRunWithPlatform:"+c.platform);
platform=c.platform;
port=c.runtime.port;
target=c.program.target||c.files.workspace.config.defaultTargets[platform];
hosted=c.program.hosted;

(0,_common.logTask)("_rnvRunWithPlatform:"+platform+":"+port+":"+target,_chalk.default.grey);

throwErr=function throwErr(err){
throw err;
};if(!(

_config.default.isWebHostEnabled&&hosted)){_context12.next=10;break;}
c.runtime.shouldOpenBrowser=true;return _context12.abrupt("return",
rnvStart(c));case 10:



_analytics.default.captureEvent({
type:'runProject',
platform:platform});_context12.t0=


platform;_context12.next=_context12.t0===
_constants.IOS?14:_context12.t0===
_constants.TVOS?14:_context12.t0===








_constants.ANDROID?25:_context12.t0===
_constants.ANDROID_TV?25:_context12.t0===
_constants.ANDROID_WEAR?25:_context12.t0===















_constants.MACOS?43:_context12.t0===
_constants.WINDOWS?43:_context12.t0===





_constants.WEB?49:_context12.t0===






_constants.TIZEN?56:_context12.t0===
_constants.TIZEN_MOBILE?56:_context12.t0===
_constants.TIZEN_WATCH?56:_context12.t0===










_constants.WEBOS?68:_context12.t0===










_constants.KAIOS?80:_context12.t0===
_constants.FIREFOX_OS?80:_context12.t0===
_constants.FIREFOX_TV?80:88;break;case 14:if(c.program.only){_context12.next=24;break;}_context12.next=17;return _regenerator.default.awrap((0,_common.cleanPlatformIfRequired)(c,platform));case 17:_context12.next=19;return _regenerator.default.awrap((0,_common.configureIfRequired)(c,platform));case 19:_context12.next=21;return _regenerator.default.awrap(startBundlerIfRequired(c));case 21:_context12.next=23;return _regenerator.default.awrap((0,_apple.runXcodeProject)(c,platform,target));case 23:return _context12.abrupt("return",waitForBundlerIfRequired(c));case 24:return _context12.abrupt("return",(0,_apple.runXcodeProject)(c,platform,target));case 25:if((0,_common.checkSdk)(c,platform,_common.logError)){_context12.next=29;break;}setupInstance=(0,_setupTools.default)(c);_context12.next=29;return _regenerator.default.awrap(setupInstance.askToInstallSDK('android'));case 29:if(c.program.only){_context12.next=42;break;}_context12.next=32;return _regenerator.default.awrap((0,_common.cleanPlatformIfRequired)(c,platform));case 32:_context12.next=34;return _regenerator.default.awrap((0,_common.configureIfRequired)(c,platform));case 34:_context12.next=36;return _regenerator.default.awrap(startBundlerIfRequired(c));case 36:if(!((0,_common.getConfigProp)(c,platform,'bundleAssets')===true||platform===_constants.ANDROID_WEAR)){_context12.next=39;break;}_context12.next=39;return _regenerator.default.awrap((0,_android.packageAndroid)(c,platform));case 39:_context12.next=41;return _regenerator.default.awrap((0,_android.runAndroid)(c,platform,target));case 41:return _context12.abrupt("return",waitForBundlerIfRequired(c));case 42:return _context12.abrupt("return",(0,_android.runAndroid)(c,platform,target));case 43:if(c.program.only){_context12.next=48;break;}_context12.next=46;return _regenerator.default.awrap((0,_common.cleanPlatformIfRequired)(c,platform));case 46:_context12.next=48;return _regenerator.default.awrap((0,_common.configureIfRequired)(c,platform));case 48:return _context12.abrupt("return",(0,_electron.runElectron)(c,platform,port));case 49:if(c.program.only){_context12.next=54;break;}_context12.next=52;return _regenerator.default.awrap((0,_common.cleanPlatformIfRequired)(c,platform));case 52:_context12.next=54;return _regenerator.default.awrap((0,_common.configureIfRequired)(c,platform));case 54:c.runtime.shouldOpenBrowser=true;return _context12.abrupt("return",(0,_web.runWeb)(c,platform,port,true));case 56:if((0,_common.checkSdk)(c,platform,_common.logError)){_context12.next=60;break;}_setupInstance=(0,_setupTools.default)(c);_context12.next=60;return _regenerator.default.awrap(_setupInstance.askToInstallSDK('tizen'));case 60:if(c.program.only){_context12.next=67;break;}_context12.next=63;return _regenerator.default.awrap((0,_common.cleanPlatformIfRequired)(c,platform));case 63:_context12.next=65;return _regenerator.default.awrap((0,_common.configureIfRequired)(c,platform));case 65:_context12.next=67;return _regenerator.default.awrap(_configureHostedIfRequired(c,platform));case 67:return _context12.abrupt("return",(0,_tizen.runTizen)(c,platform,target));case 68:if((0,_common.checkSdk)(c,platform,_common.logError)){_context12.next=72;break;}_setupInstance2=(0,_setupTools.default)(c);_context12.next=72;return _regenerator.default.awrap(_setupInstance2.askToInstallSDK('webos'));case 72:if(c.program.only){_context12.next=79;break;}_context12.next=75;return _regenerator.default.awrap((0,_common.cleanPlatformIfRequired)(c,platform));case 75:_context12.next=77;return _regenerator.default.awrap((0,_common.configureIfRequired)(c,platform));case 77:_context12.next=79;return _regenerator.default.awrap(_configureHostedIfRequired(c,platform));case 79:return _context12.abrupt("return",(0,_webos.runWebOS)(c,platform,target));case 80:if(!(
platform===_constants.KAIOS&&!(0,_common.checkSdk)(c,platform,throwErr))){_context12.next=82;break;}return _context12.abrupt("return");case 82:if(
c.program.only){_context12.next=87;break;}_context12.next=85;return _regenerator.default.awrap(
(0,_common.cleanPlatformIfRequired)(c,platform));case 85:_context12.next=87;return _regenerator.default.awrap(
(0,_common.configureIfRequired)(c,platform));case 87:return _context12.abrupt("return",

(0,_firefox.runFirefoxProject)(c,platform));case 88:return _context12.abrupt("return",

(0,_common.logErrorPlatform)(c,platform));case 89:case"end":return _context12.stop();}}});};



var _rnvPackageWithPlatform=function _rnvPackageWithPlatform(c){var platform,target;return _regenerator.default.async(function _rnvPackageWithPlatform$(_context13){while(1){switch(_context13.prev=_context13.next){case 0:
(0,_common.logTask)("_rnvPackageWithPlatform:"+c.platform);
platform=c.platform;

target=c.program.target||c.files.workspace.config.defaultTargets[platform];_context13.t0=

platform;_context13.next=_context13.t0===
_constants.IOS?6:_context13.t0===
_constants.TVOS?6:_context13.t0===





_constants.ANDROID?12:_context13.t0===
_constants.ANDROID_TV?12:_context13.t0===
_constants.ANDROID_WEAR?12:21;break;case 6:if(c.program.only){_context13.next=11;break;}_context13.next=9;return _regenerator.default.awrap((0,_common.cleanPlatformIfRequired)(c,platform));case 9:_context13.next=11;return _regenerator.default.awrap((0,_common.configureIfRequired)(c,platform));case 11:return _context13.abrupt("return",(0,_apple.packageBundleForXcode)(c,platform));case 12:
(0,_common.checkSdk)(c,platform);if(
c.program.only){_context13.next=20;break;}_context13.next=16;return _regenerator.default.awrap(
(0,_common.cleanPlatformIfRequired)(c,platform));case 16:_context13.next=18;return _regenerator.default.awrap(
(0,_common.configureIfRequired)(c,platform));case 18:_context13.next=20;return _regenerator.default.awrap(
(0,_android.configureGradleProject)(c,platform));case 20:return _context13.abrupt("return",

(0,_android.packageAndroid)(c,platform,target,platform===_constants.ANDROID_WEAR));case 21:


(0,_common.logErrorPlatform)(c,platform);case 22:case"end":return _context13.stop();}}});};


var _rnvExportWithPlatform=function _rnvExportWithPlatform(c){var platform;return _regenerator.default.async(function _rnvExportWithPlatform$(_context14){while(1){switch(_context14.prev=_context14.next){case 0:
(0,_common.logTask)("_rnvExportWithPlatform:"+c.platform);
platform=c.platform;_context14.t0=
platform;_context14.next=_context14.t0===
_constants.WEB?5:_context14.t0===




_constants.IOS?9:_context14.t0===
_constants.TVOS?9:_context14.t0===




_constants.ANDROID?13:_context14.t0===
_constants.ANDROID_TV?13:_context14.t0===
_constants.ANDROID_WEAR?13:_context14.t0===

_constants.MACOS?14:_context14.t0===
_constants.WINDOWS?14:24;break;case 5:if(c.program.only){_context14.next=8;break;}_context14.next=8;return _regenerator.default.awrap(rnvBuild(c));case 8:return _context14.abrupt("return",(0,_web.exportWeb)(c,platform));case 9:if(c.program.only){_context14.next=12;break;}_context14.next=12;return _regenerator.default.awrap(_rnvBuildWithPlatform(c,platform));case 12:return _context14.abrupt("return",(0,_apple.exportXcodeProject)(c,platform));case 13:return _context14.abrupt("return",_rnvBuildWithPlatform(c));case 14:if(
c.program.only){_context14.next=23;break;}_context14.next=17;return _regenerator.default.awrap(
(0,_common.cleanPlatformIfRequired)(c,platform));case 17:_context14.next=19;return _regenerator.default.awrap(
(0,_common.configureIfRequired)(c,platform));case 19:_context14.next=21;return _regenerator.default.awrap(
(0,_electron.configureElectronProject)(c,platform));case 21:_context14.next=23;return _regenerator.default.awrap(
(0,_electron.buildElectron)(c,platform));case 23:return _context14.abrupt("return",

(0,_electron.exportElectron)(c,platform));case 24:


(0,_common.logErrorPlatform)(c,platform);case 25:case"end":return _context14.stop();}}});};


var _rnvDeployWithPlatform=function _rnvDeployWithPlatform(c){var platform;return _regenerator.default.async(function _rnvDeployWithPlatform$(_context15){while(1){switch(_context15.prev=_context15.next){case 0:
(0,_common.logTask)("_rnvDeployWithPlatform:"+c.platform);
platform=c.platform;_context15.t0=

platform;_context15.next=_context15.t0===
_constants.WEB?5:_context15.t0===




_constants.TVOS?9:_context15.t0===
_constants.IOS?9:_context15.t0===





_constants.TIZEN?12:_context15.t0===




_constants.ANDROID_TV?16:_context15.t0===
_constants.ANDROID?16:19;break;case 5:if(c.program.only){_context15.next=8;break;}_context15.next=8;return _regenerator.default.awrap(rnvBuild(c));case 8:return _context15.abrupt("return",(0,_web.deployWeb)(c,platform));case 9:if(c.program.only){_context15.next=11;break;}return _context15.abrupt("return",_rnvExportWithPlatform(c));case 11:return _context15.abrupt("return");case 12:if(c.program.only){_context15.next=15;break;}_context15.next=15;return _regenerator.default.awrap(rnvBuild(c));case 15:return _context15.abrupt("return");case 16:if(
c.program.only){_context15.next=18;break;}return _context15.abrupt("return",
_rnvBuildWithPlatform(c));case 18:return _context15.abrupt("return");case 19:



(0,_common.logErrorPlatform)(c,platform);case 20:case"end":return _context15.stop();}}});};



var _rnvBuildWithPlatform=function _rnvBuildWithPlatform(c){var platform;return _regenerator.default.async(function _rnvBuildWithPlatform$(_context16){while(1){switch(_context16.prev=_context16.next){case 0:
(0,_common.logTask)("_rnvBuildWithPlatform:"+c.platform);
platform=c.platform;_context16.t0=

platform;_context16.next=_context16.t0===
_constants.ANDROID?5:_context16.t0===
_constants.ANDROID_TV?5:_context16.t0===
_constants.ANDROID_WEAR?5:_context16.t0===






_constants.MACOS?16:_context16.t0===
_constants.WINDOWS?16:_context16.t0===





_constants.IOS?25:_context16.t0===
_constants.TVOS?25:_context16.t0===





_constants.WEB?31:_context16.t0===




_constants.KAIOS?38:_context16.t0===
_constants.FIREFOX_OS?38:_context16.t0===
_constants.FIREFOX_TV?38:_context16.t0===




_constants.TIZEN?45:_context16.t0===
_constants.TIZEN_MOBILE?45:_context16.t0===
_constants.TIZEN_WATCH?45:_context16.t0===





_constants.WEBOS?53:61;break;case 5:_context16.next=7;return _regenerator.default.awrap((0,_common.cleanPlatformIfRequired)(c,platform));case 7:_context16.next=9;return _regenerator.default.awrap((0,_common.configureIfRequired)(c,platform));case 9:_context16.next=11;return _regenerator.default.awrap((0,_android.configureGradleProject)(c,platform));case 11:_context16.next=13;return _regenerator.default.awrap((0,_android.packageAndroid)(c,platform));case 13:_context16.next=15;return _regenerator.default.awrap((0,_android.buildAndroid)(c,platform));case 15:return _context16.abrupt("return");case 16:_context16.next=18;return _regenerator.default.awrap((0,_common.cleanPlatformIfRequired)(c,platform));case 18:_context16.next=20;return _regenerator.default.awrap((0,_common.configureIfRequired)(c,platform));case 20:_context16.next=22;return _regenerator.default.awrap((0,_electron.configureElectronProject)(c,platform));case 22:_context16.next=24;return _regenerator.default.awrap((0,_electron.buildElectron)(c,platform));case 24:return _context16.abrupt("return");case 25:if(c.program.only){_context16.next=28;break;}_context16.next=28;return _regenerator.default.awrap(_rnvPackageWithPlatform(c,platform));case 28:_context16.next=30;return _regenerator.default.awrap((0,_apple.archiveXcodeProject)(c,platform));case 30:return _context16.abrupt("return");case 31:_context16.next=33;return _regenerator.default.awrap((0,_common.cleanPlatformIfRequired)(c,platform));case 33:_context16.next=35;return _regenerator.default.awrap((0,_common.configureIfRequired)(c,platform));case 35:_context16.next=37;return _regenerator.default.awrap((0,_web.buildWeb)(c,platform));case 37:return _context16.abrupt("return");case 38:_context16.next=40;return _regenerator.default.awrap((0,_common.cleanPlatformIfRequired)(c,platform));case 40:_context16.next=42;return _regenerator.default.awrap((0,_common.configureIfRequired)(c,platform));case 42:_context16.next=44;return _regenerator.default.awrap((0,_firefox.buildFirefoxProject)(c,platform));case 44:return _context16.abrupt("return");case 45:(0,_common.checkSdk)(c,platform);_context16.next=48;return _regenerator.default.awrap((0,_common.cleanPlatformIfRequired)(c,platform));case 48:_context16.next=50;return _regenerator.default.awrap((0,_common.configureIfRequired)(c,platform));case 50:_context16.next=52;return _regenerator.default.awrap((0,_tizen.buildTizenProject)(c,platform));case 52:return _context16.abrupt("return");case 53:
(0,_common.checkSdk)(c,platform);_context16.next=56;return _regenerator.default.awrap(
(0,_common.cleanPlatformIfRequired)(c,platform));case 56:_context16.next=58;return _regenerator.default.awrap(
(0,_common.configureIfRequired)(c,platform));case 58:_context16.next=60;return _regenerator.default.awrap(
(0,_webos.buildWebOSProject)(c,platform));case 60:return _context16.abrupt("return");case 61:



(0,_common.logErrorPlatform)(c,platform);case 62:case"end":return _context16.stop();}}});};
//# sourceMappingURL=runner.js.map