Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cspell/custom-dict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ owasppcitoolkit
owtf
pentest
pentesting
pnpmrc
psycopg
pygithub
pygoat
Expand All @@ -95,6 +96,7 @@ speakerdeck
superfences
tiktok
tsc
turbopack
usefixtures
winsrdf
wsgi
Expand Down
4 changes: 4 additions & 0 deletions frontend/.pnpmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
legacy-peer-deps=true
public-hoist-pattern[]=*import-in-the-middle*
public-hoist-pattern[]=*require-in-the-middle*
save-exact=true
4 changes: 2 additions & 2 deletions frontend/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN npm install --ignore-scripts -g pnpm
COPY --chmod=444 package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile --ignore-scripts

COPY --chmod=444 .env next.config.ts postcss.config.js tailwind.config.js tsconfig.json ./
COPY --chmod=444 .env .pnpmrc next.config.ts postcss.config.js tailwind.config.js tsconfig.json ./
COPY --chmod=555 public public
COPY --chmod=555 src src

Expand All @@ -28,7 +28,7 @@ ENV NEXT_TELEMETRY_DISABLED=1
ENV NODE_ENV=production

RUN addgroup --system --gid 1001 nodejs && \
adduser --system --uid 1001 -G nodejs nextjs
adduser --system --uid 1001 -G nodejs nextjs
# Copying files with root as owner, so that executing user cannot change the container.
COPY --from=builder --chown=root:root --chmod=555 /app/public public

Expand Down
2 changes: 1 addition & 1 deletion frontend/docker/Dockerfile.e2e.test
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ RUN npm install --ignore-scripts -g pnpm && \

COPY __tests__/e2e __tests__/e2e
COPY __tests__/unit/data __tests__/unit/data
COPY next.config.ts postcss.config.js playwright.config.ts tailwind.config.js tsconfig.json ./
COPY .pnpmrc next.config.ts postcss.config.js playwright.config.ts tailwind.config.js tsconfig.json ./
COPY public public
COPY src src
4 changes: 1 addition & 3 deletions frontend/docker/Dockerfile.unit.test
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ RUN npm install --ignore-scripts -g pnpm && \
chown node:node /app

COPY __tests__/unit __tests__/unit
COPY jest.config.ts jest.config.ts
COPY jest.setup.ts jest.setup.ts
COPY .pnpmrc jest.config.ts jest.setup.ts tsconfig.json ./
COPY public public
COPY src src
COPY tsconfig.json tsconfig.json

USER node
6 changes: 5 additions & 1 deletion frontend/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { NextConfig } from 'next'
const isLocal = process.env.NEXT_PUBLIC_ENVIRONMENT === 'local'

const nextConfig: NextConfig = {
devIndicators: false,
images: {
// This is a list of remote patterns that Next.js will use to determine
// if an image is allowed to be loaded from a remote source.
Expand All @@ -26,7 +27,10 @@ const nextConfig: NextConfig = {
},
],
},
devIndicators: false,
serverExternalPackages: ['import-in-the-middle', 'require-in-the-middle'],
turbopack: {
resolveExtensions: ['.ts', '.tsx', '.mjs', '.json', '.yaml', '.js', '.jsx'],
},
...(isLocal ? {} : { output: 'standalone' }),
}

Expand Down
5 changes: 4 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev --port 3000",
"build": "next build",
"build:turbo": "next build --turbo",
"dev": "next dev --port 3000",
"format": "prettier --log-level warn --write .",
"format:check": "prettier --check .",
"lint": "eslint . --config eslint.config.mjs --fix --max-warnings=0",
Expand Down Expand Up @@ -91,13 +92,15 @@
"eslint-plugin-react-hooks": "^5.2.0",
"globals": "^16.0.0",
"identity-obj-proxy": "^3.0.0",
"import-in-the-middle": "^1.13.1",
"jest": "^29.7.0",
"jest-axe": "^10.0.0",
"jest-environment-jsdom": "^29.7.0",
"open": "^10.1.1",
"postcss": "^8.5.3",
"prettier": "^3.5.3",
"prettier-plugin-tailwindcss": "^0.6.11",
"require-in-the-middle": "^7.5.2",
"tailwindcss": "^3.4.17",
"ts-jest": "^29.3.2",
"ts-node": "^10.9.2",
Expand Down
2 changes: 1 addition & 1 deletion frontend/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default defineConfig({
trace: 'off',
},
webServer: {
command: 'pnpm run build && pnpm run start',
command: 'pnpm run build:turbo && pnpm run start',
timeout: 120_000,
url: 'http://localhost:3000',
},
Expand Down
62 changes: 34 additions & 28 deletions frontend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.