logd-console-output
Advanced tools
Comparing version 1.0.7 to 1.1.1
{ | ||
"name": "logd-console-output", | ||
"version": "1.0.7", | ||
"version": "1.1.1", | ||
"description": "console output for logd", | ||
@@ -24,7 +24,7 @@ "main": "index.js", | ||
"devDependencies": { | ||
"section-tests": "^1.3.0" | ||
"section-tests": "^1.3.1" | ||
}, | ||
"dependencies": { | ||
"app-root-path": "^2.0.1", | ||
"chalk": "^2.3.0", | ||
"app-root-path": "^2.1.0", | ||
"chalk": "^2.4.1", | ||
"ee-types": "^2.1.4", | ||
@@ -31,0 +31,0 @@ "glob": "^7.1.2" |
@@ -85,3 +85,3 @@ 'use strict'; | ||
}) { | ||
if(options) context.setOptions(options); | ||
if (options) context.setOptions(options); | ||
@@ -88,0 +88,0 @@ // render all values |
@@ -148,4 +148,13 @@ 'use strict'; | ||
const valueType = type(value); | ||
let valueType; | ||
// allow custom renderer assignements | ||
if (type.object(value) && value.__logd_custom_renderer) { | ||
valueType = value.__logd_custom_renderer; | ||
} else { | ||
valueType = type(value); | ||
} | ||
if (this.renderers.has(valueType)) { | ||
@@ -152,0 +161,0 @@ const renderer = this.renderers.get(valueType); |
@@ -68,2 +68,3 @@ 'use strict'; | ||
// get a proper stack | ||
@@ -159,4 +160,5 @@ const frames = this.convertStack(value); | ||
// remove th eproject root | ||
// remove the project root | ||
if (path.startsWith(rootPath)) path = path.substr(rootPath.length+1); | ||
else if (path.startsWith(`file://${rootPath}`)) path = path.substr(rootPath.length+1+7); | ||
@@ -163,0 +165,0 @@ // check for node modules, remove that |
@@ -25,3 +25,9 @@ 'use strict'; | ||
getThemeName() { | ||
return this.themeName || this.getName(); | ||
} | ||
/** | ||
@@ -45,3 +51,3 @@ * truncate string to a certain length | ||
decorate(context, input, topic, color) { | ||
let theme = context.getThemeFor(this.getName(), topic); | ||
let theme = context.getThemeFor(this.getThemeName(), topic); | ||
@@ -48,0 +54,0 @@ if (color) { |
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
60960
36
1743
Updatedapp-root-path@^2.1.0
Updatedchalk@^2.4.1