var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports.taskRnvProjectUpgrade=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _constants=require("../core/constants");
var _logger=require("../core/systemManager/logger");
var _projectParser=require("../core/projectManager/projectParser");
var _engineManager=require("../core/engineManager");
var _npmUtils=require("../core/systemManager/npmUtils");
var _pluginManager=require("../core/pluginManager");


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

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

(0,_npmUtils.listAndSelectNpmVersion)(c,'rnv'));case 5:selectedVersion=_context.sent;

(0,_projectParser.upgradeProjectDependencies)(c,selectedVersion);_context.next=9;return _regenerator.default.awrap(

(0,_pluginManager.installPackageDependenciesAndPlugins)(c));case 9:return _context.abrupt("return",

true);case 10:case"end":return _context.stop();}}},null,null,null,Promise);};exports.taskRnvProjectUpgrade=taskRnvProjectUpgrade;var _default=


{
description:'Upgrade or downgrade RNV dependencies in your ReNative project',
fn:taskRnvProjectUpgrade,
task:_constants.TASK_PROJECT_UPGRADE,
params:_constants.PARAMS.withBase(),
platforms:[]};exports.default=_default;
//# sourceMappingURL=task.rnv.project.upgrade.js.map