var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");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.SDKFirefox=exports.SDKXcode=exports.SDKAndroid=exports.SDKElectron=exports.SDKTizen=exports.SDKWebos=exports.SDKNext=exports.SDKWebpack=exports.Logger=exports.Doctor=exports.FileUtils=exports.Exec=exports.NPMUtils=exports.SchemaParser=exports.PluginManager=exports.PlatformManager=exports.SetupManager=exports.EngineManager=exports.Resolver=exports.Constants=exports.Prompt=exports.Common=exports.default=exports.run=exports.SetupTools=exports.PluginTools=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 CoreUtils=_interopRequireWildcard(require("./core/utils"));
var Prompt=_interopRequireWildcard(require("./cli/prompt"));exports.Prompt=Prompt;
var Constants=_interopRequireWildcard(require("./core/constants"));exports.Constants=Constants;
var Resolver=_interopRequireWildcard(require("./core/resolve"));exports.Resolver=Resolver;
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 SchemaParser=_interopRequireWildcard(require("./core/schemaManager/schemaParser"));exports.SchemaParser=SchemaParser;
var NPMUtils=_interopRequireWildcard(require("./core/systemManager/npmUtils"));exports.NPMUtils=NPMUtils;
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 ConfigParser=_interopRequireWildcard(require("./core/configManager/configParser"));
var Logger=_interopRequireWildcard(require("./core/systemManager/logger"));exports.Logger=Logger;
var _analytics=_interopRequireDefault(require("./core/systemManager/analytics"));
var _config=_interopRequireDefault(require("./core/configManager/config"));


var SDKWebpack=_interopRequireWildcard(require("./sdk-webpack"));exports.SDKWebpack=SDKWebpack;
var SDKNext=_interopRequireWildcard(require("./sdk-webpack/webNext"));exports.SDKNext=SDKNext;
var SDKWebos=_interopRequireWildcard(require("./sdk-webos"));exports.SDKWebos=SDKWebos;
var SDKTizen=_interopRequireWildcard(require("./sdk-tizen"));exports.SDKTizen=SDKTizen;
var SDKElectron=_interopRequireWildcard(require("./sdk-electron"));exports.SDKElectron=SDKElectron;
var SDKAndroid=_interopRequireWildcard(require("./sdk-android"));exports.SDKAndroid=SDKAndroid;
var SDKXcode=_interopRequireWildcard(require("./sdk-xcode"));exports.SDKXcode=SDKXcode;
var SDKFirefox=_interopRequireWildcard(require("./sdk-firefox"));exports.SDKFirefox=SDKFirefox;

_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:
FileUtils.configureFilesystem(Resolver.getConfigProp,Resolver.doResolve,CoreUtils.isSystemWin);
c=ConfigParser.createRnvConfig(program,process,cmd,subCmd);

Logger.configureLogger(c,_analytics.default);
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 SetupTools=SetupManager;exports.SetupTools=SetupTools;
var PluginTools=PluginManager;exports.PluginTools=PluginTools;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