Fix: Revert to inline shared types (Turbopack can't resolve path aliases)
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 40s
CI / test-go-edu-search (push) Successful in 30s
CI / test-python-klausur (push) Failing after 2m56s
CI / test-python-agent-core (push) Successful in 19s
CI / test-nodejs-website (push) Successful in 25s

Turbopack doesn't support tsconfig path aliases pointing outside
the project root. Reverted to copying shared types directly into
each service. The canonical source remains shared/types/*.ts,
synced via scripts/sync-shared-types.sh.

Changes:
- Reverted docker-compose.yml contexts to ./service
- Reverted Dockerfiles to simple COPY . .
- Removed @shared/* from tsconfigs
- Removed symlinks + .gitignore hacks
- Added scripts/sync-shared-types.sh for keeping copies in sync

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-04-25 17:13:18 +02:00
parent 2eb17fd349
commit b49ee3467e
24 changed files with 3127 additions and 47 deletions

34
scripts/sync-shared-types.sh Executable file
View File

@@ -0,0 +1,34 @@
#!/usr/bin/env bash
#
# Sync shared types from shared/types/ into each frontend service.
#
# The canonical source of truth is shared/types/*.ts.
# This script copies them into each service's local directory
# because Turbopack doesn't support tsconfig path aliases
# pointing outside the project root.
#
# Run this after modifying any file in shared/types/.
set -euo pipefail
ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
SHARED="$ROOT/shared/types"
echo "Syncing shared types from $SHARED..."
# Companion types
cp "$SHARED/companion.ts" "$ROOT/admin-lehrer/lib/companion/types.ts"
cp "$SHARED/companion.ts" "$ROOT/studio-v2/lib/companion/types.ts"
# Klausur-Korrektur types
cp "$SHARED/klausur.ts" "$ROOT/admin-lehrer/app/(admin)/education/klausur-korrektur/types.ts"
cp "$SHARED/klausur.ts" "$ROOT/studio-v2/app/korrektur/types.ts"
cp "$SHARED/klausur.ts" "$ROOT/website/app/admin/klausur-korrektur/types.ts"
cp "$SHARED/klausur.ts" "$ROOT/website/app/lehrer/klausur-korrektur/types.ts"
cp "$SHARED/klausur.ts" "$ROOT/website/components/klausur-korrektur/klausur-types.ts"
# OCR Labeling types
cp "$SHARED/ocr-labeling.ts" "$ROOT/admin-lehrer/app/(admin)/ai/ocr-labeling/types.ts"
cp "$SHARED/ocr-labeling.ts" "$ROOT/website/app/admin/ocr-labeling/types.ts"
echo "Done. Synced to 9 locations."