diff --git a/package-lock.json b/package-lock.json index 806badf..a2d608c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "malta", - "version": "4.2.5", + "version": "4.2.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "malta", - "version": "4.2.5", + "version": "4.2.7", "license": "MIT", "bin": { "malta": "src/bin.js" diff --git a/package.json b/package.json index fa2e531..c826b62 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "malta", - "version": "4.2.5", + "version": "4.2.7", "description": "Lightning builder allows to compose on the fly and update packed and full coded huge files, edit its parts as files, splitted and glued as You need.", "main": "src/index.js", "scripts": { diff --git a/src/colors.js b/src/colors.js index e460170..e392627 100644 --- a/src/colors.js +++ b/src/colors.js @@ -46,6 +46,7 @@ module.exports = { blue: s => conc(34, s), magenta: s => conc(35, s), cyan: s => conc(36, s), + darkcyan: s => conc(36, s), lightgray: s => conc(37, s), darkgray: s => conc(90, s), lightred: s => conc(91, s), diff --git a/src/docs/changelog.md b/src/docs/changelog.md index f26be5a..a9b949b 100644 --- a/src/docs/changelog.md +++ b/src/docs/changelog.md @@ -1,10 +1,9 @@ Changelog --------- -- **v4.2.5** +- **v4.2.7** - **Security**: removed all eval calls from the core. jsonFromStr now uses a safe manual parser; microTpl runs inside an isolated vm context; replace_calc returns content without executing it. - **Robustness**: removed all internal process.exit calls. Build, plugin, and child-process errors are now propagated or logged without killing the Node process. - **Performance**: replaced the file watcher from polling (setInterval + fs.statSync) to event-driven fs.watch, with a lightweight periodic refresh for new files. - - **Quality**: removed stringproto.js (String.prototype pollution) and introduced the colors.js utility module for console coloring. - **Maintainability**: updated engines.node to >=18.0.0, aligned with actual devDependency requirements. Added hasOwnProperty checks to all for...in loops. - **Coverage**: raised code coverage diff --git a/src/stringproto.js b/src/stringproto.js index c81b880..3c6b51b 100644 --- a/src/stringproto.js +++ b/src/stringproto.js @@ -1,16 +1,47 @@ const colors = require('./colors'); const methods = { - white: colors.white, + normal: colors.normal, + darken: colors.darken, + italic: colors.italic, + underline: colors.underline, + blink: colors.blink, + invert: colors.invert, + gray: colors.gray, red: colors.red, green: colors.green, yellow: colors.yellow, - gray: colors.gray, - darkgray: colors.darkgray, + blue: colors.blue, + magenta: colors.magenta, cyan: colors.cyan, darkcyan: colors.darkcyan, - underline: colors.underline, - rainbow: colors.rainbow + lightgray: colors.lightgray, + darkgray: colors.darkgray, + lightred: colors.lightred, + lightgreen: colors.lightgreen, + lightyellow: colors.lightyellow, + lightblue: colors.lightblue, + lightmagenta: colors.lightmagenta, + lightcyan: colors.lightcyan, + white: colors.white, + rainbow: colors.rainbow, + bgblack: colors.bgblack, + bgred: colors.bgred, + bggreen: colors.bggreen, + bgyellow: colors.bgyellow, + bgblue: colors.bgblue, + bgmagenta: colors.bgmagenta, + bgcyan: colors.bgcyan, + bglightgray: colors.bglightgray, + bgdefault: colors.bgdefault, + bgdarkgray: colors.bgdarkgray, + bglightred: colors.bglightred, + bglightgreen: colors.bglightgreen, + bglightyellow: colors.bglightyellow, + bglightblue: colors.bglightblue, + bglightmagenta: colors.bglightmagenta, + bglightcyan: colors.bglightcyan, + bgwhite: colors.bgwhite }; for (const name in methods) {