From 3285d43be4fe5cdd13849ad03be43865e6627ce8 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Fri, 25 Aug 2023 15:20:11 +0200 Subject: [PATCH 01/11] chore: update ci syntax --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index fb57928..e61dbc4 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,4 +1,4 @@ -pipeline: +steps: test: image: node commands: From 7cc54d9fa23faaf9c0eb160b20fe807a7a007c8a Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Fri, 25 Aug 2023 15:49:55 +0200 Subject: [PATCH 02/11] fix: fix ci copy error --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8fcf2aa..3cbf745 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,10 +12,10 @@ FROM node:16-alpine WORKDIR /app COPY --from=builder /app/package.json /app/package.json -COPY --from=builder /app/dist /app/dist -COPY --from=builder /app/content /app/content -COPY --from=builder /app/views /app/views -COPY --from=builder /app/static /app/static +COPY --from=builder /app/dist/* /app/dist/ +COPY --from=builder /app/content/* /app/content/ +COPY --from=builder /app/views/* /app/views/ +COPY --from=builder /app/static/* /app/static/ EXPOSE 3000 From bc2f2b6a8618fc645ded683472205aaa54755f97 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Fri, 25 Aug 2023 15:53:42 +0200 Subject: [PATCH 03/11] fix: fix ci copy error --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3cbf745..a273a08 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,11 +11,11 @@ RUN yarn run build FROM node:16-alpine WORKDIR /app -COPY --from=builder /app/package.json /app/package.json -COPY --from=builder /app/dist/* /app/dist/ -COPY --from=builder /app/content/* /app/content/ -COPY --from=builder /app/views/* /app/views/ -COPY --from=builder /app/static/* /app/static/ +COPY --from=builder /app/package.json ./package.json +COPY --from=builder /app/dist ./dist +COPY --from=builder /app/content ./content +COPY --from=builder /app/views ./views +COPY --from=builder /app/static ./static EXPOSE 3000 From fef0e1105267eaeabb8ac7af2943234234c1b151 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Fri, 25 Aug 2023 15:55:54 +0200 Subject: [PATCH 04/11] fix: fix ci copy error --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index a273a08..e724d2a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,10 +12,10 @@ FROM node:16-alpine WORKDIR /app COPY --from=builder /app/package.json ./package.json -COPY --from=builder /app/dist ./dist -COPY --from=builder /app/content ./content -COPY --from=builder /app/views ./views -COPY --from=builder /app/static ./static +COPY --from=builder /app/dist/ /app/dist/ +COPY --from=builder /app/content/ /app/content/ +COPY --from=builder /app/views/ /app/views/ +COPY --from=builder /app/static/ /app/static/ EXPOSE 3000 From 876959dd7c68f7c4099d0528185745c766ff8c54 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Fri, 25 Aug 2023 16:32:07 +0200 Subject: [PATCH 05/11] fix: fix ci copy error --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index e724d2a..a6b2adb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,11 +11,11 @@ RUN yarn run build FROM node:16-alpine WORKDIR /app -COPY --from=builder /app/package.json ./package.json -COPY --from=builder /app/dist/ /app/dist/ -COPY --from=builder /app/content/ /app/content/ -COPY --from=builder /app/views/ /app/views/ -COPY --from=builder /app/static/ /app/static/ +COPY --from=builder /app/package.json . +COPY --from=builder /app/dist/ . +COPY --from=builder /app/content/ . +COPY --from=builder /app/views/ . +COPY --from=builder /app/static/ . EXPOSE 3000 From 0ea467ab3bf2bf36d3bfbd65a8f038417546fb13 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Sat, 26 Aug 2023 10:52:46 +0200 Subject: [PATCH 06/11] fix: fix ci copy error --- Dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index a6b2adb..4efc4f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,11 +11,8 @@ RUN yarn run build FROM node:16-alpine WORKDIR /app -COPY --from=builder /app/package.json . -COPY --from=builder /app/dist/ . -COPY --from=builder /app/content/ . -COPY --from=builder /app/views/ . -COPY --from=builder /app/static/ . +COPY --from=builder /app /app +RUN rm -r /app/node_modules EXPOSE 3000 From 4e0562a2db6e22ddd817137816cb3b0066cbe290 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Mon, 28 Aug 2023 13:24:57 +0200 Subject: [PATCH 07/11] chore: release 4.0.0 --- CHANGELOG.md | 12 ++++++++++++ package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a35ae06..8be3cd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [4.0.0] - 2023-08-28 +### Added +- ASPE support +- Rome linting and formatting +- API v3 +### Changed +- Updated doipjs to 1.0.0 +### Fixed +- Missing primaryUserIndex +### Removed +- API v0, v1, v2 + ## [3.6.4] - 2023-03-27 ### Fixed - Missing /graphql proxy API endpoint diff --git a/package.json b/package.json index 3a5d0bb..4a9c462 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "keyoxide-web", - "version": "3.6.4", + "version": "4.0.0", "description": "Verifying online identity with cryptography", "main": "./src/index.js", "type": "module", From 7f432d40ec9cce48320bbfe9dc30f44c54f20121 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Mon, 28 Aug 2023 14:44:06 +0200 Subject: [PATCH 08/11] debug: debug Dockerfile --- Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4efc4f8..96db0df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,15 +4,19 @@ WORKDIR /app COPY . . RUN yarn --pure-lockfile -RUN yarn run build +RUN yarn run build:server +RUN yarn run build:static ### FROM node:16-alpine WORKDIR /app -COPY --from=builder /app /app -RUN rm -r /app/node_modules +COPY --from=builder /app/package.json /app/package.json +COPY --from=builder /app/dist /app/dist +COPY --from=builder /app/content /app/content +COPY --from=builder /app/views /app/views +COPY --from=builder /app/static /app/static EXPOSE 3000 From 44f9664300a0568d49b21d97b0a81a2348d5f87e Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Mon, 28 Aug 2023 14:48:42 +0200 Subject: [PATCH 09/11] chore: release 4.0.1 --- CHANGELOG.md | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8be3cd5..70aa8c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [4.0.1] - 2023-08-28 +### Fixed +- CI docker builds + ## [4.0.0] - 2023-08-28 ### Added - ASPE support diff --git a/package.json b/package.json index 4a9c462..e3cf97b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "keyoxide-web", - "version": "4.0.0", + "version": "4.0.1", "description": "Verifying online identity with cryptography", "main": "./src/index.js", "type": "module", From 1373f145879261000bb2dccbac41a0ccf842b0ec Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Thu, 31 Aug 2023 14:38:03 +0200 Subject: [PATCH 10/11] fix: handle doip promise rejection --- src/server/openpgpProfiles.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/server/openpgpProfiles.js b/src/server/openpgpProfiles.js index 2192bbe..c0086af 100644 --- a/src/server/openpgpProfiles.js +++ b/src/server/openpgpProfiles.js @@ -102,7 +102,16 @@ const fetchWKD = (id) => { reject(new Error('No public keys could be read from the data fetched using WKD')) } - profile = await doipjs.openpgp.parsePublicKey(publicKey) + try { + profile = await doipjs.openpgp.parsePublicKey(publicKey) + } catch (error) { + profile = null + } + + if (!profile) { + reject(new Error('No public keys could be fetched using WKD')) + return + } profile.publicKey.fetch.method = 'wkd' profile.publicKey.fetch.query = id profile.publicKey.fetch.resolvedUrl = fetchURL From 35c1dbc13d0cf5d76f027e6ba40c6d6cad9a87e7 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Thu, 31 Aug 2023 14:50:50 +0200 Subject: [PATCH 11/11] fix: syntax --- src/server/openpgpProfiles.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/server/openpgpProfiles.js b/src/server/openpgpProfiles.js index c0086af..ef11ace 100644 --- a/src/server/openpgpProfiles.js +++ b/src/server/openpgpProfiles.js @@ -105,13 +105,10 @@ const fetchWKD = (id) => { try { profile = await doipjs.openpgp.parsePublicKey(publicKey) } catch (error) { - profile = null - } - - if (!profile) { reject(new Error('No public keys could be fetched using WKD')) return } + profile.publicKey.fetch.method = 'wkd' profile.publicKey.fetch.query = id profile.publicKey.fetch.resolvedUrl = fetchURL