"use strict";function _typeof(obj) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {return typeof obj;} : function (obj) {return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;}, _typeof(obj);}Object.defineProperty(exports, "__esModule", { value: true });Object.defineProperty(exports, "CLI", { enumerable: true, get: function get() {return _cli["default"];} });exports.Common = void 0;Object.defineProperty(exports, "Config", { enumerable: true, get: function get() {return _config["default"];} });exports.run = exports.initializeBuilder = exports.doResolvePath = exports.doResolve = exports["default"] = exports.Utils = exports.TemplateManager = exports.TaskManager = exports.SetupManager = exports.SchemaManager = exports.SDKManager = exports.RuntimeManager = exports.Resolver = exports.Prompt = exports.ProjectManager = exports.PluginManager = exports.PlatformManager = exports.ObjectUtils = exports.NPMUtils = exports.Logger = exports.FileUtils = exports.Exec = exports.EngineManager = exports.Doctor = exports.Constants = exports.ConfigManager = void 0;require("regenerator-runtime/runtime");
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"));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { "default": obj };}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;}function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};}

global.RNV_ANALYTICS = _analytics["default"];

var initializeBuilder = /*#__PURE__*/function () {var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(cmd, subCmd, process, program) {var c;return regeneratorRuntime.wrap(function _callee$(_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();}}}, _callee);}));return function initializeBuilder(_x, _x2, _x3, _x4) {return _ref.apply(this, arguments);};}();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;
// END LEGACY
exports.doResolvePath = doResolvePath;var _default =






























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