Upgrade deps

This commit is contained in:
Jonathan Cremin 2019-01-14 21:37:03 +00:00
parent 9fcec67a5b
commit f464ce2b59
7 changed files with 1482 additions and 800 deletions

View file

@ -1,4 +1,4 @@
FROM node:10.2.1-alpine
FROM node:11.6.0-alpine
WORKDIR /app

View file

@ -49,8 +49,8 @@ router.use(async (ctx, next) => {
};
} else if (!err.status) {
debug(err);
if (ctx.Raven) {
ctx.Raven.captureException(err);
if (ctx.Sentry) {
ctx.Sentry.captureException(err);
}
throw err;
} else {

View file

@ -77,7 +77,7 @@ export async function events(ctx) {
} catch (err) {
debug('Invalid JSON for socket auth');
ctx.websocket.send('Invalid authentication message. Bad JSON?');
ctx.Raven.captureException(err);
ctx.Sentry.captureException(err);
}
try {
const reply = await ctx.redis.get(json.authorization);
@ -90,7 +90,7 @@ export async function events(ctx) {
}
} catch (err) {
debug(err);
ctx.Raven.captureException(err);
ctx.Sentry.captureException(err);
}
}));
});

20
app.js
View file

@ -8,7 +8,7 @@ import bodyparser from 'koa-bodyparser';
import websockify from 'koa-websocket';
import helmet from 'koa-helmet';
import session from 'koa-session';
import Raven from 'raven';
import * as Sentry from '@sentry/node';
import debugname from 'debug';
import * as redis from './lib/redis';
import api, { ws } from './api/app';
@ -20,19 +20,19 @@ const app = websockify(new Koa());
app.keys = [process.env.COOKIE_KEY];
if (process.env.SENTRY_DSN) {
Raven.config(process.env.SENTRY_DSN);
Raven.install();
app.on('error', function (err) {
Raven.captureException(err, function (err, eventId) {
console.log('Reported error ' + eventId);
Sentry.init({ dsn: process.env.SENTRY_DSN });
app.on('error', (err) => {
if (err.statusCode === 404) return;
Sentry.captureException(err, (_err, eventId) => {
debug('Reported error', eventId);
});
});
app.use(async (ctx, next) => {
ctx.Raven = Raven;
ctx.Sentry = Sentry;
await next();
});
app.ws.use(async (ctx, next) => {
ctx.Raven = Raven;
ctx.Sentry = Sentry;
await next();
});
}
@ -49,7 +49,9 @@ app.use(async (ctx, next) => {
await next();
} catch (err) {
if (!err.statusCode && process.env.SENTRY_DSN) {
Raven.captureException(err);
Sentry.captureException(err, (_err, eventId) => {
debug('Reported error', eventId);
});
}
throw err;
}

View file

@ -5,7 +5,7 @@
"version": "0.0.0",
"private": true,
"engines": {
"node": "^10.1.0"
"node": "^11.6.0"
},
"scripts": {
"build": "npm run build-js && npm run build-sass",
@ -25,84 +25,84 @@
"watch-sass": "node-sass --include-path ./node_modules/ -w -r -o web/public/styles/ web/public/styles/"
},
"dependencies": {
"angular": "^1.7.3",
"angular": "^1.7.5",
"angular-reconnecting-websocket": "https://github.com/adieu/angular-reconnecting-websocket#0.1.1",
"angular-resource": "^1.7.3",
"angular-route": "^1.7.3",
"angular-resource": "^1.7.5",
"angular-route": "^1.7.5",
"angular-strap": "^2.3.8",
"async-busboy": "^0.7.0",
"aws-sdk": "^2.291.0",
"aws-sdk": "^2.387.0",
"babel": "^6.5.2",
"babel-cli": "^6.10.1",
"babel-plugin-transform-es2015-destructuring": "^6.23.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"babel-plugin-transform-object-rest-spread": "^6.8.0",
"babel-register": "^6.9.0",
"basic-auth": "~2.0.0",
"bootstrap-sass": "^3.3.6",
"busboy": "^0.2.14",
"basic-auth": "~2.0.1",
"bootstrap-sass": "^3.4.0",
"busboy": "^0.3.0",
"co": "~4.6.0",
"co-redis": "^2.1.0",
"co-views": "~2.1.0",
"copy-webpack-plugin": "^4.5.2",
"debug": "~3.1.0",
"copy-webpack-plugin": "^4.6.0",
"debug": "~4.1.1",
"dropzone": "~5.5.1",
"ejs": "^2.6.1",
"form-data": "^2.3.2",
"http-errors": "^1.7.0",
"image-size": "^0.6.3",
"form-data": "^2.3.3",
"http-errors": "^1.7.1",
"image-size": "^0.7.1",
"image-type": "^3.0.0",
"jimp": "0.3.3",
"jimp": "0.6.0",
"jquery": "^3.3.1",
"kcors": "^2.2.2",
"koa": "^2.5.2",
"koa": "^2.6.2",
"koa-bodyparser": "^4.2.1",
"koa-compress": "~3.0.0",
"koa-csrf": "^3.0.6",
"koa-csrf": "^3.0.7",
"koa-error": "^3.2.0",
"koa-favicon": "~2.0.1",
"koa-generic-session": "^2.0.1",
"koa-helmet": "^4.0.0",
"koa-logger": "~3.2.0",
"koa-redis": "^3.1.2",
"koa-redis": "^3.1.3",
"koa-router": "^7.4.0",
"koa-session": "^5.8.2",
"koa-session": "^5.10.1",
"koa-static": "^5.0.0",
"koa-statsd": "~0.0.2",
"koa-views": "^6.1.4",
"koa-views": "^6.1.5",
"koa-websocket": "^5.0.1",
"kue": "^0.11.6",
"mime-types": "^2.1.19",
"moment": "^2.22.1",
"mime-types": "^2.1.21",
"moment": "^2.23.0",
"mz": "^2.7.0",
"node-fetch": "^2.2.0",
"node-sass": "^4.9.3",
"node-fetch": "^2.3.0",
"node-sass": "^4.11.0",
"node-uuid": "^1.4.8",
"passwords": "^1.3.1",
"pg": "^7.4.3",
"raven": "^2.6.3",
"pg": "^7.8.0",
"@sentry/node": "^4.5.1",
"redis": "^2.8.0",
"@sendgrid/mail": "^6.3.1",
"sequelize": "^4.38.0",
"sequelize": "^4.42.0",
"smooth-scroll": "https://github.com/cferdinandi/smooth-scroll#5.3.7",
"statsy": "~0.2.0",
"stripe": "^6.7.0",
"stripe": "^6.20.0",
"swig": "~1.4.2",
"validate-ip": "^1.0.1",
"webpack": "^4.16.5",
"webpack-cli": "^3.1.0",
"webpack": "^4.28.4",
"webpack-cli": "^3.2.1",
"zeroclipboard": "^2.2.0"
},
"devDependencies": {
"babel-eslint": "^8.2.6",
"concurrently": "^3.6.1",
"eslint": "^5.3.0",
"eslint-config-airbnb": "^17.0.0",
"eslint-plugin-import": "^2.13.0",
"babel-eslint": "^10.0.1",
"concurrently": "^4.1.0",
"eslint": "^5.12.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-plugin-import": "^2.14.0",
"istanbul": "^0.4.3",
"mocha": "^5.2.0",
"nodemon": "^1.18.3",
"supertest": "^3.1.0",
"nodemon": "^1.18.9",
"supertest": "^3.3.0",
"tmp": "0.0.33"
}
}

View file

@ -1,11 +1,11 @@
import co from 'co';
import kue from 'kue';
import Raven from 'raven';
import Sentry from '@sentry/node';
import debuglog from 'debug';
const debug = debuglog('hostr:worker');
Raven.config(process.env.SENTRY_DSN).install();
Sentry.config(process.env.SENTRY_DSN).install();
const queue = kue.createQueue({
redis: process.env.REDIS_URL,
@ -16,7 +16,7 @@ function store(data, done) {
}).catch((err) => {
debug(err);
Raven.captureException(err);
Sentry.captureException(err);
return done();
});
}

2174
yarn.lock

File diff suppressed because it is too large Load diff