From fe36881d6f009293ab6506c906c0a21ae18b314f Mon Sep 17 00:00:00 2001 From: Adrian Andersen Date: Fri, 13 Dec 2024 16:52:20 +0100 Subject: [PATCH] deps: minor bumps --- package.json | 22 +-- .../unique-item/helpers/bl-id-generator.ts | 4 +- src/crypto/se.crypto.ts | 6 - src/logger/logger.ts | 2 +- yarn.lock | 143 +++++++++--------- 5 files changed, 88 insertions(+), 89 deletions(-) diff --git a/package.json b/package.json index 445d1032..aa5714f4 100644 --- a/package.json +++ b/package.json @@ -20,29 +20,29 @@ "@boklisten/bl-model": "^0.26.6", "@boklisten/bl-post-office": "^0.5.56", "@napi-rs/image": "^1.9.2", - "@sendgrid/mail": "^8.1.3", + "@sendgrid/mail": "^8.1.4", "@types/chai": "^4.3.19", "@types/chai-as-promised": "^8.0.0", "@types/cors": "^2.8.17", "@types/express": "^4.17.21", "@types/express-session": "^1.18.0", - "@types/jsonwebtoken": "^9.0.6", + "@types/jsonwebtoken": "^9.0.7", "@types/mocha": "^10.0.7", - "@types/node": "^22.5.4", - "@types/passport": "^1.0.16", + "@types/node": "^22.10.2", + "@types/passport": "^1.0.17", "@types/passport-facebook": "^3.0.3", "@types/passport-google-oauth20": "^2.0.16", "@types/passport-jwt": "^4.0.1", "@types/passport-local": "^1.0.38", - "@types/pdfkit": "^0.13.4", + "@types/pdfkit": "^0.13.7", "@types/qrcode": "^1.5.5", "@types/request-promise": "^4.1.51", "@types/sinon": "^17.0.3", "@types/sinon-chai": "^3.2.12", - "@types/validator": "^13.12.1", + "@types/validator": "^13.12.2", "canvas": "^3.0.0-rc2", "cors": "^2.8.5", - "dotenv": "^16.4.5", + "dotenv": "^16.4.7", "express": "^4.19.2", "express-session": "^1.18.0", "jsbarcode": "^3.11.6", @@ -56,14 +56,14 @@ "passport-google-oauth20": "^2.0.0", "passport-jwt": "^4.0.1", "passport-local": "^1.0.0", - "pdfkit": "^0.15.0", + "pdfkit": "^0.15.1", "qrcode": "^1.5.4", - "qs": "^6.13.0", + "qs": "^6.13.1", "request": "^2.88.0", "request-promise": "^4.2.2", "twilio": "^5.3.0", "validator": "^13.12.0", - "winston": "^3.14.2" + "winston": "^3.17.0" }, "devDependencies": { "@typescript-eslint/eslint-plugin": "^8.4.0", @@ -77,7 +77,7 @@ "eslint-plugin-import": "^2.30.0", "eslint-plugin-no-relative-import-paths": "^1.5.5", "mocha": "^10.7.3", - "pkgroll": "^2.4.2", + "pkgroll": "^2.5.1", "prettier": "^3.4.2", "sinon": "^18.0.0", "sinon-chai": "^3.6.0", diff --git a/src/collections/unique-item/helpers/bl-id-generator.ts b/src/collections/unique-item/helpers/bl-id-generator.ts index 4b470d68..4995e54c 100644 --- a/src/collections/unique-item/helpers/bl-id-generator.ts +++ b/src/collections/unique-item/helpers/bl-id-generator.ts @@ -116,7 +116,7 @@ async function addIdPagesToDoc( pngBuffers.push(chunk); } - const pngBuffer = Buffer.concat(pngBuffers as Uint8Array[]); + const pngBuffer = Buffer.concat(pngBuffers); for (let i = 0; i < 2; i++) { doc.addPage({ @@ -142,7 +142,7 @@ async function generateBlIdPDF(): Promise { buffers.push(chunk as Buffer); } - return Buffer.concat(buffers as Uint8Array[]); + return Buffer.concat(buffers); } export default generateBlIdPDF; diff --git a/src/crypto/se.crypto.ts b/src/crypto/se.crypto.ts index 17726d4c..ab5e906b 100644 --- a/src/crypto/se.crypto.ts +++ b/src/crypto/se.crypto.ts @@ -14,12 +14,8 @@ export class SeCrypto { const key = crypto.randomBytes(32); const iv = crypto.randomBytes(16); - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-expect-error const cipher = crypto.createCipheriv("aes-256-cbc", Buffer.from(key), iv); const encrypted = cipher.update(msg); - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-expect-error resolve(Buffer.concat([encrypted, cipher.final()]).toString("hex")); }); } @@ -51,8 +47,6 @@ export class SeCrypto { } public timingSafeEqual(a: string, b: string): boolean { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-expect-error return crypto.timingSafeEqual(Buffer.from(a), Buffer.from(b)); } diff --git a/src/logger/logger.ts b/src/logger/logger.ts index 4e90d27a..11f187fc 100644 --- a/src/logger/logger.ts +++ b/src/logger/logger.ts @@ -4,7 +4,7 @@ import { assertEnv, BlEnvironment } from "@/config/environment"; export const logger = createLogger({ format: format.printf((info) => - format.colorize().colorize(info.level, info.message), + format.colorize().colorize(info.level, info.message as string), ), transports: [ new transports.Console({ diff --git a/yarn.lock b/yarn.lock index efed6e7d..b5c859d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -568,13 +568,13 @@ "@types/request" "^2.48.4" request "^2.88.0" -"@sendgrid/client@^8.1.3": - version "8.1.3" - resolved "https://registry.yarnpkg.com/@sendgrid/client/-/client-8.1.3.tgz#51fd4a318627c4b615ff98e35609e98486a3bd6f" - integrity sha512-mRwTticRZIdUTsnyzvlK6dMu3jni9ci9J+dW/6fMMFpGRAJdCJlivFVYQvqk8kRS3RnFzS7sf6BSmhLl1ldDhA== +"@sendgrid/client@^8.1.4": + version "8.1.4" + resolved "https://registry.yarnpkg.com/@sendgrid/client/-/client-8.1.4.tgz#4db39e49d8ed732169d73b5d5c94d2b11907970d" + integrity sha512-VxZoQ82MpxmjSXLR3ZAE2OWxvQIW2k2G24UeRPr/SYX8HqWLV/8UBN15T2WmjjnEb5XSmFImTJOKDzzSeKr9YQ== dependencies: "@sendgrid/helpers" "^8.0.0" - axios "^1.6.8" + axios "^1.7.4" "@sendgrid/helpers@^6.5.5": version "6.5.5" @@ -599,12 +599,12 @@ "@sendgrid/client" "^6.5.5" "@sendgrid/helpers" "^6.5.5" -"@sendgrid/mail@^8.1.3": - version "8.1.3" - resolved "https://registry.yarnpkg.com/@sendgrid/mail/-/mail-8.1.3.tgz#d371cbddcd2e8ca9469a68d1ed0c6b3a5c365e5e" - integrity sha512-Wg5iKSUOER83/cfY6rbPa+o3ChnYzWwv1OcsR8gCV8SKi+sUPIMroildimlnb72DBkQxcbylxng1W7f0RIX7MQ== +"@sendgrid/mail@^8.1.4": + version "8.1.4" + resolved "https://registry.yarnpkg.com/@sendgrid/mail/-/mail-8.1.4.tgz#0ba72906685eae1a1ef990cca31e962f1ece6928" + integrity sha512-MUpIZykD9ARie8LElYCqbcBhGGMaA/E6I7fEcG7Hc2An26QJyLtwOaKQ3taGp8xO8BICPJrSKuYV4bDeAJKFGQ== dependencies: - "@sendgrid/client" "^8.1.3" + "@sendgrid/client" "^8.1.4" "@sendgrid/helpers" "^8.0.0" "@sinonjs/commons@^1.7.0": @@ -787,13 +787,20 @@ resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz" integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= -"@types/jsonwebtoken@*", "@types/jsonwebtoken@^9.0.6": +"@types/jsonwebtoken@*": version "9.0.6" resolved "https://registry.yarnpkg.com/@types/jsonwebtoken/-/jsonwebtoken-9.0.6.tgz#d1af3544d99ad992fb6681bbe60676e06b032bd3" integrity sha512-/5hndP5dCjloafCXns6SZyESp3Ldq7YjH3zwzwczYnjxIT0Fqzk5ROSYVGfFyczIue7IUEj8hkvLbPoLQ18vQw== dependencies: "@types/node" "*" +"@types/jsonwebtoken@^9.0.7": + version "9.0.7" + resolved "https://registry.yarnpkg.com/@types/jsonwebtoken/-/jsonwebtoken-9.0.7.tgz#e49b96c2b29356ed462e9708fc73b833014727d2" + integrity sha512-ugo316mmTYBl2g81zDFnZ7cfxlut3o+/EQdaP7J8QN2kY6lJ22hmQYCK5EHcJHbrW+dkCGSCPgbG8JtYj6qSrg== + dependencies: + "@types/node" "*" + "@types/mime@^1": version "1.3.2" resolved "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz" @@ -819,12 +826,12 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-11.15.54.tgz#59ed60e7b0d56905a654292e8d73275034eb6283" integrity sha512-1RWYiq+5UfozGsU6MwJyFX6BtktcT10XRjvcAQmskCtMcW3tPske88lM/nHv7BQG1w9KBXI1zPGuu5PnNCX14g== -"@types/node@^22.5.4": - version "22.5.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.4.tgz#83f7d1f65bc2ed223bdbf57c7884f1d5a4fa84e8" - integrity sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg== +"@types/node@^22.10.2": + version "22.10.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.2.tgz#a485426e6d1fdafc7b0d4c7b24e2c78182ddabb9" + integrity sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ== dependencies: - undici-types "~6.19.2" + undici-types "~6.20.0" "@types/oauth@*": version "0.9.5" @@ -885,17 +892,24 @@ "@types/express" "*" "@types/passport" "*" -"@types/passport@*", "@types/passport@^1.0.16": +"@types/passport@*": version "1.0.16" resolved "https://registry.yarnpkg.com/@types/passport/-/passport-1.0.16.tgz#5a2918b180a16924c4d75c31254c31cdca5ce6cf" integrity sha512-FD0qD5hbPWQzaM0wHUnJ/T0BBCJBxCeemtnCwc/ThhTg3x9jfrAcRUmj5Dopza+MfFS9acTe3wk7rcVnRIp/0A== dependencies: "@types/express" "*" -"@types/pdfkit@^0.13.4": - version "0.13.4" - resolved "https://registry.yarnpkg.com/@types/pdfkit/-/pdfkit-0.13.4.tgz#e75ca9d296b4078178794bccd7f7b58ef805682a" - integrity sha512-ixGNDHYJCCKuamY305wbfYSphZ2WPe8FPkjn8oF4fHV+PgPV4V+hecPh2VOS2h4RNtpSB3zQcR4sCpNvvrEb1A== +"@types/passport@^1.0.17": + version "1.0.17" + resolved "https://registry.yarnpkg.com/@types/passport/-/passport-1.0.17.tgz#718a8d1f7000ebcf6bbc0853da1bc8c4bc7ea5e6" + integrity sha512-aciLyx+wDwT2t2/kJGJR2AEeBz0nJU4WuRX04Wu9Dqc5lSUtwu0WERPHYsLhF9PtseiAMPBGNUOtFjxZ56prsg== + dependencies: + "@types/express" "*" + +"@types/pdfkit@^0.13.7": + version "0.13.7" + resolved "https://registry.yarnpkg.com/@types/pdfkit/-/pdfkit-0.13.7.tgz#ec8fa0f460eb49f3e7051b09aca5f709d7beea89" + integrity sha512-qIV2V2cnunHEVa51ISkoXlTsAnuQpTXhE7is3CWvV5lKSItRDLL7VLg/j0AkvAr3lG5ZBK2IWIl5iTfqf+obuA== dependencies: "@types/node" "*" @@ -1002,10 +1016,10 @@ resolved "https://registry.yarnpkg.com/@types/triple-beam/-/triple-beam-1.3.2.tgz#38ecb64f01aa0d02b7c8f4222d7c38af6316fef8" integrity sha512-txGIh+0eDFzKGC25zORnswy+br1Ha7hj5cMVwKIU7+s0U2AxxJru/jZSMU6OC9MJWP6+pc/hc6ZjyZShpsyY2g== -"@types/validator@^13.12.1": - version "13.12.1" - resolved "https://registry.yarnpkg.com/@types/validator/-/validator-13.12.1.tgz#8835d22f7e25b261e624d02a42fe4ade2c689a3c" - integrity sha512-w0URwf7BQb0rD/EuiG12KP0bailHKHP5YVviJG9zw3ykAokL0TuxU2TUqMB7EwZ59bDHYdeTIvjI5m0S7qHfOA== +"@types/validator@^13.12.2": + version "13.12.2" + resolved "https://registry.yarnpkg.com/@types/validator/-/validator-13.12.2.tgz#760329e756e18a4aab82fc502b51ebdfebbe49f5" + integrity sha512-6SlHBzUW8Jhf3liqrGGXyTJSIFe4nqlJ5A5KaMZ2l/vbM3Wh3KSybots/wfWVzNLK4D1NZluDlSQIbIEPx6oyA== "@types/webidl-conversions@*": version "6.1.1" @@ -1414,15 +1428,6 @@ axios@^0.26.1: dependencies: follow-redirects "^1.14.8" -axios@^1.6.8: - version "1.7.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.2.tgz#b625db8a7051fbea61c35a3cbb3a1daa7b9c7621" - integrity sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw== - dependencies: - follow-redirects "^1.15.6" - form-data "^4.0.0" - proxy-from-env "^1.1.0" - axios@^1.7.4: version "1.7.7" resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.7.tgz#2f554296f9892a72ac8d8e4c5b79c14a91d0a47f" @@ -2190,10 +2195,10 @@ domutils@^3.0.1: domelementtype "^2.3.0" domhandler "^5.0.1" -dotenv@^16.4.5: - version "16.4.5" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" - integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== +dotenv@^16.4.7: + version "16.4.7" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.7.tgz#0e20c5b82950140aa99be360a8a5f52335f53c26" + integrity sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ== eastasianwidth@^0.2.0: version "0.2.0" @@ -4091,10 +4096,10 @@ logform@^2.3.2, logform@^2.4.0: safe-stable-stringify "^2.3.1" triple-beam "^1.3.0" -logform@^2.6.0, logform@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/logform/-/logform-2.6.1.tgz#71403a7d8cae04b2b734147963236205db9b3df0" - integrity sha512-CdaO738xRapbKIMVn2m4F6KTj4j7ooJ8POVnebSgKo3KBz5axNXRAL7ZdRjIV6NOr2Uf4vjtRkxrFETOioCqSA== +logform@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/logform/-/logform-2.7.0.tgz#cfca97528ef290f2e125a08396805002b2d060d1" + integrity sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ== dependencies: "@colors/colors" "1.6.0" "@types/triple-beam" "^1.3.2" @@ -4780,10 +4785,10 @@ pause@0.0.1: resolved "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz" integrity sha1-HUCLP9t2kjuVQ9lvtMnf1TXZy10= -pdfkit@^0.15.0: - version "0.15.0" - resolved "https://registry.yarnpkg.com/pdfkit/-/pdfkit-0.15.0.tgz#7152f1bfa500c37d25b5f8cd4850db09a8108941" - integrity sha512-Z0dx0sEPKLW2kbThS1SWZ0iSHlRPoFMpP+oSjNrtwRjsfGivwE+r6emyEFwQG/fx1Ri0AGUHmDcGOSMMlLLnSg== +pdfkit@^0.15.1: + version "0.15.1" + resolved "https://registry.yarnpkg.com/pdfkit/-/pdfkit-0.15.1.tgz#c2b5d451b0508965737482c2239e5e0f697de848" + integrity sha512-sleaMQXbQ/Dk+38HlxdiMT6Lmw5+HoNc4vkJR1Tb9XGALuB1xrfdWYbDFta70F3jCrVkhA2DiQ52D7jbysGZrw== dependencies: crypto-js "^4.2.0" fontkit "^1.8.1" @@ -4825,10 +4830,10 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -pkgroll@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/pkgroll/-/pkgroll-2.4.2.tgz#5f2dffb993c85f9405d4624da130c3685276d1fd" - integrity sha512-9seL/4BNQsE+eL+kefjfh5jSLqQPSKXQE/adw1L76k49KFw/XnOnyU8dRwuWpVtvMyIVyecaSBIpvFYrmnZq6A== +pkgroll@^2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/pkgroll/-/pkgroll-2.5.1.tgz#8f6d929928f92087be3552a29c749933545b750e" + integrity sha512-rehzSpQ1T/gh+tlVSxlUeqUPR9W1ZtJXDG00cuussNeCPdS9w1Wv0MWxwL116HbugsTZTrd+lVem+ipinT2JUg== dependencies: "@rollup/plugin-alias" "^5.1.0" "@rollup/plugin-commonjs" "^26.0.1" @@ -4999,10 +5004,10 @@ qs@^6.11.0: dependencies: side-channel "^1.0.4" -qs@^6.13.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" - integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== +qs@^6.13.1: + version "6.13.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.1.tgz#3ce5fc72bd3a8171b85c99b93c65dd20b7d1b16e" + integrity sha512-EJPeIn0CYrGu+hli1xilKAPXODtJ12T0sP63Ijx2/khC2JtuaN3JyNIpvmnkmaEtha9ocbG4A4cMcr+TvqvwQg== dependencies: side-channel "^1.0.6" @@ -6127,10 +6132,10 @@ unbzip2-stream@^1.3.3: buffer "^5.2.1" through "^2.3.8" -undici-types@~6.19.2: - version "6.19.8" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" - integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== +undici-types@~6.20.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" + integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== unicode-properties@^1.3.1: version "1.4.1" @@ -6310,31 +6315,31 @@ winston-transport@^4.5.0: readable-stream "^3.6.0" triple-beam "^1.3.0" -winston-transport@^4.7.0: - version "4.7.1" - resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.7.1.tgz#52ff1bcfe452ad89991a0aaff9c3b18e7f392569" - integrity sha512-wQCXXVgfv/wUPOfb2x0ruxzwkcZfxcktz6JIMUaPLmcNhO4bZTwA/WtDWK74xV3F2dKu8YadrFv0qhwYjVEwhA== +winston-transport@^4.9.0: + version "4.9.0" + resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.9.0.tgz#3bba345de10297654ea6f33519424560003b3bf9" + integrity sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A== dependencies: - logform "^2.6.1" + logform "^2.7.0" readable-stream "^3.6.2" triple-beam "^1.3.0" -winston@^3.14.2: - version "3.14.2" - resolved "https://registry.yarnpkg.com/winston/-/winston-3.14.2.tgz#94ce5fd26d374f563c969d12f0cd9c641065adab" - integrity sha512-CO8cdpBB2yqzEf8v895L+GNKYJiEq8eKlHU38af3snQBQ+sdAIUepjMSguOIJC7ICbzm0ZI+Af2If4vIJrtmOg== +winston@^3.17.0: + version "3.17.0" + resolved "https://registry.yarnpkg.com/winston/-/winston-3.17.0.tgz#74b8665ce9b4ea7b29d0922cfccf852a08a11423" + integrity sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw== dependencies: "@colors/colors" "^1.6.0" "@dabh/diagnostics" "^2.0.2" async "^3.2.3" is-stream "^2.0.0" - logform "^2.6.0" + logform "^2.7.0" one-time "^1.0.0" readable-stream "^3.4.0" safe-stable-stringify "^2.3.1" stack-trace "0.0.x" triple-beam "^1.3.0" - winston-transport "^4.7.0" + winston-transport "^4.9.0" winston@^3.2.1: version "3.8.2"