flex-plugins-utils-logger
Advanced tools
Comparing version 0.8.1 to 0.9.0
@@ -115,5 +115,9 @@ "use strict"; | ||
var formatter = Logger.formatter[key]; | ||
var match = msg.match(formatter.matcher); | ||
var regex = new RegExp(formatter.openChars + "(.*?)" + formatter.closeChars); | ||
var match = msg.match(regex); | ||
if (match) { | ||
return _this.markdown(msg.replace(formatter.replacer, formatter.render(match[0]))); | ||
var replace = match[0] | ||
.replace(new RegExp(formatter.openChars, 'g'), '') | ||
.replace(new RegExp(formatter.closeChars, 'g'), ''); | ||
return _this.markdown(msg.replace(regex, formatter.render(replace))); | ||
} | ||
@@ -154,34 +158,34 @@ } | ||
bold: { | ||
matcher: /(?<=\*{2})(.*?)(?=\*{2})/, | ||
replacer: /\*{2}(.*?)\*{2}/, | ||
openChars: '\\*{2}', | ||
closeChars: '\\*{2}', | ||
render: chalk_1.default.bold, | ||
}, | ||
italic: { | ||
matcher: /(?<=\*)(.*?)(?=\*)/, | ||
replacer: /\*(.*?)\*/, | ||
openChars: '\\*', | ||
closeChars: '\\*', | ||
render: chalk_1.default.italic, | ||
}, | ||
code: { | ||
matcher: /(?<=\{{2})(.*?)(?=\}{2})/, | ||
replacer: /\{{2}(.*?)\}{2}/, | ||
openChars: '\\{{2}', | ||
closeChars: '\\}{2}', | ||
render: chalk_1.default.magenta, | ||
}, | ||
link: { | ||
matcher: /(?<=\[{2})(.*?)(?=\]{2})/, | ||
replacer: /\[{2}(.*?)\]{2}/, | ||
openChars: '\\[{2}', | ||
closeChars: '\\]{2}', | ||
render: chalk_1.default.blue, | ||
}, | ||
success: { | ||
matcher: /(?<=\+{2})(.*?)(?=\+{2})/, | ||
replacer: /\+{2}(.*?)\+{2}/, | ||
openChars: '\\+{2}', | ||
closeChars: '\\+{2}', | ||
render: chalk_1.default.green, | ||
}, | ||
warning: { | ||
matcher: /(?<=\!{2})(.*?)(?=\!{2})/, | ||
replacer: /\!{2}(.*?)\!{2}/, | ||
openChars: '\\!{2}', | ||
closeChars: '\\!{2}', | ||
render: chalk_1.default.yellow, | ||
}, | ||
error: { | ||
matcher: /(?<=\-{2})(.*?)(?=\-{2})/, | ||
replacer: /\-{2}(.*?)\-{2}/, | ||
openChars: '\\-{2}', | ||
closeChars: '\\-{2}', | ||
render: chalk_1.default.red, | ||
@@ -188,0 +192,0 @@ }, |
{ | ||
"name": "flex-plugins-utils-logger", | ||
"version": "0.8.1", | ||
"version": "0.9.0", | ||
"description": "Flex Plugins Logger", | ||
@@ -46,3 +46,3 @@ "keywords": [ | ||
"chalk": "^4.0.0", | ||
"flex-plugins-utils-env": "^0.8.0", | ||
"flex-plugins-utils-env": "^0.9.0", | ||
"log-symbols": "^3.0.0", | ||
@@ -57,3 +57,3 @@ "ora": "^4.0.4", | ||
}, | ||
"gitHead": "4a850ff7c4b7fe99ae32b595c0feea33dfffd527" | ||
"gitHead": "8fa4501d2e8e3481deb39738a120d596b8d2bc49" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38318
579
+ Addedflex-plugins-utils-env@0.9.0(transitive)
- Removedflex-plugins-utils-env@0.8.0(transitive)