From b2281e12c1edb9c7fc574335334c534cf8905867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 15 Nov 2026 23:14:04 +0100 Subject: [PATCH 1/5] build(deps): move the Node base image to 22.23.5 node:22-trixie-slim now resolves to 68c76cf, a multi-arch index with linux/amd64 and linux/arm64 that carries Node 22.23.5, a security release with HTTP, HTTP/2 and TLS fixes. All four Node stages and the release guard move to the new digest together. --- CHANGELOG.md | 5 +++++ Dockerfile | 8 ++++---- scripts/__tests__/release-workflows.test.ts | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55aa1b220..3fde94601 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## [Unreleased] +### Security + +- The container image moves to Node 22.23.5, a security release with fixes + in HTTP, HTTP/2 and TLS handling (CVE-2026-123863 and others). + ## [1.47.6] — 2026-11-15 ### Added diff --git a/Dockerfile b/Dockerfile index 160069bc3..d24350db8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ # future change to one of the stages cannot pair them wrongly. # ── Stage 1: Dependencies ────────────────────────────────── -FROM node:22-trixie-slim@sha256:be1e2a3dc2c4fd68cdfadad2a696a280e0d2749098bee509230174d72fb768c6 AS deps +FROM node:22-trixie-slim@sha256:68c76cfad89921b927eae28ba21407475e29d0ce450afcdbe70c1532db042b64 AS deps RUN corepack enable && corepack prepare pnpm@11.15.1 --activate WORKDIR /app @@ -29,7 +29,7 @@ COPY scripts/prepare.mjs scripts/prepare.mjs RUN pnpm install --frozen-lockfile --prod=false # ── Stage 2: Build ───────────────────────────────────────── -FROM node:22-trixie-slim@sha256:be1e2a3dc2c4fd68cdfadad2a696a280e0d2749098bee509230174d72fb768c6 AS builder +FROM node:22-trixie-slim@sha256:68c76cfad89921b927eae28ba21407475e29d0ce450afcdbe70c1532db042b64 AS builder RUN corepack enable && corepack prepare pnpm@11.15.1 --activate WORKDIR /app @@ -127,7 +127,7 @@ RUN node scripts/verify-message-catalogs.mjs --dir messages \ # npm install never reads. Rebuilding this install both ways confirms it: # without the two fields below npm resolves 1.19.11 and 1.2.0, with them it # resolves 1.19.17 and 1.4.2, and `prisma --version` still reports 7.8.0. -FROM node:22-trixie-slim@sha256:be1e2a3dc2c4fd68cdfadad2a696a280e0d2749098bee509230174d72fb768c6 AS prisma-cli +FROM node:22-trixie-slim@sha256:68c76cfad89921b927eae28ba21407475e29d0ce450afcdbe70c1532db042b64 AS prisma-cli RUN mkdir -p /opt/prisma-cli && \ cd /opt/prisma-cli && \ npm init -y && \ @@ -159,7 +159,7 @@ RUN set -eu; \ cp -L "$LIBPQ" /out/lib/libpq.so.5 # ── Stage 5: Production runner ───────────────────────────── -FROM node:22-trixie-slim@sha256:be1e2a3dc2c4fd68cdfadad2a696a280e0d2749098bee509230174d72fb768c6 AS runner +FROM node:22-trixie-slim@sha256:68c76cfad89921b927eae28ba21407475e29d0ce450afcdbe70c1532db042b64 AS runner # The package managers the base ships (npm, npx, corepack, yarn) go first. # Nothing at runtime installs a package, and the bundled npm carried the only # HIGH findings with a fix the image scan reported. Removed in a later layer, diff --git a/scripts/__tests__/release-workflows.test.ts b/scripts/__tests__/release-workflows.test.ts index 1b32ba387..4794f663f 100644 --- a/scripts/__tests__/release-workflows.test.ts +++ b/scripts/__tests__/release-workflows.test.ts @@ -228,7 +228,7 @@ describe("release container inputs", () => { expect(fromLines).toHaveLength(4); expect(new Set(fromLines.map((line) => line.split(" AS ")[0]))).toEqual( new Set([ - "FROM node:22-trixie-slim@sha256:be1e2a3dc2c4fd68cdfadad2a696a280e0d2749098bee509230174d72fb768c6", + "FROM node:22-trixie-slim@sha256:68c76cfad89921b927eae28ba21407475e29d0ce450afcdbe70c1532db042b64", ]), ); }); From 685645db3d5eb792a0fc2742911c6e1251e410f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 15 Nov 2026 23:14:21 +0100 Subject: [PATCH 2/5] build(deps): move the pgclient stage to the rebuilt postgres 18.6 image postgres:18.6-trixie now resolves to e3d24f6, a multi-arch index with linux/amd64 and linux/arm64 on the current Debian trixie-slim base. The PostgreSQL package is unchanged (18.6-1.pgdg13+2). --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d24350db8..0c92fe0d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -150,7 +150,7 @@ RUN mkdir -p /opt/prisma-cli && \ # does for the bundled database. The libpq file is found through the loader # rather than by an architecture path, so the step is the same on amd64 and # arm64. -FROM postgres:18.6-trixie@sha256:3a4264520e121176619f54ff867d12774bc81e95e7b84db58d63bccdb6144b81 AS pgclient +FROM postgres:18.6-trixie@sha256:e3d24f6906d0760bf4da0dae872415391ededefad23fd471c47dc53b0ddf3c42 AS pgclient RUN set -eu; \ mkdir -p /out/bin /out/lib; \ cp /usr/lib/postgresql/18/bin/pg_dump /usr/lib/postgresql/18/bin/pg_restore /out/bin/; \ From 0d5f1ec04a60ba942c8cd009dc3b6efcdae77b71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 15 Nov 2026 23:18:35 +0100 Subject: [PATCH 3/5] build(deps): bump the production-weekly group @aws-sdk/client-s3 3.1169 and lib-storage 3.1167, @napi-rs/canvas 1.1.1, @simplewebauthn/server 14.1.0, @tanstack/react-query 5.107.1, dotenv 18.0.10, jose 6.2.17, lucide-react 1.73, mmdb-lib 3.0.5, nodemailer 10.5.0 and pg-boss 12.38.2. The pins that hold these move after reading the installed sources: - pg-boss 12.38.2 keeps the failed-row ledger the 72-hour reader relies on: deletion still runs on completed_on + deletion_seconds against job_now(), with the 14-day retention, 7-day deletion, 15-minute expiry and two retries unchanged. The release only moves keep_until along with start_after on retry and resume. - @simplewebauthn/server 14.1.0 adds passkeyProviderMetadata to the registration result. It is filled only by an initialised FIDO metadata service, which downloads from the FIDO Alliance; HealthLog initialises none, so the contract now pins the field as absent. The stored key bytes are unchanged. The new origin and RP ID checks reject a trailing slash or non-ASCII form, and both values already come from URL.origin and URL.hostname. - dotenv 18.0.10 moves its CLI to a separate entry; the library API is unchanged. The Prisma CLI stage installs the same version. --- Dockerfile | 2 +- package.json | 22 +- pnpm-lock.yaml | 467 +++++++++--------- .../webauthn-library-contract.test.ts | 6 + .../__tests__/job-failures-retention.test.ts | 2 +- 5 files changed, 257 insertions(+), 242 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0c92fe0d6..97664f5f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -136,7 +136,7 @@ RUN mkdir -p /opt/prisma-cli && \ npm pkg set 'overrides.@hono/node-server=^2.1.3' && \ npm pkg set 'overrides.valibot=^1.4.2' && \ npm pkg set 'allowScripts.@prisma/engines=true' 'allowScripts.prisma=true' 'allowScripts.esbuild=true' --json && \ - npm install --omit=dev prisma@7.10.1 @prisma/engines@7.10.1 tsx@4.23.1 dotenv@18.0.9 --no-fund --no-audit + npm install --omit=dev prisma@7.10.1 @prisma/engines@7.10.1 tsx@4.23.1 dotenv@18.0.10 --no-fund --no-audit # ── Stage 4: PostgreSQL client ───────────────────────────── # pg_dump and pg_restore of the bundled database's major, taken from the diff --git a/package.json b/package.json index cc04dd6e6..b81ecf853 100644 --- a/package.json +++ b/package.json @@ -54,38 +54,38 @@ "mcp:stdio": "npx tsx src/cli/mcp-stdio.ts" }, "dependencies": { - "@aws-sdk/client-s3": "^3.1162.0", - "@aws-sdk/lib-storage": "3.1162.0", + "@aws-sdk/client-s3": "^3.1167.0", + "@aws-sdk/lib-storage": "3.1167.0", "@dnd-kit/core": "^6.3.1", "@dnd-kit/sortable": "^10.0.0", "@dnd-kit/utilities": "^3.2.2", "@modelcontextprotocol/sdk": "^1.32.2", - "@napi-rs/canvas": "1.1.0", + "@napi-rs/canvas": "1.1.1", "@node-rs/argon2": "^2.2.2", "@parse/node-apn": "^8.2.0", "@prisma/adapter-pg": "^7.10.1", "@prisma/client": "^7.10.1", "@simplewebauthn/browser": "^14.0.0", - "@simplewebauthn/server": "^14.0.3", - "@tanstack/react-query": "5.106.1", + "@simplewebauthn/server": "^14.1.0", + "@tanstack/react-query": "5.107.1", "@tanstack/react-virtual": "^3.14.26", "@types/sax": "^1.2.7", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "date-fns": "^4.4.0", - "dotenv": "^18.0.9", + "dotenv": "^18.0.10", "fflate": "^0.8.3", - "jose": "^6.2.15", + "jose": "^6.2.17", "jspdf": "^4.2.1", "jspdf-autotable": "^5.0.9", - "lucide-react": "^1.69.0", - "mmdb-lib": "^3.0.4", + "lucide-react": "^1.72.0", + "mmdb-lib": "^3.0.5", "next": "16.4.5", - "nodemailer": "10.3.1", + "nodemailer": "10.5.0", "otpauth": "^9.6.0", "p-limit": "^7.3.3", "pg": "^8.23.1", - "pg-boss": "^12.38.1", + "pg-boss": "^12.38.2", "prisma": "^7.10.1", "qrcode": "^1.5.4", "radix-ui": "^1.8.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 433073ef4..2e95172c9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -47,11 +47,11 @@ importers: .: dependencies: '@aws-sdk/client-s3': - specifier: ^3.1162.0 - version: 3.1162.0 + specifier: ^3.1167.0 + version: 3.1169.0 '@aws-sdk/lib-storage': - specifier: 3.1162.0 - version: 3.1162.0(@aws-sdk/client-s3@3.1162.0) + specifier: 3.1167.0 + version: 3.1167.0(@aws-sdk/client-s3@3.1169.0) '@dnd-kit/core': specifier: ^6.3.1 version: 6.3.1(react-dom@19.3.1(react@19.3.1))(react@19.3.1) @@ -65,8 +65,8 @@ importers: specifier: ^1.32.2 version: 1.32.2(@cfworker/json-schema@4.1.1)(supports-color@7.2.0)(zod@4.6.7) '@napi-rs/canvas': - specifier: 1.1.0 - version: 1.1.0 + specifier: 1.1.1 + version: 1.1.1 '@node-rs/argon2': specifier: ^2.2.2 version: 2.2.2 @@ -83,11 +83,11 @@ importers: specifier: ^14.0.0 version: 14.0.0 '@simplewebauthn/server': - specifier: ^14.0.3 - version: 14.0.3 + specifier: ^14.1.0 + version: 14.1.0 '@tanstack/react-query': - specifier: 5.106.1 - version: 5.106.1(@types/react@19.3.0)(react@19.3.1) + specifier: 5.107.1 + version: 5.107.1(@types/react@19.3.0)(react@19.3.1) '@tanstack/react-virtual': specifier: ^3.14.26 version: 3.14.26(react-dom@19.3.1(react@19.3.1))(react@19.3.1) @@ -104,14 +104,14 @@ importers: specifier: ^4.4.0 version: 4.4.0 dotenv: - specifier: ^18.0.9 - version: 18.0.9 + specifier: ^18.0.10 + version: 18.0.10 fflate: specifier: ^0.8.3 version: 0.8.3 jose: - specifier: ^6.2.15 - version: 6.2.15 + specifier: ^6.2.17 + version: 6.2.17 jspdf: specifier: ^4.2.1 version: 4.2.1 @@ -119,17 +119,17 @@ importers: specifier: ^5.0.9 version: 5.0.9(jspdf@4.2.1) lucide-react: - specifier: ^1.69.0 - version: 1.69.0(@types/react@19.3.0)(react@19.3.1) + specifier: ^1.72.0 + version: 1.73.0(@types/react@19.3.0)(react@19.3.1) mmdb-lib: - specifier: ^3.0.4 - version: 3.0.4 + specifier: ^3.0.5 + version: 3.0.5 next: specifier: 16.4.5 version: 16.4.5(@babel/core@7.29.7(supports-color@7.2.0))(@opentelemetry/api@1.9.1)(@playwright/test@1.65.0)(@types/node@26.6.6)(react-dom@19.3.1(react@19.3.1))(react@19.3.1) nodemailer: - specifier: 10.3.1 - version: 10.3.1 + specifier: 10.5.0 + version: 10.5.0 otpauth: specifier: ^9.6.0 version: 9.6.0 @@ -140,8 +140,8 @@ importers: specifier: ^8.23.1 version: 8.23.1 pg-boss: - specifier: ^12.38.1 - version: 12.38.1(@opentelemetry/api@1.9.1) + specifier: ^12.38.2 + version: 12.38.2(@opentelemetry/api@1.9.1) prisma: specifier: ^7.10.1 version: 7.10.1(@types/node@26.6.6)(@types/react-dom@19.3.0(@types/react@19.3.0))(@types/react@19.3.0)(magicast@0.5.5)(react-dom@19.3.1(react@19.3.1))(react@19.3.1)(typescript@6.0.3) @@ -303,78 +303,78 @@ packages: resolution: {integrity: sha512-U4+70Pc5ZS9osnCBCE5Jha/ciHM+Yp+CNMNC/7HvYbNRk1Ldd+f7qO65W5qfhu/TCv+/ozljlXXe9Nj8419DMA==} engines: {node: '>=10'} - '@aws-sdk/checksums@3.1002.2': - resolution: {integrity: sha512-u57THWR5YOCqjIzg5og8r5dDc54n7hENs2eVy+aw1+Fd+QERa2x72qNlsiMNJI9svSpQp3WevkSKljzIG6x1YA==} + '@aws-sdk/checksums@3.1002.5': + resolution: {integrity: sha512-OHlfkNzDFjYnwNPABhwAkDTUi0HPjfsKUHJDR0bSMORpCXNzRpInPCNCIT08xKDhjaPlcLJ+2Av+Sk7hHnuC8A==} engines: {node: '>=20.0.0'} - '@aws-sdk/client-s3@3.1162.0': - resolution: {integrity: sha512-WIPNPTQJnZBpWeeejEp7TPb2Jajy2kHqOkq5GzbI/vCU9Hu8Ks8kdHBFUuu7IC+bZuC/OuvPKL3ciet0RQkiAA==} + '@aws-sdk/client-s3@3.1169.0': + resolution: {integrity: sha512-5IjQ2R1TM5lMuUvCvCfGNG9q6g3nxdputC9FY7YQJf1ygVUwsOruEYxQqpjik1nZdl8mNvV57Mhivtp2JbgBtg==} engines: {node: '>=20.0.0'} - '@aws-sdk/core@3.980.0': - resolution: {integrity: sha512-2RVSP/SsPS8HSPPzIPWNYFnSmlOdxx8VDlt5gDOuMaq9UiIi35pUyo6ZEuJcysjVCu0L8Lv5dJevLLpEkyF0/Q==} + '@aws-sdk/core@3.981.0': + resolution: {integrity: sha512-Mnu7gaDrC5UCdyH8uLxLfB2eWbjE/HbjKX1U1J2VQxG3TTATUDObW2wU3I8iH3e9YH5NN2CY6w1mlAIe2XJ3jg==} engines: {node: '>=20.0.0'} - '@aws-sdk/credential-provider-env@3.972.81': - resolution: {integrity: sha512-VD+EVZ9UHNZhSm4KtakXZAPzgfOw4mRx66dAXNUtHcdJUisbsE7kpi1PRZFMquvuqVfx52fCDBgJgYyOFT/4hQ==} + '@aws-sdk/credential-provider-env@3.972.84': + resolution: {integrity: sha512-akZJetiMVeLRHsKzYh3LamDCo74ZUCeo0XoyRKMEMZT5qP7ReM6LhpioBCyuqKP5Vav5gEOeCmaQV0VVQr1Meg==} engines: {node: '>=20.0.0'} - '@aws-sdk/credential-provider-http@3.972.83': - resolution: {integrity: sha512-NsLT02HXcWAQAgpuDJznoJDPIDH/Hh2LiQVlYc+1bVGsksEUZuYCMKa1E1L5qvzc5LLTphp7BP9LYVIhf+MbQA==} + '@aws-sdk/credential-provider-http@3.972.86': + resolution: {integrity: sha512-U4mHaDRPWAn63yhl7FXIzbppNmW1F+4dSLeuiUpej2v3Xb6rGwvayEJ8SdlrdMV+/mZtd+GStTEP2HqurEzXtw==} engines: {node: '>=20.0.0'} - '@aws-sdk/credential-provider-ini@3.973.26': - resolution: {integrity: sha512-vRydnN8wPqh5APe5R+/y4/UOts7QQQQP1UTczJq3fLcLzkQblbkYpLn+Srr8w9S/gzXU1pbiPKTv479unRawAA==} + '@aws-sdk/credential-provider-ini@3.973.30': + resolution: {integrity: sha512-r6r6499GWoGN943NA5YEhBEQ6TEOGTf7tTOBhHd/zw0UbNvSzd1/zPCNcDkPmRarA+e24X7KgxutqxjoWcskBg==} engines: {node: '>=20.0.0'} - '@aws-sdk/credential-provider-login@3.972.88': - resolution: {integrity: sha512-J8IcBpuFj3j3RImHq/dVO5HtnUbFgvzg7JQvzLt5A42VmzLLgPLM+CUWN68jpIMdIPayu1bb1T+mJjDv9Sq1aA==} + '@aws-sdk/credential-provider-login@3.972.92': + resolution: {integrity: sha512-96bcp9Pe/Xd60OEwncZ+kAQTQSu+fJnpUGz1qE6ghF5jnETmrk8XMU86mIP3lolvnCgR61XbZ+Ht6hdBjiQOmQ==} engines: {node: '>=20.0.0'} - '@aws-sdk/credential-provider-node@3.972.93': - resolution: {integrity: sha512-f5Grg1sgckk11ojxZ7NUYG1ZCOvcNhuuPngKWVxOKGuZokj8eOmo/75+GyR6qAQx4wAGytglZ53r4a3UPleAPQ==} + '@aws-sdk/credential-provider-node@3.972.97': + resolution: {integrity: sha512-E4a0IXXJVsIdo/K9roX4JAEfI0JJr7KTPymkbKgETRDqEcLygE4ZlLTe24+7Qkh8Dl5YpnPd+Tt0DOPJDFXIwA==} engines: {node: '>=20.0.0'} - '@aws-sdk/credential-provider-process@3.972.81': - resolution: {integrity: sha512-6NBoFaNJbHB0YjcKW4WfrYIDmaMjtwbxlRreAf3MnXkD9WJX8XYu62pa78M0AQGgEt2TJmcNxqL3btAAjV67bA==} + '@aws-sdk/credential-provider-process@3.972.84': + resolution: {integrity: sha512-199C6OpNejd0nq9GFAkEFIKids1FL0R6LJtL9c1OTiDOXki7S1OduuPxW4+hE0LwndcYJ7YHOuYTlqScfpCocA==} engines: {node: '>=20.0.0'} - '@aws-sdk/credential-provider-sso@3.973.25': - resolution: {integrity: sha512-p1fNaa3as6S2L0wrWqe1cEz1r4iGQa7GbW23KJE3rJy+ZZxhPr6pr9cyCAJ7fAnzoMELvQGZZAuv/rG1ogRuOQ==} + '@aws-sdk/credential-provider-sso@3.973.28': + resolution: {integrity: sha512-bGg7wH8wVDJQIcJggO9lg1ZYbG7l+PbLwHuM3Bi/e1TlCZhU712JS1W3tdRpyptdJD1UGyhBNGO/YrhrQCHKbg==} engines: {node: '>=20.0.0'} - '@aws-sdk/credential-provider-web-identity@3.972.87': - resolution: {integrity: sha512-O2P6CUfMP2qi8vgYB6UHYj/NYTEAAdTr2geEVdVchr3JBofK4Q6W917FiVr2sleA72R59YAXMEhrpzPwkX/xdA==} + '@aws-sdk/credential-provider-web-identity@3.972.90': + resolution: {integrity: sha512-duLeE3xlf0viHeH+1RM4z5duR3b32BCZTWVMu+MbxFPjQBxy7hmIGEqt5hekuFPRuXoyhMovjNl+PNNsb5oiGQ==} engines: {node: '>=20.0.0'} - '@aws-sdk/lib-storage@3.1162.0': - resolution: {integrity: sha512-lHesG1fq+CC4iuAdu+dLXSDiiorYQWOkYZEmJVToIfs0vR2UYGKV7hfM0URkt/v1cSBSBfcLl6CZ9MkqeSoRfA==} + '@aws-sdk/lib-storage@3.1167.0': + resolution: {integrity: sha512-OdV5oTxZKjoyeRMYpbEDu/JaKiRY+NaukQOqKF5xX6/107cpbR3JbcxxesAOTmygNH7thmpaAnaWe78j4Oisdg==} engines: {node: '>=20.0.0'} peerDependencies: - '@aws-sdk/client-s3': ^3.1162.0 + '@aws-sdk/client-s3': ^3.1167.0 - '@aws-sdk/middleware-sdk-s3@3.972.86': - resolution: {integrity: sha512-S3RunQUwvUJcuJ5VrVgvhN5OsVpK4GHRcuXaSawCbutO4piyHTmpObUKm19HdqqLBqjf6kHSeAOk/7OyAJ+hmA==} + '@aws-sdk/middleware-sdk-s3@3.972.89': + resolution: {integrity: sha512-Lem2/ZT1eOicVATBukPRPm2S4JAmrTEkP3/dnJE9iTeyqIKqsJF2j04f5L0o+rrZIrwR13swiQMdzcE5jXRzNA==} engines: {node: '>=20.0.0'} - '@aws-sdk/nested-clients@3.998.0': - resolution: {integrity: sha512-aOD1oQVWG6UjOOEdp0MsrWE93vG8pPbvtymmeNtglGxAARplh1wzhHs4npqtY5JN5GBSrTaLbn1hQQ3W2Lk8ow==} + '@aws-sdk/nested-clients@3.998.3': + resolution: {integrity: sha512-acHTTzMB13CU6dU4sxABYExMI3PQM2zStWH2MiUwJp/7QKTrLg2f7mbzSXoegW2kYOk2tdqQYagsZrWB8Xv7eA==} engines: {node: '>=20.0.0'} - '@aws-sdk/signature-v4-multi-region@3.996.51': - resolution: {integrity: sha512-+aHvUugVBuMPXxgkPfWnTMyGdE/yWS8GHi5+qQ37HowS0YqzrbuaDLznj+Dtmtu5jgCdqz36gXmujOToUhNNWw==} + '@aws-sdk/signature-v4-multi-region@3.996.52': + resolution: {integrity: sha512-6W6SjGc8OXUhMzNxU1X922ghD+PP1XvzmCk5Scui0jaYsLezycMYR1RaLp5xTIOUrhTXyb4DnAbPr3fBgmdnzg==} engines: {node: '>=20.0.0'} - '@aws-sdk/token-providers@3.1162.0': - resolution: {integrity: sha512-vOD6Ac0M43LtXaPu+/+wUMQCd27zIpKt/Le/a645qhx7T1MZeEK71PDhtIHGHgnQjGyNSfC6Z5RNud/hQb3veg==} + '@aws-sdk/token-providers@3.1166.0': + resolution: {integrity: sha512-ngJ8mxXqtQ9mnp7QV6TWKJCxkpjVfPWxKQSc2FYhCyCfOVFIGdFv7P+/RqVffFrJAorwBPpktnv32gNlcEgF4g==} engines: {node: '>=20.0.0'} - '@aws-sdk/types@3.975.0': - resolution: {integrity: sha512-WQlhs6juByzWOzj5fwxOx0mPJaEqMcG/sDpl3Id61B3XhKE63xY+0QWcnG+sWR/sCfprmreyUo1lM7IKZmHMzw==} + '@aws-sdk/types@3.975.1': + resolution: {integrity: sha512-7rGxUkCB2QPoQOeJmonmAICTN2zrH+fpmi1p4Iwu72lnxNaMhOgqcbpyddifnM1DBb19TWQ1u6z/XjkaFNEDWw==} engines: {node: '>=20.0.0'} - '@aws-sdk/xml-builder@3.972.42': - resolution: {integrity: sha512-smX8/gNP8Kjq+CWTBMZQLQ912vOQjiWExzwzvMO+eujPB5RY8IbtF0AGdUUXHKN7KoDWK9dIcuW0WG269kiP6w==} + '@aws-sdk/xml-builder@3.972.43': + resolution: {integrity: sha512-rG8QVx4DOrJWptsogu1Aq+CDsnPKaBrAlJpKLxrJrIDXAq1ElnW0yQjjBnlWSXll0cDakCG6UDvaqwz0A9d9Og==} engines: {node: '>=20.0.0'} '@aws/lambda-invoke-store@0.3.0': @@ -1247,79 +1247,79 @@ packages: resolution: {integrity: sha512-VVPPgHyQ6ShqnrmDWuxjmUIsO9gWyOZFmuOfLd9LfBGQJwZfy0gvv9pbHSJuoFNIYC7ZDX9aoFwowjcdSC4E8w==} engines: {node: '>=18'} - '@napi-rs/canvas-android-arm64@1.1.0': - resolution: {integrity: sha512-mKrSmRyhWK4q699Q1xthbZIZi7JBvLtsRNnOZAeFaLPOFT1yo8y82aRC2nNZbXTGJXU7fVDONgGQPr0vo3kerw==} + '@napi-rs/canvas-android-arm64@1.1.1': + resolution: {integrity: sha512-rSEp3y+/YXw6TxSx4/NHSAFxumZrkMoXy2WiVqpKGT8oF5GHOUDzTKj45e5cvzophX4iFaxwKs3+/gNkJ7FmzQ==} engines: {node: '>= 10'} cpu: [arm64] os: [android] - '@napi-rs/canvas-darwin-arm64@1.1.0': - resolution: {integrity: sha512-iqwST4g0oH+x8VCpBIYh+MYokv/mVvkM+v9oJGB0d9A3P2qBh42ogJlVyWq9SpPCrAjS7tplMb1D3OIfxl+utw==} + '@napi-rs/canvas-darwin-arm64@1.1.1': + resolution: {integrity: sha512-NrPTZWpu0ywOGdp9JBDi46gABUzDJK6IzlP7cOEwaAuVVFM8KRakUWk12RK3YQ/Ea5FrNVTWUFTmkXVk4RfHqg==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@napi-rs/canvas-darwin-x64@1.1.0': - resolution: {integrity: sha512-jkeA8eVTxDum03LTvc32YJ28F6KB1U0gYwnWMfOAUQZvWWEh/kvONby4iWGJx3+Tw45UqMGMXjtw2GKNVZDhVg==} + '@napi-rs/canvas-darwin-x64@1.1.1': + resolution: {integrity: sha512-p3DOT8VBfu8cR3SVBUs6cEzJmzwOUQkNfo1S4nKLgeKDsSlvn2oZsRaa9m0lfMccn1WbwtgKCEpJXmHhp++Zrg==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@napi-rs/canvas-linux-arm-gnueabihf@1.1.0': - resolution: {integrity: sha512-Y4YkKG1ijoqkgUdTEEBNG4k+2BK5bR5jGL6S56YxCXYPwGfUd5nED8/74xyc7z+bpixPasCjSYoP3xYPOIGNxw==} + '@napi-rs/canvas-linux-arm-gnueabihf@1.1.1': + resolution: {integrity: sha512-YWGJfMa8TtEhsHd/kDiyBFwT/dAbRQiXwsm0tDev4H5cJiyOk08CC83JihrwnUsePGjIvxC8/8g/zqKKuqjpQA==} engines: {node: '>= 10'} cpu: [arm] os: [linux] - '@napi-rs/canvas-linux-arm64-gnu@1.1.0': - resolution: {integrity: sha512-dE/XthqYkiWcBVtKFlZbUXwAYfDuQGqDWixznipJNmevLGpprNnTVQZyftm1RZJudkIOn2EkzYZDMMETM08Row==} + '@napi-rs/canvas-linux-arm64-gnu@1.1.1': + resolution: {integrity: sha512-q1HBkNmB9mc6SF6uSz2492qSgsB46MqS+n3bPbPCE0kUXmWAPkH9vDADeawbhepQYn8RhlV2V/P5u6nykFXbuQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] libc: [glibc] - '@napi-rs/canvas-linux-arm64-musl@1.1.0': - resolution: {integrity: sha512-DqZ/CMcHlhU56pPjv9AP0h3U7MFQ5LzC1HzMyRMotL+PFsJmZJA/ziApPYVyyz78DaVLhI8t3So3ztqtijbYpg==} + '@napi-rs/canvas-linux-arm64-musl@1.1.1': + resolution: {integrity: sha512-aF4RkTp2T45fERFPCIqbxeKVhvhHuXeyyk5/jdJ+N0tGLZy4NvMkIrBWt6GOCmAQ7H0G3M/O03hAsc4Li52q4A==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] libc: [musl] - '@napi-rs/canvas-linux-riscv64-gnu@1.1.0': - resolution: {integrity: sha512-kJ7m5n2VffxWXM5QGa5lfq8ZN4LdOJEoz3aAJAmIqYvKiZw1gRdXqpucnRXsF6D9nLYiiIlevaAtAclR7c5ilg==} + '@napi-rs/canvas-linux-riscv64-gnu@1.1.1': + resolution: {integrity: sha512-rCU4Xo5h0AQFEaa9dNr7Kxbk4gke9Uyi/I6ZXuBGYPSNWxYmWRS6DkrxaSKUJyCgA7c8l6lZBYfx/FtbJo3fMA==} engines: {node: '>= 10'} cpu: [riscv64] os: [linux] libc: [glibc] - '@napi-rs/canvas-linux-x64-gnu@1.1.0': - resolution: {integrity: sha512-uQ9JuJlRhQdHyttcMWOiwLkfIqkqaB0YFUVe835LUe12THt2b51HXkTItq0fxWT1jdhUPX2ylWZ1walkJyD6GQ==} + '@napi-rs/canvas-linux-x64-gnu@1.1.1': + resolution: {integrity: sha512-7bZfDI9lxKqj9wJRHiSQBimCRanxDGHYE7TugnOmFJ9ScpgFSsLHFQtOH9wvmbQvBwv5nBuDBGJlG0+7iGkN+w==} engines: {node: '>= 10'} cpu: [x64] os: [linux] libc: [glibc] - '@napi-rs/canvas-linux-x64-musl@1.1.0': - resolution: {integrity: sha512-has4CPPAkkCac/LZ13VAw5p+MJLdaKVoyrhumN/A7uJd6960xYkJNDZgUebyxiha82AFzXx6RV+QJg5qGG079g==} + '@napi-rs/canvas-linux-x64-musl@1.1.1': + resolution: {integrity: sha512-xaFof2p0aO7C7ziMCLeueve09PVEKYCebljLTL3nyxoaRsYpEnBrUBP1aVpfD1Nk464dc7/wPV23fkHdOBie2g==} engines: {node: '>= 10'} cpu: [x64] os: [linux] libc: [musl] - '@napi-rs/canvas-win32-arm64-msvc@1.1.0': - resolution: {integrity: sha512-MJnktLKNijmXqdjTughHDZ9TDLZ9uUm2hvFXqaOqn0+w7lphXFnft6bpSgQAc9U1exc20UGIBlzGu9+kiCj9Ag==} + '@napi-rs/canvas-win32-arm64-msvc@1.1.1': + resolution: {integrity: sha512-wOLX/WRwWr0xGj2hnDf/t3tZfPlzzL9rGPsO1UnYSuNbRzwas/hC8JXnuhaEs8eCw+J+W4zxOJiVF4RxkvcMfw==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@napi-rs/canvas-win32-x64-msvc@1.1.0': - resolution: {integrity: sha512-08575bFk7iiadxap4h+JxgGut9xDCHAGum6wh0eInN53zEMImkmEHi5MushX2FOmNO7qRNX7BPiDC5ZYBwHeEg==} + '@napi-rs/canvas-win32-x64-msvc@1.1.1': + resolution: {integrity: sha512-6Ge1AF1SVO+Ypjaw9IPcApm95krR3GQ32HgVqlIckbN/WqUlWYS0hnb8ZIdu3e0IbutbJgd8D2qSeb2/Cdpbdw==} engines: {node: '>= 10'} cpu: [x64] os: [win32] - '@napi-rs/canvas@1.1.0': - resolution: {integrity: sha512-k+ph/D8H9GS8ZZ48okvHrKeJynkqAA1kMUZRuzRWNlQUDHXngq7oRaWMZBdmSfd9ZhVy9bwNKei/7wMboI/uMg==} + '@napi-rs/canvas@1.1.1': + resolution: {integrity: sha512-UyNspnx0rXclATMOBXiWgy1xtWUSUDm4UOO6+YO8xzyVKaZRpvK+SlJSCtRoSI9J/mEqklJiPYtroN1B+hgLXg==} engines: {node: '>= 10'} '@napi-rs/wasm-runtime@1.2.7': @@ -2794,9 +2794,9 @@ packages: '@simplewebauthn/browser@14.0.0': resolution: {integrity: sha512-1odWVqeEBTl7lJ9zMKLEsmTlnyrDO5iRcTvfMKKk1WThUnp/i8JJdffdj2icP+tty159s4PgwE3BiMoEW9NFow==} - '@simplewebauthn/server@14.0.3': - resolution: {integrity: sha512-D39/0fiDiYmGV+nraY9s63D1Ho2AX/waMLy22/9gUadTUuvbAnstfb4bpbHYbwZuV5ZLDYN1SmzDKuiHzKAA4Q==} - engines: {node: '>=20.0.0'} + '@simplewebauthn/server@14.1.0': + resolution: {integrity: sha512-HPRRBR4Vzr45+RVvbmf6JuCfGdYYcSs4Pnnnp9YSY2IABa4JKnG+wxybczoB7rmdLCOMS/mbBa2ZL/Bcz58UlA==} + engines: {node: '>=22.0.0'} '@sindresorhus/merge-streams@4.0.0': resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==} @@ -2806,12 +2806,16 @@ packages: resolution: {integrity: sha512-JJ/46AWQ4ipS1N2eZmUj7yzIhH8NhQIfAE+dce7NSB6dmFh+7hvD4pbofcoT4I0Xzfy/LNhZx3V2QhwYyAiqdg==} engines: {node: '>=18.0.0'} + '@smithy/core@3.40.0': + resolution: {integrity: sha512-DssGno52pzZ5m6RlDtyKuBIpZNPg9pqgs0CnNDKz9IatxCsmvNmJNn5Zn6rf77MthZo9wf89OvZFhTY/RwxhxQ==} + engines: {node: '>=18.0.0'} + '@smithy/credential-provider-imds@4.5.2': resolution: {integrity: sha512-A9uSdn72ozbRUSit0eib0TW7nXuNPlaeM0zcGkJ+nE6tFcSDbnmtwoxbTCFBukVQcszDAyvsd7+rTduPTXpygg==} engines: {node: '>=18.0.0'} - '@smithy/fetch-http-handler@5.8.0': - resolution: {integrity: sha512-ycSJu3tFAQ4v04CBB0agqFMVsSQ1iG3yw+SpgxRqKfaURpQD4CZ8Wn0zPMmSnOuTpTh65Vz+EA0rMrw089wvkA==} + '@smithy/fetch-http-handler@5.8.1': + resolution: {integrity: sha512-h8BdMUrUBhMhMaeK7QqAdINRZezCGuYOCpcOZZ1ewxbHST9rdTd09xwNpvLTYfzDRehxQiReK4SKbdYZxBA+ew==} engines: {node: '>=18.0.0'} '@smithy/node-http-handler@4.14.2': @@ -2956,11 +2960,11 @@ packages: '@tailwindcss/postcss@4.3.5': resolution: {integrity: sha512-FAV37Tlx9wBiT/hkfgVD0Q6CWsP2oUX3lf28nrfjW8+ksILjnpuFulUqWDfNR4/ZiEHHDRBX8DUTzD1Rys687A==} - '@tanstack/query-core@5.106.1': - resolution: {integrity: sha512-erYv/UACddcdgjOL2ixmFdK6tO/AVBeUcTCOtX2N51yZpDQ2U7KJ+xgB/bCNfsF3uoCDTqGHEEbDiFsIO9YUmQ==} + '@tanstack/query-core@5.107.1': + resolution: {integrity: sha512-PSyAik11oQBEVOiVy5hjZWHmoUqOXqK1WYy4v55mcxozEfKaQgpUMsgnXhWjuESzSht8JfzqMS1m6M/9CpNgvg==} - '@tanstack/react-query@5.106.1': - resolution: {integrity: sha512-ORDvJG/DSfmlFL9lQ8GDkE0VjtQbLeRDY7BL8xjKkQFGLfjFGfNWNuteWgPqA2gPJgLLuWfQ7IX0FlsHCJriyg==} + '@tanstack/react-query@5.107.1': + resolution: {integrity: sha512-udCOOLp3ZAheUrIHLCe+ZZge6nr2ZUrGMSWcCuXsjY1Bf2JeeE09oxst97PILiCY6N8xo/7bIo3Hvz13zh06FA==} peerDependencies: '@types/react': ^18 || ^19 react: ^18 || ^19 @@ -4148,8 +4152,8 @@ packages: resolution: {integrity: sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==} engines: {node: '>=12'} - dotenv@18.0.9: - resolution: {integrity: sha512-3fVOW4cB02R066PUSwn8O4TJyz9NckQl7F81blIbaq9jKBm2tSmOKky7ZHIXzGvkVPXCSn6jkpziBPZdGFs8Tw==} + dotenv@18.0.10: + resolution: {integrity: sha512-89FAA1xchzK2mxVWdr5F/0rldwiueXs6zJM86rO66EzekR1iBdiXRthyG+m5GvkJaFH3C2LESzamTkgndmLT2A==} engines: {node: '>=12'} hasBin: true @@ -5059,8 +5063,8 @@ packages: resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==} hasBin: true - jose@6.2.15: - resolution: {integrity: sha512-qdF6ewcZARtef63fJ9AKKZPgxw+t7USH6HLXYcD4CrdmSvDp79rpJSPFEKc90QBeGS63u1KQtN2MZQHC0yDIzA==} + jose@6.2.17: + resolution: {integrity: sha512-wOuK9V1yujQFH5S0ZWmLcDZN7+IKh9bUCC2ZPCf2HDlol3WWHy+PPyNjEI75FXRLMp3vDKQcupP59xhVU95hcg==} js-md4@0.3.2: resolution: {integrity: sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA==} @@ -5365,8 +5369,8 @@ packages: resolution: {integrity: sha512-5J9ysMYUpYIg9RF2vJpy9SinEmSviFSe0GyPpCQ4L5QSkLAgeLXlTAOu2ZwWUU5m+0SBl6gUU1R1ZQB3aKypfA==} engines: {bun: '>=1.0.0', deno: '>=1.30.0', node: '>=8.0.0'} - lucide-react@1.69.0: - resolution: {integrity: sha512-UTFECm4yEgkgMN0kfLuxWcmlk+4u02Jrqehgk3ZXRx/Ud68OpP7hjkp67bvkBHmIpMaZCIveF1QDYeupO7XmYQ==} + lucide-react@1.73.0: + resolution: {integrity: sha512-fVOzGviL9mTfHenG1PbCfIceavyGlnpYNSYr+aGZHLRymAJ7DTP6KHuqt0uBkCKAoenr1UVkwSbDIYt2xIesEQ==} peerDependencies: '@types/react': '*' react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -5460,8 +5464,8 @@ packages: engines: {node: '>=10'} hasBin: true - mmdb-lib@3.0.4: - resolution: {integrity: sha512-tWy4b2UQaJjRhW/VGpy7ypMMgS7JfPezMsmVW7/utlWm6vv1JgsxXkmjuv/SjN6tsG8YrKHfJ00zHhrOCQDhjg==} + mmdb-lib@3.0.5: + resolution: {integrity: sha512-fBhq5SQHKXwL4dPwF4/Xesw6Ai5nsPlft7RWQwBOm5fhfrQs0r1dR7FbLCaaKH9pkub2s4BKrHAeZUjq+KrX7g==} engines: {node: '>=10', npm: '>=6'} mrmime@2.0.1: @@ -5570,8 +5574,8 @@ packages: resolution: {integrity: sha512-BdiKAgbfRlvfMq/XzO/AF9NPmaA8a+YpLAyAFTVFBj3gARrAIfWvNq7Q7NE4se3KgFu0KkrvQMxTS0XVnsGzHg==} engines: {node: '>=18'} - nodemailer@10.3.1: - resolution: {integrity: sha512-uF0AFsJC07Y1vdW7p580DKAnh7rAO+4UPSSB3mDCPNDufoiaOebV6JmrzpxB14OjEEEiBsNdYoM2Y+fN8M7BBA==} + nodemailer@10.5.0: + resolution: {integrity: sha512-L/w/HH5MqpzMDuZD7fQdt/+KqymuvrpaApaIjAH2XA3ILePwlcvXCVVvP75xVrXCEt2ggK2marrrHHFB5Qu0kA==} engines: {node: '>=20.0.0'} non-error@0.1.0: @@ -5783,8 +5787,8 @@ packages: performance-now@2.1.0: resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==} - pg-boss@12.38.1: - resolution: {integrity: sha512-g7zSszWPsakw+Ng5Uqa/DiW8mz8CVnuO17VQ7CXaPsfgFj5Z+wSmP8CBGIgwGB82DNFpdP+wCbt89pal3fwxRQ==} + pg-boss@12.38.2: + resolution: {integrity: sha512-nvB9hB2cDJGSPUwYjN/Mth+EE3zvxffkp7uKXIiYloMAaxSoEiutmZi9mpSW85hNCcPChf3yicNXdwhIWkv2nA==} engines: {node: '>=22.12.0'} hasBin: true peerDependencies: @@ -7204,175 +7208,175 @@ snapshots: '@alloc/quick-lru@5.3.0': {} - '@aws-sdk/checksums@3.1002.2': + '@aws-sdk/checksums@3.1002.5': dependencies: - '@aws-sdk/core': 3.980.0 - '@aws-sdk/types': 3.975.0 - '@smithy/core': 3.39.0 + '@aws-sdk/core': 3.981.0 + '@aws-sdk/types': 3.975.1 + '@smithy/core': 3.40.0 '@smithy/types': 4.20.0 tslib: 2.9.1 - '@aws-sdk/client-s3@3.1162.0': + '@aws-sdk/client-s3@3.1169.0': dependencies: - '@aws-sdk/checksums': 3.1002.2 - '@aws-sdk/core': 3.980.0 - '@aws-sdk/credential-provider-node': 3.972.93 - '@aws-sdk/middleware-sdk-s3': 3.972.86 - '@aws-sdk/signature-v4-multi-region': 3.996.51 - '@aws-sdk/types': 3.975.0 - '@smithy/core': 3.39.0 - '@smithy/fetch-http-handler': 5.8.0 + '@aws-sdk/checksums': 3.1002.5 + '@aws-sdk/core': 3.981.0 + '@aws-sdk/credential-provider-node': 3.972.97 + '@aws-sdk/middleware-sdk-s3': 3.972.89 + '@aws-sdk/signature-v4-multi-region': 3.996.52 + '@aws-sdk/types': 3.975.1 + '@smithy/core': 3.40.0 + '@smithy/fetch-http-handler': 5.8.1 '@smithy/node-http-handler': 4.14.2 '@smithy/types': 4.20.0 tslib: 2.9.1 - '@aws-sdk/core@3.980.0': + '@aws-sdk/core@3.981.0': dependencies: - '@aws-sdk/types': 3.975.0 - '@aws-sdk/xml-builder': 3.972.42 + '@aws-sdk/types': 3.975.1 + '@aws-sdk/xml-builder': 3.972.43 '@aws/lambda-invoke-store': 0.3.0 - '@smithy/core': 3.39.0 + '@smithy/core': 3.40.0 '@smithy/signature-v4': 5.7.5 '@smithy/types': 4.20.0 bowser: 2.15.0 tslib: 2.9.1 - '@aws-sdk/credential-provider-env@3.972.81': + '@aws-sdk/credential-provider-env@3.972.84': dependencies: - '@aws-sdk/core': 3.980.0 - '@aws-sdk/types': 3.975.0 - '@smithy/core': 3.39.0 + '@aws-sdk/core': 3.981.0 + '@aws-sdk/types': 3.975.1 + '@smithy/core': 3.40.0 '@smithy/types': 4.20.0 tslib: 2.9.1 - '@aws-sdk/credential-provider-http@3.972.83': + '@aws-sdk/credential-provider-http@3.972.86': dependencies: - '@aws-sdk/core': 3.980.0 - '@aws-sdk/types': 3.975.0 - '@smithy/core': 3.39.0 - '@smithy/fetch-http-handler': 5.8.0 + '@aws-sdk/core': 3.981.0 + '@aws-sdk/types': 3.975.1 + '@smithy/core': 3.40.0 + '@smithy/fetch-http-handler': 5.8.1 '@smithy/node-http-handler': 4.14.2 '@smithy/types': 4.20.0 tslib: 2.9.1 - '@aws-sdk/credential-provider-ini@3.973.26': + '@aws-sdk/credential-provider-ini@3.973.30': dependencies: - '@aws-sdk/core': 3.980.0 - '@aws-sdk/credential-provider-env': 3.972.81 - '@aws-sdk/credential-provider-http': 3.972.83 - '@aws-sdk/credential-provider-login': 3.972.88 - '@aws-sdk/credential-provider-process': 3.972.81 - '@aws-sdk/credential-provider-sso': 3.973.25 - '@aws-sdk/credential-provider-web-identity': 3.972.87 - '@aws-sdk/nested-clients': 3.998.0 - '@aws-sdk/types': 3.975.0 - '@smithy/core': 3.39.0 + '@aws-sdk/core': 3.981.0 + '@aws-sdk/credential-provider-env': 3.972.84 + '@aws-sdk/credential-provider-http': 3.972.86 + '@aws-sdk/credential-provider-login': 3.972.92 + '@aws-sdk/credential-provider-process': 3.972.84 + '@aws-sdk/credential-provider-sso': 3.973.28 + '@aws-sdk/credential-provider-web-identity': 3.972.90 + '@aws-sdk/nested-clients': 3.998.3 + '@aws-sdk/types': 3.975.1 + '@smithy/core': 3.40.0 '@smithy/credential-provider-imds': 4.5.2 '@smithy/types': 4.20.0 tslib: 2.9.1 - '@aws-sdk/credential-provider-login@3.972.88': + '@aws-sdk/credential-provider-login@3.972.92': dependencies: - '@aws-sdk/core': 3.980.0 - '@aws-sdk/nested-clients': 3.998.0 - '@aws-sdk/types': 3.975.0 - '@smithy/core': 3.39.0 + '@aws-sdk/core': 3.981.0 + '@aws-sdk/nested-clients': 3.998.3 + '@aws-sdk/types': 3.975.1 + '@smithy/core': 3.40.0 '@smithy/types': 4.20.0 tslib: 2.9.1 - '@aws-sdk/credential-provider-node@3.972.93': + '@aws-sdk/credential-provider-node@3.972.97': dependencies: - '@aws-sdk/credential-provider-env': 3.972.81 - '@aws-sdk/credential-provider-http': 3.972.83 - '@aws-sdk/credential-provider-ini': 3.973.26 - '@aws-sdk/credential-provider-process': 3.972.81 - '@aws-sdk/credential-provider-sso': 3.973.25 - '@aws-sdk/credential-provider-web-identity': 3.972.87 - '@aws-sdk/types': 3.975.0 - '@smithy/core': 3.39.0 + '@aws-sdk/credential-provider-env': 3.972.84 + '@aws-sdk/credential-provider-http': 3.972.86 + '@aws-sdk/credential-provider-ini': 3.973.30 + '@aws-sdk/credential-provider-process': 3.972.84 + '@aws-sdk/credential-provider-sso': 3.973.28 + '@aws-sdk/credential-provider-web-identity': 3.972.90 + '@aws-sdk/types': 3.975.1 + '@smithy/core': 3.40.0 '@smithy/credential-provider-imds': 4.5.2 '@smithy/types': 4.20.0 tslib: 2.9.1 - '@aws-sdk/credential-provider-process@3.972.81': + '@aws-sdk/credential-provider-process@3.972.84': dependencies: - '@aws-sdk/core': 3.980.0 - '@aws-sdk/types': 3.975.0 - '@smithy/core': 3.39.0 + '@aws-sdk/core': 3.981.0 + '@aws-sdk/types': 3.975.1 + '@smithy/core': 3.40.0 '@smithy/types': 4.20.0 tslib: 2.9.1 - '@aws-sdk/credential-provider-sso@3.973.25': + '@aws-sdk/credential-provider-sso@3.973.28': dependencies: - '@aws-sdk/core': 3.980.0 - '@aws-sdk/nested-clients': 3.998.0 - '@aws-sdk/token-providers': 3.1162.0 - '@aws-sdk/types': 3.975.0 - '@smithy/core': 3.39.0 + '@aws-sdk/core': 3.981.0 + '@aws-sdk/nested-clients': 3.998.3 + '@aws-sdk/token-providers': 3.1166.0 + '@aws-sdk/types': 3.975.1 + '@smithy/core': 3.40.0 '@smithy/types': 4.20.0 tslib: 2.9.1 - '@aws-sdk/credential-provider-web-identity@3.972.87': + '@aws-sdk/credential-provider-web-identity@3.972.90': dependencies: - '@aws-sdk/core': 3.980.0 - '@aws-sdk/nested-clients': 3.998.0 - '@aws-sdk/types': 3.975.0 - '@smithy/core': 3.39.0 + '@aws-sdk/core': 3.981.0 + '@aws-sdk/nested-clients': 3.998.3 + '@aws-sdk/types': 3.975.1 + '@smithy/core': 3.40.0 '@smithy/types': 4.20.0 tslib: 2.9.1 - '@aws-sdk/lib-storage@3.1162.0(@aws-sdk/client-s3@3.1162.0)': + '@aws-sdk/lib-storage@3.1167.0(@aws-sdk/client-s3@3.1169.0)': dependencies: - '@aws-sdk/client-s3': 3.1162.0 - '@smithy/core': 3.39.0 + '@aws-sdk/client-s3': 3.1169.0 + '@smithy/core': 3.40.0 '@smithy/types': 4.20.0 buffer: 5.6.0 events: 3.3.0 stream-browserify: 3.0.0 tslib: 2.9.1 - '@aws-sdk/middleware-sdk-s3@3.972.86': + '@aws-sdk/middleware-sdk-s3@3.972.89': dependencies: - '@aws-sdk/core': 3.980.0 - '@aws-sdk/signature-v4-multi-region': 3.996.51 - '@aws-sdk/types': 3.975.0 - '@smithy/core': 3.39.0 + '@aws-sdk/core': 3.981.0 + '@aws-sdk/signature-v4-multi-region': 3.996.52 + '@aws-sdk/types': 3.975.1 + '@smithy/core': 3.40.0 '@smithy/types': 4.20.0 tslib: 2.9.1 - '@aws-sdk/nested-clients@3.998.0': + '@aws-sdk/nested-clients@3.998.3': dependencies: - '@aws-sdk/core': 3.980.0 - '@aws-sdk/signature-v4-multi-region': 3.996.51 - '@aws-sdk/types': 3.975.0 - '@smithy/core': 3.39.0 - '@smithy/fetch-http-handler': 5.8.0 + '@aws-sdk/core': 3.981.0 + '@aws-sdk/signature-v4-multi-region': 3.996.52 + '@aws-sdk/types': 3.975.1 + '@smithy/core': 3.40.0 + '@smithy/fetch-http-handler': 5.8.1 '@smithy/node-http-handler': 4.14.2 '@smithy/types': 4.20.0 tslib: 2.9.1 - '@aws-sdk/signature-v4-multi-region@3.996.51': + '@aws-sdk/signature-v4-multi-region@3.996.52': dependencies: - '@aws-sdk/types': 3.975.0 + '@aws-sdk/types': 3.975.1 '@smithy/signature-v4': 5.7.5 '@smithy/types': 4.20.0 tslib: 2.9.1 - '@aws-sdk/token-providers@3.1162.0': + '@aws-sdk/token-providers@3.1166.0': dependencies: - '@aws-sdk/core': 3.980.0 - '@aws-sdk/nested-clients': 3.998.0 - '@aws-sdk/types': 3.975.0 - '@smithy/core': 3.39.0 + '@aws-sdk/core': 3.981.0 + '@aws-sdk/nested-clients': 3.998.3 + '@aws-sdk/types': 3.975.1 + '@smithy/core': 3.40.0 '@smithy/types': 4.20.0 tslib: 2.9.1 - '@aws-sdk/types@3.975.0': + '@aws-sdk/types@3.975.1': dependencies: '@smithy/types': 4.20.0 tslib: 2.9.1 - '@aws-sdk/xml-builder@3.972.42': + '@aws-sdk/xml-builder@3.972.43': dependencies: '@smithy/types': 4.20.0 tslib: 2.9.1 @@ -8308,7 +8312,7 @@ snapshots: express: 5.2.1(supports-color@7.2.0) express-rate-limit: 8.6.2(express@5.2.1(supports-color@7.2.0))(supports-color@7.2.0) hono: 4.13.18 - jose: 6.2.15 + jose: 6.2.17 json-schema-typed: 8.0.2 pkce-challenge: 5.0.1 raw-body: 3.0.2 @@ -8334,52 +8338,52 @@ snapshots: strict-event-emitter: 0.5.1 optional: true - '@napi-rs/canvas-android-arm64@1.1.0': + '@napi-rs/canvas-android-arm64@1.1.1': optional: true - '@napi-rs/canvas-darwin-arm64@1.1.0': + '@napi-rs/canvas-darwin-arm64@1.1.1': optional: true - '@napi-rs/canvas-darwin-x64@1.1.0': + '@napi-rs/canvas-darwin-x64@1.1.1': optional: true - '@napi-rs/canvas-linux-arm-gnueabihf@1.1.0': + '@napi-rs/canvas-linux-arm-gnueabihf@1.1.1': optional: true - '@napi-rs/canvas-linux-arm64-gnu@1.1.0': + '@napi-rs/canvas-linux-arm64-gnu@1.1.1': optional: true - '@napi-rs/canvas-linux-arm64-musl@1.1.0': + '@napi-rs/canvas-linux-arm64-musl@1.1.1': optional: true - '@napi-rs/canvas-linux-riscv64-gnu@1.1.0': + '@napi-rs/canvas-linux-riscv64-gnu@1.1.1': optional: true - '@napi-rs/canvas-linux-x64-gnu@1.1.0': + '@napi-rs/canvas-linux-x64-gnu@1.1.1': optional: true - '@napi-rs/canvas-linux-x64-musl@1.1.0': + '@napi-rs/canvas-linux-x64-musl@1.1.1': optional: true - '@napi-rs/canvas-win32-arm64-msvc@1.1.0': + '@napi-rs/canvas-win32-arm64-msvc@1.1.1': optional: true - '@napi-rs/canvas-win32-x64-msvc@1.1.0': + '@napi-rs/canvas-win32-x64-msvc@1.1.1': optional: true - '@napi-rs/canvas@1.1.0': + '@napi-rs/canvas@1.1.1': optionalDependencies: - '@napi-rs/canvas-android-arm64': 1.1.0 - '@napi-rs/canvas-darwin-arm64': 1.1.0 - '@napi-rs/canvas-darwin-x64': 1.1.0 - '@napi-rs/canvas-linux-arm-gnueabihf': 1.1.0 - '@napi-rs/canvas-linux-arm64-gnu': 1.1.0 - '@napi-rs/canvas-linux-arm64-musl': 1.1.0 - '@napi-rs/canvas-linux-riscv64-gnu': 1.1.0 - '@napi-rs/canvas-linux-x64-gnu': 1.1.0 - '@napi-rs/canvas-linux-x64-musl': 1.1.0 - '@napi-rs/canvas-win32-arm64-msvc': 1.1.0 - '@napi-rs/canvas-win32-x64-msvc': 1.1.0 + '@napi-rs/canvas-android-arm64': 1.1.1 + '@napi-rs/canvas-darwin-arm64': 1.1.1 + '@napi-rs/canvas-darwin-x64': 1.1.1 + '@napi-rs/canvas-linux-arm-gnueabihf': 1.1.1 + '@napi-rs/canvas-linux-arm64-gnu': 1.1.1 + '@napi-rs/canvas-linux-arm64-musl': 1.1.1 + '@napi-rs/canvas-linux-riscv64-gnu': 1.1.1 + '@napi-rs/canvas-linux-x64-gnu': 1.1.1 + '@napi-rs/canvas-linux-x64-musl': 1.1.1 + '@napi-rs/canvas-win32-arm64-msvc': 1.1.1 + '@napi-rs/canvas-win32-x64-msvc': 1.1.1 '@napi-rs/wasm-runtime@1.2.7(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': dependencies: @@ -9817,7 +9821,7 @@ snapshots: '@simplewebauthn/browser@14.0.0': {} - '@simplewebauthn/server@14.0.3': + '@simplewebauthn/server@14.1.0': dependencies: '@hexagon/base64': 1.1.28 '@levischuck/tiny-cbor': 0.2.11 @@ -9837,13 +9841,18 @@ snapshots: '@smithy/types': 4.20.0 tslib: 2.9.1 + '@smithy/core@3.40.0': + dependencies: + '@smithy/types': 4.20.0 + tslib: 2.9.1 + '@smithy/credential-provider-imds@4.5.2': dependencies: '@smithy/core': 3.39.0 '@smithy/types': 4.20.0 tslib: 2.9.1 - '@smithy/fetch-http-handler@5.8.0': + '@smithy/fetch-http-handler@5.8.1': dependencies: '@smithy/core': 3.39.0 '@smithy/types': 4.20.0 @@ -10017,11 +10026,11 @@ snapshots: postcss: 8.5.32 tailwindcss: 4.3.5 - '@tanstack/query-core@5.106.1': {} + '@tanstack/query-core@5.107.1': {} - '@tanstack/react-query@5.106.1(@types/react@19.3.0)(react@19.3.1)': + '@tanstack/react-query@5.107.1(@types/react@19.3.0)(react@19.3.1)': dependencies: - '@tanstack/query-core': 5.106.1 + '@tanstack/query-core': 5.107.1 react: 19.3.1 optionalDependencies: '@types/react': 19.3.0 @@ -11262,7 +11271,7 @@ snapshots: dotenv@17.4.2: {} - dotenv@18.0.9: {} + dotenv@18.0.10: {} dunder-proto@1.0.1: dependencies: @@ -12310,7 +12319,7 @@ snapshots: jiti@2.7.0: {} - jose@6.2.15: {} + jose@6.2.17: {} js-md4@0.3.2: {} @@ -12583,7 +12592,7 @@ snapshots: lru.min@1.1.5: {} - lucide-react@1.69.0(@types/react@19.3.0)(react@19.3.1): + lucide-react@1.73.0(@types/react@19.3.0)(react@19.3.1): dependencies: react: 19.3.1 optionalDependencies: @@ -12654,7 +12663,7 @@ snapshots: mkdirp@3.0.1: {} - mmdb-lib@3.0.4: {} + mmdb-lib@3.0.5: {} mrmime@2.0.1: {} @@ -12768,7 +12777,7 @@ snapshots: node-releases@2.0.58: {} - nodemailer@10.3.1: {} + nodemailer@10.5.0: {} non-error@0.1.0: {} @@ -13013,14 +13022,14 @@ snapshots: pdfjs-dist@6.5.438: optionalDependencies: - '@napi-rs/canvas': 1.1.0 + '@napi-rs/canvas': 1.1.1 perfect-debounce@2.1.0: {} performance-now@2.1.0: optional: true - pg-boss@12.38.1(@opentelemetry/api@1.9.1): + pg-boss@12.38.2(@opentelemetry/api@1.9.1): dependencies: '@opentelemetry/api': 1.9.1 cron-parser: 5.10.3 diff --git a/src/lib/auth/__tests__/webauthn-library-contract.test.ts b/src/lib/auth/__tests__/webauthn-library-contract.test.ts index cfe07e234..4f0e86ce3 100644 --- a/src/lib/auth/__tests__/webauthn-library-contract.test.ts +++ b/src/lib/auth/__tests__/webauthn-library-contract.test.ts @@ -791,6 +791,10 @@ describe("stored credentials", () => { userVerified: info.userVerified, origin: info.origin, rpID: info.rpID, + // Filled only when a FIDO metadata service has been initialised, which + // downloads from the FIDO Alliance. HealthLog never initialises one, so + // registration stays offline and this stays undefined. + passkeyProviderMetadata: info.passkeyProviderMetadata ?? "absent", registrationInfoKeys: Object.keys(info).sort(), }).toMatchInlineSnapshot(` { @@ -802,6 +806,7 @@ describe("stored credentials", () => { "credentialType": "public-key", "fmt": "none", "origin": "https://health.example.test", + "passkeyProviderMetadata": "absent", "publicKeyHex": "a50102032620012158202a40dff8de2ee1ba264ae10e05136e3933839a3bf5a24fb40672a2fb90bccf722258205508587675cda220cac807aa2bb93596dc3ce76590eb728fab4d00dbda17d4b4", "registrationInfoKeys": [ "aaguid", @@ -813,6 +818,7 @@ describe("stored credentials", () => { "credentialType", "fmt", "origin", + "passkeyProviderMetadata", "rpID", "userVerified", ], diff --git a/src/lib/jobs/__tests__/job-failures-retention.test.ts b/src/lib/jobs/__tests__/job-failures-retention.test.ts index b15aeda98..5e161cc5e 100644 --- a/src/lib/jobs/__tests__/job-failures-retention.test.ts +++ b/src/lib/jobs/__tests__/job-failures-retention.test.ts @@ -18,7 +18,7 @@ describe("pg-boss failed-row ledger retention", () => { ) as { version: string }; const plans = readFileSync(join(PG_BOSS_ROOT, "dist/plans.js"), "utf8"); - expect(packageJson.version).toBe("12.38.1"); + expect(packageJson.version).toBe("12.38.2"); expect(plans).toContain("retention_seconds: FORTEEN_DAYS"); expect(plans).toContain("deletion_seconds: SEVEN_DAYS"); // 12.37 reads the clock through job_now(), which is pg_catalog.now() From f602336fcb196fb431a8e356880c84c7b214a5a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 15 Nov 2026 23:21:37 +0100 Subject: [PATCH 4/5] build(deps): bump web-push from 3.6.7 to 4.0.0 4.0.0 moves the package to ESM and class syntax and drops minimist from the CLI. The sender and the VAPID route load it with a dynamic import and call generateVAPIDKeys, setVapidDetails and generateRequestDetails, which keep their names, arguments and module-level VAPID state; the request is still dialled through safeFetch, so the library's own transport and error shapes are not on our path. Every sender test mocks the library, so a contract test now runs the real one: a stored VAPID pair is accepted, the request carries the same headers (TTL of four weeks, Urgency, aes128gcm), the VAPID JWT verifies against the public key with the endpoint origin as audience, and the subscriber's keys decrypt the body back to the payload. It passes on 3.6.7 and on 4.0.0. --- package.json | 2 +- pnpm-lock.yaml | 53 ++-- .../web-push-library-contract.test.ts | 230 ++++++++++++++++++ 3 files changed, 264 insertions(+), 21 deletions(-) create mode 100644 src/lib/notifications/senders/__tests__/web-push-library-contract.test.ts diff --git a/package.json b/package.json index b81ecf853..d7b49d5ba 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "tailwind-merge": "^3.7.0", "tesseract.js": "^7.0.0", "undici": "^8.12.4", - "web-push": "^3.6.7", + "web-push": "^4.0.0", "yaml": "^2.9.1", "zod": "^4.6.7", "zod-openapi": "^6.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2e95172c9..2e7c06a7d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -182,8 +182,8 @@ importers: specifier: ^8.12.4 version: 8.12.4 web-push: - specifier: ^3.6.7 - version: 3.6.7(supports-color@7.2.0) + specifier: ^4.0.0 + version: 4.0.0(supports-color@7.2.0) yaml: specifier: ^2.9.1 version: 2.9.1 @@ -3439,9 +3439,9 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - agent-base@7.1.4: - resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==} - engines: {node: '>= 14'} + agent-base@9.0.0: + resolution: {integrity: sha512-TQf59BsZnytt8GdJKLPfUZ54g/iaUL2OWDSFCCvMOhsHduDQxO8xC4PNeyIkVcA5KwL2phPSv0douC0fgWzmnA==} + engines: {node: '>= 20'} ajv-formats@2.1.1: resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} @@ -4776,13 +4776,13 @@ packages: resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==} engines: {node: '>= 0.8'} - http_ece@1.2.0: - resolution: {integrity: sha512-JrF8SSLVmcvc5NducxgyOrKXe3EsyHMgBFgSaIUGmArKe+rwr0uphRkRXvwiom3I+fpIfoItveHrfudL8/rxuA==} + http_ece@1.2.1: + resolution: {integrity: sha512-+tzLoMYgXvicu60sVFoswTiu6BiQ6EX3DORRJQ3W2dNpNWCyZ3tcmRFZZ3jgVyw8ziWUCeUARKCkYDY6JgFx+w==} engines: {node: '>=16'} - https-proxy-agent@7.0.6: - resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} - engines: {node: '>= 14'} + https-proxy-agent@9.1.0: + resolution: {integrity: sha512-ag87y7cJJ9/3+GxFr8Oy4O5faDsGRGnBGsJj/YjOSsSx/5eadKLYTMPlzuR6obgoCDDm0abAAZitXXQkMOPSpA==} + engines: {node: '>= 20'} human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} @@ -6029,6 +6029,15 @@ packages: resolution: {integrity: sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ==} engines: {node: '>= 0.10'} + proxy-agent-negotiate@1.1.0: + resolution: {integrity: sha512-N8IBcM3UgCVzz2L2Lqv8DVntDnnC8/hiV4nEDUPkqq72TPUgYWjQc+bdZlBPZK9LzPAvOY//gAt0S0DApoOXWQ==} + engines: {node: '>= 20'} + peerDependencies: + kerberos: ^2.0.0 + peerDependenciesMeta: + kerberos: + optional: true + pump@3.0.4: resolution: {integrity: sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==} @@ -7023,8 +7032,8 @@ packages: weapon-regex@2.0.6: resolution: {integrity: sha512-iJC2vqYp+bh3r4X6zjuP0h65XqXjgUX3nJgmhj0PQMrdhAbUwCfN76CSTEEQqV3G7468kjOJ69PmytTG8l/8Gg==} - web-push@3.6.7: - resolution: {integrity: sha512-OpiIUe8cuGjrj3mMBFWY+e4MMIkW3SVT+7vEIjvD9kejGUypv8GPDf84JdPWskK8zMRIJ6xYGm+Kxr8YkPyA0A==} + web-push@4.0.0: + resolution: {integrity: sha512-iKzGK/q3k+kjoPK+fkbs8ymYvEqu5RJNAypEskW+UAYsC44upqb0f+T8QSYW4naowl9bzjlHRe8CI0NFCBzZeQ==} engines: {node: '>= 16'} hasBin: true @@ -10562,7 +10571,7 @@ snapshots: acorn@8.19.0: {} - agent-base@7.1.4: {} + agent-base@9.0.0: {} ajv-formats@2.1.1(ajv@8.20.0): optionalDependencies: @@ -12075,13 +12084,15 @@ snapshots: statuses: 2.0.2 toidentifier: 1.0.1 - http_ece@1.2.0: {} + http_ece@1.2.1: {} - https-proxy-agent@7.0.6(supports-color@7.2.0): + https-proxy-agent@9.1.0(supports-color@7.2.0): dependencies: - agent-base: 7.1.4 + agent-base: 9.0.0 debug: 4.4.3(supports-color@7.2.0) + proxy-agent-negotiate: 1.1.0 transitivePeerDependencies: + - kerberos - supports-color human-signals@2.1.0: {} @@ -13222,6 +13233,8 @@ snapshots: forwarded: 0.2.0 ipaddr.js: 1.9.1 + proxy-agent-negotiate@1.1.0: {} + pump@3.0.4: dependencies: end-of-stream: 1.4.5 @@ -14416,14 +14429,14 @@ snapshots: weapon-regex@2.0.6: {} - web-push@3.6.7(supports-color@7.2.0): + web-push@4.0.0(supports-color@7.2.0): dependencies: asn1.js: 5.4.1 - http_ece: 1.2.0 - https-proxy-agent: 7.0.6(supports-color@7.2.0) + http_ece: 1.2.1 + https-proxy-agent: 9.1.0(supports-color@7.2.0) jws: 4.0.1 - minimist: 1.2.8 transitivePeerDependencies: + - kerberos - supports-color webidl-conversions@3.0.1: {} diff --git a/src/lib/notifications/senders/__tests__/web-push-library-contract.test.ts b/src/lib/notifications/senders/__tests__/web-push-library-contract.test.ts new file mode 100644 index 000000000..4c84ab0b6 --- /dev/null +++ b/src/lib/notifications/senders/__tests__/web-push-library-contract.test.ts @@ -0,0 +1,230 @@ +/** + * Wire contract between HealthLog and `web-push`, exercised against the real + * library rather than a mock. + * + * Every sender test mocks `web-push`, so a major bump of it would pass them + * all while changing what a push service receives. The sender only borrows + * three functions from the library (`generateVAPIDKeys`, `setVapidDetails`, + * `generateRequestDetails`) and dials the result itself through `safeFetch`, + * so this file pins what those three must keep doing: + * + * 1. They are reachable on the namespace a dynamic `import("web-push")` + * returns, which is how the sender and the VAPID route load the library. + * 2. A VAPID key pair stored before an upgrade is still accepted, and a fresh + * one has the same shape. + * 3. The request a subscription gets: method, the RFC 8030 headers (TTL, + * Urgency, aes128gcm encoding), a VAPID `Authorization` whose JWT verifies + * against the public key and names the endpoint's origin, and a body the + * subscriber's keys decrypt back to the exact payload (RFC 8291). + */ +import { + createECDH, + createHash, + createDecipheriv, + createHmac, + createPublicKey, + randomBytes, + verify, +} from "node:crypto"; +import { describe, expect, it } from "vitest"; + +const ENDPOINT = "https://push.example.test/send/abc123?x=1"; +const SUBJECT = "mailto:operator@example.test"; + +/** A P-256 key pair from a fixed seed, so its encoded form is stable. */ +function fixedVapidKeys() { + const ecdh = createECDH("prime256v1"); + ecdh.setPrivateKey(createHash("sha256").update("healthlog-vapid").digest()); + return { + publicKey: ecdh.getPublicKey().toString("base64url"), + privateKey: ecdh.getPrivateKey().toString("base64url"), + }; +} + +/** A browser-side subscription: its own P-256 key pair plus an auth secret. */ +function subscriber() { + const ecdh = createECDH("prime256v1"); + ecdh.generateKeys(); + const auth = randomBytes(16); + return { + ecdh, + auth, + subscription: { + endpoint: ENDPOINT, + keys: { + p256dh: ecdh.getPublicKey().toString("base64url"), + auth: auth.toString("base64url"), + }, + }, + }; +} + +function hmac(key: Buffer, data: Buffer): Buffer { + return createHmac("sha256", key).update(data).digest(); +} + +/** RFC 8291 / RFC 8188 decryption of a single-record aes128gcm body. */ +function decryptAes128gcm( + body: Buffer, + ecdh: ReturnType, + auth: Buffer, +) { + const salt = body.subarray(0, 16); + const recordSize = body.readUInt32BE(16); + const idLength = body[20]!; + const serverPublic = body.subarray(21, 21 + idLength); + const record = body.subarray(21 + idLength); + expect(record.length).toBeLessThanOrEqual(recordSize); + + const shared = ecdh.computeSecret(serverPublic); + const keyInfo = Buffer.concat([ + Buffer.from("WebPush: info\0"), + ecdh.getPublicKey(), + serverPublic, + ]); + const ikm = hmac( + hmac(auth, shared), + Buffer.concat([keyInfo, Buffer.from([1])]), + ); + const prk = hmac(salt, ikm); + const cek = hmac( + prk, + Buffer.from("Content-Encoding: aes128gcm\0\x01"), + ).subarray(0, 16); + const nonce = hmac( + prk, + Buffer.from("Content-Encoding: nonce\0\x01"), + ).subarray(0, 12); + + const decipher = createDecipheriv("aes-128-gcm", cek, nonce); + decipher.setAuthTag(record.subarray(record.length - 16)); + const padded = Buffer.concat([ + decipher.update(record.subarray(0, record.length - 16)), + decipher.final(), + ]); + // The last record ends in the 0x02 delimiter followed by zero padding. + let end = padded.length - 1; + while (end >= 0 && padded[end] === 0) end -= 1; + expect(padded[end]).toBe(2); + return padded.subarray(0, end).toString("utf8"); +} + +function verifyVapidJwt(jwt: string, publicKeyB64: string) { + const [header, claims, signature] = jwt.split("."); + const point = Buffer.from(publicKeyB64, "base64url"); + const key = createPublicKey({ + key: { + kty: "EC", + crv: "P-256", + x: point.subarray(1, 33).toString("base64url"), + y: point.subarray(33, 65).toString("base64url"), + }, + format: "jwk", + }); + const valid = verify( + "sha256", + Buffer.from(`${header}.${claims}`), + { key, dsaEncoding: "ieee-p1363" }, + Buffer.from(signature!, "base64url"), + ); + return { + valid, + header: JSON.parse(Buffer.from(header!, "base64url").toString()), + claims: JSON.parse(Buffer.from(claims!, "base64url").toString()), + }; +} + +type RequestDetails = { + endpoint: string; + method: string; + headers: Record; + body: Buffer | null; +}; + +describe("web-push library contract", () => { + it("exposes the three functions on the dynamically imported namespace", async () => { + const webpush = await import("web-push"); + expect(typeof webpush.generateVAPIDKeys).toBe("function"); + expect(typeof webpush.setVapidDetails).toBe("function"); + expect(typeof webpush.generateRequestDetails).toBe("function"); + }); + + it("accepts a stored VAPID pair and mints new ones of the same shape", async () => { + const webpush = await import("web-push"); + const stored = fixedVapidKeys(); + expect(() => + webpush.setVapidDetails(SUBJECT, stored.publicKey, stored.privateKey), + ).not.toThrow(); + + const fresh = webpush.generateVAPIDKeys(); + expect(Buffer.from(fresh.publicKey, "base64url")).toHaveLength(65); + expect(Buffer.from(fresh.privateKey, "base64url")).toHaveLength(32); + expect(fresh.publicKey).toMatch(/^[A-Za-z0-9_-]+$/); + expect(fresh.privateKey).toMatch(/^[A-Za-z0-9_-]+$/); + }); + + it("builds a signed, encrypted request the subscriber can open", async () => { + const webpush = await import("web-push"); + const vapid = fixedVapidKeys(); + webpush.setVapidDetails(SUBJECT, vapid.publicKey, vapid.privateKey); + const { ecdh, auth, subscription } = subscriber(); + const payload = JSON.stringify({ + title: "Reminder", + body: "Täglich 08:00", + }); + + const details = webpush.generateRequestDetails( + subscription, + payload, + ) as unknown as RequestDetails; + + expect(details.endpoint).toBe(ENDPOINT); + expect(details.method).toBe("POST"); + expect(Object.keys(details.headers).sort()).toEqual([ + "Authorization", + "Content-Encoding", + "Content-Length", + "Content-Type", + "TTL", + "Urgency", + ]); + // The sender passes no TTL, so the library default is what a push + // service is told to hold an undelivered reminder for: four weeks. + expect(String(details.headers.TTL)).toBe("2419200"); + expect(details.headers.Urgency).toBe("normal"); + expect(details.headers["Content-Encoding"]).toBe("aes128gcm"); + expect(details.headers["Content-Type"]).toBe("application/octet-stream"); + expect(Buffer.isBuffer(details.body)).toBe(true); + expect(Number(details.headers["Content-Length"])).toBe( + details.body!.length, + ); + + const auth_ = String(details.headers.Authorization); + const match = /^vapid t=([^,]+), k=(.+)$/.exec(auth_); + expect(match).not.toBeNull(); + expect(match![2]).toBe(vapid.publicKey); + const jwt = verifyVapidJwt(match![1]!, vapid.publicKey); + expect(jwt.valid).toBe(true); + expect(jwt.header).toEqual({ typ: "JWT", alg: "ES256" }); + expect(jwt.claims.aud).toBe("https://push.example.test"); + expect(jwt.claims.sub).toBe(SUBJECT); + const now = Math.floor(Date.now() / 1000); + expect(jwt.claims.exp).toBeGreaterThan(now); + expect(jwt.claims.exp).toBeLessThanOrEqual(now + 24 * 60 * 60); + + expect(decryptAes128gcm(details.body!, ecdh, auth)).toBe(payload); + }); + + it("carries the Urgency the sender asks for on an urgent event", async () => { + const webpush = await import("web-push"); + const vapid = fixedVapidKeys(); + webpush.setVapidDetails(SUBJECT, vapid.publicKey, vapid.privateKey); + const { subscription } = subscriber(); + + const details = webpush.generateRequestDetails(subscription, "{}", { + urgency: "high", + }) as unknown as RequestDetails; + + expect(details.headers.Urgency).toBe("high"); + }); +}); From 6debd62326ad32880ca5f7b0779ca1a4202cb83b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 15 Nov 2026 23:40:31 +0100 Subject: [PATCH 5/5] build(deps): bump next and eslint-config-next to 16.4.6 16.4.6 keeps a single header value as a string, so the compression middleware now sees a route handler's Content-Type and gzips the response when the client accepts it. Route handlers were never compressed before. Measured on a production build: JSON and CSV exports go out gzipped with their Content-Disposition intact and still flush chunk by chunk, so a streamed download keeps arriving as it is written. The Coach and document chat streams send Cache-Control: no-transform, which the middleware honours, so they stay uncompressed and each frame arrives when it is written. A guard now holds every text/event-stream surface to that directive. The notification journey failed twice on the release candidate at the same step: the e-mail address typed into the card was wiped. The spec waited for the settings read with waitForResponse, which settles on the headers, and treated that as the card having copied the server value into the input. With compression the body follows the headers after a round through zlib on the thread pool, which a loaded runner can hold up, and the late copy overwrote the typed value. The spec now also waits for each card's enable switch, which is disabled until its read has landed and is enabled in the same render that does the copy. --- CHANGELOG.md | 7 ++ e2e/notification-dispatch-journey.spec.ts | 13 ++- package.json | 4 +- pnpm-lock.yaml | 104 +++++++++---------- src/__tests__/sse-no-transform-guard.test.ts | 64 ++++++++++++ 5 files changed, 136 insertions(+), 56 deletions(-) create mode 100644 src/__tests__/sse-no-transform-guard.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fde94601..9a0a6ab71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ## [Unreleased] +### Changed + +- API responses and CSV or JSON exports now go out gzip-compressed when the + browser or app asks for it, which comes with Next.js 16.4.6. The live Coach + and document chat streams are left uncompressed, so their text still + arrives as it is written. + ### Security - The container image moves to Node 22.23.5, a security release with fixes diff --git a/e2e/notification-dispatch-journey.spec.ts b/e2e/notification-dispatch-journey.spec.ts index 97d583b91..385ffc8bb 100644 --- a/e2e/notification-dispatch-journey.spec.ts +++ b/e2e/notification-dispatch-journey.spec.ts @@ -217,8 +217,15 @@ async function attemptCount(page: Page): Promise { * sync-from-server shape, no effect involved. A value typed into the input * before that copy runs is silently replaced by the server's, so the save that * follows persists an empty field and the next request is refused for a reason - * that points nowhere near the test. Waiting for the two reads is what makes - * the copy already done rather than pending. + * that points nowhere near the test. + * + * Waiting for the two reads alone is not enough. Playwright settles a + * response on its headers, and the body can follow later: API responses are + * compressed, and the compressed body reaches the socket only after a round + * through zlib on the thread pool, which a loaded runner can hold up. The copy + * runs only once the body is parsed. Each card keeps its enable switch + * disabled until its read has landed and does the copy in that same render, + * so an enabled switch is the signal that the seed is in the input. */ async function openChannels(page: Page): Promise { const seeded = ["/api/settings/email", "/api/settings/ntfy"].map((endpoint) => @@ -231,6 +238,8 @@ async function openChannels(page: Page): Promise { await page.goto("/settings/integrations", { waitUntil: "domcontentloaded" }); await expect(page.locator(CHANNELS_PANEL)).toBeVisible({ timeout: 30_000 }); await Promise.all(seeded); + await expect(page.locator("#email-toggle")).toBeEnabled(); + await expect(page.locator("#ntfy-toggle")).toBeEnabled(); } /** diff --git a/package.json b/package.json index d7b49d5ba..92c3c5b0b 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "jspdf-autotable": "^5.0.9", "lucide-react": "^1.72.0", "mmdb-lib": "^3.0.5", - "next": "16.4.5", + "next": "16.4.6", "nodemailer": "10.5.0", "otpauth": "^9.6.0", "p-limit": "^7.3.3", @@ -125,7 +125,7 @@ "@vitest/coverage-v8": "^5.1.0", "ajv": "^8.20.0", "eslint": "^9", - "eslint-config-next": "16.4.5", + "eslint-config-next": "16.4.6", "fast-check": "4.10.2", "knip": "^6.45.1", "lefthook": "^2.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2e7c06a7d..e0ba48c0c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -125,8 +125,8 @@ importers: specifier: ^3.0.5 version: 3.0.5 next: - specifier: 16.4.5 - version: 16.4.5(@babel/core@7.29.7(supports-color@7.2.0))(@opentelemetry/api@1.9.1)(@playwright/test@1.65.0)(@types/node@26.6.6)(react-dom@19.3.1(react@19.3.1))(react@19.3.1) + specifier: 16.4.6 + version: 16.4.6(@babel/core@7.29.7(supports-color@7.2.0))(@opentelemetry/api@1.9.1)(@playwright/test@1.65.0)(@types/node@26.6.6)(react-dom@19.3.1(react@19.3.1))(react@19.3.1) nodemailer: specifier: 10.5.0 version: 10.5.0 @@ -255,8 +255,8 @@ importers: specifier: ^9 version: 9.39.3(jiti@2.7.0)(supports-color@7.2.0) eslint-config-next: - specifier: 16.4.5 - version: 16.4.5(@typescript-eslint/parser@8.71.0(eslint@9.39.3(jiti@2.7.0)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.3(jiti@2.7.0)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) + specifier: 16.4.6 + version: 16.4.6(@typescript-eslint/parser@8.71.0(eslint@9.39.3(jiti@2.7.0)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.3(jiti@2.7.0)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) fast-check: specifier: 4.10.2 version: 4.10.2 @@ -1332,60 +1332,60 @@ packages: '@next/bundle-analyzer@16.4.6': resolution: {integrity: sha512-Evp2ETZoDcqpg5LZPeJNG51o1Bc5vH+LPSP+BmSkdjeykMCh1fMB/shs3bJVbTOxYp7wC3Ed3HLo0jgX1BdxNA==} - '@next/env@16.4.5': - resolution: {integrity: sha512-JwSPwpdkZL5VMl2jA/q+JI8MZdweAL3xmw5/tb9y/TLtmS0YXZnmYDzSihwk8xTj1OL+WM53gTqaj96yuLp6Xw==} + '@next/env@16.4.6': + resolution: {integrity: sha512-SunBjJ6t+oBtecS3dTjdVuMhUogP5wD/vrGL5EVuQYM1iS4O5ilL51HkiJ3sPjMzRHiCChvr4dbaSJbR7F3lxA==} - '@next/eslint-plugin-next@16.4.5': - resolution: {integrity: sha512-dNmc4y4En/34tWxaBFF2tG/R9GeiRwVPf7v8Az/Pqk8FcT4Uv0ePmrZKvWBL2nFy1QprPgJW+6XjfyV6jbRV3Q==} + '@next/eslint-plugin-next@16.4.6': + resolution: {integrity: sha512-HdqERVOafOD8JaUSAkwf9aSu/1rsHlkN8C5GcXYBH3C/z1MxBhZFxB5rz/xqMMRiIj7r9tIv8OCLQ9JWUxCvWA==} - '@next/swc-darwin-arm64@16.4.5': - resolution: {integrity: sha512-W5TniBzWKASbNNwHZ/S/f1MxQUXU/LdjklVMWA0Ujbfl7SZnUzFls45hO0i/sF7Bx1jJBWp7WWmoQajXtX/O8A==} + '@next/swc-darwin-arm64@16.4.6': + resolution: {integrity: sha512-kJ4VVZkley17xKaJx72QN2IBqjrj7zenCQZaUF0l9ShS/1Mt2kW4+Z5KGG6vgr3L/J562xTOizVyM1iA/u5nlg==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@next/swc-darwin-x64@16.4.5': - resolution: {integrity: sha512-uWq4qkHapBDS1oFltWS4YxTb9pLHAtLNcpbuK6SmRsebLYZqpBML/j/C0op+50JYGTpZgVL/DWNt/6oWlamrrw==} + '@next/swc-darwin-x64@16.4.6': + resolution: {integrity: sha512-eIPGZIqC+8JKaeZmvnCANJQF4xWkkHqSnAAajtFxgwDMAOnCgxNvP52SeWZ41PyVwoe+Le/NQuZSaQ8j7YshSA==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@next/swc-linux-arm64-gnu@16.4.5': - resolution: {integrity: sha512-FdRcyOx5u5P51mlAqLB9EXdd8jZO5fsdHtk4BAQSkqOywCsbTNN/rmw+jO7pnmjNdAtu2AG46NzbCL2FPDrrgw==} + '@next/swc-linux-arm64-gnu@16.4.6': + resolution: {integrity: sha512-9nI6O8vvczH2D9ZNdMGqb/3NuT15T9ksOZnAmx9/gjF2cOi74+xxyf1Hk96uIMfm14c9y6wHeBq6SH8g6udvcA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] libc: [glibc] - '@next/swc-linux-arm64-musl@16.4.5': - resolution: {integrity: sha512-cyvmmgtRXR8aGVT86wi9Py53IlfyCx7P2fZxuAXAoTummDnhKtUyjrMeXfapqp4qgD+gT5RqyGD/VfA16jEK7Q==} + '@next/swc-linux-arm64-musl@16.4.6': + resolution: {integrity: sha512-7/qPhTxDp2ScluOJOhLuhWmlA17o1yZ0SIgpISBCpBxXgtnK4+KGywBpFkfLPiU1rnSM1faFGzYkH6i7JdTrqA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] libc: [musl] - '@next/swc-linux-x64-gnu@16.4.5': - resolution: {integrity: sha512-hPc+Fl+N22DAvqZHq559NmamXboOX5Lu8I5Wl0DezfrhTk1Zz21NQeYoZDmNI/NjTcrdsVxM72Fzn2lI+Q+vAw==} + '@next/swc-linux-x64-gnu@16.4.6': + resolution: {integrity: sha512-oOpbNa8XOW1qCGd9VvzC4fbkkRxEls7/WI6tz+YHC0xRA7KpV1U7DrAnCPjzVyOk/karzWEepCOcTIDmwK8FwQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] libc: [glibc] - '@next/swc-linux-x64-musl@16.4.5': - resolution: {integrity: sha512-gbACYE8IP/jlprNTpiWXHb8N9CofOzpnEwH2SrIz1dUbiJf1FbDssDupCAPeP1Taxe8mgG20sGZamJI7KFOdZw==} + '@next/swc-linux-x64-musl@16.4.6': + resolution: {integrity: sha512-aM8CZ+OR2EwXaAYw7KGkW2GDmNDsLBIRe1MMRZCJPTdw/xhTD0IMUVO4sf3KqrzuRouGzwwLZn34+gFeVXiUQA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] libc: [musl] - '@next/swc-win32-arm64-msvc@16.4.5': - resolution: {integrity: sha512-+8gj++ZMo8H20Xh2ijjNqyFk5LPLw0AC4Fs4Tq/G94rjjQXhOjN4jgSWsWKPFsyY26hfIeemJIwKtMxOsp5GBA==} + '@next/swc-win32-arm64-msvc@16.4.6': + resolution: {integrity: sha512-U0p7/tEtqvHX2crhd841CDwKtp5CFkKXVjOhmfccR3Pvp64sj8KBwRqsvltqLOwVBbj0NtkxwXSDpEHYGbxeXQ==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@next/swc-win32-x64-msvc@16.4.5': - resolution: {integrity: sha512-qNZj66pYXnaWLiF9R9GUbfBdrCv7kC6TaZfIwB2KH5WPc/8pEM3nVOj8hpQhWJU8S94rlH5MPDcX15+RrgUhiw==} + '@next/swc-win32-x64-msvc@16.4.6': + resolution: {integrity: sha512-3ZG15/5WIdlTQsIEvc9sPTTSL5XFrlLklIKmfF4fwsDnoAhu6NcBDXsk3mbGxNyo6aVLEGex+fHCv2MahY7a9g==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -4275,8 +4275,8 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - eslint-config-next@16.4.5: - resolution: {integrity: sha512-mvh39zYLoNjpT5tVmf8xZu7i5lEOb5jN5cW6qD9OpeCp4GEEOeYta0Z2XyKiD0pYdlvm5/Td6Bi890maPRlIjg==} + eslint-config-next@16.4.6: + resolution: {integrity: sha512-IBGGrVf9E6pL0NGL0hmeicVGeSyv1VEzIWq6IecDqkw+YFByhEtDJS9u1r6s6a1VxK6rssh69KyNFQUgfaacqw==} peerDependencies: eslint: '>=9.0.0' typescript: '>=3.3.1' @@ -5532,8 +5532,8 @@ packages: resolution: {integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==} engines: {node: '>= 0.6'} - next@16.4.5: - resolution: {integrity: sha512-rmdfsWosjTUO+6R0S3KokoIk6Kj0sWDRTe86tZHdqaWH/oXq/udX3/4xb+YQi7aWbyEFoglDU54kaifLCdXbBw==} + next@16.4.6: + resolution: {integrity: sha512-QZJiYhaZLJMo2KpkQGQIwvmd79WVsAWeYIU554a8d7zArS3si/IRy3lBNV/rtYhE70oLwdLYhPAXLPx8HwcwtA==} engines: {node: '>=20.9.0'} hasBin: true peerDependencies: @@ -8422,37 +8422,37 @@ snapshots: - bufferutil - utf-8-validate - '@next/env@16.4.5': {} + '@next/env@16.4.6': {} - '@next/eslint-plugin-next@16.4.5(eslint@9.39.3(jiti@2.7.0)(supports-color@7.2.0))': + '@next/eslint-plugin-next@16.4.6(eslint@9.39.3(jiti@2.7.0)(supports-color@7.2.0))': dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.3(jiti@2.7.0)(supports-color@7.2.0)) fast-glob: 3.3.1 transitivePeerDependencies: - eslint - '@next/swc-darwin-arm64@16.4.5': + '@next/swc-darwin-arm64@16.4.6': optional: true - '@next/swc-darwin-x64@16.4.5': + '@next/swc-darwin-x64@16.4.6': optional: true - '@next/swc-linux-arm64-gnu@16.4.5': + '@next/swc-linux-arm64-gnu@16.4.6': optional: true - '@next/swc-linux-arm64-musl@16.4.5': + '@next/swc-linux-arm64-musl@16.4.6': optional: true - '@next/swc-linux-x64-gnu@16.4.5': + '@next/swc-linux-x64-gnu@16.4.6': optional: true - '@next/swc-linux-x64-musl@16.4.5': + '@next/swc-linux-x64-musl@16.4.6': optional: true - '@next/swc-win32-arm64-msvc@16.4.5': + '@next/swc-win32-arm64-msvc@16.4.6': optional: true - '@next/swc-win32-x64-msvc@16.4.5': + '@next/swc-win32-x64-msvc@16.4.6': optional: true '@noble/hashes@2.4.0': {} @@ -11458,9 +11458,9 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-config-next@16.4.5(@typescript-eslint/parser@8.71.0(eslint@9.39.3(jiti@2.7.0)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.3(jiti@2.7.0)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3): + eslint-config-next@16.4.6(@typescript-eslint/parser@8.71.0(eslint@9.39.3(jiti@2.7.0)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.3(jiti@2.7.0)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3): dependencies: - '@next/eslint-plugin-next': 16.4.5(eslint@9.39.3(jiti@2.7.0)(supports-color@7.2.0)) + '@next/eslint-plugin-next': 16.4.6(eslint@9.39.3(jiti@2.7.0)(supports-color@7.2.0)) eslint: 9.39.3(jiti@2.7.0)(supports-color@7.2.0) eslint-import-resolver-node: 0.3.10(supports-color@7.2.0) eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.3(jiti@2.7.0)(supports-color@7.2.0))(supports-color@7.2.0) @@ -12165,7 +12165,7 @@ snapshots: is-bun-module@2.0.0: dependencies: - semver: 7.8.5 + semver: 7.8.6 is-callable@1.2.7: {} @@ -12746,9 +12746,9 @@ snapshots: negotiator@1.0.0: {} - next@16.4.5(@babel/core@7.29.7(supports-color@7.2.0))(@opentelemetry/api@1.9.1)(@playwright/test@1.65.0)(@types/node@26.6.6)(react-dom@19.3.1(react@19.3.1))(react@19.3.1): + next@16.4.6(@babel/core@7.29.7(supports-color@7.2.0))(@opentelemetry/api@1.9.1)(@playwright/test@1.65.0)(@types/node@26.6.6)(react-dom@19.3.1(react@19.3.1))(react@19.3.1): dependencies: - '@next/env': 16.4.5 + '@next/env': 16.4.6 '@swc/helpers': 0.5.23 baseline-browser-mapping: 2.11.27 caniuse-lite: 1.0.30001815 @@ -12757,14 +12757,14 @@ snapshots: react-dom: 19.3.1(react@19.3.1) styled-jsx: 5.1.6(@babel/core@7.29.7(supports-color@7.2.0))(react@19.3.1) optionalDependencies: - '@next/swc-darwin-arm64': 16.4.5 - '@next/swc-darwin-x64': 16.4.5 - '@next/swc-linux-arm64-gnu': 16.4.5 - '@next/swc-linux-arm64-musl': 16.4.5 - '@next/swc-linux-x64-gnu': 16.4.5 - '@next/swc-linux-x64-musl': 16.4.5 - '@next/swc-win32-arm64-msvc': 16.4.5 - '@next/swc-win32-x64-msvc': 16.4.5 + '@next/swc-darwin-arm64': 16.4.6 + '@next/swc-darwin-x64': 16.4.6 + '@next/swc-linux-arm64-gnu': 16.4.6 + '@next/swc-linux-arm64-musl': 16.4.6 + '@next/swc-linux-x64-gnu': 16.4.6 + '@next/swc-linux-x64-musl': 16.4.6 + '@next/swc-win32-arm64-msvc': 16.4.6 + '@next/swc-win32-x64-msvc': 16.4.6 '@opentelemetry/api': 1.9.1 '@playwright/test': 1.65.0 sharp: 0.35.5(@types/node@26.6.6) @@ -13721,7 +13721,7 @@ snapshots: dependencies: '@img/colour': 1.1.0 detect-libc: 2.1.2 - semver: 7.8.5 + semver: 7.8.6 optionalDependencies: '@img/sharp-darwin-arm64': 0.35.5 '@img/sharp-darwin-x64': 0.35.5 diff --git a/src/__tests__/sse-no-transform-guard.test.ts b/src/__tests__/sse-no-transform-guard.test.ts new file mode 100644 index 000000000..8cc207454 --- /dev/null +++ b/src/__tests__/sse-no-transform-guard.test.ts @@ -0,0 +1,64 @@ +/** + * Every response this app streams as Server-Sent Events says + * `Cache-Control: no-transform`. + * + * Next.js compresses route-handler responses for a client that accepts it + * (since 16.4.6), and its compression middleware skips a response only when + * the type is not compressible or `Cache-Control` carries `no-transform`. + * `text/event-stream` is compressible, so without the directive a Coach or + * document-chat stream would go out gzipped: every token a separate deflate + * flush, and a proxy that buffers compressed bodies would hold the reply until + * it ends. The directive is what keeps the stream as written. + * + * The guard finds the SSE surfaces by the content type they declare, so a new + * one is covered without being listed, and it fails if it finds none, which + * would mean the matcher went blind rather than that the surfaces went away. + */ +import { describe, expect, it } from "vitest"; +import { join } from "node:path"; + +import { + readSourceText, + stripComments, + walkSourceFiles, +} from "./helpers/source-files"; + +const SRC = join(process.cwd(), "src"); + +/** A `Content-Type` header literal (either quote style) naming SSE. */ +const SSE_CONTENT_TYPE = /["']?content-type["']?\s*:\s*["']text\/event-stream/i; +/** A `Cache-Control` header literal whose value lists `no-transform`. */ +const NO_TRANSFORM = + /["']?cache-control["']?\s*:\s*["'][^"']*\bno-transform\b/i; + +function sseSurfaces(): string[] { + return walkSourceFiles(SRC, { floor: 3000 }) + .filter((p) => !p.startsWith("generated/")) + .filter((p) => !p.includes("__tests__")) + .filter((p) => !p.endsWith(".test.ts") && !p.endsWith(".test.tsx")) + .filter((p) => + SSE_CONTENT_TYPE.test(stripComments(readSourceText(join(SRC, p)), p)), + ) + .sort(); +} + +describe("SSE responses opt out of compression", () => { + it("finds the SSE surfaces it is meant to watch", () => { + // The Coach turn and the fenced document chat today. + const surfaces = sseSurfaces(); + expect(surfaces.length).toBeGreaterThanOrEqual(2); + expect(surfaces).toEqual( + expect.arrayContaining([ + "lib/ai/coach/turn/sse.ts", + "lib/documents/fenced-chat.ts", + ]), + ); + }); + + it("sets Cache-Control: no-transform wherever it declares text/event-stream", () => { + const missing = sseSurfaces().filter( + (p) => !NO_TRANSFORM.test(stripComments(readSourceText(join(SRC, p)), p)), + ); + expect(missing).toEqual([]); + }); +});