From 36ee8a15ba58ac8fd33c91b98f9288619df1a943 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Mon, 25 Nov 2024 09:11:52 +0000 Subject: [PATCH] build(deps)!: bump fastify from v4 to v5 BREAKING CHANGE: dropped support for node 18 --- .github/workflows/ci.yml | 2 +- README.md | 2 +- package-lock.json | 494 ++++++++++++++----------- package.json | 36 +- scripts/esbuild.js | 2 +- src/plugins/doc-to-txt/index.js | 2 +- src/plugins/docx-to-html/index.js | 2 +- src/plugins/embed-html-images/index.js | 2 +- src/plugins/html-to-txt/index.js | 2 +- src/plugins/image-to-txt/index.js | 2 +- src/plugins/pdf-to-html/index.js | 2 +- src/plugins/pdf-to-txt/index.js | 2 +- src/plugins/rtf-to-html/index.js | 2 +- src/plugins/shared-schemas/index.js | 2 +- src/plugins/tidy-css/index.js | 2 +- src/plugins/tidy-html/index.js | 2 +- src/routes/docs/index.js | 17 +- src/server.js | 2 +- src/utils/parse-string/index.js | 5 +- 19 files changed, 323 insertions(+), 259 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7de49e3c1..86bf1bd27 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,7 +100,7 @@ jobs: if: github.event.pull_request.draft == false strategy: matrix: - node-version: [18, 20, 22] + node-version: [20, 22] os: [macos-latest, ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} steps: diff --git a/README.md b/README.md index ae10c7ba7..34d075829 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Docsmith enables a data processor to use a comprehensive, GDPR-compliant, open-s These are only required if running the API outside of Docker: -- [Node.js](https://nodejs.org/en/) >=18.18.0 +- [Node.js](https://nodejs.org/en/) >=20.0.0 - Linux only: `poppler-data` >=0.4.9 - Linux only: `poppler-utils` >=20.12.0 - macOS only: `poppler` >=20.12.0 diff --git a/package-lock.json b/package-lock.json index dd95ada6a..91e6c7c43 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,27 +9,27 @@ "version": "11.2.6", "license": "MIT", "dependencies": { - "@fastify/accepts": "^4.3.0", - "@fastify/autoload": "^5.10.0", - "@fastify/bearer-auth": "^9.4.0", - "@fastify/compress": "^7.0.3", - "@fastify/cors": "^9.0.1", - "@fastify/helmet": "^11.1.1", - "@fastify/rate-limit": "^9.1.0", - "@fastify/sensible": "^5.6.0", - "@fastify/static": "^7.0.4", - "@fastify/swagger": "^8.15.0", - "@fastify/under-pressure": "^8.5.1", + "@fastify/accepts": "^5.0.1", + "@fastify/autoload": "^6.0.2", + "@fastify/bearer-auth": "^10.0.1", + "@fastify/compress": "^8.0.1", + "@fastify/cors": "^10.0.1", + "@fastify/helmet": "^12.0.1", + "@fastify/rate-limit": "^10.2.1", + "@fastify/sensible": "^6.0.1", + "@fastify/static": "^8.0.3", + "@fastify/swagger": "^9.4.0", + "@fastify/under-pressure": "^9.0.1", "cfb": "^1.2.2", "clean-css": "^5.3.3", "cssesc": "^3.0.0", "cssom": "^0.5.0", "env-schema": "^6.0.0", - "fastify": "^4.28.1", - "fastify-disablecache": "^3.1.9", - "fastify-floc-off": "^2.1.11", - "fastify-json-to-xml": "^1.1.12", - "fastify-plugin": "^4.5.1", + "fastify": "^5.1.0", + "fastify-disablecache": "^4.0.0", + "fastify-floc-off": "^3.0.0", + "fastify-json-to-xml": "^2.0.0", + "fastify-plugin": "^5.0.1", "file-stream-rotator": "^1.0.0", "file-type": "^16.5.4", "fix-latin1-to-utf8": "^1.0.3", @@ -46,7 +46,7 @@ "node-unrtf": "^5.0.4", "pino": "^9.5.0", "redoc": "^2.2.0", - "secure-json-parse": "^2.7.0", + "secure-json-parse": "^3.0.1", "tesseract.js": "^5.1.1", "upath": "^2.0.1", "word-extractor": "^1.0.4" @@ -78,7 +78,7 @@ "spdx-copyleft": "^1.0.0" }, "engines": { - "node": ">=18.18" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/Fdawgs" @@ -1575,67 +1575,58 @@ "license": "MIT" }, "node_modules/@fastify/accept-negotiator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@fastify/accept-negotiator/-/accept-negotiator-1.1.0.tgz", - "integrity": "sha512-OIHZrb2ImZ7XG85HXOONLcJWGosv7sIvM2ifAPQVhg9Lv7qdmMBNVaai4QTdyuaqbKM5eO6sLSQOYI7wEQeCJQ==", - "license": "MIT", - "engines": { - "node": ">=14" - } + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@fastify/accept-negotiator/-/accept-negotiator-2.0.0.tgz", + "integrity": "sha512-/Sce/kBzuTxIq5tJh85nVNOq9wKD8s+viIgX0fFMDBdw95gnpf53qmF1oBgJym3cPFliWUuSloVg/1w/rH0FcQ==", + "license": "MIT" }, "node_modules/@fastify/accepts": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@fastify/accepts/-/accepts-4.3.0.tgz", - "integrity": "sha512-QK4FoqXdwwPmaPOLL6NrxsyaXVvdviYVoS6ltHyOLdFlUyREIaMykHQIp+x0aJz9hB3B3n/Ht6QRdvBeGkptGQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@fastify/accepts/-/accepts-5.0.1.tgz", + "integrity": "sha512-8ji2MGTbceSnAXKYx/U9iWt6Fmf0zJovh0meO5rpwYS/vy0Z3QIR2J/hKmbcTpYfMu5NUliNpsAtMavmzBQhmA==", "license": "MIT", "dependencies": { - "accepts": "^1.3.5", - "fastify-plugin": "^4.0.0" + "accepts": "^1.3.8", + "fastify-plugin": "^5.0.0" } }, "node_modules/@fastify/ajv-compiler": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@fastify/ajv-compiler/-/ajv-compiler-3.6.0.tgz", - "integrity": "sha512-LwdXQJjmMD+GwLOkP7TVC68qa+pSSogeWWmznRJ/coyTcfe9qA05AHFSe1eZFwK6q+xVRpChnvFUkf1iYaSZsQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@fastify/ajv-compiler/-/ajv-compiler-4.0.1.tgz", + "integrity": "sha512-DxrBdgsjNLP0YM6W5Hd6/Fmj43S8zMKiFJYgi+Ri3htTGAowPVG/tG1wpnWLMjufEnehRivUCKZ1pLDIoZdTuw==", "license": "MIT", "dependencies": { - "ajv": "^8.11.0", - "ajv-formats": "^2.1.1", - "fast-uri": "^2.0.0" + "ajv": "^8.12.0", + "ajv-formats": "^3.0.1", + "fast-uri": "^3.0.0" } }, - "node_modules/@fastify/ajv-compiler/node_modules/fast-uri": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-2.4.0.tgz", - "integrity": "sha512-ypuAmmMKInk5q7XcepxlnUWDLWv4GFtaJqAzWKqn62IpQ3pejtr5dTVbt3vwqVaMKmkNR55sTT+CqUKIaT21BA==", - "license": "MIT" - }, "node_modules/@fastify/autoload": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@fastify/autoload/-/autoload-5.10.0.tgz", - "integrity": "sha512-4A6s86qMbjcpWHmJL7cErtjIxOPuW8c67DLiuO8HoJQxuK97vaptoUnK5BTOwRg1ntYqfc3tjwerTTo5NQ3fEQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@fastify/autoload/-/autoload-6.0.2.tgz", + "integrity": "sha512-efRwk2KKTPERxHEnzabK+w2pGxBExCCYixPYUMqtLd++Xsoh4h5Rrq8D2xZDq2BQ8hTFI1rzGLkHWsz40wgoWA==", "license": "MIT" }, "node_modules/@fastify/bearer-auth": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/@fastify/bearer-auth/-/bearer-auth-9.4.0.tgz", - "integrity": "sha512-+xn8UCKhJiBP3SsbCjzhfq+Dtf/pl1BDVrgb0/o6WcgNDUZ+bcEZnJ0P2e6FQEtE2nMYonLD/aVa9Ku8N9Cfbw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@fastify/bearer-auth/-/bearer-auth-10.0.1.tgz", + "integrity": "sha512-i2snRkAJsMmfFcsRS/fFIovcLL3WeZtxJP9pprx2NvB8N/l+fjMNmKeWWyX0hDS2Q0zEPqLz/G0DK92nqJYAJQ==", "license": "MIT", "dependencies": { - "@fastify/error": "^3.4.1", - "fastify-plugin": "^4.0.0" + "@fastify/error": "^4.0.0", + "fastify-plugin": "^5.0.0" } }, "node_modules/@fastify/compress": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/@fastify/compress/-/compress-7.0.3.tgz", - "integrity": "sha512-xa9fo5/DgK1s0bkS6xrYgNn8HmofO5tJvbCDk8QuXshSgLd2cFZANv1ox/Qv7zswS7JroHwTlCVv/XGTVO98tg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@fastify/compress/-/compress-8.0.1.tgz", + "integrity": "sha512-yWNfKhvL4orfN45LKCHCo8Fcsbj1kdNgwyShw2xpdHfzPf4A3MESmgSfUm3TCKQwgqDdrPnLfy1E+3I/DVP+BQ==", "license": "MIT", "dependencies": { - "@fastify/accept-negotiator": "^1.1.0", - "fastify-plugin": "^4.5.0", + "@fastify/accept-negotiator": "^2.0.0", + "fastify-plugin": "^5.0.0", "mime-db": "^1.52.0", - "minipass": "^7.0.2", + "minipass": "^7.0.4", "peek-stream": "^1.1.3", "pump": "^3.0.0", "pumpify": "^2.0.1", @@ -1643,13 +1634,13 @@ } }, "node_modules/@fastify/cors": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/@fastify/cors/-/cors-9.0.1.tgz", - "integrity": "sha512-YY9Ho3ovI+QHIL2hW+9X4XqQjXLjJqsU+sMV/xFsxZkE8p3GNnYVFpoOxF7SsP5ZL76gwvbo3V9L+FIekBGU4Q==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@fastify/cors/-/cors-10.0.1.tgz", + "integrity": "sha512-O8JIf6448uQbOgzSkCqhClw6gFTAqrdfeA6R3fc/3gwTJGUp7gl8/3tbNB+6INuu4RmgVOq99BmvdGbtu5pgOA==", "license": "MIT", "dependencies": { - "fastify-plugin": "^4.0.0", - "mnemonist": "0.39.6" + "fastify-plugin": "^5.0.0", + "mnemonist": "0.39.8" } }, "node_modules/@fastify/deepmerge": { @@ -1659,28 +1650,28 @@ "license": "MIT" }, "node_modules/@fastify/error": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/@fastify/error/-/error-3.4.1.tgz", - "integrity": "sha512-wWSvph+29GR783IhmvdwWnN4bUxTD01Vm5Xad4i7i1VuAOItLvbPAb69sb0IQ2N57yprvhNIwAP5B6xfKTmjmQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@fastify/error/-/error-4.0.0.tgz", + "integrity": "sha512-OO/SA8As24JtT1usTUTKgGH7uLvhfwZPwlptRi2Dp5P4KKmJI3gvsZ8MIHnNwDs4sLf/aai5LzTyl66xr7qMxA==", "license": "MIT" }, "node_modules/@fastify/fast-json-stringify-compiler": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@fastify/fast-json-stringify-compiler/-/fast-json-stringify-compiler-4.3.0.tgz", - "integrity": "sha512-aZAXGYo6m22Fk1zZzEUKBvut/CIIQe/BapEORnxiD5Qr0kPHqqI69NtEMCme74h+at72sPhbkb4ZrLd1W3KRLA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@fastify/fast-json-stringify-compiler/-/fast-json-stringify-compiler-5.0.1.tgz", + "integrity": "sha512-f2d3JExJgFE3UbdFcpPwqNUEoHWmt8pAKf8f+9YuLESdefA0WgqxeT6DrGL4Yrf/9ihXNSKOqpjEmurV405meA==", "license": "MIT", "dependencies": { - "fast-json-stringify": "^5.7.0" + "fast-json-stringify": "^6.0.0" } }, "node_modules/@fastify/helmet": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@fastify/helmet/-/helmet-11.1.1.tgz", - "integrity": "sha512-pjJxjk6SLEimITWadtYIXt6wBMfFC1I6OQyH/jYVCqSAn36sgAIFjeNiibHtifjCd+e25442pObis3Rjtame6A==", + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/@fastify/helmet/-/helmet-12.0.1.tgz", + "integrity": "sha512-kkjBcedWwdflRThovGuvN9jB2QQLytBqArCFPdMIb7o2Fp0l/H3xxYi/6x/SSRuH/FFt9qpTGIfJz2bfnMrLqA==", "license": "MIT", "dependencies": { - "fastify-plugin": "^4.2.1", - "helmet": "^7.0.0" + "fastify-plugin": "^5.0.0", + "helmet": "^7.1.0" } }, "node_modules/@fastify/merge-json-schemas": { @@ -1693,38 +1684,38 @@ } }, "node_modules/@fastify/rate-limit": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/@fastify/rate-limit/-/rate-limit-9.1.0.tgz", - "integrity": "sha512-h5dZWCkuZXN0PxwqaFQLxeln8/LNwQwH9popywmDCFdKfgpi4b/HoMH1lluy6P+30CG9yzzpSpwTCIPNB9T1JA==", + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/@fastify/rate-limit/-/rate-limit-10.2.1.tgz", + "integrity": "sha512-6rM4MXBtz9j6i9ChAVNz8ZA2yzSTGswIR3XvIbzHpe7JUWvbL7NJylFO12n7zKWfl3rEpOYiKogD98scl8SMGQ==", "license": "MIT", "dependencies": { - "@lukeed/ms": "^2.0.1", - "fastify-plugin": "^4.0.0", - "toad-cache": "^3.3.1" + "@lukeed/ms": "^2.0.2", + "fastify-plugin": "^5.0.0", + "toad-cache": "^3.7.0" } }, "node_modules/@fastify/send": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@fastify/send/-/send-2.1.0.tgz", - "integrity": "sha512-yNYiY6sDkexoJR0D8IDy3aRP3+L4wdqCpvx5WP+VtEU58sn7USmKynBzDQex5X42Zzvw2gNzzYgP90UfWShLFA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@fastify/send/-/send-3.2.0.tgz", + "integrity": "sha512-qF4TIEMjqk92jrOXjcqBrkk+HOXE70AwDKas9/AweFslbvSq0o1JEAHzC7YlggBaj4bN9pU70XIPyseEJ6vlXg==", "license": "MIT", "dependencies": { - "@lukeed/ms": "^2.0.1", + "@lukeed/ms": "^2.0.2", "escape-html": "~1.0.3", "fast-decode-uri-component": "^1.0.1", - "http-errors": "2.0.0", - "mime": "^3.0.0" + "http-errors": "^2.0.0", + "mime": "^3" } }, "node_modules/@fastify/sensible": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@fastify/sensible/-/sensible-5.6.0.tgz", - "integrity": "sha512-Vq6Z2ZQy10GDqON+hvLF52K99s9et5gVVxTul5n3SIAf0Kq5QjPRUKkAMT3zPAiiGvoHtS3APa/3uaxfDgCODQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@fastify/sensible/-/sensible-6.0.1.tgz", + "integrity": "sha512-D0rN0kMeZKP23f4w9MoCI9e4+n7vASFAsGoRNn9bondSbplLeIfR2HcjCbyElAM04jGrPRLi/edyThEPOyC9cQ==", "license": "MIT", "dependencies": { - "@lukeed/ms": "^2.0.1", - "fast-deep-equal": "^3.1.1", - "fastify-plugin": "^4.0.0", + "@lukeed/ms": "^2.0.2", + "dequal": "^2.0.3", + "fastify-plugin": "^5.0.0-pre.fv5.1", "forwarded": "^0.2.0", "http-errors": "^2.0.0", "type-is": "^1.6.18", @@ -1732,40 +1723,118 @@ } }, "node_modules/@fastify/static": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@fastify/static/-/static-7.0.4.tgz", - "integrity": "sha512-p2uKtaf8BMOZWLs6wu+Ihg7bWNBdjNgCwDza4MJtTqg+5ovKmcbgbR9Xs5/smZ1YISfzKOCNYmZV8LaCj+eJ1Q==", + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/@fastify/static/-/static-8.0.3.tgz", + "integrity": "sha512-GHSoOVDIxEYEeVR5l044bRCuAKDErD/+9VE+Z9fnaTRr+DDz0Avrm4kKai1mHbPx6C0U7BVNthjd/gcMquZZUA==", "license": "MIT", "dependencies": { - "@fastify/accept-negotiator": "^1.0.0", - "@fastify/send": "^2.0.0", - "content-disposition": "^0.5.3", - "fastify-plugin": "^4.0.0", - "fastq": "^1.17.0", - "glob": "^10.3.4" + "@fastify/accept-negotiator": "^2.0.0", + "@fastify/send": "^3.2.0", + "content-disposition": "^0.5.4", + "fastify-plugin": "^5.0.0", + "fastq": "^1.17.1", + "glob": "^11.0.0" + } + }, + "node_modules/@fastify/static/node_modules/glob": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.0.tgz", + "integrity": "sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==", + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^4.0.1", + "minimatch": "^10.0.0", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@fastify/static/node_modules/jackspeak": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.2.tgz", + "integrity": "sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==", + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@fastify/static/node_modules/lru-cache": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.1.tgz", + "integrity": "sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==", + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@fastify/static/node_modules/minimatch": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", + "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@fastify/static/node_modules/path-scurry": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/@fastify/swagger": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/@fastify/swagger/-/swagger-8.15.0.tgz", - "integrity": "sha512-zy+HEEKFqPMS2sFUsQU5X0MHplhKJvWeohBwTCkBAJA/GDYGLGUWQaETEhptiqxK7Hs0fQB9B4MDb3pbwIiCwA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@fastify/swagger/-/swagger-9.4.0.tgz", + "integrity": "sha512-3hF7asqyNfu41aeDA/ATlIG0RY4XizgaDqPR0nc1Unt3EiXWjkVMiELLaH5WZKNvB4BA/5Wovxdin7N4ii7YHw==", "license": "MIT", "dependencies": { - "fastify-plugin": "^4.0.0", + "fastify-plugin": "^5.0.0", "json-schema-resolver": "^2.0.0", - "openapi-types": "^12.0.0", - "rfdc": "^1.3.0", - "yaml": "^2.2.2" + "openapi-types": "^12.1.3", + "rfdc": "^1.3.1", + "yaml": "^2.4.2" } }, "node_modules/@fastify/under-pressure": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@fastify/under-pressure/-/under-pressure-8.5.1.tgz", - "integrity": "sha512-4PRp1Y29yNSqNnMIwL9CyBtNP6rqLnY0JmZ0TMzCYj28k9Lw0nrqI6A2JxNQZd0jzbls/8LN4TcuRW2HEqQVmw==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@fastify/under-pressure/-/under-pressure-9.0.1.tgz", + "integrity": "sha512-aafxmJYJBgbYad4eoKwaWXtyBwoLoUCpVDahjzsvRcCjR8esm0F6s3jACWWtZqgcE498gV7fG1X4vzGt9lWw9A==", "license": "MIT", "dependencies": { - "@fastify/error": "^3.0.0", - "fastify-plugin": "^4.0.0" + "@fastify/error": "^4.0.0", + "fastify-plugin": "^5.0.0" } }, "node_modules/@humanwhocodes/config-array": { @@ -3273,9 +3342,9 @@ } }, "node_modules/ajv-formats": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", - "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", "license": "MIT", "dependencies": { "ajv": "^8.0.0" @@ -3650,12 +3719,12 @@ } }, "node_modules/avvio": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/avvio/-/avvio-8.4.0.tgz", - "integrity": "sha512-CDSwaxINFy59iNwhYnkvALBwZiTydGkOecZyPkqBpABYR1KqGEsET0VOOYDwtleZSUIdeY36DC2bSZ24CO1igA==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/avvio/-/avvio-9.1.0.tgz", + "integrity": "sha512-fYASnYi600CsH/j9EQov7lECAniYiBFiiAtBNuZYLA2leLe9qOvZzqYHFjtIj6gD2VMoMLP14834LFWvr4IfDw==", "license": "MIT", "dependencies": { - "@fastify/error": "^3.3.0", + "@fastify/error": "^4.0.0", "fastq": "^1.17.1" } }, @@ -4523,6 +4592,7 @@ "version": "0.7.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -4992,6 +5062,15 @@ "node": ">= 0.8" } }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -6304,12 +6383,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/fast-content-type-parse": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-1.1.0.tgz", - "integrity": "sha512-fBHHqSTFLVnR61C+gltJuE5GkVQMV0S2nqUO8TJ+5Z3qAKG8vAx4FKai1s5jq/inV1+sREynIWSuQ6HgoSXpDQ==", - "license": "MIT" - }, "node_modules/fast-copy": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/fast-copy/-/fast-copy-3.0.2.tgz", @@ -6354,37 +6427,20 @@ "license": "MIT" }, "node_modules/fast-json-stringify": { - "version": "5.16.1", - "resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-5.16.1.tgz", - "integrity": "sha512-KAdnLvy1yu/XrRtP+LJnxbBGrhN+xXu+gt3EUvZhYGKCr3lFHq/7UFJHHFgmJKoqlh6B40bZLEv7w46B0mqn1g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-6.0.0.tgz", + "integrity": "sha512-FGMKZwniMTgZh7zQp9b6XnBVxUmKVahQLQeRQHqwYmPDqDhcEKZ3BaQsxelFFI5PY7nN71OEeiL47/zUWcYe1A==", "license": "MIT", "dependencies": { - "@fastify/merge-json-schemas": "^0.1.0", - "ajv": "^8.10.0", + "@fastify/merge-json-schemas": "^0.1.1", + "ajv": "^8.12.0", "ajv-formats": "^3.0.1", "fast-deep-equal": "^3.1.3", - "fast-uri": "^2.1.0", + "fast-uri": "^2.3.0", "json-schema-ref-resolver": "^1.0.1", "rfdc": "^1.2.0" } }, - "node_modules/fast-json-stringify/node_modules/ajv-formats": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", - "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", - "license": "MIT", - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, "node_modules/fast-json-stringify/node_modules/fast-uri": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-2.4.0.tgz", @@ -6429,9 +6485,9 @@ "license": "MIT" }, "node_modules/fastify": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/fastify/-/fastify-4.28.1.tgz", - "integrity": "sha512-kFWUtpNr4i7t5vY2EJPCN2KgMVpuqfU4NjnJNCgiNB900oiDeYqaNDRcAfeBbOF5hGixixxcKnOU4KN9z6QncQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/fastify/-/fastify-5.1.0.tgz", + "integrity": "sha512-0SdUC5AoiSgMSc2Vxwv3WyKzyGMDJRAW/PgNsK1kZrnkO6MeqUIW9ovVg9F2UGIqtIcclYMyeJa4rK6OZc7Jxg==", "funding": [ { "type": "github", @@ -6444,78 +6500,89 @@ ], "license": "MIT", "dependencies": { - "@fastify/ajv-compiler": "^3.5.0", - "@fastify/error": "^3.4.0", - "@fastify/fast-json-stringify-compiler": "^4.3.0", + "@fastify/ajv-compiler": "^4.0.0", + "@fastify/error": "^4.0.0", + "@fastify/fast-json-stringify-compiler": "^5.0.0", "abstract-logging": "^2.0.1", - "avvio": "^8.3.0", - "fast-content-type-parse": "^1.1.0", - "fast-json-stringify": "^5.8.0", - "find-my-way": "^8.0.0", - "light-my-request": "^5.11.0", + "avvio": "^9.0.0", + "fast-json-stringify": "^6.0.0", + "find-my-way": "^9.0.0", + "light-my-request": "^6.0.0", "pino": "^9.0.0", - "process-warning": "^3.0.0", + "process-warning": "^4.0.0", "proxy-addr": "^2.0.7", - "rfdc": "^1.3.0", + "rfdc": "^1.3.1", "secure-json-parse": "^2.7.0", - "semver": "^7.5.4", - "toad-cache": "^3.3.0" + "semver": "^7.6.0", + "toad-cache": "^3.7.0" } }, "node_modules/fastify-disablecache": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/fastify-disablecache/-/fastify-disablecache-3.1.9.tgz", - "integrity": "sha512-RelP1ANJs0olkGxXVIiHJukmhMWqXbVV9FGkzYJFjh+3MzMGmLyH0vI0cEfXWBDS7SLKPTW/XIQm/FyHRqcitQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fastify-disablecache/-/fastify-disablecache-4.0.0.tgz", + "integrity": "sha512-M4lca5TGBIG+ZqJQCBFIVtgMQfDvo9+OkCF29T5R8eUXNZ3n5vW7gDH4dmzuFK9IAD3P8dwfMmRxcjjGs6hboQ==", "license": "MIT", "dependencies": { - "fastify-plugin": "^4.5.1" + "fastify-plugin": "^5.0.1" }, "engines": { - "node": ">=14.18.0" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/Fdawgs" } }, "node_modules/fastify-floc-off": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/fastify-floc-off/-/fastify-floc-off-2.1.11.tgz", - "integrity": "sha512-HELu+eHoXyXh2zgDD5vyRJGQ6ho1/+fcsl1XD8qh5oJaP4w7EI+GrfOx6VI/FwijZawQtcGvHoFYA4dGmz/fLQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/fastify-floc-off/-/fastify-floc-off-3.0.0.tgz", + "integrity": "sha512-uzTi/CPYC4qMz4FKC5Q8dWvWIRjwkz7HoaCECkwJXjIbHGB77o9vT3kWXZCuLTrPX5WvCxdpAXyZ19ThdBqfXA==", "license": "MIT", "dependencies": { - "fastify-plugin": "^4.5.1" + "fastify-plugin": "^5.0.1" }, "engines": { - "node": ">=14.18.0" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/Fdawgs" } }, "node_modules/fastify-json-to-xml": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/fastify-json-to-xml/-/fastify-json-to-xml-1.1.12.tgz", - "integrity": "sha512-mhKtRjllGTeqehemxg7cCvU1wOc6GEcGb5sleGrs4jY84qZM1OpltmMii92rkPTkGpJHIRNMiOsuPXRumqYhfg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fastify-json-to-xml/-/fastify-json-to-xml-2.0.0.tgz", + "integrity": "sha512-hpWicYzhB2e6YHo1nanrg5gaEfMK4rJ+azMGO/CN2RYOYXpsURUUxVZhn9Jtpy8uMzxwIFOVlABwUSmFmfZaAA==", "license": "MIT", "dependencies": { "accepts": "^1.3.8", - "fastify-plugin": "^4.5.1", + "fastify-plugin": "^5.0.1", "js2xmlparser": "^5.0.0", "secure-json-parse": "^2.7.0" }, "engines": { - "node": ">=14.18.0" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/Fdawgs" } }, + "node_modules/fastify-json-to-xml/node_modules/secure-json-parse": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.7.0.tgz", + "integrity": "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==", + "license": "BSD-3-Clause" + }, "node_modules/fastify-plugin": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/fastify-plugin/-/fastify-plugin-4.5.1.tgz", - "integrity": "sha512-stRHYGeuqpEZTL1Ef0Ovr2ltazUT9g844X5z/zEBFLG8RYlpDiOCIG+ATvYEp+/zmc7sN29mcIMp8gvYplYPIQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/fastify-plugin/-/fastify-plugin-5.0.1.tgz", + "integrity": "sha512-HCxs+YnRaWzCl+cWRYFnHmeRFyR5GVnJTAaCJQiYzQSDwK9MgJdyAsuL3nh0EWRCYMgQ5MeziymvmAhUHYHDUQ==", "license": "MIT" }, + "node_modules/fastify/node_modules/secure-json-parse": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.7.0.tgz", + "integrity": "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==", + "license": "BSD-3-Clause" + }, "node_modules/fastq": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", @@ -6594,13 +6661,14 @@ } }, "node_modules/find-my-way": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-8.2.2.tgz", - "integrity": "sha512-Dobi7gcTEq8yszimcfp/R7+owiT4WncAJ7VTTgFH1jYJ5GaG1FbhjwDG820hptN0QDFvzVY3RfCzdInvGPGzjA==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-9.1.0.tgz", + "integrity": "sha512-Y5jIsuYR4BwWDYYQ2A/RWWE6gD8a0FMgtU+HOq1WKku+Cwdz8M1v8wcAmRXXM1/iqtoqg06v+LjAxMYbCjViMw==", + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", "fast-querystring": "^1.0.0", - "safe-regex2": "^3.1.0" + "safe-regex2": "^4.0.0" }, "engines": { "node": ">=14" @@ -9921,13 +9989,14 @@ } }, "node_modules/light-my-request": { - "version": "5.14.0", - "resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-5.14.0.tgz", - "integrity": "sha512-aORPWntbpH5esaYpGOOmri0OHDOe3wC5M2MQxZ9dvMLZm6DnaAn0kJlcbU9hwsQgLzmZyReKwFwwPkR+nHu5kA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-6.1.0.tgz", + "integrity": "sha512-+NFuhlOGoEwxeQfJ/pobkVFxcnKyDtiX847hLjuB/IzBxIl3q4VJeFI8uRCgb3AlTWL1lgOr+u5+8QdUcr33ng==", + "license": "BSD-3-Clause", "dependencies": { "cookie": "^0.7.0", - "process-warning": "^3.0.0", - "set-cookie-parser": "^2.4.1" + "process-warning": "^4.0.0", + "set-cookie-parser": "^2.6.0" } }, "node_modules/lines-and-columns": { @@ -10357,9 +10426,9 @@ } }, "node_modules/mnemonist": { - "version": "0.39.6", - "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.39.6.tgz", - "integrity": "sha512-A/0v5Z59y63US00cRSLiloEIw3t5G+MiKz4BhX21FI+YBJXBOGW0ohFxTxO08dsOYlzxo87T7vGfZKYp2bcAWA==", + "version": "0.39.8", + "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.39.8.tgz", + "integrity": "sha512-vyWo2K3fjrUw8YeeZ1zF0fy6Mu59RHokURlld8ymdUPjMlD9EC9ov1/YPqTgqRvUN9nTr3Gqfz29LYAmu0PHPQ==", "license": "MIT", "dependencies": { "obliterator": "^2.0.1" @@ -11445,18 +11514,19 @@ "pino-pretty": "bin.js" } }, + "node_modules/pino-pretty/node_modules/secure-json-parse": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.7.0.tgz", + "integrity": "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==", + "dev": true, + "license": "BSD-3-Clause" + }, "node_modules/pino-std-serializers": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-7.0.0.tgz", "integrity": "sha512-e906FRY0+tV27iq4juKzSYPbUj2do2X2JX4EzSca1631EB2QJQUqGbDuERal7LCtOpxl6x3+nvo9NPZcmjkiFA==", "license": "MIT" }, - "node_modules/pino/node_modules/process-warning": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-4.0.0.tgz", - "integrity": "sha512-/MyYDxttz7DfGMMHiysAsFE4qF+pQYAA8ziO/3NcRVrQ5fSk+Mns4QZA/oRPFzvcqNoVJXQNWNAsdwBXLUkQKw==", - "license": "MIT" - }, "node_modules/pirates": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", @@ -11736,9 +11806,9 @@ "license": "MIT" }, "node_modules/process-warning": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-3.0.0.tgz", - "integrity": "sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-4.0.0.tgz", + "integrity": "sha512-/MyYDxttz7DfGMMHiysAsFE4qF+pQYAA8ziO/3NcRVrQ5fSk+Mns4QZA/oRPFzvcqNoVJXQNWNAsdwBXLUkQKw==", "license": "MIT" }, "node_modules/progress": { @@ -12585,18 +12655,18 @@ } }, "node_modules/safe-regex2": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/safe-regex2/-/safe-regex2-3.1.0.tgz", - "integrity": "sha512-RAAZAGbap2kBfbVhvmnTFv73NWLMvDGOITFYTZBAaY8eR+Ir4ef7Up/e7amo+y1+AH+3PtLkrt9mvcTsG9LXug==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/safe-regex2/-/safe-regex2-4.0.0.tgz", + "integrity": "sha512-Hvjfv25jPDVr3U+4LDzBuZPPOymELG3PYcSk5hcevooo1yxxamQL/bHs/GrEPGmMoMEwRrHVGiCA1pXi97B8Ew==", "license": "MIT", "dependencies": { - "ret": "~0.4.0" + "ret": "~0.5.0" } }, "node_modules/safe-regex2/node_modules/ret": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.4.3.tgz", - "integrity": "sha512-0f4Memo5QP7WQyUEAYUO3esD/XjOc3Zjjg5CPsAq1p8sIu0XPeMbHJemKA0BO7tV0X7+A0FoEpbmHXWxPyD3wQ==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.5.0.tgz", + "integrity": "sha512-I1XxrZSQ+oErkRR4jYbAyEEu2I0avBvvMM5JN+6EBprOGRCs63ENqZ3vjavq8fBw2+62G5LF5XelKwuJpcvcxw==", "license": "MIT", "engines": { "node": ">=10" @@ -12655,9 +12725,9 @@ } }, "node_modules/secure-json-parse": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.7.0.tgz", - "integrity": "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-3.0.1.tgz", + "integrity": "sha512-9QR7G96th4QJ2+dJwvZB+JoXyt8PN+DbEjOr6kL2/JU4KH8Eb2sFdU+gt8EDdzWDWoWH0uocDdfCoFzdVSixUA==", "license": "BSD-3-Clause" }, "node_modules/selderee": { diff --git a/package.json b/package.json index 7b6696caa..780a6c867 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "author": "Frazer Smith ", "funding": "https://github.com/sponsors/Fdawgs", "engines": { - "node": ">=18.18" + "node": ">=20" }, "scripts": { "benchmark:html": "autocannon -a 100 -m POST -i \"./test_resources/test_files/pdf_1.3_NHS_Constitution.pdf\" -H \"Content-Type:application/pdf\" \"http://0.0.0.0:3000/pdf/html?lastPageToConvert=1\"", @@ -89,27 +89,27 @@ "spdx-copyleft": "^1.0.0" }, "dependencies": { - "@fastify/accepts": "^4.3.0", - "@fastify/autoload": "^5.10.0", - "@fastify/bearer-auth": "^9.4.0", - "@fastify/compress": "^7.0.3", - "@fastify/cors": "^9.0.1", - "@fastify/helmet": "^11.1.1", - "@fastify/rate-limit": "^9.1.0", - "@fastify/sensible": "^5.6.0", - "@fastify/static": "^7.0.4", - "@fastify/swagger": "^8.15.0", - "@fastify/under-pressure": "^8.5.1", + "@fastify/accepts": "^5.0.1", + "@fastify/autoload": "^6.0.2", + "@fastify/bearer-auth": "^10.0.1", + "@fastify/compress": "^8.0.1", + "@fastify/cors": "^10.0.1", + "@fastify/helmet": "^12.0.1", + "@fastify/rate-limit": "^10.2.1", + "@fastify/sensible": "^6.0.1", + "@fastify/static": "^8.0.3", + "@fastify/swagger": "^9.4.0", + "@fastify/under-pressure": "^9.0.1", "cfb": "^1.2.2", "clean-css": "^5.3.3", "cssesc": "^3.0.0", "cssom": "^0.5.0", "env-schema": "^6.0.0", - "fastify": "^4.28.1", - "fastify-disablecache": "^3.1.9", - "fastify-floc-off": "^2.1.11", - "fastify-json-to-xml": "^1.1.12", - "fastify-plugin": "^4.5.1", + "fastify": "^5.1.0", + "fastify-disablecache": "^4.0.0", + "fastify-floc-off": "^3.0.0", + "fastify-json-to-xml": "^2.0.0", + "fastify-plugin": "^5.0.1", "file-stream-rotator": "^1.0.0", "file-type": "^16.5.4", "fix-latin1-to-utf8": "^1.0.3", @@ -126,7 +126,7 @@ "node-unrtf": "^5.0.4", "pino": "^9.5.0", "redoc": "^2.2.0", - "secure-json-parse": "^2.7.0", + "secure-json-parse": "^3.0.1", "tesseract.js": "^5.1.1", "upath": "^2.0.1", "word-extractor": "^1.0.4" diff --git a/scripts/esbuild.js b/scripts/esbuild.js index 8074d221a..6db3d9e73 100644 --- a/scripts/esbuild.js +++ b/scripts/esbuild.js @@ -18,5 +18,5 @@ esbuild.build({ packages: "external", platform: "node", plugins: [globPlugin()], - target: "node18", + target: "node20", }); diff --git a/src/plugins/doc-to-txt/index.js b/src/plugins/doc-to-txt/index.js index 8396729eb..8bef51143 100644 --- a/src/plugins/doc-to-txt/index.js +++ b/src/plugins/doc-to-txt/index.js @@ -47,7 +47,7 @@ async function plugin(server) { } module.exports = fp(plugin, { - fastify: "4.x", + fastify: "5.x", name: "doc-to-txt", dependencies: ["@fastify/sensible"], }); diff --git a/src/plugins/docx-to-html/index.js b/src/plugins/docx-to-html/index.js index 0d0eacdb5..3b3c03214 100644 --- a/src/plugins/docx-to-html/index.js +++ b/src/plugins/docx-to-html/index.js @@ -66,7 +66,7 @@ async function plugin(server) { } module.exports = fp(plugin, { - fastify: "4.x", + fastify: "5.x", name: "docx-to-html", dependencies: ["@fastify/sensible"], }); diff --git a/src/plugins/embed-html-images/index.js b/src/plugins/embed-html-images/index.js index 9b6be49fa..7859b35ff 100644 --- a/src/plugins/embed-html-images/index.js +++ b/src/plugins/embed-html-images/index.js @@ -52,6 +52,6 @@ async function plugin(server, options) { } module.exports = fp(plugin, { - fastify: "4.x", + fastify: "5.x", name: "embed-html-images", }); diff --git a/src/plugins/html-to-txt/index.js b/src/plugins/html-to-txt/index.js index c9b00d336..90057756c 100644 --- a/src/plugins/html-to-txt/index.js +++ b/src/plugins/html-to-txt/index.js @@ -47,7 +47,7 @@ async function plugin(server) { } module.exports = fp(plugin, { - fastify: "4.x", + fastify: "5.x", name: "html-to-txt", dependencies: ["@fastify/sensible"], }); diff --git a/src/plugins/image-to-txt/index.js b/src/plugins/image-to-txt/index.js index e6e11c1bb..fa5e8ea0b 100644 --- a/src/plugins/image-to-txt/index.js +++ b/src/plugins/image-to-txt/index.js @@ -71,4 +71,4 @@ async function plugin(server, options) { }); } -module.exports = fp(plugin, { fastify: "4.x", name: "image-to-txt" }); +module.exports = fp(plugin, { fastify: "5.x", name: "image-to-txt" }); diff --git a/src/plugins/pdf-to-html/index.js b/src/plugins/pdf-to-html/index.js index 5cc1b634c..938161d92 100644 --- a/src/plugins/pdf-to-html/index.js +++ b/src/plugins/pdf-to-html/index.js @@ -179,7 +179,7 @@ async function plugin(server, options) { } module.exports = fp(plugin, { - fastify: "4.x", + fastify: "5.x", name: "pdf-to-html", dependencies: ["@fastify/sensible"], }); diff --git a/src/plugins/pdf-to-txt/index.js b/src/plugins/pdf-to-txt/index.js index 62022230f..2037479e3 100644 --- a/src/plugins/pdf-to-txt/index.js +++ b/src/plugins/pdf-to-txt/index.js @@ -241,7 +241,7 @@ async function plugin(server, options) { } module.exports = fp(plugin, { - fastify: "4.x", + fastify: "5.x", name: "pdf-to-txt", dependencies: ["@fastify/sensible"], }); diff --git a/src/plugins/rtf-to-html/index.js b/src/plugins/rtf-to-html/index.js index 00382c58b..907a66980 100644 --- a/src/plugins/rtf-to-html/index.js +++ b/src/plugins/rtf-to-html/index.js @@ -173,7 +173,7 @@ async function plugin(server, options) { } module.exports = fp(plugin, { - fastify: "4.x", + fastify: "5.x", name: "rtf-to-html", dependencies: ["@fastify/sensible"], }); diff --git a/src/plugins/shared-schemas/index.js b/src/plugins/shared-schemas/index.js index 53872c841..5277e1872 100644 --- a/src/plugins/shared-schemas/index.js +++ b/src/plugins/shared-schemas/index.js @@ -98,6 +98,6 @@ async function plugin(server) { } module.exports = fp(plugin, { - fastify: "4.x", + fastify: "5.x", name: "shared-schemas", }); diff --git a/src/plugins/tidy-css/index.js b/src/plugins/tidy-css/index.js index 9d50ff2ec..59631fa6a 100644 --- a/src/plugins/tidy-css/index.js +++ b/src/plugins/tidy-css/index.js @@ -129,4 +129,4 @@ async function plugin(server) { server.decorate("tidyCss", tidyCss); } -module.exports = fp(plugin, { fastify: "4.x", name: "tidy-css" }); +module.exports = fp(plugin, { fastify: "5.x", name: "tidy-css" }); diff --git a/src/plugins/tidy-html/index.js b/src/plugins/tidy-html/index.js index d13cac5ba..ec4eab137 100644 --- a/src/plugins/tidy-html/index.js +++ b/src/plugins/tidy-html/index.js @@ -143,7 +143,7 @@ async function plugin(server) { } module.exports = fp(plugin, { - fastify: "4.x", + fastify: "5.x", name: "tidy-html", dependencies: ["@fastify/sensible"], }); diff --git a/src/routes/docs/index.js b/src/routes/docs/index.js index 9d18163d7..c2c91678f 100644 --- a/src/routes/docs/index.js +++ b/src/routes/docs/index.js @@ -22,19 +22,15 @@ async function route(server) { // Register plugins await server // Allow for static files to be served from this dir via `sendFile` - .register(staticPlugin, { root: __dirname, serve: false }) + .register(staticPlugin, { + root: __dirname, + serve: false, + cacheControl: false, + }) // Register redoc module to allow for standalone js and map to be used in docs.html .register(staticPlugin, { - root: joinSafe( - __dirname, - "..", - "..", - "..", - "node_modules", - "redoc", - "bundles" - ), + root: joinSafe(__dirname, "../../../node_modules/redoc/bundles"), allowedPath: (pathName) => pathName.match(pathRegex) !== null, decorateReply: false, maxAge: "1 day", @@ -58,7 +54,6 @@ async function route(server) { .removeHeader("pragma") .removeHeader("expires") .removeHeader("surrogate-control") - .type("text/html; charset=utf-8") .sendFile("index.html"); }, }); diff --git a/src/server.js b/src/server.js index b6645f1c4..848cb6375 100644 --- a/src/server.js +++ b/src/server.js @@ -234,4 +234,4 @@ async function plugin(server, config) { }); } -module.exports = fp(plugin, { fastify: "4.x", name: "server" }); +module.exports = fp(plugin, { fastify: "5.x", name: "server" }); diff --git a/src/utils/parse-string/index.js b/src/utils/parse-string/index.js index 778c8d830..0ca7fe021 100644 --- a/src/utils/parse-string/index.js +++ b/src/utils/parse-string/index.js @@ -2,9 +2,8 @@ /** * @author Frazer Smith - * @description Converts string boolean to boolean - * or string number to number. - * @param {*} param - String to convert. + * @description Converts string boolean/number to their respective types. + * @param {*} param - Value to convert. * @returns {*} Parsed string, or original value * if unable to parse. */