Upgrade deps

This commit is contained in:
Jonathan Cremin 2018-08-11 12:53:42 +01:00
parent 207c12973e
commit d2178c8ee6
6 changed files with 776 additions and 664 deletions

View file

@ -27,6 +27,7 @@ services:
volumes:
- ./:/app:cached
- uploads:/hostr/uploads
- export:/export
ports:
- "3000:3000"
command: yarn run watch

View file

@ -10,56 +10,26 @@ const types = {
gif: jimp.MIME_JPEG,
};
function cover(path, type, size) {
return new Promise((resolve, reject) => {
jimp.read(path, (errIn, image) => {
const align = jimp.HORIZONTAL_ALIGN_CENTER | jimp.VERTICAL_ALIGN_MIDDLE;
async function cover(path, type, size) {
const image = await jimp.read(path);
debug('Image Opened');
if (errIn) {
reject(errIn);
}
image.quality(80).cover(size.width, size.height, (errOut, resized) => {
debug(size);
const resized = await image.cover(size.width, size.height, align);
debug('Image Resized');
if (errOut) {
reject(errOut);
return await resized.quality(80).getBufferAsync(types[type]);
}
resized.getBuffer(types[type], (errBuf, buffer) => {
debug('Image Buffered');
if (errBuf) {
reject(errBuf);
}
resolve(buffer);
});
});
});
});
}
function scale(path, type, size) {
return new Promise((resolve, reject) => {
jimp.read(path, (errIn, image) => {
async function scale(path, type, size) {
const image = await jimp.read(path);
debug('Image Opened');
if (errIn) {
reject(errIn);
}
image.quality(80).cover(size.width, size.height, (errOut, resized) => {
const resized = await image.cover(size.width, size.height, align);
debug('Image Resized');
if (errOut) {
reject(errOut);
}
resized.getBuffer(types[type], (errBuf, buffer) => {
debug('Image Buffered');
if (errBuf) {
reject(errBuf);
}
resolve(buffer);
});
});
});
});
return await resized.quality(80).getBufferAsync(types[type]);
}
export default function resize(path, type, currentSize, newSize) {

View file

@ -22,3 +22,5 @@ export default function init() {
}
});
}
fs.mkdirSync(path.join('/export', 'hostr'));

View file

@ -25,13 +25,13 @@
"watch-sass": "node-sass --include-path ./node_modules/ -w -r -o web/public/styles/ web/public/styles/"
},
"dependencies": {
"angular": "^1.5.6",
"angular": "^1.7.3",
"angular-reconnecting-websocket": "https://github.com/adieu/angular-reconnecting-websocket#0.1.1",
"angular-resource": "^1.5.6",
"angular-route": "^1.5.6",
"angular-resource": "^1.7.3",
"angular-route": "^1.7.3",
"angular-strap": "^2.3.8",
"async-busboy": "^0.6.2",
"aws-sdk": "^2.245.1",
"async-busboy": "^0.7.0",
"aws-sdk": "^2.291.0",
"babel": "^6.5.2",
"babel-cli": "^6.10.1",
"babel-plugin-transform-es2015-destructuring": "^6.23.0",
@ -44,18 +44,18 @@
"co": "~4.6.0",
"co-redis": "^2.1.0",
"co-views": "~2.1.0",
"copy-webpack-plugin": "^4.5.1",
"copy-webpack-plugin": "^4.5.2",
"debug": "~3.1.0",
"dropzone": "~4.0.1",
"ejs": "^2.6.1",
"form-data": "^2.3.2",
"http-errors": "^1.6.3",
"image-size": "^0.6.2",
"http-errors": "^1.7.0",
"image-size": "^0.6.3",
"image-type": "^3.0.0",
"jimp": "0.2.28",
"jimp": "0.3.3",
"jquery": "^3.3.1",
"kcors": "^2.2.1",
"koa": "^2.5.1",
"kcors": "^2.2.2",
"koa": "^2.5.2",
"koa-bodyparser": "^4.2.1",
"koa-compress": "~3.0.0",
"koa-csrf": "^3.0.6",
@ -66,42 +66,42 @@
"koa-logger": "~3.2.0",
"koa-redis": "^3.1.2",
"koa-router": "^7.4.0",
"koa-session": "^5.8.1",
"koa-static": "^4.0.3",
"koa-session": "^5.8.2",
"koa-static": "^5.0.0",
"koa-statsd": "~0.0.2",
"koa-views": "^6.1.4",
"koa-websocket": "^5.0.1",
"kue": "^0.11.6",
"mime-types": "^2.1.18",
"mime-types": "^2.1.19",
"moment": "^2.22.1",
"mz": "^2.7.0",
"node-fetch": "^2.1.2",
"node-sass": "^4.9.0",
"node-fetch": "^2.2.0",
"node-sass": "^4.9.3",
"node-uuid": "^1.4.8",
"passwords": "^1.3.1",
"pg": "^7.4.3",
"raven": "^2.6.2",
"raven": "^2.6.3",
"redis": "^2.8.0",
"@sendgrid/mail": "^6.3.1",
"sequelize": "^4.37.10",
"sequelize": "^4.38.0",
"smooth-scroll": "https://github.com/cferdinandi/smooth-scroll#5.3.7",
"statsy": "~0.2.0",
"stripe": "^6.0.0",
"stripe": "^6.7.0",
"swig": "~1.4.2",
"validate-ip": "^1.0.1",
"webpack": "^4.10.2",
"webpack-cli": "^3.0.1",
"webpack": "^4.16.5",
"webpack-cli": "^3.1.0",
"zeroclipboard": "^2.2.0"
},
"devDependencies": {
"babel-eslint": "^8.2.3",
"concurrently": "^3.5.1",
"eslint": "^4.19.1",
"eslint-config-airbnb": "^16.1.0",
"eslint-plugin-import": "^2.12.0",
"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",
"istanbul": "^0.4.3",
"mocha": "^5.2.0",
"nodemon": "^1.17.4",
"nodemon": "^1.18.3",
"supertest": "^3.1.0",
"tmp": "0.0.33"
}

View file

@ -8,4 +8,5 @@ co(async function sync() {
debug('Syncing schema');
await models.sequelize.sync();
debug('Schema synced');
process.exit();
});

1324
yarn.lock

File diff suppressed because it is too large Load diff