diff --git a/CHANGELOG.md b/CHANGELOG.md index 6239ecbfd..96c0869e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 2.5.0 + +### Notable enhancements and fixes +- Updated to express 5.0.0. This is a major update to express that brings a lot of improvements and fixes. + # 2.4.2 ### Notable enhancements and fixes diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 798131ad8..a37bbb9a1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -162,11 +162,11 @@ importers: specifier: ^0.25.8 version: 0.25.8 express: - specifier: 4.21.2 - version: 4.21.2 + specifier: ^5.1.0 + version: 5.1.0 express-rate-limit: - specifier: ^8.0.0 - version: 8.0.1(express@4.21.2) + specifier: ^8.0.1 + version: 8.0.1(express@5.1.0) express-session: specifier: ^1.18.2 version: 1.18.2 @@ -262,7 +262,7 @@ importers: version: 10.2.2 swagger-ui-express: specifier: ^5.0.1 - version: 5.0.1(express@4.21.2) + version: 5.0.1(express@5.1.0) tinycon: specifier: 0.6.8 version: 0.6.8 @@ -290,10 +290,10 @@ importers: version: 3.2.24 '@types/cookie-parser': specifier: ^1.4.9 - version: 1.4.9(@types/express@4.17.21) + version: 1.4.9(@types/express@5.0.3) '@types/express': - specifier: ^4.17.21 - version: 4.17.21 + specifier: ^5.0.0 + version: 5.0.3 '@types/express-session': specifier: ^1.18.2 version: 1.18.2 @@ -1576,14 +1576,14 @@ packages: '@types/estree@1.0.8': resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} - '@types/express-serve-static-core@4.19.6': - resolution: {integrity: sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==} + '@types/express-serve-static-core@5.0.7': + resolution: {integrity: sha512-R+33OsgWw7rOhD1emjU7dzCDHucJrgJXMA5PYCzJxVil0dsyx5iBEPHqpPfiKNJQb7lZ1vxwoLR4Z87bBUpeGQ==} '@types/express-session@1.18.2': resolution: {integrity: sha512-k+I0BxwVXsnEU2hV77cCobC08kIsn4y44C3gC0b46uxZVMaXA04lSPgRLR/bSL2w0t0ShJiG8o4jPzRG/nscFg==} - '@types/express@4.17.21': - resolution: {integrity: sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==} + '@types/express@5.0.3': + resolution: {integrity: sha512-wGA0NX93b19/dZC1J18tKWVIYWyyF2ZjT9vin/NRu0qzzvfVzWjs04iq2rQ3H65vCTQYlRqs3YHfY7zjdV+9Kw==} '@types/formidable@3.4.5': resolution: {integrity: sha512-s7YPsNVfnsng5L8sKnG/Gbb2tiwwJTY1conOkJzTMRvJAlLFW1nEua+ADsJQu8N1c0oTHx9+d5nqg10WuT9gHQ==} @@ -2052,6 +2052,10 @@ packages: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} + accepts@2.0.0: + resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==} + engines: {node: '>= 0.6'} + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -2115,9 +2119,6 @@ packages: resolution: {integrity: sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==} engines: {node: '>= 0.4'} - array-flatten@1.1.1: - resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} - array-includes@3.1.8: resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==} engines: {node: '>= 0.4'} @@ -2197,9 +2198,9 @@ packages: birpc@2.5.0: resolution: {integrity: sha512-VSWO/W6nNQdyP520F1mhf+Lc2f8pjGQOtoHHm7Ze8Go1kX7akpVIrtTa0fn+HB0QJEDVacl6aO08YE0PgXfdnQ==} - body-parser@1.20.3: - resolution: {integrity: sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==} - engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + body-parser@2.2.0: + resolution: {integrity: sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==} + engines: {node: '>=18'} brace-expansion@1.1.12: resolution: {integrity: sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==} @@ -2325,6 +2326,10 @@ packages: resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} engines: {node: '>= 0.6'} + content-disposition@1.0.0: + resolution: {integrity: sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==} + engines: {node: '>= 0.6'} + content-type@1.0.5: resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} engines: {node: '>= 0.6'} @@ -2342,9 +2347,9 @@ packages: cookie-signature@1.0.7: resolution: {integrity: sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==} - cookie@0.7.1: - resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==} - engines: {node: '>= 0.6'} + cookie-signature@1.2.2: + resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==} + engines: {node: '>=6.6.0'} cookie@0.7.2: resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} @@ -2567,10 +2572,6 @@ packages: emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - encodeurl@1.0.2: - resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} - engines: {node: '>= 0.8'} - encodeurl@2.0.0: resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} engines: {node: '>= 0.8'} @@ -2860,9 +2861,9 @@ packages: resolution: {integrity: sha512-SZjssGQC7TzTs9rpPDuUrR23GNZ9+2+IkA/+IJWmvQilTr5OSliEHGF+D9scbIpdC6yGtTI0/VhaHoVes2AN/A==} engines: {node: '>= 0.8.0'} - express@4.21.2: - resolution: {integrity: sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==} - engines: {node: '>= 0.10.0'} + express@5.1.0: + resolution: {integrity: sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==} + engines: {node: '>= 18'} extend@3.0.2: resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} @@ -2916,8 +2917,8 @@ packages: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} - finalhandler@1.3.1: - resolution: {integrity: sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==} + finalhandler@2.1.0: + resolution: {integrity: sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==} engines: {node: '>= 0.8'} find-root@1.1.0: @@ -2982,6 +2983,10 @@ packages: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} + fresh@2.0.0: + resolution: {integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==} + engines: {node: '>= 0.8'} + fs-extra@10.1.0: resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} engines: {node: '>=12'} @@ -3193,10 +3198,6 @@ packages: typescript: optional: true - iconv-lite@0.4.24: - resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} - engines: {node: '>=0.10.0'} - iconv-lite@0.6.3: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} @@ -3328,6 +3329,9 @@ packages: is-promise@1.0.1: resolution: {integrity: sha512-mjWH5XxnhMA8cFnDchr6qRP9S/kLntKuEfIYku+PaN1CnS8v+OG9O/BKpRCVRJvpIkgAZm0Pf5Is3iSSOILlcg==} + is-promise@4.0.0: + resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} + is-regex@1.2.1: resolution: {integrity: sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==} engines: {node: '>= 0.4'} @@ -3601,16 +3605,13 @@ packages: resolution: {integrity: sha512-SIzGtX1WGDvR59FqcJaGEAqDueBvLBh6W4T/gQaHr5ufcqvQkUHGcfQhlmq77mkeF5Mo+UpD+8hm69CwUVibGw==} engines: {node: '>= 5.12'} - media-typer@0.3.0: - resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} - engines: {node: '>= 0.6'} - media-typer@1.1.0: resolution: {integrity: sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==} engines: {node: '>= 0.8'} - merge-descriptors@1.0.3: - resolution: {integrity: sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==} + merge-descriptors@2.0.0: + resolution: {integrity: sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==} + engines: {node: '>=18'} merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} @@ -3655,11 +3656,6 @@ packages: resolution: {integrity: sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==} engines: {node: '>= 0.6'} - mime@1.6.0: - resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} - engines: {node: '>=4'} - hasBin: true - mime@2.6.0: resolution: {integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==} engines: {node: '>=4.0.0'} @@ -3744,6 +3740,10 @@ packages: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} + negotiator@1.0.0: + resolution: {integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==} + engines: {node: '>= 0.6'} + netmask@2.0.2: resolution: {integrity: sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==} engines: {node: '>= 0.4.0'} @@ -3905,12 +3905,13 @@ packages: resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} engines: {node: '>=16 || 14 >=14.18'} - path-to-regexp@0.1.12: - resolution: {integrity: sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==} - path-to-regexp@6.3.0: resolution: {integrity: sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==} + path-to-regexp@8.2.0: + resolution: {integrity: sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==} + engines: {node: '>=16'} + path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -3983,10 +3984,6 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} - qs@6.13.0: - resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} - engines: {node: '>=0.6'} - qs@6.14.0: resolution: {integrity: sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==} engines: {node: '>=0.6'} @@ -4015,10 +4012,6 @@ packages: rate-limiter-flexible@7.1.1: resolution: {integrity: sha512-lsYRcqRSJrKBNt6pMzBJTiCJP5KnwsGWdObMZxd19JFUJRntM+yuHs4/2bs6NZweSLgpsDcykvzyQaumoslWQg==} - raw-body@2.5.2: - resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} - engines: {node: '>= 0.8'} - raw-body@3.0.0: resolution: {integrity: sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==} engines: {node: '>= 0.8'} @@ -4170,6 +4163,10 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + router@2.2.0: + resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==} + engines: {node: '>= 18'} + rrweb-cssom@0.8.0: resolution: {integrity: sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==} @@ -4277,16 +4274,16 @@ packages: engines: {node: '>=10'} hasBin: true - send@0.19.0: - resolution: {integrity: sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==} - engines: {node: '>= 0.8.0'} + send@1.2.0: + resolution: {integrity: sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==} + engines: {node: '>= 18'} serialize-javascript@6.0.2: resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} - serve-static@1.16.2: - resolution: {integrity: sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==} - engines: {node: '>= 0.8.0'} + serve-static@2.2.0: + resolution: {integrity: sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==} + engines: {node: '>= 18'} set-cookie-parser@2.7.1: resolution: {integrity: sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==} @@ -4618,10 +4615,6 @@ packages: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} - type-is@1.6.18: - resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} - engines: {node: '>= 0.6'} - type-is@2.0.1: resolution: {integrity: sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==} engines: {node: '>= 0.6'} @@ -4734,10 +4727,6 @@ packages: '@types/react': optional: true - utils-merge@1.0.1: - resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} - engines: {node: '>= 0.4.0'} - vary@1.1.2: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} @@ -5987,16 +5976,16 @@ snapshots: '@types/content-disposition@0.5.9': {} - '@types/cookie-parser@1.4.9(@types/express@4.17.21)': + '@types/cookie-parser@1.4.9(@types/express@5.0.3)': dependencies: - '@types/express': 4.17.21 + '@types/express': 5.0.3 '@types/cookiejar@2.1.5': {} '@types/cookies@0.9.1': dependencies: '@types/connect': 3.4.38 - '@types/express': 4.17.21 + '@types/express': 5.0.3 '@types/keygrip': 1.0.6 '@types/node': 24.1.0 @@ -6014,7 +6003,7 @@ snapshots: '@types/estree@1.0.8': {} - '@types/express-serve-static-core@4.19.6': + '@types/express-serve-static-core@5.0.7': dependencies: '@types/node': 24.1.0 '@types/qs': 6.9.18 @@ -6023,13 +6012,12 @@ snapshots: '@types/express-session@1.18.2': dependencies: - '@types/express': 4.17.21 + '@types/express': 5.0.3 - '@types/express@4.17.21': + '@types/express@5.0.3': dependencies: '@types/body-parser': 1.19.5 - '@types/express-serve-static-core': 4.19.6 - '@types/qs': 6.9.18 + '@types/express-serve-static-core': 5.0.7 '@types/serve-static': 1.15.7 '@types/formidable@3.4.5': @@ -6164,7 +6152,7 @@ snapshots: '@types/swagger-ui-express@4.1.8': dependencies: - '@types/express': 4.17.21 + '@types/express': 5.0.3 '@types/serve-static': 1.15.7 '@types/tar@6.1.13': @@ -6563,6 +6551,11 @@ snapshots: mime-types: 2.1.35 negotiator: 0.6.3 + accepts@2.0.0: + dependencies: + mime-types: 3.0.1 + negotiator: 1.0.0 + acorn-jsx@5.3.2(acorn@8.15.0): dependencies: acorn: 8.15.0 @@ -6617,8 +6610,6 @@ snapshots: call-bound: 1.0.4 is-array-buffer: 3.0.5 - array-flatten@1.1.1: {} - array-includes@3.1.8: dependencies: call-bind: 1.0.8 @@ -6706,20 +6697,17 @@ snapshots: birpc@2.5.0: {} - body-parser@1.20.3: + body-parser@2.2.0: dependencies: bytes: 3.1.2 content-type: 1.0.5 - debug: 2.6.9 - depd: 2.0.0 - destroy: 1.2.0 + debug: 4.4.1(supports-color@8.1.1) http-errors: 2.0.0 - iconv-lite: 0.4.24 + iconv-lite: 0.6.3 on-finished: 2.4.1 - qs: 6.13.0 - raw-body: 2.5.2 - type-is: 1.6.18 - unpipe: 1.0.0 + qs: 6.14.0 + raw-body: 3.0.0 + type-is: 2.0.1 transitivePeerDependencies: - supports-color @@ -6850,6 +6838,10 @@ snapshots: dependencies: safe-buffer: 5.2.1 + content-disposition@1.0.0: + dependencies: + safe-buffer: 5.2.1 + content-type@1.0.5: {} convert-source-map@2.0.0: {} @@ -6863,7 +6855,7 @@ snapshots: cookie-signature@1.0.7: {} - cookie@0.7.1: {} + cookie-signature@1.2.2: {} cookie@0.7.2: {} @@ -7052,8 +7044,6 @@ snapshots: emoji-regex@9.2.2: {} - encodeurl@1.0.2: {} - encodeurl@2.0.0: {} engine.io-client@6.6.3: @@ -7495,9 +7485,9 @@ snapshots: expect-type@1.2.1: {} - express-rate-limit@8.0.1(express@4.21.2): + express-rate-limit@8.0.1(express@5.1.0): dependencies: - express: 4.21.2 + express: 5.1.0 ip-address: 10.0.1 express-session@1.18.2: @@ -7513,38 +7503,34 @@ snapshots: transitivePeerDependencies: - supports-color - express@4.21.2: + express@5.1.0: dependencies: - accepts: 1.3.8 - array-flatten: 1.1.1 - body-parser: 1.20.3 - content-disposition: 0.5.4 + accepts: 2.0.0 + body-parser: 2.2.0 + content-disposition: 1.0.0 content-type: 1.0.5 - cookie: 0.7.1 - cookie-signature: 1.0.6 - debug: 2.6.9 - depd: 2.0.0 + cookie: 0.7.2 + cookie-signature: 1.2.2 + debug: 4.4.1(supports-color@8.1.1) encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 - finalhandler: 1.3.1 - fresh: 0.5.2 + finalhandler: 2.1.0 + fresh: 2.0.0 http-errors: 2.0.0 - merge-descriptors: 1.0.3 - methods: 1.1.2 + merge-descriptors: 2.0.0 + mime-types: 3.0.1 on-finished: 2.4.1 + once: 1.4.0 parseurl: 1.3.3 - path-to-regexp: 0.1.12 proxy-addr: 2.0.7 - qs: 6.13.0 + qs: 6.14.0 range-parser: 1.2.1 - safe-buffer: 5.2.1 - send: 0.19.0 - serve-static: 1.16.2 - setprototypeof: 1.2.0 - statuses: 2.0.1 - type-is: 1.6.18 - utils-merge: 1.0.1 + router: 2.2.0 + send: 1.2.0 + serve-static: 2.2.0 + statuses: 2.0.2 + type-is: 2.0.1 vary: 1.1.2 transitivePeerDependencies: - supports-color @@ -7598,15 +7584,14 @@ snapshots: dependencies: to-regex-range: 5.0.1 - finalhandler@1.3.1: + finalhandler@2.1.0: dependencies: - debug: 2.6.9 + debug: 4.4.1(supports-color@8.1.1) encodeurl: 2.0.0 escape-html: 1.0.3 on-finished: 2.4.1 parseurl: 1.3.3 - statuses: 2.0.1 - unpipe: 1.0.0 + statuses: 2.0.2 transitivePeerDependencies: - supports-color @@ -7671,6 +7656,8 @@ snapshots: fresh@0.5.2: {} + fresh@2.0.0: {} + fs-extra@10.1.0: dependencies: graceful-fs: 4.2.11 @@ -7947,10 +7934,6 @@ snapshots: optionalDependencies: typescript: 5.8.3 - iconv-lite@0.4.24: - dependencies: - safer-buffer: 2.1.2 - iconv-lite@0.6.3: dependencies: safer-buffer: 2.1.2 @@ -8073,6 +8056,8 @@ snapshots: is-promise@1.0.1: {} + is-promise@4.0.0: {} + is-regex@1.2.1: dependencies: call-bound: 1.0.4 @@ -8395,11 +8380,9 @@ snapshots: binary-search: 1.3.6 optional-js: 2.3.0 - media-typer@0.3.0: {} - media-typer@1.1.0: {} - merge-descriptors@1.0.3: {} + merge-descriptors@2.0.0: {} merge2@1.4.1: {} @@ -8439,8 +8422,6 @@ snapshots: dependencies: mime-db: 1.54.0 - mime@1.6.0: {} - mime@2.6.0: {} minimatch@3.1.2: @@ -8519,6 +8500,8 @@ snapshots: negotiator@0.6.3: {} + negotiator@1.0.0: {} + netmask@2.0.2: {} no-case@3.0.4: @@ -8722,10 +8705,10 @@ snapshots: lru-cache: 10.4.3 minipass: 7.1.2 - path-to-regexp@0.1.12: {} - path-to-regexp@6.3.0: {} + path-to-regexp@8.2.0: {} + path-type@4.0.0: {} pathe@2.0.3: {} @@ -8788,10 +8771,6 @@ snapshots: punycode@2.3.1: {} - qs@6.13.0: - dependencies: - side-channel: 1.1.0 - qs@6.14.0: dependencies: side-channel: 1.1.0 @@ -8812,13 +8791,6 @@ snapshots: rate-limiter-flexible@7.1.1: {} - raw-body@2.5.2: - dependencies: - bytes: 3.1.2 - http-errors: 2.0.0 - iconv-lite: 0.4.24 - unpipe: 1.0.0 - raw-body@3.0.0: dependencies: bytes: 3.1.2 @@ -8992,6 +8964,16 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.40.1 fsevents: 2.3.3 + router@2.2.0: + dependencies: + debug: 4.4.1(supports-color@8.1.1) + depd: 2.0.0 + is-promise: 4.0.0 + parseurl: 1.3.3 + path-to-regexp: 8.2.0 + transitivePeerDependencies: + - supports-color + rrweb-cssom@0.8.0: {} run-parallel@1.2.0: @@ -9076,21 +9058,19 @@ snapshots: semver@7.7.2: {} - send@0.19.0: + send@1.2.0: dependencies: - debug: 2.6.9 - depd: 2.0.0 - destroy: 1.2.0 - encodeurl: 1.0.2 + debug: 4.4.1(supports-color@8.1.1) + encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 - fresh: 0.5.2 + fresh: 2.0.0 http-errors: 2.0.0 - mime: 1.6.0 + mime-types: 3.0.1 ms: 2.1.3 on-finished: 2.4.1 range-parser: 1.2.1 - statuses: 2.0.1 + statuses: 2.0.2 transitivePeerDependencies: - supports-color @@ -9098,12 +9078,12 @@ snapshots: dependencies: randombytes: 2.1.0 - serve-static@1.16.2: + serve-static@2.2.0: dependencies: encodeurl: 2.0.0 escape-html: 1.0.3 parseurl: 1.3.3 - send: 0.19.0 + send: 1.2.0 transitivePeerDependencies: - supports-color @@ -9401,9 +9381,9 @@ snapshots: dependencies: '@scarf/scarf': 1.4.0 - swagger-ui-express@5.0.1(express@4.21.2): + swagger-ui-express@5.0.1(express@5.1.0): dependencies: - express: 4.21.2 + express: 5.1.0 swagger-ui-dist: 5.20.6 symbol-tree@3.2.4: {} @@ -9496,11 +9476,6 @@ snapshots: type-fest@0.20.2: {} - type-is@1.6.18: - dependencies: - media-typer: 0.3.0 - mime-types: 2.1.35 - type-is@2.0.1: dependencies: content-type: 1.0.5 @@ -9645,8 +9620,6 @@ snapshots: optionalDependencies: '@types/react': 19.1.8 - utils-merge@1.0.1: {} - vary@1.1.2: {} vfile-location@5.0.3: diff --git a/src/ep.json b/src/ep.json index 83dfc509d..355a9e0b0 100644 --- a/src/ep.json +++ b/src/ep.json @@ -96,12 +96,6 @@ "socketio": "ep_etherpad-lite/node/handler/PadMessageHandler" } }, - { - "name": "tests", - "hooks": { - "expressPreSession": "ep_etherpad-lite/node/hooks/express/tests" - } - }, { "name": "admin", "hooks": { diff --git a/src/node/hooks/express/admin.ts b/src/node/hooks/express/admin.ts index ceefb0155..66f02699a 100644 --- a/src/node/hooks/express/admin.ts +++ b/src/node/hooks/express/admin.ts @@ -22,7 +22,7 @@ exports.expressCreateServer = (hookName: string, args: ArgsExpressType, cb: Func console.error('admin template not found, skipping admin interface. You need to rebuild it in /admin with pnpm run build-copy') return cb(); } - args.app.get('/admin/*', (req: any, res: any) => { + args.app.get('/admin/{*filename}', (req: any, res: any) => { // extract URL path let pathname = path.join(ADMIN_PATH, req.url); pathname = path.normalize(pathname) diff --git a/src/node/hooks/express/importexport.ts b/src/node/hooks/express/importexport.ts index 898606e49..3a361d005 100644 --- a/src/node/hooks/express/importexport.ts +++ b/src/node/hooks/express/importexport.ts @@ -25,8 +25,8 @@ exports.expressCreateServer = (hookName:string, args:ArgsExpressType, cb:Functio }); // handle export requests - args.app.use('/p/:pad/:rev?/export/:type', limiter); - args.app.get('/p/:pad/:rev?/export/:type', (req:any, res:any, next:Function) => { + args.app.use('/p/:pad{/:rev}/export/:type', limiter); + args.app.get('/p/:pad{/:rev}/export/:type', (req:any, res:any, next:Function) => { (async () => { const types = ['pdf', 'doc', 'txt', 'html', 'odt', 'etherpad']; // send a 404 if we don't support this filetype diff --git a/src/node/hooks/express/static.ts b/src/node/hooks/express/static.ts index 07a7f3a21..f83bb382a 100644 --- a/src/node/hooks/express/static.ts +++ b/src/node/hooks/express/static.ts @@ -6,6 +6,7 @@ import {PartType} from "../../types/PartType"; const fs = require('fs').promises; import {minify} from '../../utils/Minify'; import path from 'node:path'; +import {ArgsExpressType} from "../../types/ArgsExpressType"; const plugins = require('../../../static/js/pluginfw/plugin_defs'); const settings = require('../../utils/Settings'); @@ -30,16 +31,16 @@ const getTar = async () => { return tar; }; -exports.expressPreSession = async (hookName:string, {app}:any) => { +exports.expressPreSession = async (hookName:string, {app}:ArgsExpressType) => { // Minify will serve static files compressed (minify enabled). It also has // file-specific hacks for ace/require-kernel/etc. - app.all('/static/:filename(*)', minify); + app.all('/static/*filename', minify); // serve plugin definitions // not very static, but served here so that client can do // require("pluginfw/static/js/plugin-definitions.js"); - app.get('/pluginfw/plugin-definitions.json', (req: any, res:any, next:Function) => { + app.get('/pluginfw/plugin-definitions.json', (_req, res) => { const clientParts = plugins.parts.filter((part: PartType) => part.client_hooks != null); const clientPlugins:MapArrayType = {}; for (const name of new Set(clientParts.map((part: PartType) => part.plugin))) { diff --git a/src/node/hooks/express/tests.ts b/src/node/hooks/express/tests.ts deleted file mode 100644 index f8a1417ef..000000000 --- a/src/node/hooks/express/tests.ts +++ /dev/null @@ -1,83 +0,0 @@ -'use strict'; - -import {Dirent} from "node:fs"; -import {PluginDef} from "../../types/PartType"; - -const path = require('path'); -const fsp = require('fs').promises; -const plugins = require('../../../static/js/pluginfw/plugin_defs'); -const sanitizePathname = require('../../utils/sanitizePathname'); -const settings = require('../../utils/Settings'); - -// Returns all *.js files under specDir (recursively) as relative paths to specDir, using '/' -// instead of path.sep to separate pathname components. -const findSpecs = async (specDir: string) => { - let dirents: Dirent[]; - try { - dirents = await fsp.readdir(specDir, {withFileTypes: true}); - } catch (err:any) { - if (['ENOENT', 'ENOTDIR'].includes(err.code)) return []; - throw err; - } - const specs: string[] = []; - await Promise.all(dirents.map(async (dirent) => { - if (dirent.isDirectory()) { - const subdirSpecs = await findSpecs(path.join(specDir, dirent.name)); - specs.push(...subdirSpecs.map((spec) => `${dirent.name}/${spec}`)); - return; - } - if (!dirent.name.endsWith('.js')) return; - specs.push(dirent.name); - })); - return specs; -}; - -exports.expressPreSession = async (hookName:string, {app}:any) => { - app.get('/tests/frontend/frontendTestSpecs.json', (req:any, res:any, next:Function) => { - (async () => { - const modules:string[] = []; - await Promise.all(Object.entries(plugins.plugins).map(async ([plugin, def]) => { - let {package: {path: pluginPath}} = def as PluginDef; - if (!pluginPath.endsWith(path.sep)) pluginPath += path.sep; - const specDir = `${plugin === 'ep_etherpad-lite' ? '' : 'static/'}tests/frontend/specs`; - for (const spec of await findSpecs(path.join(pluginPath, specDir))) { - if (plugin === 'ep_etherpad-lite' && !settings.enableAdminUITests && - spec.startsWith('admin')) continue; - modules.push(`${plugin}/${specDir}/${spec.replace(/\.js$/, '')}`); - } - })); - // Sort plugin tests before core tests. - modules.sort((a, b) => { - a = String(a); - b = String(b); - const aCore = a.startsWith('ep_etherpad-lite/'); - const bCore = b.startsWith('ep_etherpad-lite/'); - if (aCore === bCore) return a.localeCompare(b); - return aCore ? 1 : -1; - }); - console.debug('Sent browser the following test spec modules:', modules); - res.json(modules); - })().catch((err) => next(err || new Error(err))); - }); - - const rootTestFolder = path.join(settings.root, 'src/tests/frontend/'); - - app.get('/tests/frontend/index.html', (req:any, res:any) => { - res.redirect(['./', ...req.url.split('?').slice(1)].join('?')); - }); - - // The regexp /[\d\D]{0,}/ is equivalent to the regexp /.*/. The Express route path used here - // uses the more verbose /[\d\D]{0,}/ pattern instead of /.*/ because path-to-regexp v0.1.7 (the - // version used with Express v4.x) interprets '.' and '*' differently than regexp. - app.get('/tests/frontend/:file([\\d\\D]{0,})', (req:any, res:any, next:Function) => { - (async () => { - let file = sanitizePathname(req.params.file); - if (['', '.', './'].includes(file)) file = 'index.html'; - res.sendFile(path.join(rootTestFolder, file)); - })().catch((err) => next(err || new Error(err))); - }); - - app.get('/tests/frontend', (req:any, res:any) => { - res.redirect(['./frontend/', ...req.url.split('?').slice(1)].join('?')); - }); -}; diff --git a/src/node/utils/Minify.ts b/src/node/utils/Minify.ts index 9660c9098..dbd4b247b 100644 --- a/src/node/utils/Minify.ts +++ b/src/node/utils/Minify.ts @@ -146,7 +146,7 @@ const compatPaths = { * @param res the Express response */ const _minify = async (req:any, res:any) => { - let filename = req.params.filename; + let filename = req.params.filename.join('/'); try { filename = sanitizePathname(filename); } catch (err) { diff --git a/src/package.json b/src/package.json index 81461d129..f96724207 100644 --- a/src/package.json +++ b/src/package.json @@ -37,8 +37,8 @@ "cross-spawn": "^7.0.6", "ejs": "^3.1.10", "esbuild": "^0.25.8", - "express": "4.21.2", - "express-rate-limit": "^8.0.0", + "express": "^5.1.0", + "express-rate-limit": "^8.0.1", "express-session": "^1.18.2", "fast-deep-equal": "^3.1.3", "find-root": "1.1.0", @@ -85,8 +85,8 @@ "devDependencies": { "@playwright/test": "^1.54.1", "@types/async": "^3.2.24", + "@types/express": "^5.0.0", "@types/cookie-parser": "^1.4.9", - "@types/express": "^4.17.21", "@types/express-session": "^1.18.2", "@types/formidable": "^3.4.5", "@types/http-errors": "^2.0.5",