"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.PRE_DEPRECATE_REMOTE = exports.POST_RECEIVE_OBJECTS = exports.PRE_RECEIVE_OBJECTS = exports.POST_SEND_OBJECTS = exports.PRE_SEND_OBJECTS = exports.POST_EXPORT_HOOK = exports.PRE_EXPORT_HOOK = exports.POST_IMPORT_HOOK = exports.PRE_IMPORT_HOOK = exports.POST_TAG_ALL_HOOK = exports.PRE_TAG_ALL_HOOK = exports.POST_ADD_HOOK = exports.POST_TAG_HOOK = exports.PRE_TAG_HOOK = exports.GIT_HOOKS_NAMES = exports.POST_MERGE = exports.POST_CHECKOUT = exports.CFG_INIT_INTERACTIVE = exports.CFG_COMMAND_INTERACTIVE_TEMPLATE = exports.CFG_INTERACTIVE = exports.CFG_NO_WARNINGS = exports.CFG_LOG_JSON_FORMAT = exports.CFG_GIT_EXECUTABLE_PATH = exports.CFG_CI_ENABLE_KEY = exports.CFG_CI_FUNCTION_PATH_KEY = exports.CFG_POST_IMPORT_HOOK_KEY = exports.CFG_POST_EXPORT_HOOK_KEY = exports.CFG_REGISTRY_DOMAIN_PREFIX = exports.CFG_ANALYTICS_USERID_KEY = exports.CFG_ANALYTICS_ENVIRONMENT_KEY = exports.CFG_ANALYTICS_ERROR_REPORTS_KEY = exports.CFG_ANALYTICS_REPORTING_KEY = exports.CFG_REPOSITORY_REPORTING_KEY = exports.CFG_ANALYTICS_ANONYMOUS_KEY = exports.CFG_ANALYTICS_DOMAIN_KEY = exports.CFG_HUB_LOGIN_KEY = exports.CFG_HUB_DOMAIN_KEY = exports.CFG_SSH_KEY_FILE_KEY = exports.CFG_REGISTRY_URL_KEY = exports.CFG_USER_NAME_KEY = exports.CFG_USER_TOKEN_KEY = exports.CFG_USER_EMAIL_KEY = exports.INIT_COMMAND = exports.IGNORE_LIST = exports.DEFAULT_SSH_READY_TIMEOUT = exports.DEFAULT_SSH_KEY_FILE = exports.PREVIOUSLY_DEFAULT_REGISTRY_URL = exports.DEFAULT_REGISTRY_URL = exports.RELEASE_SERVER = exports.SEARCH_DOMAIN = exports.DEFAULT_REGISTRY_DOMAIN_PREFIX = exports.DEFAULT_ANALYTICS_DOMAIN = exports.DEFAULT_BIT_ENV = exports.DEFAULT_HUB_LOGIN = exports.REPO_NAME = exports.BASE_DOCS_DOMAIN = exports.DEFAULT_HUB_DOMAIN = exports.PREVIOUSLY_BASE_WEB_DOMAIN = exports.BASE_WEB_DOMAIN = exports.SPINNER_TYPE = exports.DEFAULT_DEPENDENCIES = exports.DEFAULT_REMOTES = exports.DEPENDENCIES_DIR = exports.VERSION_DELIMITER = exports.SPACE_DELIMITER = exports.NULL_BYTE = exports.OBJECTS_DIR = exports.LATEST_BIT_VERSION = exports.DEFAULT_SEPARATOR = exports.DEFAULT_EJECTED_ENVS_DIR_PATH = exports.COMPONENT_DIR = exports.DEFAULT_DEPENDENCIES_DIR_PATH = exports.DEFAULT_DIR_DEPENDENCIES = exports.DEFAULT_COMPONENTS_DIR_PATH = exports.NODE_PATH_COMPONENT_SEPARATOR = exports.DEFAULT_BINDINGS_PREFIX = exports.DEFAULT_LANGUAGE = exports.DEFAULT_BIT_RELEASE_TYPE = exports.DEFAULT_BIT_VERSION = exports.DEFAULT_BUNDLE_FILENAME = exports.DEFAULT_DIST_DIRNAME = exports.DEFAULT_EXTENSIONS = exports.DEFAULT_PACKAGE_MANAGER = exports.DEFAULT_TESTER_ID = exports.DEFAULT_COMPILER_ID = exports.NO_PLUGIN_TYPE = exports.DEFAULT_INDEX_EXTS = exports.DEFAULT_INDEX_NAME = exports.TESTS_FORK_LEVEL = exports.COMPONENT_ORIGINS = exports.OLD_BIT_MAP = exports.BIT_MAP = exports.GIT_IGNORE = exports.BIT_JSON = exports.BITS_DIRNAME = exports.BIT_USAGE = exports.BIT_DESCRIPTION = exports.AUTO_GENERATED_MSG = exports.AUTO_GENERATED_STAMP = exports.IS_WINDOWS = void 0;
exports.COMPONENT_DIST_PATH_TEMPLATE = exports.ANGULAR_BIT_ENTRY_POINT_FILE = exports.ANGULAR_PACKAGE_IDENTIFIER = exports.ACCEPTABLE_NPM_VERSIONS = exports.OVERRIDE_COMPONENT_PREFIX = exports.OVERRIDE_FILE_PREFIX = exports.MANUALLY_ADD_DEPENDENCY = exports.MANUALLY_REMOVE_ENVIRONMENT = exports.MANUALLY_REMOVE_DEPENDENCY = exports.DEBUG_LOG = exports.TESTER_ENV_TYPE = exports.COMPILER_ENV_TYPE = exports.PACKAGE_JSON = exports.WRAPPER_DIR = exports.NODE_PATH_SEPARATOR = exports.ISOLATED_ENV_ROOT = exports.LICENSE_FILENAME = exports.SKIP_UPDATE_FLAG = exports.BIT_INSTALL_METHOD = exports.BIT_VERSION = exports.DEFAULT_RESOLVER = exports.SCOPE_JSON = exports.SUB_DIRECTORIES_GLOB_PATTERN = exports.LATEST_TESTED_MARK = exports.BIT_CACHE_DIRNAME = exports.BIT_WORKSPACE_TMP_DIRNAME = exports.BIT_TMP_DIRNAME = exports.BIT_SOURCES_DIRNAME = exports.DEPENDENCY_DELIMITER = exports.LATEST = exports.BIT_REGISTRY = exports.DOT_GIT_DIR = exports.BIT_GIT_DIR = exports.BIT_HIDDEN_DIR = exports.GLOBAL_REMOTES = exports.GLOBAL_CONFIG_FILE = exports.GLOBAL_LOGS = exports.GLOBAL_CONFIG = exports.APP_CACHE_DIR = exports.CACHE_ROOT = exports.HOOKS_NAMES = exports.POST_REMOVE_REMOTE = exports.PRE_REMOVE_REMOTE = exports.POST_UNDEPRECATE_REMOTE = exports.POST_DEPRECATE_REMOTE = exports.PRE_UNDEPRECATE_REMOTE = void 0;

function _cliSpinners() {
  const data = _interopRequireDefault(require("cli-spinners"));

  _cliSpinners = function () {
    return data;
  };

  return data;
}

function _os() {
  const data = _interopRequireDefault(require("os"));

  _os = function () {
    return data;
  };

  return data;
}

function _path() {
  const data = _interopRequireDefault(require("path"));

  _path = function () {
    return data;
  };

  return data;
}

function _stringFormat() {
  const data = _interopRequireDefault(require("string-format"));

  _stringFormat = function () {
    return data;
  };

  return data;
}

const userHome = require('user-home');

const packageFile = require('../package.json');

const IS_WINDOWS = _os().default.platform() === 'win32';
exports.IS_WINDOWS = IS_WINDOWS;

function getDirectory() {
  if (process.platform === 'win32' && process.env.LOCALAPPDATA) {
    return _path().default.join(process.env.LOCALAPPDATA, 'Bit');
  }

  return _path().default.join(userHome, '.bit');
}

function getCacheDirectory() {
  if (process.platform === 'darwin' || process.platform === 'linux') {
    return _path().default.join(userHome, 'Library', 'Caches', 'Bit');
  }

  return getDirectory();
}

const AUTO_GENERATED_STAMP = 'BIT-AUTO-GENERATED';
exports.AUTO_GENERATED_STAMP = AUTO_GENERATED_STAMP;
const AUTO_GENERATED_MSG = `/* THIS IS A ${AUTO_GENERATED_STAMP} FILE. DO NOT EDIT THIS FILE DIRECTLY. */\n\n`;
exports.AUTO_GENERATED_MSG = AUTO_GENERATED_MSG;
const BIT_DESCRIPTION = 'bit is a free and open source tool designed for easy use, maintenance and discovery of code components.';
exports.BIT_DESCRIPTION = BIT_DESCRIPTION;
const BIT_USAGE = '[--version] [--help] <command> [<args>]';
exports.BIT_USAGE = BIT_USAGE;
const BITS_DIRNAME = 'components';
exports.BITS_DIRNAME = BITS_DIRNAME;
const BIT_JSON = 'bit.json';
exports.BIT_JSON = BIT_JSON;
const GIT_IGNORE = '.gitignore';
exports.GIT_IGNORE = GIT_IGNORE;
const BIT_MAP = '.bitmap';
exports.BIT_MAP = BIT_MAP;
const OLD_BIT_MAP = '.bit.map.json';
exports.OLD_BIT_MAP = OLD_BIT_MAP;
const COMPONENT_ORIGINS = {
  IMPORTED: 'IMPORTED',
  AUTHORED: 'AUTHORED',
  NESTED: 'NESTED' // which is a nested dependency

};
exports.COMPONENT_ORIGINS = COMPONENT_ORIGINS;
const TESTS_FORK_LEVEL = {
  NONE: 'NONE',
  ONE: 'ONE',
  COMPONENT: 'COMPONENT'
};
exports.TESTS_FORK_LEVEL = TESTS_FORK_LEVEL;
const DEFAULT_INDEX_NAME = 'index'; // todo: move to bit-javascript

exports.DEFAULT_INDEX_NAME = DEFAULT_INDEX_NAME;
const DEFAULT_INDEX_EXTS = ['js', 'ts', 'jsx', 'tsx', 'css', 'scss', 'less', 'sass']; // todo: move to bit-javascript

exports.DEFAULT_INDEX_EXTS = DEFAULT_INDEX_EXTS;
const NO_PLUGIN_TYPE = 'none';
exports.NO_PLUGIN_TYPE = NO_PLUGIN_TYPE;
const DEFAULT_COMPILER_ID = NO_PLUGIN_TYPE;
exports.DEFAULT_COMPILER_ID = DEFAULT_COMPILER_ID;
const DEFAULT_TESTER_ID = NO_PLUGIN_TYPE;
exports.DEFAULT_TESTER_ID = DEFAULT_TESTER_ID;
const DEFAULT_PACKAGE_MANAGER = 'npm';
exports.DEFAULT_PACKAGE_MANAGER = DEFAULT_PACKAGE_MANAGER;
const DEFAULT_EXTENSIONS = {
  'ext-docs-parser': {
    rawConfig: {},
    options: {
      core: true
    }
  }
};
exports.DEFAULT_EXTENSIONS = DEFAULT_EXTENSIONS;
const DEFAULT_DIST_DIRNAME = 'dist';
exports.DEFAULT_DIST_DIRNAME = DEFAULT_DIST_DIRNAME;
const DEFAULT_BUNDLE_FILENAME = 'dist.js';
exports.DEFAULT_BUNDLE_FILENAME = DEFAULT_BUNDLE_FILENAME;
const DEFAULT_BIT_VERSION = '0.0.1';
exports.DEFAULT_BIT_VERSION = DEFAULT_BIT_VERSION;
const DEFAULT_BIT_RELEASE_TYPE = 'patch'; // release type of semver (patch, minor, major)

exports.DEFAULT_BIT_RELEASE_TYPE = DEFAULT_BIT_RELEASE_TYPE;
const DEFAULT_LANGUAGE = 'javascript';
exports.DEFAULT_LANGUAGE = DEFAULT_LANGUAGE;
const DEFAULT_BINDINGS_PREFIX = '@bit';
exports.DEFAULT_BINDINGS_PREFIX = DEFAULT_BINDINGS_PREFIX;
const NODE_PATH_COMPONENT_SEPARATOR = '.';
exports.NODE_PATH_COMPONENT_SEPARATOR = NODE_PATH_COMPONENT_SEPARATOR;
const DEFAULT_COMPONENTS_DIR_PATH = `${BITS_DIRNAME}/{name}`;
exports.DEFAULT_COMPONENTS_DIR_PATH = DEFAULT_COMPONENTS_DIR_PATH;
const DEFAULT_DIR_DEPENDENCIES = '.dependencies';
exports.DEFAULT_DIR_DEPENDENCIES = DEFAULT_DIR_DEPENDENCIES;
const DEFAULT_DEPENDENCIES_DIR_PATH = `${BITS_DIRNAME}/${DEFAULT_DIR_DEPENDENCIES}`;
exports.DEFAULT_DEPENDENCIES_DIR_PATH = DEFAULT_DEPENDENCIES_DIR_PATH;
const COMPONENT_DIR = 'COMPONENT_DIR';
exports.COMPONENT_DIR = COMPONENT_DIR;
const DEFAULT_EJECTED_ENVS_DIR_PATH = `{${COMPONENT_DIR}}`;
exports.DEFAULT_EJECTED_ENVS_DIR_PATH = DEFAULT_EJECTED_ENVS_DIR_PATH;
const DEFAULT_SEPARATOR = '/';
exports.DEFAULT_SEPARATOR = DEFAULT_SEPARATOR;
const LATEST_BIT_VERSION = 'latest';
exports.LATEST_BIT_VERSION = LATEST_BIT_VERSION;
const OBJECTS_DIR = 'objects';
exports.OBJECTS_DIR = OBJECTS_DIR;
const NULL_BYTE = '\u0000';
exports.NULL_BYTE = NULL_BYTE;
const SPACE_DELIMITER = ' ';
exports.SPACE_DELIMITER = SPACE_DELIMITER;
const VERSION_DELIMITER = '@';
exports.VERSION_DELIMITER = VERSION_DELIMITER;
const DEPENDENCIES_DIR = 'dependencies';
exports.DEPENDENCIES_DIR = DEPENDENCIES_DIR;
const DEFAULT_REMOTES = {};
exports.DEFAULT_REMOTES = DEFAULT_REMOTES;
const DEFAULT_DEPENDENCIES = {};
exports.DEFAULT_DEPENDENCIES = DEFAULT_DEPENDENCIES;
const SPINNER_TYPE = IS_WINDOWS ? _cliSpinners().default.line : _cliSpinners().default.dots12;
exports.SPINNER_TYPE = SPINNER_TYPE;
const BASE_WEB_DOMAIN = 'bit.dev';
exports.BASE_WEB_DOMAIN = BASE_WEB_DOMAIN;
const PREVIOUSLY_BASE_WEB_DOMAIN = 'bitsrc.io';
exports.PREVIOUSLY_BASE_WEB_DOMAIN = PREVIOUSLY_BASE_WEB_DOMAIN;
const DEFAULT_HUB_DOMAIN = `hub.${BASE_WEB_DOMAIN}`;
exports.DEFAULT_HUB_DOMAIN = DEFAULT_HUB_DOMAIN;
const BASE_DOCS_DOMAIN = `docs.${BASE_WEB_DOMAIN}`;
exports.BASE_DOCS_DOMAIN = BASE_DOCS_DOMAIN;
const REPO_NAME = 'teambit/bit';
exports.REPO_NAME = REPO_NAME;
const DEFAULT_HUB_LOGIN = `https://${BASE_WEB_DOMAIN}/bit-login`;
exports.DEFAULT_HUB_LOGIN = DEFAULT_HUB_LOGIN;
const DEFAULT_BIT_ENV = 'production';
exports.DEFAULT_BIT_ENV = DEFAULT_BIT_ENV;
const DEFAULT_ANALYTICS_DOMAIN = `https://analytics.${BASE_WEB_DOMAIN}/`;
exports.DEFAULT_ANALYTICS_DOMAIN = DEFAULT_ANALYTICS_DOMAIN;
const DEFAULT_REGISTRY_DOMAIN_PREFIX = '@bit';
exports.DEFAULT_REGISTRY_DOMAIN_PREFIX = DEFAULT_REGISTRY_DOMAIN_PREFIX;
const SEARCH_DOMAIN = `api.${BASE_WEB_DOMAIN}`;
exports.SEARCH_DOMAIN = SEARCH_DOMAIN;
const RELEASE_SERVER = `https://api.${BASE_WEB_DOMAIN}/release`;
exports.RELEASE_SERVER = RELEASE_SERVER;
const DEFAULT_REGISTRY_URL = `https://node.${BASE_WEB_DOMAIN}`;
exports.DEFAULT_REGISTRY_URL = DEFAULT_REGISTRY_URL;
const PREVIOUSLY_DEFAULT_REGISTRY_URL = `https://node.${PREVIOUSLY_BASE_WEB_DOMAIN}`;
exports.PREVIOUSLY_DEFAULT_REGISTRY_URL = PREVIOUSLY_DEFAULT_REGISTRY_URL;
const DEFAULT_SSH_KEY_FILE = `${userHome}/.ssh/id_rsa`; // Setting this to 99999 to prevent this issue:
// https://github.com/mscdex/ssh2/issues/142

exports.DEFAULT_SSH_KEY_FILE = DEFAULT_SSH_KEY_FILE;
const DEFAULT_SSH_READY_TIMEOUT = 99999;
exports.DEFAULT_SSH_READY_TIMEOUT = DEFAULT_SSH_READY_TIMEOUT;
const IGNORE_LIST = ['**/.bit.map.json', '**/.bitmap', '**/.gitignore', '**/bit.json', '**/bitBindings.js', '**/node_modules/**', '**/package-lock.json', '**/yarn.lock', '**/LICENSE'];
/**
 * bit commands
 */

exports.IGNORE_LIST = IGNORE_LIST;
const INIT_COMMAND = 'init';
/**
 * bit global config keys
 */

exports.INIT_COMMAND = INIT_COMMAND;
const CFG_USER_EMAIL_KEY = 'user.email';
exports.CFG_USER_EMAIL_KEY = CFG_USER_EMAIL_KEY;
const CFG_USER_TOKEN_KEY = 'user.token';
exports.CFG_USER_TOKEN_KEY = CFG_USER_TOKEN_KEY;
const CFG_USER_NAME_KEY = 'user.name';
exports.CFG_USER_NAME_KEY = CFG_USER_NAME_KEY;
const CFG_REGISTRY_URL_KEY = 'registry';
exports.CFG_REGISTRY_URL_KEY = CFG_REGISTRY_URL_KEY;
const CFG_SSH_KEY_FILE_KEY = 'ssh_key_file';
exports.CFG_SSH_KEY_FILE_KEY = CFG_SSH_KEY_FILE_KEY;
const CFG_HUB_DOMAIN_KEY = 'hub_domain';
exports.CFG_HUB_DOMAIN_KEY = CFG_HUB_DOMAIN_KEY;
const CFG_HUB_LOGIN_KEY = 'hub_domain_login';
exports.CFG_HUB_LOGIN_KEY = CFG_HUB_LOGIN_KEY;
const CFG_ANALYTICS_DOMAIN_KEY = 'analytics_domain';
exports.CFG_ANALYTICS_DOMAIN_KEY = CFG_ANALYTICS_DOMAIN_KEY;
const CFG_ANALYTICS_ANONYMOUS_KEY = 'anonymous_reporting';
exports.CFG_ANALYTICS_ANONYMOUS_KEY = CFG_ANALYTICS_ANONYMOUS_KEY;
const CFG_REPOSITORY_REPORTING_KEY = 'repository_reporting';
exports.CFG_REPOSITORY_REPORTING_KEY = CFG_REPOSITORY_REPORTING_KEY;
const CFG_ANALYTICS_REPORTING_KEY = 'analytics_reporting';
exports.CFG_ANALYTICS_REPORTING_KEY = CFG_ANALYTICS_REPORTING_KEY;
const CFG_ANALYTICS_ERROR_REPORTS_KEY = 'error_reporting';
exports.CFG_ANALYTICS_ERROR_REPORTS_KEY = CFG_ANALYTICS_ERROR_REPORTS_KEY;
const CFG_ANALYTICS_ENVIRONMENT_KEY = 'bit_environment';
exports.CFG_ANALYTICS_ENVIRONMENT_KEY = CFG_ANALYTICS_ENVIRONMENT_KEY;
const CFG_ANALYTICS_USERID_KEY = 'analytics_id';
exports.CFG_ANALYTICS_USERID_KEY = CFG_ANALYTICS_USERID_KEY;
const CFG_REGISTRY_DOMAIN_PREFIX = 'registry_domain_prefix';
exports.CFG_REGISTRY_DOMAIN_PREFIX = CFG_REGISTRY_DOMAIN_PREFIX;
const CFG_POST_EXPORT_HOOK_KEY = 'post_export_hook';
exports.CFG_POST_EXPORT_HOOK_KEY = CFG_POST_EXPORT_HOOK_KEY;
const CFG_POST_IMPORT_HOOK_KEY = 'post_import_hook';
exports.CFG_POST_IMPORT_HOOK_KEY = CFG_POST_IMPORT_HOOK_KEY;
const CFG_CI_FUNCTION_PATH_KEY = 'ci_function_path';
exports.CFG_CI_FUNCTION_PATH_KEY = CFG_CI_FUNCTION_PATH_KEY;
const CFG_CI_ENABLE_KEY = 'ci_enable';
exports.CFG_CI_ENABLE_KEY = CFG_CI_ENABLE_KEY;
const CFG_GIT_EXECUTABLE_PATH = 'git_path';
exports.CFG_GIT_EXECUTABLE_PATH = CFG_GIT_EXECUTABLE_PATH;
const CFG_LOG_JSON_FORMAT = 'log_json_format';
exports.CFG_LOG_JSON_FORMAT = CFG_LOG_JSON_FORMAT;
const CFG_NO_WARNINGS = 'no_warnings';
exports.CFG_NO_WARNINGS = CFG_NO_WARNINGS;
const CFG_INTERACTIVE = 'interactive'; // Template for interactive config for specific command like interactive.init

exports.CFG_INTERACTIVE = CFG_INTERACTIVE;
const CFG_COMMAND_INTERACTIVE_TEMPLATE = 'interactive.{commandName}';
exports.CFG_COMMAND_INTERACTIVE_TEMPLATE = CFG_COMMAND_INTERACTIVE_TEMPLATE;
const CFG_INIT_INTERACTIVE = (0, _stringFormat().default)(CFG_COMMAND_INTERACTIVE_TEMPLATE, {
  commandName: INIT_COMMAND
});
/**
 * git hooks
 */

exports.CFG_INIT_INTERACTIVE = CFG_INIT_INTERACTIVE;
const POST_CHECKOUT = 'post-checkout';
exports.POST_CHECKOUT = POST_CHECKOUT;
const POST_MERGE = 'post-merge';
exports.POST_MERGE = POST_MERGE;
const GIT_HOOKS_NAMES = [POST_CHECKOUT, POST_MERGE];
/**
 * bit hooks
 */

exports.GIT_HOOKS_NAMES = GIT_HOOKS_NAMES;
const PRE_TAG_HOOK = 'pre-tag';
exports.PRE_TAG_HOOK = PRE_TAG_HOOK;
const POST_TAG_HOOK = 'post-tag';
exports.POST_TAG_HOOK = POST_TAG_HOOK;
const POST_ADD_HOOK = 'post-add';
exports.POST_ADD_HOOK = POST_ADD_HOOK;
const PRE_TAG_ALL_HOOK = 'pre-tag-all';
exports.PRE_TAG_ALL_HOOK = PRE_TAG_ALL_HOOK;
const POST_TAG_ALL_HOOK = 'post-tag-all';
exports.POST_TAG_ALL_HOOK = POST_TAG_ALL_HOOK;
const PRE_IMPORT_HOOK = 'pre-import';
exports.PRE_IMPORT_HOOK = PRE_IMPORT_HOOK;
const POST_IMPORT_HOOK = 'post-import';
exports.POST_IMPORT_HOOK = POST_IMPORT_HOOK;
const PRE_EXPORT_HOOK = 'pre-export';
exports.PRE_EXPORT_HOOK = PRE_EXPORT_HOOK;
const POST_EXPORT_HOOK = 'post-export';
exports.POST_EXPORT_HOOK = POST_EXPORT_HOOK;
const PRE_SEND_OBJECTS = 'pre-send-objects'; // pre-fetch

exports.PRE_SEND_OBJECTS = PRE_SEND_OBJECTS;
const POST_SEND_OBJECTS = 'post-send-objects'; // post-fetch

exports.POST_SEND_OBJECTS = POST_SEND_OBJECTS;
const PRE_RECEIVE_OBJECTS = 'pre-receive-objects'; // pre-put

exports.PRE_RECEIVE_OBJECTS = PRE_RECEIVE_OBJECTS;
const POST_RECEIVE_OBJECTS = 'post-receive-objects'; // post-put

exports.POST_RECEIVE_OBJECTS = POST_RECEIVE_OBJECTS;
const PRE_DEPRECATE_REMOTE = 'pre-deprecate-remote';
exports.PRE_DEPRECATE_REMOTE = PRE_DEPRECATE_REMOTE;
const PRE_UNDEPRECATE_REMOTE = 'pre-undeprecate-remote';
exports.PRE_UNDEPRECATE_REMOTE = PRE_UNDEPRECATE_REMOTE;
const POST_DEPRECATE_REMOTE = 'post-deprecate-remote';
exports.POST_DEPRECATE_REMOTE = POST_DEPRECATE_REMOTE;
const POST_UNDEPRECATE_REMOTE = 'post-undeprecate-remote';
exports.POST_UNDEPRECATE_REMOTE = POST_UNDEPRECATE_REMOTE;
const PRE_REMOVE_REMOTE = 'pre-remove-remote';
exports.PRE_REMOVE_REMOTE = PRE_REMOVE_REMOTE;
const POST_REMOVE_REMOTE = 'post-remove-remote';
exports.POST_REMOVE_REMOTE = POST_REMOVE_REMOTE;
const HOOKS_NAMES = [PRE_TAG_HOOK, POST_TAG_HOOK, POST_ADD_HOOK, PRE_TAG_ALL_HOOK, POST_TAG_ALL_HOOK, PRE_IMPORT_HOOK, POST_IMPORT_HOOK, PRE_EXPORT_HOOK, POST_EXPORT_HOOK, PRE_SEND_OBJECTS, POST_SEND_OBJECTS, PRE_RECEIVE_OBJECTS, POST_RECEIVE_OBJECTS, PRE_DEPRECATE_REMOTE, PRE_UNDEPRECATE_REMOTE, POST_DEPRECATE_REMOTE, POST_UNDEPRECATE_REMOTE, PRE_REMOVE_REMOTE, POST_REMOVE_REMOTE];
/**
 * cache root directory
 */

exports.HOOKS_NAMES = HOOKS_NAMES;
const CACHE_ROOT = getCacheDirectory();
/**
 * app cache directory
 */

exports.CACHE_ROOT = CACHE_ROOT;

const APP_CACHE_DIR = _path().default.join(CACHE_ROOT, 'app');
/**
 * global config directories
 */


exports.APP_CACHE_DIR = APP_CACHE_DIR;

const GLOBAL_CONFIG = _path().default.join(CACHE_ROOT, 'config');

exports.GLOBAL_CONFIG = GLOBAL_CONFIG;

const GLOBAL_LOGS = _path().default.join(CACHE_ROOT, 'logs');

exports.GLOBAL_LOGS = GLOBAL_LOGS;
const GLOBAL_CONFIG_FILE = 'config.json';
exports.GLOBAL_CONFIG_FILE = GLOBAL_CONFIG_FILE;
const GLOBAL_REMOTES = 'global-remotes.json';
exports.GLOBAL_REMOTES = GLOBAL_REMOTES;
const BIT_HIDDEN_DIR = '.bit';
exports.BIT_HIDDEN_DIR = BIT_HIDDEN_DIR;
const BIT_GIT_DIR = 'bit';
exports.BIT_GIT_DIR = BIT_GIT_DIR;
const DOT_GIT_DIR = '.git';
/**
 * bit registry default URL.
 */

exports.DOT_GIT_DIR = DOT_GIT_DIR;
const BIT_REGISTRY = '';
exports.BIT_REGISTRY = BIT_REGISTRY;
const LATEST = 'latest';
exports.LATEST = LATEST;
const DEPENDENCY_DELIMITER = '/';
exports.DEPENDENCY_DELIMITER = DEPENDENCY_DELIMITER;
const BIT_SOURCES_DIRNAME = 'source';
exports.BIT_SOURCES_DIRNAME = BIT_SOURCES_DIRNAME;
const BIT_TMP_DIRNAME = 'tmp';
exports.BIT_TMP_DIRNAME = BIT_TMP_DIRNAME;
const BIT_WORKSPACE_TMP_DIRNAME = '.bitTmp';
exports.BIT_WORKSPACE_TMP_DIRNAME = BIT_WORKSPACE_TMP_DIRNAME;
const BIT_CACHE_DIRNAME = 'cache';
exports.BIT_CACHE_DIRNAME = BIT_CACHE_DIRNAME;
const LATEST_TESTED_MARK = '*';
exports.LATEST_TESTED_MARK = LATEST_TESTED_MARK;
const SUB_DIRECTORIES_GLOB_PATTERN = '/**/*';
exports.SUB_DIRECTORIES_GLOB_PATTERN = SUB_DIRECTORIES_GLOB_PATTERN;
const SCOPE_JSON = 'scope.json';
exports.SCOPE_JSON = SCOPE_JSON;

const DEFAULT_RESOLVER = () => '';
/**
 * current bit application version
 */


exports.DEFAULT_RESOLVER = DEFAULT_RESOLVER;
const BIT_VERSION = packageFile.version;
exports.BIT_VERSION = BIT_VERSION;
const BIT_INSTALL_METHOD = packageFile.installationMethod;
exports.BIT_INSTALL_METHOD = BIT_INSTALL_METHOD;
const SKIP_UPDATE_FLAG = '--skip-update';
exports.SKIP_UPDATE_FLAG = SKIP_UPDATE_FLAG;
const LICENSE_FILENAME = 'LICENSE';
exports.LICENSE_FILENAME = LICENSE_FILENAME;
const ISOLATED_ENV_ROOT = 'environment';
exports.ISOLATED_ENV_ROOT = ISOLATED_ENV_ROOT;
const NODE_PATH_SEPARATOR = process.platform === 'win32' ? ';' : ':'; // see here https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders

exports.NODE_PATH_SEPARATOR = NODE_PATH_SEPARATOR;
const WRAPPER_DIR = 'bit_wrapper_dir';
exports.WRAPPER_DIR = WRAPPER_DIR;
const PACKAGE_JSON = 'package.json';
exports.PACKAGE_JSON = PACKAGE_JSON;
const COMPILER_ENV_TYPE = 'compiler';
exports.COMPILER_ENV_TYPE = COMPILER_ENV_TYPE;
const TESTER_ENV_TYPE = 'tester';
exports.TESTER_ENV_TYPE = TESTER_ENV_TYPE;

const DEBUG_LOG = _path().default.join(GLOBAL_LOGS, 'debug.log');

exports.DEBUG_LOG = DEBUG_LOG;
const MANUALLY_REMOVE_DEPENDENCY = '-';
exports.MANUALLY_REMOVE_DEPENDENCY = MANUALLY_REMOVE_DEPENDENCY;
const MANUALLY_REMOVE_ENVIRONMENT = '-';
exports.MANUALLY_REMOVE_ENVIRONMENT = MANUALLY_REMOVE_ENVIRONMENT;
const MANUALLY_ADD_DEPENDENCY = '+';
exports.MANUALLY_ADD_DEPENDENCY = MANUALLY_ADD_DEPENDENCY;
const OVERRIDE_FILE_PREFIX = 'file://';
exports.OVERRIDE_FILE_PREFIX = OVERRIDE_FILE_PREFIX;
const OVERRIDE_COMPONENT_PREFIX = '@bit/';
exports.OVERRIDE_COMPONENT_PREFIX = OVERRIDE_COMPONENT_PREFIX;
const ACCEPTABLE_NPM_VERSIONS = '>=5.0.0';
exports.ACCEPTABLE_NPM_VERSIONS = ACCEPTABLE_NPM_VERSIONS;
const ANGULAR_PACKAGE_IDENTIFIER = '@angular/core';
exports.ANGULAR_PACKAGE_IDENTIFIER = ANGULAR_PACKAGE_IDENTIFIER;
const ANGULAR_BIT_ENTRY_POINT_FILE = 'public_api.ts';
exports.ANGULAR_BIT_ENTRY_POINT_FILE = ANGULAR_BIT_ENTRY_POINT_FILE;
const COMPONENT_DIST_PATH_TEMPLATE = '{COMPONENT_DIST_PATH}';
exports.COMPONENT_DIST_PATH_TEMPLATE = COMPONENT_DIST_PATH_TEMPLATE;