@nuxtjs/youch
Advanced tools
Comparing version 3.0.2 to 3.1.0
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "3.0.2", | ||
"version": "3.1.0", | ||
"description": "Pretty error reporting for Node.js 🚀 (Modified for Nuxt.js & SSR Bundles)", | ||
@@ -9,0 +9,0 @@ "main": "src/Youch/index.js", |
@@ -182,6 +182,15 @@ 'use strict' | ||
context: this._getContext(frame), | ||
lang: this._getLang(frame) | ||
lang: this._getLang(frame), | ||
open: this._openURL(frame) | ||
} | ||
} | ||
_openURL(frame) { | ||
if (!frame.fullPath) { | ||
return | ||
} | ||
const baseURL = `http://` + this.request.headers.host + '/_open' | ||
return baseURL + '?file=' + encodeURI(frame.fullPath) + ':' + (frame.getLineNumber() || 0) + ':' + (frame.getColumnNumber() || 0) | ||
} | ||
/** | ||
@@ -188,0 +197,0 @@ * Returns whether frame belongs to nodejs |
Sorry, the diff of this file is not supported yet
95803
346