Upgrade deps
This commit is contained in:
parent
9fcec67a5b
commit
f464ce2b59
7 changed files with 1482 additions and 800 deletions
|
@ -1,4 +1,4 @@
|
||||||
FROM node:10.2.1-alpine
|
FROM node:11.6.0-alpine
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
|
@ -49,8 +49,8 @@ router.use(async (ctx, next) => {
|
||||||
};
|
};
|
||||||
} else if (!err.status) {
|
} else if (!err.status) {
|
||||||
debug(err);
|
debug(err);
|
||||||
if (ctx.Raven) {
|
if (ctx.Sentry) {
|
||||||
ctx.Raven.captureException(err);
|
ctx.Sentry.captureException(err);
|
||||||
}
|
}
|
||||||
throw err;
|
throw err;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -77,7 +77,7 @@ export async function events(ctx) {
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
debug('Invalid JSON for socket auth');
|
debug('Invalid JSON for socket auth');
|
||||||
ctx.websocket.send('Invalid authentication message. Bad JSON?');
|
ctx.websocket.send('Invalid authentication message. Bad JSON?');
|
||||||
ctx.Raven.captureException(err);
|
ctx.Sentry.captureException(err);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const reply = await ctx.redis.get(json.authorization);
|
const reply = await ctx.redis.get(json.authorization);
|
||||||
|
@ -90,7 +90,7 @@ export async function events(ctx) {
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
debug(err);
|
debug(err);
|
||||||
ctx.Raven.captureException(err);
|
ctx.Sentry.captureException(err);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
20
app.js
20
app.js
|
@ -8,7 +8,7 @@ import bodyparser from 'koa-bodyparser';
|
||||||
import websockify from 'koa-websocket';
|
import websockify from 'koa-websocket';
|
||||||
import helmet from 'koa-helmet';
|
import helmet from 'koa-helmet';
|
||||||
import session from 'koa-session';
|
import session from 'koa-session';
|
||||||
import Raven from 'raven';
|
import * as Sentry from '@sentry/node';
|
||||||
import debugname from 'debug';
|
import debugname from 'debug';
|
||||||
import * as redis from './lib/redis';
|
import * as redis from './lib/redis';
|
||||||
import api, { ws } from './api/app';
|
import api, { ws } from './api/app';
|
||||||
|
@ -20,19 +20,19 @@ const app = websockify(new Koa());
|
||||||
app.keys = [process.env.COOKIE_KEY];
|
app.keys = [process.env.COOKIE_KEY];
|
||||||
|
|
||||||
if (process.env.SENTRY_DSN) {
|
if (process.env.SENTRY_DSN) {
|
||||||
Raven.config(process.env.SENTRY_DSN);
|
Sentry.init({ dsn: process.env.SENTRY_DSN });
|
||||||
Raven.install();
|
app.on('error', (err) => {
|
||||||
app.on('error', function (err) {
|
if (err.statusCode === 404) return;
|
||||||
Raven.captureException(err, function (err, eventId) {
|
Sentry.captureException(err, (_err, eventId) => {
|
||||||
console.log('Reported error ' + eventId);
|
debug('Reported error', eventId);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
app.use(async (ctx, next) => {
|
app.use(async (ctx, next) => {
|
||||||
ctx.Raven = Raven;
|
ctx.Sentry = Sentry;
|
||||||
await next();
|
await next();
|
||||||
});
|
});
|
||||||
app.ws.use(async (ctx, next) => {
|
app.ws.use(async (ctx, next) => {
|
||||||
ctx.Raven = Raven;
|
ctx.Sentry = Sentry;
|
||||||
await next();
|
await next();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,9 @@ app.use(async (ctx, next) => {
|
||||||
await next();
|
await next();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (!err.statusCode && process.env.SENTRY_DSN) {
|
if (!err.statusCode && process.env.SENTRY_DSN) {
|
||||||
Raven.captureException(err);
|
Sentry.captureException(err, (_err, eventId) => {
|
||||||
|
debug('Reported error', eventId);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
|
72
package.json
72
package.json
|
@ -5,7 +5,7 @@
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^10.1.0"
|
"node": "^11.6.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npm run build-js && npm run build-sass",
|
"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/"
|
"watch-sass": "node-sass --include-path ./node_modules/ -w -r -o web/public/styles/ web/public/styles/"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"angular": "^1.7.3",
|
"angular": "^1.7.5",
|
||||||
"angular-reconnecting-websocket": "https://github.com/adieu/angular-reconnecting-websocket#0.1.1",
|
"angular-reconnecting-websocket": "https://github.com/adieu/angular-reconnecting-websocket#0.1.1",
|
||||||
"angular-resource": "^1.7.3",
|
"angular-resource": "^1.7.5",
|
||||||
"angular-route": "^1.7.3",
|
"angular-route": "^1.7.5",
|
||||||
"angular-strap": "^2.3.8",
|
"angular-strap": "^2.3.8",
|
||||||
"async-busboy": "^0.7.0",
|
"async-busboy": "^0.7.0",
|
||||||
"aws-sdk": "^2.291.0",
|
"aws-sdk": "^2.387.0",
|
||||||
"babel": "^6.5.2",
|
"babel": "^6.5.2",
|
||||||
"babel-cli": "^6.10.1",
|
"babel-cli": "^6.10.1",
|
||||||
"babel-plugin-transform-es2015-destructuring": "^6.23.0",
|
"babel-plugin-transform-es2015-destructuring": "^6.23.0",
|
||||||
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
|
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
|
||||||
"babel-plugin-transform-object-rest-spread": "^6.8.0",
|
"babel-plugin-transform-object-rest-spread": "^6.8.0",
|
||||||
"babel-register": "^6.9.0",
|
"babel-register": "^6.9.0",
|
||||||
"basic-auth": "~2.0.0",
|
"basic-auth": "~2.0.1",
|
||||||
"bootstrap-sass": "^3.3.6",
|
"bootstrap-sass": "^3.4.0",
|
||||||
"busboy": "^0.2.14",
|
"busboy": "^0.3.0",
|
||||||
"co": "~4.6.0",
|
"co": "~4.6.0",
|
||||||
"co-redis": "^2.1.0",
|
"co-redis": "^2.1.0",
|
||||||
"co-views": "~2.1.0",
|
"co-views": "~2.1.0",
|
||||||
"copy-webpack-plugin": "^4.5.2",
|
"copy-webpack-plugin": "^4.6.0",
|
||||||
"debug": "~3.1.0",
|
"debug": "~4.1.1",
|
||||||
"dropzone": "~5.5.1",
|
"dropzone": "~5.5.1",
|
||||||
"ejs": "^2.6.1",
|
"ejs": "^2.6.1",
|
||||||
"form-data": "^2.3.2",
|
"form-data": "^2.3.3",
|
||||||
"http-errors": "^1.7.0",
|
"http-errors": "^1.7.1",
|
||||||
"image-size": "^0.6.3",
|
"image-size": "^0.7.1",
|
||||||
"image-type": "^3.0.0",
|
"image-type": "^3.0.0",
|
||||||
"jimp": "0.3.3",
|
"jimp": "0.6.0",
|
||||||
"jquery": "^3.3.1",
|
"jquery": "^3.3.1",
|
||||||
"kcors": "^2.2.2",
|
"kcors": "^2.2.2",
|
||||||
"koa": "^2.5.2",
|
"koa": "^2.6.2",
|
||||||
"koa-bodyparser": "^4.2.1",
|
"koa-bodyparser": "^4.2.1",
|
||||||
"koa-compress": "~3.0.0",
|
"koa-compress": "~3.0.0",
|
||||||
"koa-csrf": "^3.0.6",
|
"koa-csrf": "^3.0.7",
|
||||||
"koa-error": "^3.2.0",
|
"koa-error": "^3.2.0",
|
||||||
"koa-favicon": "~2.0.1",
|
"koa-favicon": "~2.0.1",
|
||||||
"koa-generic-session": "^2.0.1",
|
"koa-generic-session": "^2.0.1",
|
||||||
"koa-helmet": "^4.0.0",
|
"koa-helmet": "^4.0.0",
|
||||||
"koa-logger": "~3.2.0",
|
"koa-logger": "~3.2.0",
|
||||||
"koa-redis": "^3.1.2",
|
"koa-redis": "^3.1.3",
|
||||||
"koa-router": "^7.4.0",
|
"koa-router": "^7.4.0",
|
||||||
"koa-session": "^5.8.2",
|
"koa-session": "^5.10.1",
|
||||||
"koa-static": "^5.0.0",
|
"koa-static": "^5.0.0",
|
||||||
"koa-statsd": "~0.0.2",
|
"koa-statsd": "~0.0.2",
|
||||||
"koa-views": "^6.1.4",
|
"koa-views": "^6.1.5",
|
||||||
"koa-websocket": "^5.0.1",
|
"koa-websocket": "^5.0.1",
|
||||||
"kue": "^0.11.6",
|
"kue": "^0.11.6",
|
||||||
"mime-types": "^2.1.19",
|
"mime-types": "^2.1.21",
|
||||||
"moment": "^2.22.1",
|
"moment": "^2.23.0",
|
||||||
"mz": "^2.7.0",
|
"mz": "^2.7.0",
|
||||||
"node-fetch": "^2.2.0",
|
"node-fetch": "^2.3.0",
|
||||||
"node-sass": "^4.9.3",
|
"node-sass": "^4.11.0",
|
||||||
"node-uuid": "^1.4.8",
|
"node-uuid": "^1.4.8",
|
||||||
"passwords": "^1.3.1",
|
"passwords": "^1.3.1",
|
||||||
"pg": "^7.4.3",
|
"pg": "^7.8.0",
|
||||||
"raven": "^2.6.3",
|
"@sentry/node": "^4.5.1",
|
||||||
"redis": "^2.8.0",
|
"redis": "^2.8.0",
|
||||||
"@sendgrid/mail": "^6.3.1",
|
"@sendgrid/mail": "^6.3.1",
|
||||||
"sequelize": "^4.38.0",
|
"sequelize": "^4.42.0",
|
||||||
"smooth-scroll": "https://github.com/cferdinandi/smooth-scroll#5.3.7",
|
"smooth-scroll": "https://github.com/cferdinandi/smooth-scroll#5.3.7",
|
||||||
"statsy": "~0.2.0",
|
"statsy": "~0.2.0",
|
||||||
"stripe": "^6.7.0",
|
"stripe": "^6.20.0",
|
||||||
"swig": "~1.4.2",
|
"swig": "~1.4.2",
|
||||||
"validate-ip": "^1.0.1",
|
"validate-ip": "^1.0.1",
|
||||||
"webpack": "^4.16.5",
|
"webpack": "^4.28.4",
|
||||||
"webpack-cli": "^3.1.0",
|
"webpack-cli": "^3.2.1",
|
||||||
"zeroclipboard": "^2.2.0"
|
"zeroclipboard": "^2.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-eslint": "^8.2.6",
|
"babel-eslint": "^10.0.1",
|
||||||
"concurrently": "^3.6.1",
|
"concurrently": "^4.1.0",
|
||||||
"eslint": "^5.3.0",
|
"eslint": "^5.12.0",
|
||||||
"eslint-config-airbnb": "^17.0.0",
|
"eslint-config-airbnb": "^17.1.0",
|
||||||
"eslint-plugin-import": "^2.13.0",
|
"eslint-plugin-import": "^2.14.0",
|
||||||
"istanbul": "^0.4.3",
|
"istanbul": "^0.4.3",
|
||||||
"mocha": "^5.2.0",
|
"mocha": "^5.2.0",
|
||||||
"nodemon": "^1.18.3",
|
"nodemon": "^1.18.9",
|
||||||
"supertest": "^3.1.0",
|
"supertest": "^3.3.0",
|
||||||
"tmp": "0.0.33"
|
"tmp": "0.0.33"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import co from 'co';
|
import co from 'co';
|
||||||
import kue from 'kue';
|
import kue from 'kue';
|
||||||
import Raven from 'raven';
|
import Sentry from '@sentry/node';
|
||||||
import debuglog from 'debug';
|
import debuglog from 'debug';
|
||||||
|
|
||||||
const debug = debuglog('hostr:worker');
|
const debug = debuglog('hostr:worker');
|
||||||
|
|
||||||
Raven.config(process.env.SENTRY_DSN).install();
|
Sentry.config(process.env.SENTRY_DSN).install();
|
||||||
|
|
||||||
const queue = kue.createQueue({
|
const queue = kue.createQueue({
|
||||||
redis: process.env.REDIS_URL,
|
redis: process.env.REDIS_URL,
|
||||||
|
@ -16,7 +16,7 @@ function store(data, done) {
|
||||||
|
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
debug(err);
|
debug(err);
|
||||||
Raven.captureException(err);
|
Sentry.captureException(err);
|
||||||
return done();
|
return done();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue