nuxt-testevia
Advanced tools
Comparing version 0.0.5 to 1.0.1
{ | ||
"name": "nuxt-testevia", | ||
"version": "0.0.5", | ||
"version": "1.0.1", | ||
"description": "Nuxt - Testevia Logger", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -7,5 +7,6 @@ import Vue from 'vue' | ||
this.project = settings.project; | ||
this.sendingEnabled = !context.isDev || settings.dev; | ||
this.context = context; | ||
this.config = { | ||
headers: {'Authorization': `Bearer ${settings.apiKey}`} | ||
headers: {'Authorization': settings.apiKey} | ||
}; | ||
@@ -17,3 +18,5 @@ | ||
init(){ | ||
Vue.config.errorHandler = (err) => this.sendError(err) | ||
Vue.config.errorHandler = (err) => { | ||
if(this.sendingEnabled) this.sendError(err) | ||
} | ||
} | ||
@@ -24,9 +27,12 @@ | ||
project: this.project, | ||
url: process.server ? this.context.route.fullPath : window.location.href | ||
source: 'frontend', | ||
data: { | ||
url: process.server ? this.context.route.fullPath : window.location.href | ||
}, | ||
} | ||
if(err.message) context['error_message'] = err.message; | ||
if(err.stack) context['stacktrace'] = err.stack; | ||
if(err.message) context.data['error_message'] = err.message; | ||
if(err.stack) context.data['stacktrace'] = err.stack; | ||
axios.post('', context, this.config) | ||
axios.post('https://testevia.broj42.com/api/log-errors/', context, this.config) | ||
.catch(e =>{ | ||
@@ -46,4 +52,3 @@ // console.dir(e) | ||
inject('sendError', testevia.sendError) | ||
} | ||
inject('sendError', (err) => testevia.sendError(err)) | ||
} |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1942
49
0
1