var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Common",{enumerable:true,get:function get(){return _common.default;}});Object.defineProperty(exports,"Logger",{enumerable:true,get:function get(){return _logger.default;}});Object.defineProperty(exports,"CLI",{enumerable:true,get:function get(){return _cli.default;}});Object.defineProperty(exports,"Exec",{enumerable:true,get:function get(){return _exec.default;}});Object.defineProperty(exports,"FileUtils",{enumerable:true,get:function get(){return _fileutils.default;}});Object.defineProperty(exports,"Doctor",{enumerable:true,get:function get(){return _doctor.default;}});Object.defineProperty(exports,"PluginTools",{enumerable:true,get:function get(){return _pluginManager.default;}});Object.defineProperty(exports,"SetupTools",{enumerable:true,get:function get(){return _setupManager.default;}});Object.defineProperty(exports,"doResolve",{enumerable:true,get:function get(){return _resolve.doResolve;}});Object.defineProperty(exports,"doResolvePath",{enumerable:true,get:function get(){return _resolve.doResolvePath;}});Object.defineProperty(exports,"EngineManager",{enumerable:true,get:function get(){return _engineManager.default;}});exports.Constants=exports.default=exports.run=exports.initializeBuilder=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _common=_interopRequireWildcard(require("./core/common"));
var _utils=require("./core/utils");
var _logger=_interopRequireWildcard(require("./core/systemManager/logger"));
var _configParser=require("./core/configManager/configParser");
var _cli=_interopRequireDefault(require("./cli"));
var Constants=_interopRequireWildcard(require("./core/constants"));exports.Constants=Constants;
var _exec=_interopRequireDefault(require("./core/systemManager/exec"));
var _fileutils=_interopRequireWildcard(require("./core/systemManager/fileutils"));
var _doctor=_interopRequireDefault(require("./core/systemManager/doctor"));
var _pluginManager=_interopRequireDefault(require("./core/pluginManager"));
var _setupManager=_interopRequireDefault(require("./core/setupManager"));
var _config=_interopRequireDefault(require("./core/configManager/config"));
var _resolve=require("./core/resolve");
var _analytics=_interopRequireDefault(require("./core/systemManager/analytics"));
var _engineManager=_interopRequireDefault(require("./core/engineManager"));

require("source-map-support/register");

_analytics.default.initialize();

var initializeBuilder=function initializeBuilder(cmd,subCmd,process,program){var c;return _regenerator.default.async(function initializeBuilder$(_context){while(1){switch(_context.prev=_context.next){case 0:
(0,_fileutils.configureFilesystem)(_common.getConfigProp,_resolve.doResolve,_utils.isSystemWin);
c=(0,_configParser.createRnvConfig)(program,process,cmd,subCmd);

(0,_logger.configureLogger)(c,_analytics.default);
(0,_logger.logInitialize)();return _context.abrupt("return",

c);case 5:case"end":return _context.stop();}}},null,null,null,Promise);};exports.initializeBuilder=initializeBuilder;


var run=function run(cmd,subCmd,program,process){
initializeBuilder(cmd,subCmd,process,program).
then(function(c){return _config.default.initializeConfig(c);}).
then(function(c){return(0,_cli.default)(c);}).
then(function(){return(0,_logger.logComplete)(!_config.default.getConfig().runtime.keepSessionActive);}).
catch(function(e){return(0,_logger.logError)(e,true);});
};exports.run=run;var _default=

















{run:run,Config:_config.default};exports.default=_default;
//# sourceMappingURL=index.js.map