@appium/docutils
Version:
Documentation generation utilities for Appium and related projects
119 lines • 3.84 kB
JavaScript
"use strict";
/**
* Constants used across various modules in this package
* @module
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MESSAGE_PYTHON_MISSING = exports.PIP_ENV_VARS = exports.DEFAULT_SITE_DIR = exports.LogLevelMap = exports.DEFAULT_SERVE_HOST = exports.DEFAULT_SERVE_PORT = exports.DEFAULT_DEPLOY_REMOTE = exports.DEFAULT_DEPLOY_BRANCH = exports.DEFAULT_DEPLOY_ALIAS_TYPE = exports.REQUIREMENTS_TXT_PATH = exports.PKG_ROOT_DIR = exports.DEFAULT_LOG_LEVEL = exports.NAME_THEME = exports.NAME_ERR_ENOENT = exports.NAME_PIP = exports.NAME_MIKE = exports.NAME_MKDOCS = exports.NAME_SCHEMA = exports.NAME_REQUIREMENTS_TXT = exports.NAME_PACKAGE_JSON = exports.NAME_PYTHON = exports.NAME_MKDOCS_YML = exports.NAME_BIN = void 0;
const { LogLevels } = require('consola');
const support_1 = require("@appium/support");
const node_path_1 = __importDefault(require("node:path"));
/**
* CLI executable name
*/
exports.NAME_BIN = 'appium-docs';
/**
* Expected name of the `mkdocs.yml` config file
*/
exports.NAME_MKDOCS_YML = 'mkdocs.yml';
/**
* `python` executable
*/
exports.NAME_PYTHON = 'python';
/**
* It's `package.json`!
*/
exports.NAME_PACKAGE_JSON = 'package.json';
/**
* Name of the `requirements.txt` file for `pip`
*/
exports.NAME_REQUIREMENTS_TXT = 'requirements.txt';
/**
* Name of the `$schema` property which can be present in JSON files; it may need to be removed to
* avoid warnings/errors by 3p libs
*/
exports.NAME_SCHEMA = '$schema';
/**
* Name of the `mkdocs` executable
*/
exports.NAME_MKDOCS = 'mkdocs';
/**
* Name of the `mike` executable
*/
exports.NAME_MIKE = 'mike';
/**
* Name of the `pip` module.
*
* @remarks We don't execute the `pip` executable; but rather use `python -m pip` since that seems
* to work better ... on my computer.
*/
exports.NAME_PIP = 'pip';
/**
* Code for a "file not found" error
*/
exports.NAME_ERR_ENOENT = 'ENOENT';
/**
* Name of the default theme
*/
exports.NAME_THEME = 'material';
/**
* Default log level
*/
exports.DEFAULT_LOG_LEVEL = 'info';
/**
* Blocking I/O
*/
exports.PKG_ROOT_DIR = support_1.fs.findRoot(__dirname);
/**
* Path to the `requirements.txt` file (in this package)
*/
exports.REQUIREMENTS_TXT_PATH = node_path_1.default.join(exports.PKG_ROOT_DIR, exports.NAME_REQUIREMENTS_TXT);
/**
* The default alias creation strategy to pass to `mike` when deploying
* (`symlink`, `redirect` or `copy`)
*/
exports.DEFAULT_DEPLOY_ALIAS_TYPE = 'symlink';
/**
* The default branch to deploy to
*/
exports.DEFAULT_DEPLOY_BRANCH = 'gh-pages';
/**
* The default remote to push the deployed branch to
*/
exports.DEFAULT_DEPLOY_REMOTE = 'origin';
/**
* The default port for serving docs
*/
exports.DEFAULT_SERVE_PORT = 8000;
/**
* The default host for serving docs
*/
exports.DEFAULT_SERVE_HOST = 'localhost';
/**
* Mapping of `@appium/docutils`' log levels to `consola` log levels
*/
exports.LogLevelMap = {
silent: LogLevels.silent,
error: LogLevels.error,
warn: LogLevels.warn,
info: LogLevels.info,
debug: LogLevels.debug,
};
/**
* If the user does not specify a site directory _and_ the `mkdocs.yml` doesn't either, use this dir.
*/
exports.DEFAULT_SITE_DIR = 'site';
/**
* pip 23.0 implements PEP 668, which may prevent overriding Python system packages
* unless the --break-system-packages flag is passed.
* To ensure backwards compatibility, its environment variable version is used
*/
exports.PIP_ENV_VARS = { PIP_BREAK_SYSTEM_PACKAGES: '1' };
/**
* Error message emitted when the path to Python was not found
*/
exports.MESSAGE_PYTHON_MISSING = 'Could not find Python in PATH. Is it installed?';
//# sourceMappingURL=constants.js.map