From 661bd2e22c7452e2e14254ae4da4650771b34ac6 Mon Sep 17 00:00:00 2001 From: Entbugger Date: Sun, 10 May 2026 16:03:20 +0200 Subject: [PATCH 1/4] Update dependency versions --- Dockerfile | 3 ++- backend/requirements.txt | 8 ++++---- frontend/package.json | 38 +++++++++++++++++++------------------- 3 files changed, 25 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index e1bc72e..c431bd3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax = docker/dockerfile:1.3 -FROM --platform=$BUILDPLATFORM node:18.16.0-alpine3.17 AS frontend-builder +FROM --platform=$BUILDPLATFORM node:18.20.8-alpine3.21 AS frontend-builder #ENV NODE_OPTIONS=--openssl-legacy-provider RUN apk add autoconf automake libtool make tiff jpeg zlib zlib-dev pkgconf nasm file gcc musl-dev util-linux && yarn global add gatsby-cli && gatsby telemetry --disable WORKDIR /build @@ -9,6 +9,7 @@ RUN npx browserslist@latest --update-db && yarn COPY frontend/. ./ RUN yarn build +#FROM alpine:3.23 AS backend FROM alpine:3.17 AS backend ENV PYTHONUNBUFFERED=1 RUN apk add python3 py3-pip python3-dev gcc musl-dev libffi-dev make diff --git a/backend/requirements.txt b/backend/requirements.txt index 6024280..6d600e7 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -1,7 +1,7 @@ http-parser==0.9.0 -http-sfv==0.9.1 -pycryptodomex==3.10.1 -pynacl==1.4.0 +http-sfv==0.9.9 +pycryptodomex==3.23.0 +pynacl==1.5.0 httpsigpy==0.0.8 -flask==3.0.2 +flask==3.1.3 gunicorn==20.1.0 diff --git a/frontend/package.json b/frontend/package.json index e2157c8..2e8c763 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -15,27 +15,27 @@ "clean": "gatsby clean" }, "dependencies": { - "@fortawesome/fontawesome-svg-core": "^6.1.0", - "@fortawesome/free-solid-svg-icons": "^6.5.1", - "@fortawesome/free-brands-svg-icons": "^6.5.1", - "@fortawesome/react-fontawesome": "^0.2.0", + "@fortawesome/fontawesome-svg-core": "^6.7.2", + "@fortawesome/free-solid-svg-icons": "^6.7.2", + "@fortawesome/free-brands-svg-icons": "^6.7.2", + "@fortawesome/react-fontawesome": "^0.2.6", "@mdx-js/mdx": "^1.6.22", "@mdx-js/react": "^1.6.22", - "bulma": "^0.9.2", - "gatsby": "^3.4.1", - "gatsby-plugin-image": "^1.5.0", - "gatsby-plugin-mdx": "^2.5.1", - "gatsby-plugin-react-helmet": "^4.5.0", - "gatsby-plugin-sass": "^4.5.0", - "gatsby-plugin-sharp": "^3.5.0", - "gatsby-source-filesystem": "^3.5.0", - "gatsby-transformer-sharp": "^3.5.0", - "react": "^17.0.1", - "react-bulma-components": "^4.0.4", - "react-dom": "^17.0.1", + "bulma": "^0.9.4", + "gatsby": "^3.15.0", + "gatsby-plugin-image": "^1.15.0", + "gatsby-plugin-mdx": "^2.15.0", + "gatsby-plugin-react-helmet": "^4.15.0", + "gatsby-plugin-sass": "^4.15.0", + "gatsby-plugin-sharp": "^3.15.0", + "gatsby-source-filesystem": "^3.15.0", + "gatsby-transformer-sharp": "^3.15.0", + "react": "^17.0.2", + "react-bulma-components": "^4.1.0", + "react-dom": "^17.0.2", "react-helmet": "^6.1.0", - "react-moment": "^1.1.1", - "sass": "^1.32.13", - "structured-field-values": "^1.0.0" + "react-moment": "^1.2.2", + "sass": "^1.99.0", + "structured-field-values": "^1.1.0" } } From b191a5e7d2f853bfcdb54300b45220a04063d707 Mon Sep 17 00:00:00 2001 From: Entbugger Date: Sun, 10 May 2026 16:22:00 +0200 Subject: [PATCH 2/4] Display HTTP errors by fixing promise rejection --- frontend/src/pages/index.js | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/frontend/src/pages/index.js b/frontend/src/pages/index.js index 3238a82..5d1d48a 100644 --- a/frontend/src/pages/index.js +++ b/frontend/src/pages/index.js @@ -394,7 +394,11 @@ Signature: sig=:SfHwLLMHetROs/nmZoKFbxwJhlgVt5pwWc0Ag7yuDfTxB1RaX8x\\ if (response.ok) { return response.json(); } else { - throw new Error(response.json()['error']); + return response.json().then(data => { + const message = data && data['error'] ? data['error'] : `HTTP ${response.status}`; + console.error('Backend error:', message); + throw new Error(message); + }); } }).then(data => { var components = data['components']; @@ -594,9 +598,13 @@ Signature: sig=:SfHwLLMHetROs/nmZoKFbxwJhlgVt5pwWc0Ag7yuDfTxB1RaX8x\\ body: JSON.stringify(body) }).then(response => { if (response.ok) { - return response.json() + return response.json(); } else { - throw new Error(response.json()['error']); + return response.json().then(data => { + const message = data && data['error'] ? data['error'] : `HTTP ${response.status}`; + console.error('Backend error:', message); + throw new Error(message); + }); } }).then(data => { this.setState({ @@ -899,7 +907,11 @@ MCowBQYDK2VwAyEAJrQLj5P/89iXES9+vFgrIy29clF9CC/oPPsw3c5D0bs= if (response.ok) { return response.json(); } else { - throw new Error(response.json()['error']); + return response.json().then(data => { + const message = data && data['error'] ? data['error'] : `HTTP ${response.status}`; + console.error('Backend error:', message); + throw new Error(message); + }); } }).then(data => { this.setState({ @@ -960,7 +972,11 @@ MCowBQYDK2VwAyEAJrQLj5P/89iXES9+vFgrIy29clF9CC/oPPsw3c5D0bs= if (response.ok) { return response.json(); } else { - throw new Error(response.json()['error']); + return response.json().then(data => { + const message = data && data['error'] ? data['error'] : `HTTP ${response.status}`; + console.error('Backend error:', message); + throw new Error(message); + }); } }).then(data => { this.setState({ From b99b6c12171b70f65d61f3a1d69d9ae7ddc8cbad Mon Sep 17 00:00:00 2001 From: Entbugger Date: Sun, 10 May 2026 16:39:14 +0200 Subject: [PATCH 3/4] Display errors nicely --- frontend/src/pages/index.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/frontend/src/pages/index.js b/frontend/src/pages/index.js index 5d1d48a..7fc6b7c 100644 --- a/frontend/src/pages/index.js +++ b/frontend/src/pages/index.js @@ -11,7 +11,7 @@ import { faJava, faJs, faNodeJs, faGolang, faPhp, faPython, faRust, faSquareGith -import { Button, ButtonGroup, Tabs, Container, Section, Level, Form, Columns, Content, Heading, Box, Icon, Tag, TagGroup, Hero, Tile, Card } from 'react-bulma-components'; +import { Button, ButtonGroup, Tabs, Container, Section, Level, Form, Columns, Content, Heading, Box, Icon, Tag, TagGroup, Hero, Tile, Card, Notification } from 'react-bulma-components'; //const api = 'https://grb8qjtvye.execute-api.us-east-1.amazonaws.com/dev' // bspk test //const api = 'https://o52ky0nc31.execute-api.ca-central-1.amazonaws.com/dev' // secureKey install @@ -1034,13 +1034,10 @@ MCowBQYDK2VwAyEAJrQLj5P/89iXES9+vFgrIy29clF9CC/oPPsw3c5D0bs= {this.state.error && ( - - - Error - {this.state.error} - - - + +