From a56c29dff2011a118f8663a0d67af5b64ae4bf63 Mon Sep 17 00:00:00 2001 From: Max Stevens Date: Tue, 17 Sep 2024 11:53:20 +0200 Subject: [PATCH 1/2] refactor: factor out deprecated promise-mysql lib --- package-lock.json | 310 ++++++++++++++++++++++------------------- package.json | 6 +- scripts/setup-admin.js | 2 - scripts/setup-api.js | 3 +- scripts/setup-auth.js | 3 +- scripts/setup-image.js | 2 - 6 files changed, 168 insertions(+), 158 deletions(-) diff --git a/package-lock.json b/package-lock.json index 83de6c85a..c7026f471 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,11 +18,12 @@ }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", - "prettier": "3.0.3", - "promise-mysql": "^5.2.0" + "mysql2": "^3.11.3", + "prettier": "3.0.3" } }, "apps/admin-server": { + "name": "@openstad-headless/admin-server", "version": "0.1.0", "dependencies": { "@codemirror/lang-javascript": "^6.2.2", @@ -113,30 +114,8 @@ "typescript": "5.1.6" } }, - "apps/admin-server/node_modules/react": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", - "dependencies": { - "loose-envify": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "apps/admin-server/node_modules/react-dom": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", - "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" - }, - "peerDependencies": { - "react": "^18.2.0" - } - }, "apps/api-server": { + "name": "@openstad-headless/api-server", "version": "1.0.0", "license": "ISC", "dependencies": { @@ -162,6 +141,7 @@ "@openstad-headless/simple-voting": "file:../../packages/simple-voting", "@openstad-headless/stem-begroot": "file:../../packages/stem-begroot", "@openstad-headless/ui": "file:../../packages/ui", + "@radix-ui/react-separator": "^1.1.0", "bcrypt": "^5.0.1", "body-parser": "^1.20.2", "co": "^4.6.0", @@ -365,6 +345,7 @@ } }, "apps/auth-server": { + "name": "@openstad-headless/auth-server", "version": "1.0.0", "license": "MIT", "dependencies": { @@ -469,6 +450,7 @@ } }, "apps/cms-server": { + "name": "openstad-frontend", "version": "1.0.0", "license": "MIT", "dependencies": { @@ -524,6 +506,7 @@ } }, "apps/image-server": { + "name": "@openstad-headless/image-server", "version": "1.0.1", "license": "MIT", "dependencies": { @@ -3773,26 +3756,26 @@ "integrity": "sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==" }, "node_modules/@floating-ui/core": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.7.tgz", - "integrity": "sha512-yDzVT/Lm101nQ5TCVeK65LtdN7Tj4Qpr9RTXJ2vPFLqtLxwOrpoxAHAJI8J3yYWUc40J0BDBheaitK5SJmno2g==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.8.tgz", + "integrity": "sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==", "dependencies": { - "@floating-ui/utils": "^0.2.7" + "@floating-ui/utils": "^0.2.8" } }, "node_modules/@floating-ui/dom": { - "version": "1.6.10", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.10.tgz", - "integrity": "sha512-fskgCFv8J8OamCmyun8MfjB1Olfn+uZKjOKZ0vhYF3gRmEUXcGOjxWL8bBr7i4kIuPZ2KD2S3EUIOxnjC8kl2A==", + "version": "1.6.11", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.11.tgz", + "integrity": "sha512-qkMCxSR24v2vGkhYDo/UzxfJN3D4syqSjyuTFz6C7XcpU1pASPRieNI0Kj5VP3/503mOfYiGY891ugBX1GlABQ==", "dependencies": { "@floating-ui/core": "^1.6.0", - "@floating-ui/utils": "^0.2.7" + "@floating-ui/utils": "^0.2.8" } }, "node_modules/@floating-ui/react-dom": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.1.tgz", - "integrity": "sha512-4h84MJt3CHrtG18mGsXuLCHMrug49d7DFkU0RMIyshRveBeyV2hmV/pDaF2Uxtu8kgq5r46llp5E5FQiR0K2Yg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.2.tgz", + "integrity": "sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A==", "dependencies": { "@floating-ui/dom": "^1.0.0" }, @@ -3802,9 +3785,9 @@ } }, "node_modules/@floating-ui/utils": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.7.tgz", - "integrity": "sha512-X8R8Oj771YRl/w+c1HqAC1szL8zWQRwFvgDwT129k9ACdBoud/+/rX9V0qiMl6LWUdP9voC2nDVZYPMQQsb6eA==" + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.8.tgz", + "integrity": "sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==" }, "node_modules/@gar/promisify": { "version": "1.1.3", @@ -9415,12 +9398,6 @@ "node": ">=6.9.0" } }, - "node_modules/@types/bluebird": { - "version": "3.5.42", - "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.42.tgz", - "integrity": "sha512-Jhy+MWRlro6UjVi578V/4ZGNfeCOcNCp0YaFNIUGFKlImowqwb1O/22wDVk3FDGMLqxdpOV3qQHD5fPEH4hK6A==", - "dev": true - }, "node_modules/@types/caseless": { "version": "0.12.5", "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.5.tgz", @@ -9581,15 +9558,6 @@ "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" }, - "node_modules/@types/mysql": { - "version": "2.15.26", - "resolved": "https://registry.npmjs.org/@types/mysql/-/mysql-2.15.26.tgz", - "integrity": "sha512-DSLCOXhkvfS5WNNPbfn2KdICAmk8lLc+/PNvnPnF7gOdMZCxopXduqv0OQ13y/yA/zXTSikZZqVgybUxOEg6YQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/node": { "version": "20.5.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.0.tgz", @@ -10145,14 +10113,62 @@ "vite": "^4.2.0 || ^5.0.0" } }, + "node_modules/@vue/compiler-core": { + "version": "3.5.6", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.6.tgz", + "integrity": "sha512-r+gNu6K4lrvaQLQGmf+1gc41p3FO2OUJyWmNqaIITaJU6YFiV5PtQSFZt8jfztYyARwqhoCayjprC7KMvT3nRA==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@babel/parser": "^7.25.3", + "@vue/shared": "3.5.6", + "entities": "^4.5.0", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.0" + } + }, + "node_modules/@vue/compiler-dom": { + "version": "3.5.6", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.6.tgz", + "integrity": "sha512-xRXqxDrIqK8v8sSScpistyYH0qYqxakpsIvqMD2e5sV/PXQ1mTwtXp4k42yHK06KXxKSmitop9e45Ui/3BrTEw==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@vue/compiler-core": "3.5.6", + "@vue/shared": "3.5.6" + } + }, "node_modules/@vue/compiler-sfc": { - "version": "2.7.15", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.15.tgz", - "integrity": "sha512-FCvIEevPmgCgqFBH7wD+3B97y7u7oj/Wr69zADBf403Tui377bThTjBvekaZvlRr4IwUAu3M6hYZeULZFJbdYg==", + "version": "3.5.6", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.6.tgz", + "integrity": "sha512-pjWJ8Kj9TDHlbF5LywjVso+BIxCY5wVOLhkEXRhuCHDxPFIeX1zaFefKs8RYoHvkSMqRWt93a0f2gNJVJixHwg==", + "dev": true, + "optional": true, + "peer": true, "dependencies": { - "@babel/parser": "^7.18.4", - "postcss": "^8.4.14", - "source-map": "^0.6.1" + "@babel/parser": "^7.25.3", + "@vue/compiler-core": "3.5.6", + "@vue/compiler-dom": "3.5.6", + "@vue/compiler-ssr": "3.5.6", + "@vue/shared": "3.5.6", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.11", + "postcss": "^8.4.47", + "source-map-js": "^1.2.0" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.5.6", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.6.tgz", + "integrity": "sha512-VpWbaZrEOCqnmqjE83xdwegtr5qO/2OPUC6veWgvNqTJ3bYysz6vY3VqMuOijubuUYPRpG3OOKIh9TD0Stxb9A==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@vue/compiler-dom": "3.5.6", + "@vue/shared": "3.5.6" } }, "node_modules/@vue/component-compiler-utils": { @@ -10223,6 +10239,14 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==" }, + "node_modules/@vue/shared": { + "version": "3.5.6", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.6.tgz", + "integrity": "sha512-eidH0HInnL39z6wAt6SFIwBrvGOpDWsDxlw3rCgo1B+CQ1781WzQUSU3YjxgdkcJo9Q8S6LmXTkvI+cLHGkQfA==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/@webassemblyjs/ast": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", @@ -11589,7 +11613,7 @@ "version": "9.0.0", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==", - "devOptional": true, + "optional": true, "engines": { "node": "*" } @@ -20698,6 +20722,20 @@ "yallist": "^3.0.2" } }, + "node_modules/lru.min": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/lru.min/-/lru.min-1.1.0.tgz", + "integrity": "sha512-86xXMB6DiuKrTqkE/lRL0drlNh568awttBPJ7D66fzDHpy6NC5r3N+Ly/lKCS2zjmeGyvFDx670z0cD0PVBwGA==", + "engines": { + "bun": ">=1.0.0", + "deno": ">=1.30.0", + "node": ">=8.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wellwelwel" + } + }, "node_modules/lucide-react": { "version": "0.276.0", "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.276.0.tgz", @@ -22071,56 +22109,17 @@ } ] }, - "node_modules/mysql": { - "version": "2.18.1", - "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz", - "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", - "dev": true, - "dependencies": { - "bignumber.js": "9.0.0", - "readable-stream": "2.3.7", - "safe-buffer": "5.1.2", - "sqlstring": "2.3.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mysql/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/mysql/node_modules/sqlstring": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", - "integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/mysql2": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.11.0.tgz", - "integrity": "sha512-J9phbsXGvTOcRVPR95YedzVSxJecpW5A5+cQ57rhHIFXteTP10HCs+VBjS7DHIKfEaI1zQ5tlVrquCd64A6YvA==", + "version": "3.11.3", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.11.3.tgz", + "integrity": "sha512-Qpu2ADfbKzyLdwC/5d4W7+5Yz7yBzCU05YWt5npWzACST37wJsB23wgOSo00qi043urkiRwXtEvJc9UnuLX/MQ==", "dependencies": { "aws-ssl-profiles": "^1.1.1", "denque": "^2.1.0", "generate-function": "^2.3.1", "iconv-lite": "^0.6.3", "long": "^5.2.1", - "lru-cache": "^8.0.0", + "lru.min": "^1.0.0", "named-placeholders": "^1.1.3", "seq-queue": "^0.0.5", "sqlstring": "^2.3.2" @@ -22140,14 +22139,6 @@ "node": ">=0.10.0" } }, - "node_modules/mysql2/node_modules/lru-cache": { - "version": "8.0.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz", - "integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==", - "engines": { - "node": ">=16.14" - } - }, "node_modules/mz": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", @@ -23642,9 +23633,9 @@ "integrity": "sha512-v+Z7W/0EO707aNMaAEfiGnGL9sxxumwLl2fJvCQtMn9Fxsg+lPpPkdcyBSv/KFgpGdYkMfn+EI1Or2EHjpgLCA==" }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -24087,9 +24078,9 @@ } }, "node_modules/postcss": { - "version": "8.4.41", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.41.tgz", - "integrity": "sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==", + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", "funding": [ { "type": "opencollective", @@ -24106,8 +24097,8 @@ ], "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.1", - "source-map-js": "^1.2.0" + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -24536,18 +24527,6 @@ "dev": true, "optional": true }, - "node_modules/promise-mysql": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/promise-mysql/-/promise-mysql-5.2.0.tgz", - "integrity": "sha512-IKkBe7OukgCpy5U5EZPlgH6BRvnngmP+HwD6PoMNzvGXBYVZkiJ5nx6SY7bo+sgwXsMOVE7zQf6CfS9qaFs2pw==", - "dev": true, - "dependencies": { - "@types/bluebird": "^3.5.26", - "@types/mysql": "^2.15.2", - "bluebird": "^3.5.1", - "mysql": "^2.18.1" - } - }, "node_modules/promise-retry": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", @@ -25159,9 +25138,9 @@ } }, "node_modules/react": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", - "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", "dependencies": { "loose-envify": "^1.1.0" }, @@ -25188,15 +25167,15 @@ } }, "node_modules/react-dom": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", - "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", + "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", "dependencies": { "loose-envify": "^1.1.0", - "scheduler": "^0.23.2" + "scheduler": "^0.23.0" }, "peerDependencies": { - "react": "^18.3.1" + "react": "^18.2.0" } }, "node_modules/react-filepond": { @@ -27078,9 +27057,9 @@ } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "engines": { "node": ">=0.10.0" } @@ -29732,6 +29711,16 @@ "vue": "^2.6 || ^3.2" } }, + "node_modules/vue/node_modules/@vue/compiler-sfc": { + "version": "2.7.15", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.15.tgz", + "integrity": "sha512-FCvIEevPmgCgqFBH7wD+3B97y7u7oj/Wr69zADBf403Tui377bThTjBvekaZvlRr4IwUAu3M6hYZeULZFJbdYg==", + "dependencies": { + "@babel/parser": "^7.18.4", + "postcss": "^8.4.14", + "source-map": "^0.6.1" + } + }, "node_modules/vuedraggable": { "version": "2.24.3", "resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.24.3.tgz", @@ -30474,6 +30463,7 @@ } }, "packages/account": { + "name": "@openstad-headless/account", "version": "0.0.0", "dependencies": { "@openstad-headless/data-store": "file:../data-store", @@ -30514,6 +30504,7 @@ } }, "packages/activity": { + "name": "@openstad-headless/activity", "version": "0.0.0", "dependencies": { "@openstad-headless/data-store": "file:../data-store", @@ -30589,6 +30580,7 @@ } }, "packages/agenda": { + "name": "@openstad-headless/agenda", "version": "0.0.0", "dependencies": { "@openstad-headless/data-store": "file:../data-store", @@ -30664,6 +30656,7 @@ } }, "packages/choiceguide": { + "name": "@openstad-headless/choiceguide", "version": "0.0.0", "dependencies": { "@openstad-headless/data-store": "file:../data-store", @@ -30713,6 +30706,7 @@ "integrity": "sha512-l5aHqZqD9Lbzb8hbDlgVewmdC0sP13GGMwqJpEloR3kkXYI6PZfIQaH2QzgLqHARF0CCjRhaS+lScAmgYjxCQQ==" }, "packages/comments": { + "name": "@openstad-headless/comments", "version": "0.1.0", "dependencies": { "@openstad-headless/data-store": "file:../data-store", @@ -30788,6 +30782,7 @@ } }, "packages/counter": { + "name": "@openstad-headless/counter", "version": "0.0.0", "dependencies": { "@openstad-headless/data-store": "file:../data-store", @@ -30938,6 +30933,7 @@ } }, "packages/data-store": { + "name": "@openstad-headless/data-store", "version": "1.0.0", "dependencies": { "merge": "^2.1.1", @@ -30991,6 +30987,7 @@ } }, "packages/date-countdown-bar": { + "name": "@openstad-headless/date-countdown-bar", "version": "0.0.0", "dependencies": { "@openstad-headless/data-store": "file:../data-store", @@ -31068,6 +31065,7 @@ } }, "packages/document-map": { + "name": "@openstad-headless/document-map", "version": "0.0.0", "dependencies": { "@openstad-headless/comments": "file:../comments", @@ -31145,6 +31143,7 @@ } }, "packages/enquete": { + "name": "@openstad-headless/enquete", "version": "0.0.0", "dependencies": { "@openstad-headless/data-store": "file:../data-store", @@ -31481,6 +31480,7 @@ } }, "packages/footer": { + "name": "@openstad-headless/Footer", "version": "0.0.0", "dependencies": { "@openstad-headless/data-store": "file:../data-store", @@ -31555,6 +31555,7 @@ } }, "packages/form": { + "name": "@openstad-headless/form", "version": "0.0.0", "dependencies": { "@openstad-headless/data-store": "file:../data-store", @@ -31604,6 +31605,7 @@ "integrity": "sha512-l5aHqZqD9Lbzb8hbDlgVewmdC0sP13GGMwqJpEloR3kkXYI6PZfIQaH2QzgLqHARF0CCjRhaS+lScAmgYjxCQQ==" }, "packages/leaflet-map": { + "name": "@openstad-headless/leaflet-map", "version": "0.0.0", "dependencies": { "@openstad-headless/data-store": "file:../data-store", @@ -31684,6 +31686,7 @@ } }, "packages/lib": { + "name": "@openstad-headless/lib", "version": "1.0.0", "license": "ISC", "peerDependencies": { @@ -31692,6 +31695,7 @@ } }, "packages/likes": { + "name": "@openstad-headless/likes", "version": "0.0.0", "dependencies": { "@openstad-headless/data-store": "file:../data-store", @@ -31796,6 +31800,7 @@ } }, "packages/navBar": { + "name": "@openstad-headless/navBar", "version": "0.0.0", "dependencies": { "@openstad-headless/data-store": "file:../data-store", @@ -31870,6 +31875,7 @@ } }, "packages/raw-resource": { + "name": "@openstad-headless/raw-resource", "version": "0.0.0", "dependencies": { "@openstad-headless/data-store": "file:../data-store", @@ -32105,6 +32111,7 @@ } }, "packages/resource-detail": { + "name": "@openstad-headless/resource-detail", "version": "0.0.0", "dependencies": { "@openstad-headless/comments": "file:../comments", @@ -32134,6 +32141,7 @@ } }, "packages/resource-detail-with-map": { + "name": "@openstad-headless/resource-detail-with-map", "version": "0.0.0", "dependencies": { "@openstad-headless/comments": "file:../comments", @@ -32401,6 +32409,7 @@ } }, "packages/resource-form": { + "name": "@openstad-headless/resource-form", "version": "0.0.0", "dependencies": { "@openstad-headless/data-store": "file:../data-store", @@ -32450,6 +32459,7 @@ "integrity": "sha512-l5aHqZqD9Lbzb8hbDlgVewmdC0sP13GGMwqJpEloR3kkXYI6PZfIQaH2QzgLqHARF0CCjRhaS+lScAmgYjxCQQ==" }, "packages/resource-overview": { + "name": "@openstad-headless/resource-overview", "version": "0.0.0", "dependencies": { "@openstad-headless/data-store": "file:../data-store", @@ -32482,6 +32492,7 @@ } }, "packages/resource-overview-with-map": { + "name": "@openstad-headless/resource-overview-with-map", "version": "0.0.0", "dependencies": { "@openstad-headless/data-store": "file:../data-store", @@ -32628,6 +32639,7 @@ } }, "packages/simple-voting": { + "name": "@openstad-headless/simple-voting", "version": "0.0.0", "dependencies": { "@openstad-headless/data-store": "file:../data-store", @@ -32702,6 +32714,7 @@ } }, "packages/stem-begroot": { + "name": "@openstad-headless/stem-begroot", "version": "0.0.0", "dependencies": { "@openstad-headless/data-store": "file:../data-store", @@ -32776,6 +32789,7 @@ } }, "packages/types": { + "name": "@openstad-headless/types", "version": "1.0.0", "license": "ISC", "peerDependencies": { @@ -32784,14 +32798,17 @@ } }, "packages/ui": { + "name": "@openstad-headless/ui", "version": "1.0.0", "license": "ISC", "dependencies": { "@radix-ui/colors": "^3.0.0", "@radix-ui/react-dialog": "^1.0.5", "@radix-ui/react-dropdown-menu": "^2.0.6", + "clsx": "^2.1.1", "html-to-react": "^1.7.0", - "remixicon": "^3.5.0" + "remixicon": "^3.5.0", + "tailwind-merge": "^1.14.0" }, "devDependencies": { "@rollup/plugin-commonjs": "^25.0.7", @@ -32804,8 +32821,8 @@ "typescript": "^5.2.2" }, "peerDependencies": { - "react": "^18.2.0", - "react-dom": "^18.2.0" + "react": "18.2.0", + "react-dom": "18.2.0" } }, "packages/ui/node_modules/@utrecht/component-library-react": { @@ -32840,7 +32857,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", - "dev": true, "engines": { "node": ">=6" } diff --git a/package.json b/package.json index 21a8fb9ee..c560004ad 100644 --- a/package.json +++ b/package.json @@ -27,11 +27,11 @@ "private": true, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", - "prettier": "3.0.3", - "promise-mysql": "^5.2.0" + "mysql2": "^3.11.3", + "prettier": "3.0.3" }, "dependencies": { "react-leaflet": "^4.2.1", "uuid": "^10.0.0" } -} \ No newline at end of file +} diff --git a/scripts/setup-admin.js b/scripts/setup-admin.js index eb76d4006..b9c7b70cd 100644 --- a/scripts/setup-admin.js +++ b/scripts/setup-admin.js @@ -1,6 +1,4 @@ const fs = require('fs'); -const util = require('util'); -const imgDb = require('promise-mysql'); const execute = require('./execute'); module.exports = async function setupAdminServer(actions) { diff --git a/scripts/setup-api.js b/scripts/setup-api.js index b12bfeb04..c2b56886f 100644 --- a/scripts/setup-api.js +++ b/scripts/setup-api.js @@ -1,6 +1,5 @@ const fs = require('fs'); -const util = require('util'); -const apiDb = require('promise-mysql'); +const apiDb = require('mysql2/promise'); const execute = require('./execute'); module.exports = async function setupApi(actions) { diff --git a/scripts/setup-auth.js b/scripts/setup-auth.js index 9cb7173f8..a79cd815e 100644 --- a/scripts/setup-auth.js +++ b/scripts/setup-auth.js @@ -1,6 +1,5 @@ const fs = require('fs').promises; -const util = require('util'); -const authDb = require('promise-mysql'); +const authDb = require('mysql2/promise'); const execute = require('./execute'); module.exports = async function setupAuthServer(actions) { diff --git a/scripts/setup-image.js b/scripts/setup-image.js index 161adab82..52f68b64d 100644 --- a/scripts/setup-image.js +++ b/scripts/setup-image.js @@ -1,6 +1,4 @@ const fs = require('fs'); -const util = require('util'); -const imgDb = require('promise-mysql'); const execute = require('./execute'); module.exports = async function setupImageServer(actions) { From 13d6b760055513885e37724c22ee9bb377c621a3 Mon Sep 17 00:00:00 2001 From: Max Stevens Date: Tue, 17 Sep 2024 12:03:25 +0200 Subject: [PATCH 2/2] update package-lock to be in line with all updated deps --- package-lock.json | 102 ++++++++++------------------------------------ 1 file changed, 21 insertions(+), 81 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3cc83f137..e11a2fcd6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,8 +18,8 @@ }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", - "prettier": "3.0.3", - "promise-mysql": "^5.2.0" + "mysql2": "^3.11.3", + "prettier": "3.0.3" } }, "apps/admin-server": { @@ -9398,12 +9398,6 @@ "node": ">=6.9.0" } }, - "node_modules/@types/bluebird": { - "version": "3.5.42", - "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.42.tgz", - "integrity": "sha512-Jhy+MWRlro6UjVi578V/4ZGNfeCOcNCp0YaFNIUGFKlImowqwb1O/22wDVk3FDGMLqxdpOV3qQHD5fPEH4hK6A==", - "dev": true - }, "node_modules/@types/caseless": { "version": "0.12.5", "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.5.tgz", @@ -9564,15 +9558,6 @@ "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" }, - "node_modules/@types/mysql": { - "version": "2.15.26", - "resolved": "https://registry.npmjs.org/@types/mysql/-/mysql-2.15.26.tgz", - "integrity": "sha512-DSLCOXhkvfS5WNNPbfn2KdICAmk8lLc+/PNvnPnF7gOdMZCxopXduqv0OQ13y/yA/zXTSikZZqVgybUxOEg6YQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/node": { "version": "20.5.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.0.tgz", @@ -11646,7 +11631,7 @@ "version": "9.0.0", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==", - "devOptional": true, + "optional": true, "engines": { "node": "*" } @@ -20815,6 +20800,20 @@ "yallist": "^3.0.2" } }, + "node_modules/lru.min": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/lru.min/-/lru.min-1.1.0.tgz", + "integrity": "sha512-86xXMB6DiuKrTqkE/lRL0drlNh568awttBPJ7D66fzDHpy6NC5r3N+Ly/lKCS2zjmeGyvFDx670z0cD0PVBwGA==", + "engines": { + "bun": ">=1.0.0", + "deno": ">=1.30.0", + "node": ">=8.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wellwelwel" + } + }, "node_modules/lucide-react": { "version": "0.276.0", "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.276.0.tgz", @@ -22196,56 +22195,17 @@ } ] }, - "node_modules/mysql": { - "version": "2.18.1", - "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz", - "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", - "dev": true, - "dependencies": { - "bignumber.js": "9.0.0", - "readable-stream": "2.3.7", - "safe-buffer": "5.1.2", - "sqlstring": "2.3.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mysql/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/mysql/node_modules/sqlstring": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", - "integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/mysql2": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.11.0.tgz", - "integrity": "sha512-J9phbsXGvTOcRVPR95YedzVSxJecpW5A5+cQ57rhHIFXteTP10HCs+VBjS7DHIKfEaI1zQ5tlVrquCd64A6YvA==", + "version": "3.11.3", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.11.3.tgz", + "integrity": "sha512-Qpu2ADfbKzyLdwC/5d4W7+5Yz7yBzCU05YWt5npWzACST37wJsB23wgOSo00qi043urkiRwXtEvJc9UnuLX/MQ==", "dependencies": { "aws-ssl-profiles": "^1.1.1", "denque": "^2.1.0", "generate-function": "^2.3.1", "iconv-lite": "^0.6.3", "long": "^5.2.1", - "lru-cache": "^8.0.0", + "lru.min": "^1.0.0", "named-placeholders": "^1.1.3", "seq-queue": "^0.0.5", "sqlstring": "^2.3.2" @@ -22265,14 +22225,6 @@ "node": ">=0.10.0" } }, - "node_modules/mysql2/node_modules/lru-cache": { - "version": "8.0.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz", - "integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==", - "engines": { - "node": ">=16.14" - } - }, "node_modules/mz": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", @@ -24661,18 +24613,6 @@ "dev": true, "optional": true }, - "node_modules/promise-mysql": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/promise-mysql/-/promise-mysql-5.2.0.tgz", - "integrity": "sha512-IKkBe7OukgCpy5U5EZPlgH6BRvnngmP+HwD6PoMNzvGXBYVZkiJ5nx6SY7bo+sgwXsMOVE7zQf6CfS9qaFs2pw==", - "dev": true, - "dependencies": { - "@types/bluebird": "^3.5.26", - "@types/mysql": "^2.15.2", - "bluebird": "^3.5.1", - "mysql": "^2.18.1" - } - }, "node_modules/promise-retry": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz",