update everything easily updateable

This commit is contained in:
2022-09-18 09:53:14 +00:00
committed by Stepan Usatiuk
parent 9b26459bbd
commit 7de6bad9fd
6 changed files with 2510 additions and 3918 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -8,59 +8,58 @@
"test": "jest" "test": "jest"
}, },
"dependencies": { "dependencies": {
"@blueprintjs/core": "^4.0.0", "@blueprintjs/core": "^4.10.1",
"@parcel/config-default": "^2.3.1", "@parcel/config-default": "^2.7.0",
"@parcel/transformer-sass": "^2.3.1", "@parcel/transformer-sass": "^2.7.0",
"@typescript-eslint/eslint-plugin": "^5.12.0", "@parcel/transformer-typescript-tsc": "^2.7.0",
"@typescript-eslint/parser": "^5.12.0", "@typescript-eslint/eslint-plugin": "^5.37.0",
"@typescript-eslint/parser": "^5.37.0",
"@wojtekmaj/enzyme-adapter-react-17": "^0", "@wojtekmaj/enzyme-adapter-react-17": "^0",
"enzyme": "^3.11.0", "enzyme": "^3.11.0",
"eslint": "^8.9.0", "eslint": "^8.23.1",
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-typescript": "^2.5.0", "eslint-import-resolver-typescript": "^3.5.1",
"eslint-plugin-html": "^6.2.0", "eslint-plugin-html": "^7.1.0",
"eslint-plugin-import": "^2.25.4", "eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^26.1.1", "eslint-plugin-jest": "^27.0.4",
"eslint-plugin-jsx-a11y": "^6.5.1", "eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-prettier": "^4.0.0", "eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.28.0", "eslint-plugin-react": "^7.31.8",
"eslint-plugin-react-hooks": "^4.3.0", "eslint-plugin-react-hooks": "^4.6.0",
"flush-promises": "^1.0.2", "flush-promises": "^1.0.2",
"jest": "^27.5.1", "jest": "^29.0.3",
"parcel": "^2.3.1", "jest-environment-jsdom": "^29.0.3",
"parcel": "^2.7.0",
"pluralize": "^8.0.0", "pluralize": "^8.0.0",
"prettier": "^2.5.1", "prettier": "^2.7.1",
"prettier-eslint": "^13.0.0", "prettier-eslint": "^15.0.1",
"process": "^0.11.10", "process": "^0.11.10",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"react-redux": "^7.2.6", "react-redux": "^8.0.2",
"react-router": "^5.2.0", "react-router": "^5.2.0",
"react-router-dom": "^5.2.0", "react-router-dom": "^5.2.0",
"react-spring": "^8", "react-spring": "^8",
"redux": "^4.1.2", "redux": "^4.2.0",
"redux-devtools-extension": "^2.13.9", "redux-devtools-extension": "^2.13.9",
"redux-persist": "^6.0.0", "redux-persist": "^6.0.0",
"redux-saga": "^1.1.3", "redux-saga": "^1.2.1",
"spark-md5": "^3.0.2", "spark-md5": "^3.0.2",
"ts-jest": "^27.1.3", "ts-jest": "^29.0.1",
"typescript": "^4.5.5", "typescript": "^4.8.3"
"@parcel/transformer-typescript-tsc": "^2.4.1"
}, },
"devDependencies": { "devDependencies": {
"@types/autoprefixer": "^9.7.2", "@types/enzyme": "^3.10.12",
"@types/enzyme": "^3.10.11", "@types/eslint": "^8.4.6",
"@types/eslint": "^8.4.1",
"@types/eslint-plugin-prettier": "^3.1.0", "@types/eslint-plugin-prettier": "^3.1.0",
"@types/jest": "^27.4.0", "@types/jest": "^29.0.3",
"@types/pluralize": "^0.0.29", "@types/pluralize": "^0.0.29",
"@types/prettier": "^2.4.4", "@types/prettier": "^2.7.0",
"@types/react": "^17.0.39", "@types/react": "^17.0.39",
"@types/react-dom": "^17.0.11", "@types/react-dom": "^17.0.11",
"@types/react-redux": "^7.1.22", "@types/react-redux": "^7.1.24",
"@types/react-router": "^5.1.18", "@types/react-router": "^5.1.18",
"@types/react-router-dom": "^5.3.3", "@types/react-router-dom": "^5.3.3",
"@types/sass": "^1.43.1",
"@types/spark-md5": "^3.0.2" "@types/spark-md5": "^3.0.2"
} }
} }

2287
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -22,67 +22,67 @@
}, },
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@koa/cors": "^3.1.0", "@koa/cors": "^3.4.1",
"@koa/router": "^10.1.1", "@koa/router": "^12.0.0",
"@typescript-eslint/eslint-plugin": "^5.12.0", "@typescript-eslint/eslint-plugin": "^5.37.0",
"@typescript-eslint/parser": "^5.12.0", "@typescript-eslint/parser": "^5.37.0",
"bcrypt": "^5.0.1", "bcrypt": "^5.0.1",
"chai": "^4.3.6", "chai": "^4.3.6",
"class-validator": "^0.13.2", "class-validator": "^0.13.2",
"concurrently": "^7.0.0", "concurrently": "^7.4.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"deasync": "^0.1.24", "deasync": "^0.1.28",
"eslint": "^8.9.0", "eslint": "^8.23.1",
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-typescript": "^2.5.0", "eslint-import-resolver-typescript": "^3.5.1",
"eslint-plugin-import": "^2.25.4", "eslint-plugin-import": "^2.26.0",
"eslint-plugin-mocha": "^10.0.3", "eslint-plugin-mocha": "^10.1.0",
"eslint-plugin-prettier": "^4.0.0", "eslint-plugin-prettier": "^4.2.1",
"exifreader": "^4.2.0", "exifreader": "^4.5.1",
"hasha": "^5.2.2", "hasha": "^5.2.2",
"husky": "^7.0.4", "husky": "^8.0.1",
"jsonwebtoken": "^8.5.1", "jsonwebtoken": "^8.5.1",
"koa": "^2.13.4", "koa": "^2.13.4",
"koa-body": "^4.2.0", "koa-body": "^5.0.0",
"koa-jwt": "^4.0.3", "koa-jwt": "^4.0.3",
"koa-logger": "^3.2.1", "koa-logger": "^3.2.1",
"koa-send": "^5.0.1", "koa-send": "^5.0.1",
"koa-sslify": "^5.0.0", "koa-sslify": "^5.0.0",
"koa-static": "^5.0.0", "koa-static": "^5.0.0",
"mime-types": "^2.1.34", "mime-types": "^2.1.35",
"mocha": "^9.2.0", "mocha": "^10.0.0",
"mysql": "^2.18.1", "mysql": "^2.18.1",
"prettier": "^2.5.1", "prettier": "^2.7.1",
"prettier-eslint": "^13.0.0", "prettier-eslint": "^15.0.1",
"sharp": "^0.30.5", "sharp": "^0.31.0",
"supertest": "^6.2.2", "supertest": "^6.2.4",
"ts-node": "^10.8.1", "ts-node": "^10.9.1",
"ts-node-dev": "^2", "ts-node-dev": "^2",
"tsconfig-paths": "^3.12.0", "tsconfig-paths": "^4.1.0",
"typeorm": "^0.2.41", "typeorm": "^0.2.41",
"typescript": "^4.5.5" "typescript": "^4.8.3"
}, },
"devDependencies": { "devDependencies": {
"@types/bcrypt": "^5.0.0", "@types/bcrypt": "^5.0.0",
"@types/chai": "^4.3.0", "@types/chai": "^4.3.3",
"@types/concurrently": "^6.4.0", "@types/concurrently": "^6.4.0",
"@types/deasync": "^0.1.2", "@types/deasync": "^0.1.2",
"@types/eslint": "^8.4.1", "@types/eslint": "^8.4.6",
"@types/eslint-plugin-prettier": "^3.1.0", "@types/eslint-plugin-prettier": "^3.1.0",
"@types/jsonwebtoken": "^8.5.8", "@types/jsonwebtoken": "^8.5.9",
"@types/koa": "^2.13.4", "@types/koa": "^2.13.5",
"@types/koa-logger": "^3.1.2", "@types/koa-logger": "^3.1.2",
"@types/koa-send": "^4.1.3", "@types/koa-send": "^4.1.3",
"@types/koa-sslify": "^4.0.3", "@types/koa-sslify": "^4.0.3",
"@types/koa-static": "^4.0.2", "@types/koa-static": "^4.0.2",
"@types/koa__cors": "^3.1.1", "@types/koa__cors": "^3.3.0",
"@types/koa__router": "^8.0.11", "@types/koa__router": "^12.0.0",
"@types/mime-types": "^2.1.1", "@types/mime-types": "^2.1.1",
"@types/mocha": "^9.1.0", "@types/mocha": "^9.1.1",
"@types/mysql": "^2.15.21", "@types/mysql": "^2.15.21",
"@types/prettier": "^2.4.4", "@types/prettier": "^2.7.0",
"@types/sharp": "^0.29.5", "@types/sharp": "^0.31.0",
"@types/supertest": "^2.0.11" "@types/supertest": "^2.0.12"
}, },
"husky": { "husky": {
"hooks": { "hooks": {

View File

@@ -54,7 +54,7 @@ app.use(async (ctx, next) => {
if (Array.isArray(f)) { if (Array.isArray(f)) {
throw "more than one file uploaded"; throw "more than one file uploaded";
} }
await fs.promises.unlink(f.path); await fs.promises.unlink(f.filepath);
} catch (e) { } catch (e) {
if (e.code !== "ENOENT") { if (e.code !== "ENOENT") {
throw e; throw e;

View File

@@ -110,8 +110,8 @@ photosRouter.post("/photos/upload/:id", async (ctx) => {
throw "more than one file uploaded"; throw "more than one file uploaded";
} }
const photoHash = await getHash(file.path); const photoHash = await getHash(file.filepath);
const photoSize = await getSize(file.path); const photoSize = await getSize(file.filepath);
if (photoHash !== photo.hash || photoSize !== photo.size) { if (photoHash !== photo.hash || photoSize !== photo.size) {
ctx.throw(400, "Wrong photo"); ctx.throw(400, "Wrong photo");
@@ -120,7 +120,7 @@ photosRouter.post("/photos/upload/:id", async (ctx) => {
try { try {
// TODO: actually move file if it's on different filesystems // TODO: actually move file if it's on different filesystems
await photo.processUpload(file.path); await photo.processUpload(file.filepath);
} catch (e) { } catch (e) {
console.log(e); console.log(e);
ctx.throw(500); ctx.throw(500);