@expressots/shared
Version:
Shared library for ExpressoTS modules 🐎
14 lines (13 loc) • 691 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ENV_VAR_REGEX = exports.LINE_REGEX = void 0;
/**
* LINE_REGEX is a regular expression that matches a line in a .env file.
* It is used to parse the content of the .env file.
*/
exports.LINE_REGEX = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;
/**
* ENV_VAR_REGEX is a regular expression that matches an environment variable in the command line.
* It is used to parse the options passed in the command line.
*/
exports.ENV_VAR_REGEX = /^dotenv_config_(encoding|path|debug|override|vaultEnvKey)=(.+)$/;