@decaf-ts/utils
Version:
module management utils for decaf-ts
68 lines • 2.47 kB
JavaScript
/**
* @description Default encoding for text operations.
* @summary The standard UTF-8 encoding used for text processing.
* @const {string} Encoding
* @memberOf module:utils
*/
export const Encoding = "utf-8";
/**
* @description Regular expression for semantic versioning.
* @summary A regex pattern to match and parse semantic version strings.
* @const {RegExp} SemVersionRegex
* @memberOf module:utils
*/
export const SemVersionRegex = /^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z])))/g;
/**
* @description Enum for semantic version components.
* @summary Defines the three levels of semantic versioning: PATCH, MINOR, and MAJOR.
* @enum {string}
* @memberOf module:utils
*/
export var SemVersion;
(function (SemVersion) {
/** Patch version for backwards-compatible bug fixes. */
SemVersion["PATCH"] = "patch";
/** Minor version for backwards-compatible new features. */
SemVersion["MINOR"] = "minor";
/** Major version for changes that break backwards compatibility. */
SemVersion["MAJOR"] = "major";
})(SemVersion || (SemVersion = {}));
/**
* @description Flag to indicate non-CI environment.
* @summary Used to specify that a command should run outside of a Continuous Integration environment.
* @const {string} NoCIFLag
* @memberOf module:utils
*/
export const NoCIFLag = "-no-ci";
/**
* @description Key for the setup script in package.json.
* @summary Identifies the script that runs after package installation.
* @const {string} SetupScriptKey
* @memberOf module:utils
*/
export const SetupScriptKey = "postinstall";
/**
* @description Enum for various authentication tokens.
* @summary Defines the file names for storing different types of authentication tokens.
* @enum {string}
* @memberOf module:utils
*/
export var Tokens;
(function (Tokens) {
/** Git authentication token file name. */
Tokens["GIT"] = ".token";
/** NPM authentication token file name. */
Tokens["NPM"] = ".npmtoken";
/** Docker authentication token file name. */
Tokens["DOCKER"] = ".dockertoken";
/** Confluence authentication token file name. */
Tokens["CONFLUENCE"] = ".confluence-token";
})(Tokens || (Tokens = {}));
/**
* @description Code used to indicate an operation was aborted.
* @summary Standard message used when a process is manually terminated.
* @const {string} AbortCode
* @memberOf module:utils
*/
export const AbortCode = "Aborted";
//# sourceMappingURL=constants.js.map