UNPKG

@interaktiv/mibuilder-core

Version:

Core libraries to interact with MiBuilder projects.

70 lines (53 loc) 2.55 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.DATA_CONFIG_JSON = exports.MIAPP_RC = exports.TICH_CFG = exports.TIAPP_XML = exports.LOG_FILE_PATH = exports.LOG_FILE = exports.MIBUILDER_PROJECT_JSON_DIR = exports.MIBUILDER_PROJECT_JSON_STATE_FOLDER = exports.GLOBAL_CONFIG_DIR = exports.CONFIG_STATE_FOLDER = exports.MIBUILDER_BATCH_JSON = exports.MIBUILDER_PROJECT_JSON = exports.MIBUILDER_PROJECT_JSON_LEGACY = void 0; var _path = _interopRequireDefault(require("path")); var _os = _interopRequireDefault(require("os")); var _platformFolders = require("platform-folders"); // This has to be defined on util to prevent circular deps with project and configFile. const MIBUILDER_PROJECT_JSON_LEGACY = 'project.json'; exports.MIBUILDER_PROJECT_JSON_LEGACY = MIBUILDER_PROJECT_JSON_LEGACY; const MIBUILDER_PROJECT_JSON = 'mibuilder-project.json'; exports.MIBUILDER_PROJECT_JSON = MIBUILDER_PROJECT_JSON; const MIBUILDER_BATCH_JSON = 'mibuilder-batch.json'; /** * The global folder in which state is stored. */ exports.MIBUILDER_BATCH_JSON = MIBUILDER_BATCH_JSON; const CONFIG_STATE_FOLDER = '.mibuilder'; /** * The full system path to the global state folder. * * **See** {@link CONFIG_STATE_FOLDER} */ exports.CONFIG_STATE_FOLDER = CONFIG_STATE_FOLDER; const GLOBAL_CONFIG_DIR = _path.default.join(_os.default.homedir(), CONFIG_STATE_FOLDER); /** * The global folder in which the {@link MIBUILDER_PROJECT_JSON} is stored. */ exports.GLOBAL_CONFIG_DIR = GLOBAL_CONFIG_DIR; const MIBUILDER_PROJECT_JSON_STATE_FOLDER = 'MIBuilder'; /** * The full system path to the {@link MIBUILDER_PROJECT_JSON} state folder. */ exports.MIBUILDER_PROJECT_JSON_STATE_FOLDER = MIBUILDER_PROJECT_JSON_STATE_FOLDER; const MIBUILDER_PROJECT_JSON_DIR = _path.default.join((0, _platformFolders.getDocumentsFolder)(), MIBUILDER_PROJECT_JSON_STATE_FOLDER); exports.MIBUILDER_PROJECT_JSON_DIR = MIBUILDER_PROJECT_JSON_DIR; const LOG_FILE = 'mibuilder.log'; /** * The full system path to the global log file. */ exports.LOG_FILE = LOG_FILE; const LOG_FILE_PATH = _path.default.join(GLOBAL_CONFIG_DIR, LOG_FILE); exports.LOG_FILE_PATH = LOG_FILE_PATH; const TIAPP_XML = 'tiapp.xml'; exports.TIAPP_XML = TIAPP_XML; const TICH_CFG = 'tich.cfg'; exports.TICH_CFG = TICH_CFG; const MIAPP_RC = '.miapprc.json'; exports.MIAPP_RC = MIAPP_RC; const DATA_CONFIG_JSON = 'data/config.json'; exports.DATA_CONFIG_JSON = DATA_CONFIG_JSON;