Improve netcode and simplify #4

Merged
andras merged 15 commits from fix/audit-findings into main 2026-09-15 07:57:58 +01:00
7 changed files with 8665 additions and 47 deletions
Showing only changes of commit 3980d9948b - Show all commits

.
All checks were successful
Build & deploy / Build & publish server image (pull_request) Has been skipped
Build & deploy / Build & deploy website (pull_request) Successful in 27s

Andras Schmelczer 2026-09-14 22:19:49 +01:00

View file

@ -25,8 +25,11 @@ jobs:
node-version-file: .nvmrc
- name: Install dependencies
# No lockfiles are committed (see .gitignore), so use `npm install`.
run: npm install && npm run init
run: |
npm ci
npm --prefix shared ci
npm --prefix frontend ci
npm --prefix backend ci
- name: Build (shared -> frontend -> backend)
run: npm run build

1
.gitignore vendored
View file

@ -4,5 +4,4 @@ node_modules
.firebase
yarm-error.log
yarn.lock
package-lock.json
.DS_Store

View file

@ -6,19 +6,19 @@ WORKDIR /app
# `shared` is consumed by the backend as `file:../shared` and is bundled into
# the server bundle by webpack, so it must be installed and built first.
COPY shared/package.json shared/
RUN cd shared && npm install
COPY shared/package.json shared/package-lock.json shared/
RUN npm --prefix shared ci
COPY shared/ shared/
RUN cd shared && npm run build
RUN npm --prefix shared run build
COPY backend/package.json backend/
RUN cd backend && npm install
COPY backend/package.json backend/package-lock.json backend/
RUN npm --prefix backend ci
COPY backend/ backend/
RUN cd backend && npm run build
RUN npm --prefix backend run build
# Drop devDependencies; the runtime only needs the production deps that webpack
# left external (express, socket.io, cors, gl-matrix, minimist, msgpack parser).
RUN cd backend && npm prune --production
RUN npm --prefix backend prune --production
FROM node:22-bookworm-slim
WORKDIR /app

3635
backend/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -23,7 +23,7 @@
"resize-observer-polyfill": "^1.5.1",
"sass": "^1.100.0",
"sass-loader": "^17.0.0",
"sdf-2d": "file:../../sdf-2d",
"sdf-2d": "^0.8.0",
"shared": "file:../shared",
"socket.io-client": "^4.8.3",
"socket.io-msgpack-parser": "^3.0.2",
@ -36,40 +36,6 @@
"webpack-dev-server": "^5.2.4"
}
},
"../../sdf-2d": {
"version": "0.7.6",
"dev": true,
"license": "ISC",
"dependencies": {
"gl-matrix": "^3.4.4",
"resize-observer-polyfill": "^1.5.1"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@typescript-eslint/eslint-plugin": "^8.60.1",
"@typescript-eslint/parser": "^8.60.1",
"eslint": "^10.4.1",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.6",
"eslint-plugin-unused-imports": "^4.4.1",
"globals": "^17.6.0",
"prettier": "^3.8.3",
"raw-loader": "^4.0.2",
"terser-webpack-plugin": "^5.6.1",
"ts-loader": "^9.6.0",
"typedoc": "^0.28.19",
"typedoc-plugin-extras": "^4.0.1",
"typescript": "^6.0.3",
"webpack": "^5.107.2",
"webpack-cli": "^7.0.3"
}
},
"../../sdf-2d/dist": {
"extraneous": true
},
"../../sdf-2d/lib": {
"extraneous": true
},
"../shared": {
"version": "0.0.0",
"dev": true,
@ -5443,8 +5409,22 @@
}
},
"node_modules/sdf-2d": {
"resolved": "../../sdf-2d",
"link": true
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/sdf-2d/-/sdf-2d-0.8.0.tgz",
"integrity": "sha512-rqM3RMm71ytlLmlzC9lwsUFOv9uvodgtgRRZrv69IV5nh9OlGKk25RJRe2sRLK3u3LDvt0h+4KwthQu7GVRyJg==",
"dev": true,
"license": "ISC",
"dependencies": {
"gl-matrix": "^3.4.4",
"resize-observer-polyfill": "^1.5.1"
}
},
"node_modules/sdf-2d/node_modules/gl-matrix": {
"version": "3.4.4",
"resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.4.4.tgz",
"integrity": "sha512-latSnyDNt/8zYUB6VIJ6PCh2jBjJX6gnDsoCZ7LyW7GkqrD51EWwa9qCoGixj8YqBtETQK/xY7OmpTF8xz1DdQ==",
"dev": true,
"license": "MIT"
},
"node_modules/select-hose": {
"version": "2.0.0",

2805
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

2196
shared/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff