Update dependencies.
Includes prettier v2 lint fixes.
This commit is contained in:
parent
69b0c0fde1
commit
919c1d7a50
166
api/package-lock.json
generated
166
api/package-lock.json
generated
@ -52,14 +52,20 @@
|
|||||||
"@babel/highlight": "^7.8.3"
|
"@babel/highlight": "^7.8.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@babel/helper-validator-identifier": {
|
||||||
|
"version": "7.9.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz",
|
||||||
|
"integrity": "sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"@babel/highlight": {
|
"@babel/highlight": {
|
||||||
"version": "7.8.3",
|
"version": "7.9.0",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz",
|
||||||
"integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==",
|
"integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
"@babel/helper-validator-identifier": "^7.9.0",
|
||||||
"chalk": "^2.0.0",
|
"chalk": "^2.0.0",
|
||||||
"esutils": "^2.0.2",
|
|
||||||
"js-tokens": "^4.0.0"
|
"js-tokens": "^4.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -156,6 +162,11 @@
|
|||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@types/content-disposition": {
|
||||||
|
"version": "0.5.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/content-disposition/-/content-disposition-0.5.2.tgz",
|
||||||
|
"integrity": "sha1-GMyw/RJoCOSYqCDLgUnAByorkGY="
|
||||||
|
},
|
||||||
"@types/cookies": {
|
"@types/cookies": {
|
||||||
"version": "0.7.4",
|
"version": "0.7.4",
|
||||||
"resolved": "https://registry.npmjs.org/@types/cookies/-/cookies-0.7.4.tgz",
|
"resolved": "https://registry.npmjs.org/@types/cookies/-/cookies-0.7.4.tgz",
|
||||||
@ -186,9 +197,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/express-serve-static-core": {
|
"@types/express-serve-static-core": {
|
||||||
"version": "4.17.2",
|
"version": "4.17.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.3.tgz",
|
||||||
"integrity": "sha512-El9yMpctM6tORDAiBwZVLMcxoTMcqqRO9dVyYcn7ycLWbvR8klrDn8CAOwRfZujZtWD7yS/mshTdz43jMOejbg==",
|
"integrity": "sha512-sHEsvEzjqN+zLbqP+8OXTipc10yH1QLR+hnr5uw29gi9AhCAAAdri8ClNV7iMdrJrIzXIQtlkPvq8tJGhj3QJQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
"@types/range-parser": "*"
|
"@types/range-parser": "*"
|
||||||
@ -224,11 +235,12 @@
|
|||||||
"integrity": "sha512-GJhpTepz2udxGexqos8wgaBx4I/zWIDPh/KOGEwAqtuGDkOUJu5eFvwmdBX4AmB8Odsr+9pHCQqiAqDL/yKMKw=="
|
"integrity": "sha512-GJhpTepz2udxGexqos8wgaBx4I/zWIDPh/KOGEwAqtuGDkOUJu5eFvwmdBX4AmB8Odsr+9pHCQqiAqDL/yKMKw=="
|
||||||
},
|
},
|
||||||
"@types/koa": {
|
"@types/koa": {
|
||||||
"version": "2.11.2",
|
"version": "2.11.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/koa/-/koa-2.11.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/koa/-/koa-2.11.3.tgz",
|
||||||
"integrity": "sha512-2UPelagNNW6bnc1I5kIzluCaheXRA9S+NyOdXEFFj9Az7jc15ek5V03kb8OTbb3tdZ5i2BIJObe86PhHvpMolg==",
|
"integrity": "sha512-ABxVkrNWa4O/Jp24EYI/hRNqEVRlhB9g09p48neQp4m3xL1TJtdWk2NyNQSMCU45ejeELMQZBYyfstyVvO2H3Q==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/accepts": "*",
|
"@types/accepts": "*",
|
||||||
|
"@types/content-disposition": "*",
|
||||||
"@types/cookies": "*",
|
"@types/cookies": "*",
|
||||||
"@types/http-assert": "*",
|
"@types/http-assert": "*",
|
||||||
"@types/keygrip": "*",
|
"@types/keygrip": "*",
|
||||||
@ -271,9 +283,9 @@
|
|||||||
"integrity": "sha512-FwI9gX75FgVBJ7ywgnq/P7tw+/o1GUbtP0KzbtusLigAOgIgNISRK0ZPl4qertvXSIE8YbsVJueQ90cDt9YYyw=="
|
"integrity": "sha512-FwI9gX75FgVBJ7ywgnq/P7tw+/o1GUbtP0KzbtusLigAOgIgNISRK0ZPl4qertvXSIE8YbsVJueQ90cDt9YYyw=="
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "13.9.1",
|
"version": "13.9.5",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.5.tgz",
|
||||||
"integrity": "sha512-E6M6N0blf/jiZx8Q3nb0vNaswQeEyn0XlupO+xN6DtJ6r6IT4nXrTry7zhIfYvFCl3/8Cu6WIysmUBKiqV0bqQ=="
|
"integrity": "sha512-hkzMMD3xu6BrJpGVLeQ3htQQNAcOrJjX7WFmtK8zWQpz2UJf13LCFF2ALA7c9OVdvc2vQJeDdjfR35M0sBCxvw=="
|
||||||
},
|
},
|
||||||
"@types/node-fetch": {
|
"@types/node-fetch": {
|
||||||
"version": "2.5.5",
|
"version": "2.5.5",
|
||||||
@ -313,9 +325,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@wry/equality": {
|
"@wry/equality": {
|
||||||
"version": "0.1.9",
|
"version": "0.1.11",
|
||||||
"resolved": "https://registry.npmjs.org/@wry/equality/-/equality-0.1.9.tgz",
|
"resolved": "https://registry.npmjs.org/@wry/equality/-/equality-0.1.11.tgz",
|
||||||
"integrity": "sha512-mB6ceGjpMGz1ZTza8HYnrPGos2mC6So4NhS1PtZ8s4Qt0K7fBiIGhpSxUbQmhwcSWE3no+bYxmI2OL6KuXYmoQ==",
|
"integrity": "sha512-mwEVBDUVODlsQQ5dfuLUS5/Tf7jqUKyhKYHmVi4fPB6bDMOfWvUPJmKgS1Z7Za/sOI3vzWt4+O7yCiL/70MogA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"tslib": "^1.9.3"
|
"tslib": "^1.9.3"
|
||||||
}
|
}
|
||||||
@ -1161,9 +1173,9 @@
|
|||||||
"integrity": "sha1-4rPZG1Su1nLzCdlQ0VSFD6EdTzc="
|
"integrity": "sha1-4rPZG1Su1nLzCdlQ0VSFD6EdTzc="
|
||||||
},
|
},
|
||||||
"es-abstract": {
|
"es-abstract": {
|
||||||
"version": "1.17.4",
|
"version": "1.17.5",
|
||||||
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.4.tgz",
|
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz",
|
||||||
"integrity": "sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ==",
|
"integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"es-to-primitive": "^1.2.1",
|
"es-to-primitive": "^1.2.1",
|
||||||
"function-bind": "^1.1.1",
|
"function-bind": "^1.1.1",
|
||||||
@ -1254,12 +1266,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mkdirp": {
|
"mkdirp": {
|
||||||
"version": "0.5.1",
|
"version": "0.5.4",
|
||||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz",
|
||||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
"integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "0.0.8"
|
"minimist": "^1.2.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
@ -1290,9 +1302,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-config-prettier": {
|
"eslint-config-prettier": {
|
||||||
"version": "6.10.0",
|
"version": "6.10.1",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz",
|
||||||
"integrity": "sha512-AtndijGte1rPILInUdHjvKEGbIV06NuvPrqlIEaEaWtbtvJh464mDeyGMdZEQMsGvC0ZVkiex1fSNcC4HAbRGg==",
|
"integrity": "sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"get-stdin": "^6.0.0"
|
"get-stdin": "^6.0.0"
|
||||||
@ -1320,9 +1332,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-module-utils": {
|
"eslint-module-utils": {
|
||||||
"version": "2.5.2",
|
"version": "2.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz",
|
||||||
"integrity": "sha512-LGScZ/JSlqGKiT8OC+cYRxseMjyqt6QO54nl281CK93unD89ijSeRV6An8Ci/2nvWVKe8K/Tqdm75RQoIOCr+Q==",
|
"integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"debug": "^2.6.9",
|
"debug": "^2.6.9",
|
||||||
@ -1368,9 +1380,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-plugin-import": {
|
"eslint-plugin-import": {
|
||||||
"version": "2.20.1",
|
"version": "2.20.2",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.2.tgz",
|
||||||
"integrity": "sha512-qQHgFOTjguR+LnYRoToeZWT62XM55MBVXObHM6SKFd1VzDcX/vqT1kAz8ssqigh5eMj8qXcRoXXGZpPP6RfdCw==",
|
"integrity": "sha512-FObidqpXrR8OnCh4iNsxy+WACztJLXAHBO5hK79T1Hc77PgQZkyDGA5Ag9xAvRpglvLNxhH/zSmZ70/pZ31dHg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"array-includes": "^3.0.3",
|
"array-includes": "^3.0.3",
|
||||||
@ -1485,9 +1497,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-plugin-jsdoc": {
|
"eslint-plugin-jsdoc": {
|
||||||
"version": "22.0.1",
|
"version": "22.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-22.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-22.1.0.tgz",
|
||||||
"integrity": "sha512-lqQgGtd+roOhd5lSdIK4P3mlDmTVmVdcehj/r8nY25CGB2yi4Tk6JVwETCPBGnRKd40JkllkchyZmt0tFN+5pw==",
|
"integrity": "sha512-54NdbICM7KrxsGUqQsev9aIMqPXyvyBx2218Qcm0TQ16P9CtBI+YY4hayJR6adrxlq4Ej0JLpgfUXWaQVFqmQg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"comment-parser": "^0.7.2",
|
"comment-parser": "^0.7.2",
|
||||||
@ -1517,9 +1529,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-plugin-node": {
|
"eslint-plugin-node": {
|
||||||
"version": "11.0.0",
|
"version": "11.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz",
|
||||||
"integrity": "sha512-chUs/NVID+sknFiJzxoN9lM7uKSOEta8GC8365hw1nDfwIPIjjpRSwwPvQanWv8dt/pDe9EV4anmVSwdiSndNg==",
|
"integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"eslint-plugin-es": "^3.0.0",
|
"eslint-plugin-es": "^3.0.0",
|
||||||
@ -1599,12 +1611,20 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"esquery": {
|
"esquery": {
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.2.0.tgz",
|
||||||
"integrity": "sha512-MxYW9xKmROWF672KqjO75sszsA8Mxhw06YFeS5VHlB98KDHbOSurm3ArsjO60Eaf3QmGMCP1yn+0JQkNLo/97Q==",
|
"integrity": "sha512-weltsSqdeWIX9G2qQZz7KlTRJdkkOCTPgLYJUz1Hacf48R4YOwGPHO3+ORfWedqJKbq5WQmsgK90n+pFLIKt/Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"estraverse": "^4.0.0"
|
"estraverse": "^5.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"estraverse": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-j3acdrMzqrxmJTNj5dbr1YbjacrYgAxVMeF0gK16E3j494mOe7xygM/ZLIguEQ0ETwAg2hlJCtHRGav+y0Ny5A==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"esrecurse": {
|
"esrecurse": {
|
||||||
@ -1760,9 +1780,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flatted": {
|
"flatted": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz",
|
||||||
"integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==",
|
"integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"form-data": {
|
"form-data": {
|
||||||
@ -1836,9 +1856,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"glob-parent": {
|
"glob-parent": {
|
||||||
"version": "5.1.0",
|
"version": "5.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
|
||||||
"integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==",
|
"integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"is-glob": "^4.0.1"
|
"is-glob": "^4.0.1"
|
||||||
@ -2374,9 +2394,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"koa-bodyparser": {
|
"koa-bodyparser": {
|
||||||
"version": "4.2.1",
|
"version": "4.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/koa-bodyparser/-/koa-bodyparser-4.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/koa-bodyparser/-/koa-bodyparser-4.3.0.tgz",
|
||||||
"integrity": "sha512-UIjPAlMZfNYDDe+4zBaOAUKYqkwAGcIU6r2ARf1UOXPAlfennQys5IiShaVeNf7KkVBlf88f2LeLvBFvKylttw==",
|
"integrity": "sha512-uyV8G29KAGwZc4q/0WUAjH+Tsmuv9ImfBUF2oZVyZtaeo0husInagyn/JH85xMSxM0hEk/mbCII5ubLDuqW/Rw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"co-body": "^6.0.0",
|
"co-body": "^6.0.0",
|
||||||
"copy-to": "^2.0.1"
|
"copy-to": "^2.0.1"
|
||||||
@ -2581,9 +2601,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.8",
|
"version": "1.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
||||||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
|
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"mkdirp": {
|
"mkdirp": {
|
||||||
@ -2944,9 +2964,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"picomatch": {
|
"picomatch": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
|
||||||
"integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA==",
|
"integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"pify": {
|
"pify": {
|
||||||
@ -3027,9 +3047,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"version": "1.19.1",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.2.tgz",
|
||||||
"integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==",
|
"integrity": "sha512-5xJQIPT8BraI7ZnaDwSbu5zLrB6vvi8hVV58yHQ+QK64qrY40dULy0HSRlQ2/2IdzeBpjhDkqdcFBnFeDEMVdg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"prettier-linter-helpers": {
|
"prettier-linter-helpers": {
|
||||||
@ -3074,9 +3094,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"qs": {
|
"qs": {
|
||||||
"version": "6.9.1",
|
"version": "6.9.3",
|
||||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.9.1.tgz",
|
"resolved": "https://registry.npmjs.org/qs/-/qs-6.9.3.tgz",
|
||||||
"integrity": "sha512-Cxm7/SS/y/Z3MHWSxXb8lIFqgqBowP5JMlTUFyJN88y0SGQhVmZnqFK/PeuMX9LzUyWsqqhNxIyg0jlzq946yA=="
|
"integrity": "sha512-EbZYNarm6138UKKq46tdx08Yo/q9ZhFoAXAI1meAFd2GtbRDhbZY2WQSICskT0c5q99aFzLG1D4nvTk9tqfXIw=="
|
||||||
},
|
},
|
||||||
"raw-body": {
|
"raw-body": {
|
||||||
"version": "2.4.1",
|
"version": "2.4.1",
|
||||||
@ -3101,12 +3121,6 @@
|
|||||||
"strip-json-comments": "~2.0.1"
|
"strip-json-comments": "~2.0.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"minimist": {
|
|
||||||
"version": "1.2.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
|
||||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"strip-json-comments": {
|
"strip-json-comments": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
|
||||||
@ -3314,9 +3328,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"signal-exit": {
|
"signal-exit": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
|
||||||
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
|
"integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"slice-ansi": {
|
"slice-ansi": {
|
||||||
@ -3834,12 +3848,12 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"mkdirp": {
|
"mkdirp": {
|
||||||
"version": "0.5.1",
|
"version": "0.5.4",
|
||||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz",
|
||||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
"integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "0.0.8"
|
"minimist": "^1.2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,13 +23,13 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^6.8.0",
|
"eslint": "^6.8.0",
|
||||||
"eslint-config-env": "^13.0.4",
|
"eslint-config-env": "^13.0.4",
|
||||||
"eslint-config-prettier": "^6.10.0",
|
"eslint-config-prettier": "^6.10.1",
|
||||||
"eslint-plugin-import": "^2.20.1",
|
"eslint-plugin-import": "^2.20.2",
|
||||||
"eslint-plugin-jsdoc": "^22.0.1",
|
"eslint-plugin-jsdoc": "^22.1.0",
|
||||||
"eslint-plugin-node": "^11.0.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"eslint-plugin-prettier": "^3.1.2",
|
"eslint-plugin-prettier": "^3.1.2",
|
||||||
"nodemon": "^2.0.2",
|
"nodemon": "^2.0.2",
|
||||||
"prettier": "^1.19.1"
|
"prettier": "^2.0.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "npm run test:eslint && npm run test:prettier",
|
"test": "npm run test:eslint && npm run test:prettier",
|
||||||
|
|||||||
@ -6,5 +6,5 @@ const { QueryType } = require('./types/Query')
|
|||||||
|
|
||||||
exports.schema = new GraphQLSchema({
|
exports.schema = new GraphQLSchema({
|
||||||
query: QueryType,
|
query: QueryType,
|
||||||
mutation: MutationType
|
mutation: MutationType,
|
||||||
})
|
})
|
||||||
|
|||||||
@ -24,7 +24,7 @@ mkdirp.sync(UPLOAD_DIR)
|
|||||||
* @param {GraphQLUpload} upload GraphQL file upload.
|
* @param {GraphQLUpload} upload GraphQL file upload.
|
||||||
* @returns {object} File metadata.
|
* @returns {object} File metadata.
|
||||||
*/
|
*/
|
||||||
const storeUpload = async upload => {
|
const storeUpload = async (upload) => {
|
||||||
const { createReadStream, filename, mimetype } = await upload
|
const { createReadStream, filename, mimetype } = await upload
|
||||||
const stream = createReadStream()
|
const stream = createReadStream()
|
||||||
const id = shortid.generate()
|
const id = shortid.generate()
|
||||||
@ -41,7 +41,7 @@ const storeUpload = async upload => {
|
|||||||
|
|
||||||
// If there's an error writing the file, remove the partially written file
|
// If there's an error writing the file, remove the partially written file
|
||||||
// and reject the promise.
|
// and reject the promise.
|
||||||
writeStream.on('error', error => {
|
writeStream.on('error', (error) => {
|
||||||
unlink(path, () => {
|
unlink(path, () => {
|
||||||
reject(error)
|
reject(error)
|
||||||
})
|
})
|
||||||
@ -50,16 +50,14 @@ const storeUpload = async upload => {
|
|||||||
// In node <= 13, errors are not automatically propagated between piped
|
// In node <= 13, errors are not automatically propagated between piped
|
||||||
// streams. If there is an error receiving the upload, destroy the write
|
// streams. If there is an error receiving the upload, destroy the write
|
||||||
// stream with the corresponding error.
|
// stream with the corresponding error.
|
||||||
stream.on('error', error => writeStream.destroy(error))
|
stream.on('error', (error) => writeStream.destroy(error))
|
||||||
|
|
||||||
// Pipe the upload into the write stream.
|
// Pipe the upload into the write stream.
|
||||||
stream.pipe(writeStream)
|
stream.pipe(writeStream)
|
||||||
})
|
})
|
||||||
|
|
||||||
// Record the file metadata in the DB.
|
// Record the file metadata in the DB.
|
||||||
db.get('uploads')
|
db.get('uploads').push(file).write()
|
||||||
.push(file)
|
|
||||||
.write()
|
|
||||||
|
|
||||||
return file
|
return file
|
||||||
}
|
}
|
||||||
@ -72,15 +70,15 @@ const server = new ApolloServer({
|
|||||||
// graphql-upload:
|
// graphql-upload:
|
||||||
// https://github.com/jaydenseric/graphql-upload#type-processrequestoptions
|
// https://github.com/jaydenseric/graphql-upload#type-processrequestoptions
|
||||||
maxFileSize: 10000000, // 10 MB
|
maxFileSize: 10000000, // 10 MB
|
||||||
maxFiles: 20
|
maxFiles: 20,
|
||||||
},
|
},
|
||||||
schema,
|
schema,
|
||||||
context: { db, storeUpload }
|
context: { db, storeUpload },
|
||||||
})
|
})
|
||||||
|
|
||||||
server.applyMiddleware({ app })
|
server.applyMiddleware({ app })
|
||||||
|
|
||||||
app.listen(process.env.PORT, error => {
|
app.listen(process.env.PORT, (error) => {
|
||||||
if (error) throw error
|
if (error) throw error
|
||||||
|
|
||||||
console.info(
|
console.info(
|
||||||
|
|||||||
@ -4,7 +4,7 @@ const {
|
|||||||
GraphQLNonNull,
|
GraphQLNonNull,
|
||||||
GraphQLObjectType,
|
GraphQLObjectType,
|
||||||
GraphQLString,
|
GraphQLString,
|
||||||
GraphQLID
|
GraphQLID,
|
||||||
} = require('graphql')
|
} = require('graphql')
|
||||||
|
|
||||||
exports.FileType = new GraphQLObjectType({
|
exports.FileType = new GraphQLObjectType({
|
||||||
@ -13,19 +13,19 @@ exports.FileType = new GraphQLObjectType({
|
|||||||
fields: () => ({
|
fields: () => ({
|
||||||
id: {
|
id: {
|
||||||
description: 'Unique ID.',
|
description: 'Unique ID.',
|
||||||
type: GraphQLNonNull(GraphQLID)
|
type: GraphQLNonNull(GraphQLID),
|
||||||
},
|
},
|
||||||
path: {
|
path: {
|
||||||
description: 'Where it’s stored in the filesystem.',
|
description: 'Where it’s stored in the filesystem.',
|
||||||
type: GraphQLNonNull(GraphQLString)
|
type: GraphQLNonNull(GraphQLString),
|
||||||
},
|
},
|
||||||
filename: {
|
filename: {
|
||||||
description: 'Filename, including extension.',
|
description: 'Filename, including extension.',
|
||||||
type: GraphQLNonNull(GraphQLString)
|
type: GraphQLNonNull(GraphQLString),
|
||||||
},
|
},
|
||||||
mimetype: {
|
mimetype: {
|
||||||
description: 'MIME type.',
|
description: 'MIME type.',
|
||||||
type: GraphQLNonNull(GraphQLString)
|
type: GraphQLNonNull(GraphQLString),
|
||||||
}
|
},
|
||||||
})
|
}),
|
||||||
})
|
})
|
||||||
|
|||||||
@ -14,10 +14,10 @@ exports.MutationType = new GraphQLObjectType({
|
|||||||
args: {
|
args: {
|
||||||
file: {
|
file: {
|
||||||
description: 'File to store.',
|
description: 'File to store.',
|
||||||
type: GraphQLNonNull(GraphQLUpload)
|
type: GraphQLNonNull(GraphQLUpload),
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
resolve: (parent, { file }, { storeUpload }) => storeUpload(file)
|
resolve: (parent, { file }, { storeUpload }) => storeUpload(file),
|
||||||
},
|
},
|
||||||
multipleUpload: {
|
multipleUpload: {
|
||||||
description: 'Stores multiple files.',
|
description: 'Stores multiple files.',
|
||||||
@ -25,8 +25,8 @@ exports.MutationType = new GraphQLObjectType({
|
|||||||
args: {
|
args: {
|
||||||
files: {
|
files: {
|
||||||
description: 'Files to store.',
|
description: 'Files to store.',
|
||||||
type: GraphQLNonNull(GraphQLList(GraphQLNonNull(GraphQLUpload)))
|
type: GraphQLNonNull(GraphQLList(GraphQLNonNull(GraphQLUpload))),
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
async resolve(parent, { files }, { storeUpload }) {
|
async resolve(parent, { files }, { storeUpload }) {
|
||||||
const { resolve, reject } = await promisesAll.all(
|
const { resolve, reject } = await promisesAll.all(
|
||||||
@ -39,7 +39,7 @@ exports.MutationType = new GraphQLObjectType({
|
|||||||
)
|
)
|
||||||
|
|
||||||
return resolve
|
return resolve
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
})
|
}),
|
||||||
})
|
})
|
||||||
|
|||||||
@ -9,7 +9,7 @@ exports.QueryType = new GraphQLObjectType({
|
|||||||
uploads: {
|
uploads: {
|
||||||
description: 'All stored files.',
|
description: 'All stored files.',
|
||||||
type: GraphQLNonNull(GraphQLList(GraphQLNonNull(FileType))),
|
type: GraphQLNonNull(GraphQLList(GraphQLNonNull(FileType))),
|
||||||
resolve: (source, args, { db }) => db.get('uploads').value()
|
resolve: (source, args, { db }) => db.get('uploads').value(),
|
||||||
}
|
},
|
||||||
})
|
}),
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
export const Header = props => (
|
export const Header = (props) => (
|
||||||
<>
|
<>
|
||||||
<header {...props} />
|
<header {...props} />
|
||||||
<style jsx>{`
|
<style jsx>{`
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
export const Section = props => (
|
export const Section = (props) => (
|
||||||
<>
|
<>
|
||||||
<section {...props} />
|
<section {...props} />
|
||||||
<style jsx>{`
|
<style jsx>{`
|
||||||
|
|||||||
@ -21,7 +21,7 @@ export const UploadBlob = () => {
|
|||||||
|
|
||||||
const onNameChange = ({ target: { value } }) => setName(value)
|
const onNameChange = ({ target: { value } }) => setName(value)
|
||||||
const onContentChange = ({ target: { value } }) => setContent(value)
|
const onContentChange = ({ target: { value } }) => setContent(value)
|
||||||
const onSubmit = event => {
|
const onSubmit = (event) => {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|
||||||
const file = new Blob([content], { type: 'text/plain' })
|
const file = new Blob([content], { type: 'text/plain' })
|
||||||
|
|||||||
@ -16,8 +16,8 @@ export const UploadFile = () => {
|
|||||||
const onChange = ({
|
const onChange = ({
|
||||||
target: {
|
target: {
|
||||||
validity,
|
validity,
|
||||||
files: [file]
|
files: [file],
|
||||||
}
|
},
|
||||||
}) =>
|
}) =>
|
||||||
validity.valid &&
|
validity.valid &&
|
||||||
uploadFileMutation({ variables: { file } }).then(() => {
|
uploadFileMutation({ variables: { file } }).then(() => {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
env: {
|
env: {
|
||||||
API_URI: process.env.API_URI
|
API_URI: process.env.API_URI,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
853
app/package-lock.json
generated
853
app/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -23,22 +23,22 @@
|
|||||||
"dotenv-cli": "^3.1.0",
|
"dotenv-cli": "^3.1.0",
|
||||||
"graphql": "^14.6.0",
|
"graphql": "^14.6.0",
|
||||||
"graphql-tag": "^2.10.3",
|
"graphql-tag": "^2.10.3",
|
||||||
"next": "^9.3.0",
|
"next": "^9.3.2",
|
||||||
"react": "^16.13.0",
|
"react": "^16.13.1",
|
||||||
"react-dom": "^16.13.0"
|
"react-dom": "^16.13.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-eslint": "^10.1.0",
|
"babel-eslint": "^10.1.0",
|
||||||
"eslint": "^6.8.0",
|
"eslint": "^6.8.0",
|
||||||
"eslint-config-env": "^13.0.4",
|
"eslint-config-env": "^13.0.4",
|
||||||
"eslint-config-prettier": "^6.10.0",
|
"eslint-config-prettier": "^6.10.1",
|
||||||
"eslint-plugin-import": "^2.20.1",
|
"eslint-plugin-import": "^2.20.2",
|
||||||
"eslint-plugin-jsdoc": "^22.0.1",
|
"eslint-plugin-jsdoc": "^22.1.0",
|
||||||
"eslint-plugin-node": "^11.0.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"eslint-plugin-prettier": "^3.1.2",
|
"eslint-plugin-prettier": "^3.1.2",
|
||||||
"eslint-plugin-react": "^7.19.0",
|
"eslint-plugin-react": "^7.19.0",
|
||||||
"eslint-plugin-react-hooks": "^2.5.0",
|
"eslint-plugin-react-hooks": "^3.0.0",
|
||||||
"prettier": "^1.19.1"
|
"prettier": "^2.0.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "npm run test:eslint && npm run test:prettier",
|
"test": "npm run test:eslint && npm run test:prettier",
|
||||||
|
|||||||
@ -10,14 +10,14 @@ const createApolloClient = (cache = {}) =>
|
|||||||
new ApolloClient({
|
new ApolloClient({
|
||||||
ssrMode: typeof window !== 'undefined',
|
ssrMode: typeof window !== 'undefined',
|
||||||
cache: new InMemoryCache().restore(cache),
|
cache: new InMemoryCache().restore(cache),
|
||||||
link: createUploadLink({ uri: process.env.API_URI })
|
link: createUploadLink({ uri: process.env.API_URI }),
|
||||||
})
|
})
|
||||||
|
|
||||||
const App = ({
|
const App = ({
|
||||||
Component,
|
Component,
|
||||||
pageProps,
|
pageProps,
|
||||||
apolloCache,
|
apolloCache,
|
||||||
apolloClient = createApolloClient(apolloCache)
|
apolloClient = createApolloClient(apolloCache),
|
||||||
}) => (
|
}) => (
|
||||||
<ApolloProvider client={apolloClient}>
|
<ApolloProvider client={apolloClient}>
|
||||||
<Head>
|
<Head>
|
||||||
@ -36,11 +36,11 @@ const App = ({
|
|||||||
</ApolloProvider>
|
</ApolloProvider>
|
||||||
)
|
)
|
||||||
|
|
||||||
App.getInitialProps = async context => {
|
App.getInitialProps = async (context) => {
|
||||||
const props = {
|
const props = {
|
||||||
pageProps: context.Component.getInitialProps
|
pageProps: context.Component.getInitialProps
|
||||||
? await context.Component.getInitialProps(context)
|
? await context.Component.getInitialProps(context)
|
||||||
: {}
|
: {},
|
||||||
}
|
}
|
||||||
|
|
||||||
if (context.ctx.req) {
|
if (context.ctx.req) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user