From 74f6654209ecef0ca031d504e1f12ca6793adc63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Dec 2022 18:50:08 +0000 Subject: [PATCH 1/2] chore(deps): bump qs and formidable Bumps [qs](https://github.com/ljharb/qs) to 6.11.0 and updates ancestor dependency [formidable](https://github.com/node-formidable/formidable). These dependencies need to be updated together. Updates `qs` from 6.9.3 to 6.11.0 - [Release notes](https://github.com/ljharb/qs/releases) - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](https://github.com/ljharb/qs/compare/v6.9.3...v6.11.0) Updates `formidable` from 2.0.1 to 2.1.1 - [Release notes](https://github.com/node-formidable/formidable/releases) - [Changelog](https://github.com/node-formidable/formidable/blob/master/CHANGELOG.md) - [Commits](https://github.com/node-formidable/formidable/commits) --- updated-dependencies: - dependency-name: qs dependency-type: indirect - dependency-name: formidable dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- package-lock.json | 60 +++++++++++++++++------------------------------ package.json | 2 +- 2 files changed, 22 insertions(+), 40 deletions(-) diff --git a/package-lock.json b/package-lock.json index 80b9ac22..cc3acb81 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "apidoc": "^0.50.3", "dompurify": "^2.3.4", "express": "^4.17.2", - "formidable": "^2.0.1", + "formidable": "^2.1.1", "fs-extra": "7.*", "html2canvas": "^1.4.1", "jquery-ui-rotatable": "^1.1.0", @@ -5292,9 +5292,9 @@ "dev": true }, "node_modules/dezalgo": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", - "integrity": "sha512-K7i4zNfT2kgQz3GylDw40ot9GAE47sFZ9EXHFSPP6zONLgH6kWXE0KWJchkbQJLBkRazq4APwZ4OwiFFlT95OQ==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", + "integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==", "dependencies": { "asap": "^2.0.0", "wrappy": "1" @@ -6486,30 +6486,19 @@ } }, "node_modules/formidable": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.0.1.tgz", - "integrity": "sha512-rjTMNbp2BpfQShhFbR3Ruk3qk2y9jKpvMW78nJgx8QKtxjDVrwbZG+wvDOmVbifHyOUOQJXxqEy6r0faRrPzTQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.1.1.tgz", + "integrity": "sha512-0EcS9wCFEzLvfiks7omJ+SiYJAiD+TzK4Pcw1UlUoGnhUxDcMKjt0P7x8wEb0u6OHu8Nb98WG3nxtlF5C7bvUQ==", "dependencies": { - "dezalgo": "1.0.3", - "hexoid": "1.0.0", - "once": "1.4.0", - "qs": "6.9.3" + "dezalgo": "^1.0.4", + "hexoid": "^1.0.0", + "once": "^1.4.0", + "qs": "^6.11.0" }, "funding": { "url": "https://ko-fi.com/tunnckoCore/commissions" } }, - "node_modules/formidable/node_modules/qs": { - "version": "6.9.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.3.tgz", - "integrity": "sha512-EbZYNarm6138UKKq46tdx08Yo/q9ZhFoAXAI1meAFd2GtbRDhbZY2WQSICskT0c5q99aFzLG1D4nvTk9tqfXIw==", - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -17330,9 +17319,9 @@ "dev": true }, "dezalgo": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", - "integrity": "sha512-K7i4zNfT2kgQz3GylDw40ot9GAE47sFZ9EXHFSPP6zONLgH6kWXE0KWJchkbQJLBkRazq4APwZ4OwiFFlT95OQ==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", + "integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==", "requires": { "asap": "^2.0.0", "wrappy": "1" @@ -18120,21 +18109,14 @@ } }, "formidable": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.0.1.tgz", - "integrity": "sha512-rjTMNbp2BpfQShhFbR3Ruk3qk2y9jKpvMW78nJgx8QKtxjDVrwbZG+wvDOmVbifHyOUOQJXxqEy6r0faRrPzTQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.1.1.tgz", + "integrity": "sha512-0EcS9wCFEzLvfiks7omJ+SiYJAiD+TzK4Pcw1UlUoGnhUxDcMKjt0P7x8wEb0u6OHu8Nb98WG3nxtlF5C7bvUQ==", "requires": { - "dezalgo": "1.0.3", - "hexoid": "1.0.0", - "once": "1.4.0", - "qs": "6.9.3" - }, - "dependencies": { - "qs": { - "version": "6.9.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.3.tgz", - "integrity": "sha512-EbZYNarm6138UKKq46tdx08Yo/q9ZhFoAXAI1meAFd2GtbRDhbZY2WQSICskT0c5q99aFzLG1D4nvTk9tqfXIw==" - } + "dezalgo": "^1.0.4", + "hexoid": "^1.0.0", + "once": "^1.4.0", + "qs": "^6.11.0" } }, "forwarded": { diff --git a/package.json b/package.json index 36b2aba7..ae2d387b 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "apidoc": "^0.50.3", "dompurify": "^2.3.4", "express": "^4.17.2", - "formidable": "^2.0.1", + "formidable": "^2.1.1", "fs-extra": "7.*", "html2canvas": "^1.4.1", "jquery-ui-rotatable": "^1.1.0", From eb53561fa353b5963bd67f09ac7b5b5c5d208640 Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 8 Dec 2022 21:50:38 +0100 Subject: [PATCH 2/2] add api health check --- scripts/server-backend.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/server-backend.js b/scripts/server-backend.js index 4ad75014..fa0c3e16 100644 --- a/scripts/server-backend.js +++ b/scripts/server-backend.js @@ -34,6 +34,19 @@ function startBackendServer(port) { app.use(express.static(path.join(__dirname, "..", "dist"))); app.use("/uploads", express.static(path.join(__dirname, "..", "public", "uploads"))); + /** + * @api {get} /api/health Health Check + * @apiDescription This returns nothing but a status code of 200 + * @apiName health + * @apiGroup WhiteboardAPI + * + * @apiSuccess {Number} 200 OK + */ + app.get("/api/health", function (req, res) { + res.status(200); //OK + res.end(); + }); + /** * @api {get} /api/loadwhiteboard Get Whiteboard Data * @apiDescription This returns all the Available Data ever drawn to this Whiteboard