Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
toastConfig[item].name,
toastConfig[item].payloadFunc,
toastConfig[item].options
);
});
/* eslint-disable-next-line */
const vue = new Vue({
el: '#app',
i18n,
router,
store,
render: h => h(getApp())
});
const integration = new Integrations.Vue({ Vue, attachProps: true });
Sentry.init({
dsn: 'https://2c4e977d74fd44d1b18083e63a3b265f@sentry.mewapi.io/1',
integrations: [integration],
maxBreadcrumbs: 0,
environment: BUILD_TYPE,
requestBodies: 'small',
release: NODE_ENV === 'production' ? VERSION : 'develop',
beforeSend(event) {
const network =
!store && !store.state && !store.state.network
? store.state.network.type.name
: '';
const service =
!store && !store.state && !store.state.network
? store.state.network.service
export default function configureSentry(overrides = {}) {
// This integrations prevent an appearing of errors to console, so it is enabled only for production
const enableVueIntegration = process.env.NODE_ENV === 'production'
const vueIntegration = new Integrations.Vue({ Vue: overrides.Vue, attachProps: true })
// > Electron SDK hasn't been updated to use 5.x yet
// So we have to patch integration
// https://github.com/getsentry/sentry-javascript/issues/2033
vueIntegration.setupOnce = vueIntegration.setupOnce.bind(vueIntegration, null, getCurrentHub)
configureSentryDefault({
...overrides,
Vue: null,
integrations(integrations) {
return [...integrations, enableVueIntegration && vueIntegration].filter(Boolean)
}
})
}
logger.init = (opts = {}) => {
genMethods()
if (DEBUG) {
window.Sentry = Sentry
return
}
const {Vue} = opts
const integrations = Sentry.defaultIntegrations
if (Vue) integrations.push(new Integrations.Vue({Vue}))
Sentry.init({
environment: DEBUG ? 'dev' : 'production',
release: 'v' + manifest.version,
dsn: SENTRY_DSN,
debug: DEBUG,
integrations,
})
Sentry.configureScope(async scope => {
scope.setTag('background', await isBackground())
})
}
public install() {
Sentry.init({
dsn: this.options.dsn,
integrations: [
new Integrations.Vue({ Vue: this.Vue, attachProps: true })
],
release: this.options.release,
environment: this.options.environment
});
}