nuxt-testevia
Advanced tools
Comparing version 0.0.2 to 0.0.5
{ | ||
"name": "nuxt-testevia", | ||
"version": "0.0.2", | ||
"version": "0.0.5", | ||
"description": "Nuxt - Testevia Logger", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -6,3 +6,3 @@ import Vue from 'vue' | ||
constructor({settings, context}){ | ||
this.projectName = settings.projectName; | ||
this.project = settings.project; | ||
this.context = context; | ||
@@ -17,20 +17,22 @@ this.config = { | ||
init(){ | ||
Vue.config.errorHandler = (err) => { | ||
let context = { | ||
project: this.projectName, | ||
url: process.server ? this.context.route.fullPath : window.location.href | ||
} | ||
Vue.config.errorHandler = (err) => this.sendError(err) | ||
} | ||
if(err.message) context['error_message'] = err.message; | ||
if(err.stack) context['stacktrace'] = err.stack; | ||
sendError(err){ | ||
let context = { | ||
project: this.project, | ||
url: process.server ? this.context.route.fullPath : window.location.href | ||
} | ||
axios.post('', context, this.config) | ||
.catch(e =>{ | ||
// console.dir(e) | ||
}); | ||
} | ||
if(err.message) context['error_message'] = err.message; | ||
if(err.stack) context['stacktrace'] = err.stack; | ||
axios.post('', context, this.config) | ||
.catch(e =>{ | ||
// console.dir(e) | ||
}); | ||
} | ||
} | ||
export default (context) =>{ | ||
export default (context, inject) =>{ | ||
let testevia = new Testevia({ | ||
@@ -41,4 +43,6 @@ settings: { | ||
context | ||
}) | ||
}); | ||
inject('sendError', testevia.sendError) | ||
} | ||
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
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
1738
44
1