fix(api): patch oauth2 (#58581)

This commit is contained in:
Shaun Hamilton
2025-02-10 10:51:54 +02:00
committed by GitHub
parent 915526ec27
commit 75d2199f00
5 changed files with 389 additions and 321 deletions
+6 -1
View File
@@ -15,6 +15,8 @@ COPY --chown=node:node curriculum/ curriculum/
# TODO: AFAIK it's just the intro translations. Those should be folded into the
# curriculum and then we can remove this.
COPY --chown=node:node client/ client/
# TODO: Remove once `@fastify/oauth2` is fixed
COPY --chown=node:node patches/ patches/
RUN pnpm config set dedupe-peer-dependents false
# While we want to ignore scripts generally, we do need to generate the prisma
@@ -22,7 +24,7 @@ RUN pnpm config set dedupe-peer-dependents false
# to have prisma as a prod dependency. The jq tricks are to ensure we're using
# the right version of prisma.
RUN pnpm install -F=api -F=curriculum -F tools/scripts/build -F challenge-parser \
--frozen-lockfile --ignore-scripts
--frozen-lockfile --ignore-scripts
RUN cd api && npx prisma@$(jq -r '.devDependencies.prisma' < package.json) generate
# The api needs to source curriculum.json and build:curriculum relies on the
@@ -38,8 +40,11 @@ RUN apt-get update && apt-get install -y jq
WORKDIR /home/node/build
COPY --chown=node:node pnpm*.yaml .
COPY --chown=node:node package.json .
COPY --chown=node:node api/ api/
COPY --chown=node:node shared/ shared/
# TODO: Remove once `@fastify/oauth2` is fixed
COPY --chown=node:node patches/ patches/
RUN npm i -g pnpm@9
# Weirdly this config does not seem necessary for the new api (the same number