Skip to content

Commit

Permalink
add sentry support
Browse files Browse the repository at this point in the history
  • Loading branch information
shincurry committed Jan 22, 2019
1 parent 81e8a62 commit 999ef58
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 42 deletions.
2 changes: 1 addition & 1 deletion assets/js/api/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import fetch from 'isomorphic-fetch';
import qs from 'qs';

import apiPrefix from '~/config';
import { apiPrefix } from '~/config';

const apiBaseUrl = process.client ? apiPrefix.browser : apiPrefix.server;

Expand Down
4 changes: 2 additions & 2 deletions config.example.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const apiPrefix = {
export const apiPrefix = {
server: 'http://localhost:8080/api/v2/',
browser: 'http://localhost:8080/api/v2/',
};

export default apiPrefix;
export const sentryDsn = '';
8 changes: 8 additions & 0 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const PurgecssPlugin = require('purgecss-webpack-plugin');
const glob = require('glob-all');
const path = require('path');

const { sentryDsn } = require('./config');

module.exports = {
/*
** Headers of the page
Expand Down Expand Up @@ -104,8 +106,14 @@ module.exports = {
'@nuxtjs/pwa',
// Simple usage
'@nuxtjs/bulma',
'@nuxtjs/sentry',
],

sentry: {
dsn: sentryDsn,
config: {},
},

manifest: {
name: 'Animeloop',
short_name: 'Animeloop',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@nuxtjs/bulma": "^1.1.0",
"@nuxtjs/google-analytics": "^2.0.2",
"@nuxtjs/pwa": "^2.6.0",
"@nuxtjs/sentry": "^2.2.1",
"body-parser": "^1.18.2",
"bulma": "^0.7.1",
"connect-redis": "^3.3.3",
Expand Down
2 changes: 1 addition & 1 deletion pages/dashboard/profile/settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
import remote from '~/assets/js/api/fetch';
import isLogin from '~/middleware/is-login';
import apiPrefix from '~/config';
import { apiPrefix } from '~/config';
export default {
name: 'DashboardSettingsPage',
Expand Down
137 changes: 99 additions & 38 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1258,6 +1258,15 @@
"@nuxtjs/meta" "^2.6.0"
"@nuxtjs/workbox" "^2.6.0"

"@nuxtjs/sentry@^2.2.1":
version "2.2.1"
resolved "https://registry.yarnpkg.com/@nuxtjs/sentry/-/sentry-2.2.1.tgz#9f0b9f2d867f4f9daab9da3bbcda196baa4c717d"
integrity sha512-UEoV0qCrqXMirHrprNiW4cwjrFG8BzIbAEl8g8ykKhQ5Lt6kOW7k4gixI8XNAC5Gp5EnYQOsD7p8ZxsvrvO0+w==
dependencies:
"@sentry/browser" "^4.5.1"
"@sentry/node" "^4.5.1"
consola "^2.3.2"

"@nuxtjs/workbox@^2.6.0":
version "2.6.0"
resolved "https://registry.yarnpkg.com/@nuxtjs/workbox/-/workbox-2.6.0.tgz#eb057e7cbddc8f50bc181a5af9795cc93bd774d8"
Expand Down Expand Up @@ -1382,6 +1391,75 @@
into-stream "^4.0.0"
lodash "^4.17.4"

"@sentry/browser@^4.5.1":
version "4.5.3"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-4.5.3.tgz#69744d13b01c490f366cbf2676790624b9f7c0a0"
integrity sha512-ePbsyXtZS9jWM0lD8rxA46omJjJcQPaRZak08TyxFBGm1YOUFvvNAA6rNjUtK4fFEznLhPA5YcllcOCBE2bPPg==
dependencies:
"@sentry/core" "4.5.3"
"@sentry/types" "4.5.3"
"@sentry/utils" "4.5.3"
tslib "^1.9.3"

"@sentry/[email protected]":
version "4.5.3"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-4.5.3.tgz#e55a42c694deec903aec2479e4a282d5a7a43878"
integrity sha512-off7XkyyiPXJTQ1XYPzxsY3zLHztMdK1kuIeHzyoIzu4kvs8H75eqou+fADo04JmfaMNy+OZSoW+5Aq2SZR2Ng==
dependencies:
"@sentry/hub" "4.5.3"
"@sentry/minimal" "4.5.3"
"@sentry/types" "4.5.3"
"@sentry/utils" "4.5.3"
tslib "^1.9.3"

"@sentry/[email protected]":
version "4.5.3"
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-4.5.3.tgz#54ce5988ac6dedbe9bba99e2c00f8f26eb677dfe"
integrity sha512-4b8oPVAGw/hf11CQN9J7hAk2wzD2HIZsQBl/PcB/p5r1UyHw8cibpVobJulkHJMBJMiZ/twIBGZ1G1qK3LJdhw==
dependencies:
"@sentry/types" "4.5.3"
"@sentry/utils" "4.5.3"
tslib "^1.9.3"

"@sentry/[email protected]":
version "4.5.3"
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-4.5.3.tgz#7b69481df2d61e4b935d067be62a52824190f616"
integrity sha512-W9+eEZosoDKTAJkab/bxsSRim7I4lqeWHLhmCchDimKcdmpBzC+gOCT0PywwOWRLW08LhTHfmnNSAJv6PaZiCA==
dependencies:
"@sentry/hub" "4.5.3"
"@sentry/types" "4.5.3"
tslib "^1.9.3"

"@sentry/node@^4.5.1":
version "4.5.3"
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-4.5.3.tgz#f6b57747991c300d4f5f70add673ea3d1e78c873"
integrity sha512-glBIGsoYDcUEjZWDjbkDWt87cmuO/lcxpfz4zfTq9JfIfzI3WunJqABhFDc8tQSqUdHOlWb2QKvoNPvz+0EDfg==
dependencies:
"@sentry/core" "4.5.3"
"@sentry/hub" "4.5.3"
"@sentry/types" "4.5.3"
"@sentry/utils" "4.5.3"
"@types/stack-trace" "0.0.29"
cookie "0.3.1"
https-proxy-agent "2.2.1"
lru_map "0.3.3"
lsmod "1.0.0"
stack-trace "0.0.10"
tslib "^1.9.3"

"@sentry/[email protected]":
version "4.5.3"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-4.5.3.tgz#3350dce2b7f9b936a8c327891c12e3aef7bd8852"
integrity sha512-7ll1PAFNjrBNX9rzy3P2qAQrpQwHaDO3uKj735qsnGw34OtAS8Xr8WYrjI14f9fMPa/XIeWvMPb4GMic28V/ag==

"@sentry/[email protected]":
version "4.5.3"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-4.5.3.tgz#6893fca9fde230b230360779362752e9b5570852"
integrity sha512-yIYqnuq9cd9nAUJ2MPmq++Mgy81qB2fglsDB8TiBfk2eaba79qFcKp8xg3w3EMDHZMlfmlx4fkTmZJ/+V02oWQ==
dependencies:
"@sentry/types" "4.5.3"
tslib "^1.9.3"

"@types/babel-types@*", "@types/babel-types@^7.0.0":
version "7.0.4"
resolved "https://registry.yarnpkg.com/@types/babel-types/-/babel-types-7.0.4.tgz#bfd5b0d0d1ba13e351dff65b6e52783b816826c8"
Expand All @@ -1404,6 +1482,11 @@
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.1.tgz#48fd98c1561fe718b61733daed46ff115b496e18"
integrity sha512-eqz8c/0kwNi/OEHQfvIuJVLTst3in0e7uTKeuY+WL/zfKn0xVujOTp42bS/vUUokhK5P2BppLd9JXMOMHcgbjA==

"@types/[email protected]":
version "0.0.29"
resolved "https://registry.yarnpkg.com/@types/stack-trace/-/stack-trace-0.0.29.tgz#eb7a7c60098edb35630ed900742a5ecb20cfcb4d"
integrity sha512-TgfOX+mGY/NyNxJLIbDWrO9DjGoVSW9+aB8H2yy1fy32jsvxijhmyJI9fDFgvz3YP4lvJaq9DzdR/M1bOgVc9g==

"@types/unist@*", "@types/unist@^2.0.0":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.2.tgz#5dc0a7f76809b7518c0df58689cd16a19bd751c6"
Expand Down Expand Up @@ -3981,7 +4064,7 @@ connect@^3.6.6:
parseurl "~1.3.2"
utils-merge "1.0.1"

consola@^2.0.0-1, consola@^2.3.0:
consola@^2.0.0-1, consola@^2.3.0, consola@^2.3.2:
version "2.3.2"
resolved "https://registry.yarnpkg.com/consola/-/consola-2.3.2.tgz#ec75dd9847fa963dc41e21bc2737ac8c962677bb"
integrity sha512-7SAo6nBdWJw7XQFu0ZRnXbGBu+RhEp0/fEpm7lTnqRT6bHM0MwEkW0Yxv8phCP9s18qyMqBmVU/pJ2bri/TZIg==
Expand Down Expand Up @@ -4613,7 +4696,7 @@ debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@~4.1.0:
dependencies:
ms "^2.1.1"

debuglog@*, debuglog@^1.0.1:
debuglog@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=
Expand Down Expand Up @@ -6870,7 +6953,7 @@ https-browserify@^1.0.0:
resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73"
integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=

https-proxy-agent@^2.2.0, https-proxy-agent@^2.2.1:
https-proxy-agent@2.2.1, https-proxy-agent@^2.2.0, https-proxy-agent@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0"
integrity sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==
Expand Down Expand Up @@ -7006,7 +7089,7 @@ import-local@^1.0.0:
pkg-dir "^2.0.0"
resolve-cwd "^2.0.0"

imurmurhash@*, imurmurhash@^0.1.4:
imurmurhash@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
Expand Down Expand Up @@ -8231,11 +8314,6 @@ lockfile@^1.0.4:
dependencies:
signal-exit "^3.0.2"

lodash._baseindexof@*:
version "3.1.0"
resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c"
integrity sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw=

lodash._baseuniq@~4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8"
Expand All @@ -8244,33 +8322,11 @@ lodash._baseuniq@~4.6.0:
lodash._createset "~4.0.0"
lodash._root "~3.0.0"

lodash._bindcallback@*:
version "3.0.1"
resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
integrity sha1-5THCdkTPi1epnhftlbNcdIeJOS4=

lodash._cacheindexof@*:
version "3.0.2"
resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92"
integrity sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI=

lodash._createcache@*:
version "3.1.2"
resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093"
integrity sha1-VtagZAF2JeeevKa4AY4XRAvc8JM=
dependencies:
lodash._getnative "^3.0.0"

lodash._createset@~4.0.0:
version "4.0.3"
resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26"
integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY=

lodash._getnative@*, lodash._getnative@^3.0.0:
version "3.9.1"
resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=

lodash._reinterpolate@~3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
Expand Down Expand Up @@ -8336,11 +8392,6 @@ lodash.mergewith@^4.6.0:
resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz#639057e726c3afbdb3e7d42741caa8d6e4335927"
integrity sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==

lodash.restparam@*:
version "3.6.1"
resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=

lodash.set@^4.3.2:
version "4.3.2"
resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23"
Expand Down Expand Up @@ -8458,6 +8509,16 @@ lru-cache@^5.1.1:
dependencies:
yallist "^3.0.2"

[email protected]:
version "0.3.3"
resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd"
integrity sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0=

[email protected]:
version "1.0.0"
resolved "https://registry.yarnpkg.com/lsmod/-/lsmod-1.0.0.tgz#9a00f76dca36eb23fa05350afe1b585d4299e64b"
integrity sha1-mgD3bco26yP6BTUK/htYXUKZ5ks=

macos-release@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.0.0.tgz#7dddf4caf79001a851eb4fba7fb6034f251276ab"
Expand Down Expand Up @@ -12016,7 +12077,7 @@ readable-stream@~1.1.10:
isarray "0.0.1"
string_decoder "~0.10.x"

readdir-scoped-modules@*, readdir-scoped-modules@^1.0.0:
readdir-scoped-modules@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747"
integrity sha1-n6+jfShr5dksuuve4DDcm19AZ0c=
Expand Down Expand Up @@ -14030,7 +14091,7 @@ tryer@^1.0.0:
resolved "https://registry.yarnpkg.com/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8"
integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==

tslib@^1.9.0:
tslib@^1.9.0, tslib@^1.9.3:
version "1.9.3"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==
Expand Down

0 comments on commit 999ef58

Please sign in to comment.