var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"CLI",{enumerable:true,get:function get(){return _cli.default;}});Object.defineProperty(exports,"Config",{enumerable:true,get:function get(){return _config.default;}});exports.WebpackUtils=exports.Resolver=exports.Logger=exports.Doctor=exports.FileUtils=exports.Exec=exports.ObjectUtils=exports.NPMUtils=exports.TaskManager=exports.TemplateManager=exports.SDKManager=exports.RuntimeManager=exports.SchemaManager=exports.ConfigManager=exports.ProjectManager=exports.PluginManager=exports.PlatformManager=exports.SetupManager=exports.EngineManager=exports.Constants=exports.Prompt=exports.Utils=exports.Common=exports.default=exports.run=exports.doResolvePath=exports.doResolve=exports.initializeBuilder=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));
var Common=_interopRequireWildcard(require("./core/common"));exports.Common=Common;
var Utils=_interopRequireWildcard(require("./core/systemManager/utils"));exports.Utils=Utils;
var Prompt=_interopRequireWildcard(require("./cli/prompt"));exports.Prompt=Prompt;
var Constants=_interopRequireWildcard(require("./core/constants"));exports.Constants=Constants;
var _cli=_interopRequireDefault(require("./cli"));

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


var EngineManager=_interopRequireWildcard(require("./core/engineManager"));exports.EngineManager=EngineManager;
var SetupManager=_interopRequireWildcard(require("./core/setupManager"));exports.SetupManager=SetupManager;
var PlatformManager=_interopRequireWildcard(require("./core/platformManager"));exports.PlatformManager=PlatformManager;
var PluginManager=_interopRequireWildcard(require("./core/pluginManager"));exports.PluginManager=PluginManager;
var ProjectManager=_interopRequireWildcard(require("./core/projectManager"));exports.ProjectManager=ProjectManager;
var ConfigManager=_interopRequireWildcard(require("./core/configManager"));exports.ConfigManager=ConfigManager;
var SchemaManager=_interopRequireWildcard(require("./core/schemaManager"));exports.SchemaManager=SchemaManager;
var RuntimeManager=_interopRequireWildcard(require("./core/runtimeManager"));exports.RuntimeManager=RuntimeManager;
var SDKManager=_interopRequireWildcard(require("./core/sdkManager"));exports.SDKManager=SDKManager;
var TemplateManager=_interopRequireWildcard(require("./core/templateManager"));exports.TemplateManager=TemplateManager;
var TaskManager=_interopRequireWildcard(require("./core/taskManager"));exports.TaskManager=TaskManager;


var NPMUtils=_interopRequireWildcard(require("./core/systemManager/npmUtils"));exports.NPMUtils=NPMUtils;
var ObjectUtils=_interopRequireWildcard(require("./core/systemManager/objectUtils"));exports.ObjectUtils=ObjectUtils;
var Exec=_interopRequireWildcard(require("./core/systemManager/exec"));exports.Exec=Exec;
var FileUtils=_interopRequireWildcard(require("./core/systemManager/fileutils"));exports.FileUtils=FileUtils;
var Doctor=_interopRequireWildcard(require("./core/systemManager/doctor"));exports.Doctor=Doctor;
var Logger=_interopRequireWildcard(require("./core/systemManager/logger"));exports.Logger=Logger;
var Resolver=_interopRequireWildcard(require("./core/systemManager/resolve"));exports.Resolver=Resolver;
var _analytics=_interopRequireDefault(require("./core/systemManager/analytics"));
var _config=_interopRequireDefault(require("./core/configManager/config"));
var WebpackUtils=_interopRequireWildcard(require("./core/sdkManager/webpackUtils"));exports.WebpackUtils=WebpackUtils;function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}

global.RNV_ANALYTICS=_analytics.default;

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:
_analytics.default.initialize();
FileUtils.configureFilesystem(Resolver.getConfigProp,Resolver.doResolve,Utils.isSystemWin);
c=ConfigManager.createRnvConfig(program,process,cmd,subCmd);
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 Logger.logComplete(!_config.default.getConfig().runtime.keepSessionActive);}).
catch(function(e){return Logger.logError(e,true);});
};exports.run=run;

var doResolve=Resolver.doResolve;exports.doResolve=doResolve;
var doResolvePath=Resolver.doResolvePath;exports.doResolvePath=doResolvePath;var _default=

































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