Upgrade deps
This commit is contained in:
parent
207c12973e
commit
d2178c8ee6
6 changed files with 776 additions and 664 deletions
|
@ -27,6 +27,7 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/app:cached
|
- ./:/app:cached
|
||||||
- uploads:/hostr/uploads
|
- uploads:/hostr/uploads
|
||||||
|
- export:/export
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
command: yarn run watch
|
command: yarn run watch
|
||||||
|
|
|
@ -10,56 +10,26 @@ const types = {
|
||||||
gif: jimp.MIME_JPEG,
|
gif: jimp.MIME_JPEG,
|
||||||
};
|
};
|
||||||
|
|
||||||
function cover(path, type, size) {
|
const align = jimp.HORIZONTAL_ALIGN_CENTER | jimp.VERTICAL_ALIGN_MIDDLE;
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
jimp.read(path, (errIn, image) => {
|
|
||||||
debug('Image Opened');
|
|
||||||
if (errIn) {
|
|
||||||
reject(errIn);
|
|
||||||
}
|
|
||||||
|
|
||||||
image.quality(80).cover(size.width, size.height, (errOut, resized) => {
|
async function cover(path, type, size) {
|
||||||
debug('Image Resized');
|
const image = await jimp.read(path);
|
||||||
if (errOut) {
|
debug('Image Opened');
|
||||||
reject(errOut);
|
debug(size);
|
||||||
}
|
const resized = await image.cover(size.width, size.height, align);
|
||||||
|
debug('Image Resized');
|
||||||
|
|
||||||
resized.getBuffer(types[type], (errBuf, buffer) => {
|
return await resized.quality(80).getBufferAsync(types[type]);
|
||||||
debug('Image Buffered');
|
|
||||||
if (errBuf) {
|
|
||||||
reject(errBuf);
|
|
||||||
}
|
|
||||||
resolve(buffer);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function scale(path, type, size) {
|
async function scale(path, type, size) {
|
||||||
return new Promise((resolve, reject) => {
|
const image = await jimp.read(path);
|
||||||
jimp.read(path, (errIn, image) => {
|
debug('Image Opened');
|
||||||
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');
|
debug('Image Resized');
|
||||||
if (errOut) {
|
|
||||||
reject(errOut);
|
|
||||||
}
|
|
||||||
|
|
||||||
resized.getBuffer(types[type], (errBuf, buffer) => {
|
return await resized.quality(80).getBufferAsync(types[type]);
|
||||||
debug('Image Buffered');
|
|
||||||
if (errBuf) {
|
|
||||||
reject(errBuf);
|
|
||||||
}
|
|
||||||
resolve(buffer);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function resize(path, type, currentSize, newSize) {
|
export default function resize(path, type, currentSize, newSize) {
|
||||||
|
|
|
@ -22,3 +22,5 @@ export default function init() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fs.mkdirSync(path.join('/export', 'hostr'));
|
54
package.json
54
package.json
|
@ -25,13 +25,13 @@
|
||||||
"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.5.6",
|
"angular": "^1.7.3",
|
||||||
"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.5.6",
|
"angular-resource": "^1.7.3",
|
||||||
"angular-route": "^1.5.6",
|
"angular-route": "^1.7.3",
|
||||||
"angular-strap": "^2.3.8",
|
"angular-strap": "^2.3.8",
|
||||||
"async-busboy": "^0.6.2",
|
"async-busboy": "^0.7.0",
|
||||||
"aws-sdk": "^2.245.1",
|
"aws-sdk": "^2.291.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",
|
||||||
|
@ -44,18 +44,18 @@
|
||||||
"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.1",
|
"copy-webpack-plugin": "^4.5.2",
|
||||||
"debug": "~3.1.0",
|
"debug": "~3.1.0",
|
||||||
"dropzone": "~4.0.1",
|
"dropzone": "~4.0.1",
|
||||||
"ejs": "^2.6.1",
|
"ejs": "^2.6.1",
|
||||||
"form-data": "^2.3.2",
|
"form-data": "^2.3.2",
|
||||||
"http-errors": "^1.6.3",
|
"http-errors": "^1.7.0",
|
||||||
"image-size": "^0.6.2",
|
"image-size": "^0.6.3",
|
||||||
"image-type": "^3.0.0",
|
"image-type": "^3.0.0",
|
||||||
"jimp": "0.2.28",
|
"jimp": "0.3.3",
|
||||||
"jquery": "^3.3.1",
|
"jquery": "^3.3.1",
|
||||||
"kcors": "^2.2.1",
|
"kcors": "^2.2.2",
|
||||||
"koa": "^2.5.1",
|
"koa": "^2.5.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.6",
|
||||||
|
@ -66,42 +66,42 @@
|
||||||
"koa-logger": "~3.2.0",
|
"koa-logger": "~3.2.0",
|
||||||
"koa-redis": "^3.1.2",
|
"koa-redis": "^3.1.2",
|
||||||
"koa-router": "^7.4.0",
|
"koa-router": "^7.4.0",
|
||||||
"koa-session": "^5.8.1",
|
"koa-session": "^5.8.2",
|
||||||
"koa-static": "^4.0.3",
|
"koa-static": "^5.0.0",
|
||||||
"koa-statsd": "~0.0.2",
|
"koa-statsd": "~0.0.2",
|
||||||
"koa-views": "^6.1.4",
|
"koa-views": "^6.1.4",
|
||||||
"koa-websocket": "^5.0.1",
|
"koa-websocket": "^5.0.1",
|
||||||
"kue": "^0.11.6",
|
"kue": "^0.11.6",
|
||||||
"mime-types": "^2.1.18",
|
"mime-types": "^2.1.19",
|
||||||
"moment": "^2.22.1",
|
"moment": "^2.22.1",
|
||||||
"mz": "^2.7.0",
|
"mz": "^2.7.0",
|
||||||
"node-fetch": "^2.1.2",
|
"node-fetch": "^2.2.0",
|
||||||
"node-sass": "^4.9.0",
|
"node-sass": "^4.9.3",
|
||||||
"node-uuid": "^1.4.8",
|
"node-uuid": "^1.4.8",
|
||||||
"passwords": "^1.3.1",
|
"passwords": "^1.3.1",
|
||||||
"pg": "^7.4.3",
|
"pg": "^7.4.3",
|
||||||
"raven": "^2.6.2",
|
"raven": "^2.6.3",
|
||||||
"redis": "^2.8.0",
|
"redis": "^2.8.0",
|
||||||
"@sendgrid/mail": "^6.3.1",
|
"@sendgrid/mail": "^6.3.1",
|
||||||
"sequelize": "^4.37.10",
|
"sequelize": "^4.38.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.0.0",
|
"stripe": "^6.7.0",
|
||||||
"swig": "~1.4.2",
|
"swig": "~1.4.2",
|
||||||
"validate-ip": "^1.0.1",
|
"validate-ip": "^1.0.1",
|
||||||
"webpack": "^4.10.2",
|
"webpack": "^4.16.5",
|
||||||
"webpack-cli": "^3.0.1",
|
"webpack-cli": "^3.1.0",
|
||||||
"zeroclipboard": "^2.2.0"
|
"zeroclipboard": "^2.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-eslint": "^8.2.3",
|
"babel-eslint": "^8.2.6",
|
||||||
"concurrently": "^3.5.1",
|
"concurrently": "^3.6.1",
|
||||||
"eslint": "^4.19.1",
|
"eslint": "^5.3.0",
|
||||||
"eslint-config-airbnb": "^16.1.0",
|
"eslint-config-airbnb": "^17.0.0",
|
||||||
"eslint-plugin-import": "^2.12.0",
|
"eslint-plugin-import": "^2.13.0",
|
||||||
"istanbul": "^0.4.3",
|
"istanbul": "^0.4.3",
|
||||||
"mocha": "^5.2.0",
|
"mocha": "^5.2.0",
|
||||||
"nodemon": "^1.17.4",
|
"nodemon": "^1.18.3",
|
||||||
"supertest": "^3.1.0",
|
"supertest": "^3.1.0",
|
||||||
"tmp": "0.0.33"
|
"tmp": "0.0.33"
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,4 +8,5 @@ co(async function sync() {
|
||||||
debug('Syncing schema');
|
debug('Syncing schema');
|
||||||
await models.sequelize.sync();
|
await models.sequelize.sync();
|
||||||
debug('Schema synced');
|
debug('Schema synced');
|
||||||
|
process.exit();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue