mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
6c87bf2f7a
The /help pages fetched their markdown from raw.githubusercontent.com at
runtime, so a self-hosted install was served docs from main rather than the
version it was actually running, and help was unusable without network access.
The wiki/ directory was in the repo the whole time; the bundled-snapshot
fallback the code reached for was gitignored and never populated by any build
step, so it was dead code.
Read wiki/ straight from disk instead. server/{src,dist}/services both sit
three levels under the repo root, so a single __dirname anchor resolves in dev,
a built source install, vitest and Docker with no copy or build step. GitHub is
kept strictly as a fallback for when the directory cannot be resolved, decided
once at load by probing for _Sidebar.md: a page missing from a present wiki is
a genuine 404, since falling back per-file would reintroduce the version skew
this removes.
Ship wiki/ in the image: .dockerignore excluded it outright, so the COPY alone
would have produced an image with no wiki, and the GitHub fallback would have
masked that at runtime. Add a real path-containment check on assets now that
the path becomes a filesystem read rather than a URL, and document
TREK_WIKI_DIR as an off-by-default escape hatch across the deployment configs.
69 lines
664 B
Plaintext
69 lines
664 B
Plaintext
# Dependencies
|
|
node_modules/
|
|
|
|
# Build output
|
|
client/dist/
|
|
server/dist/
|
|
shared/dist/
|
|
server/public/*
|
|
!server/public/.gitkeep
|
|
|
|
# Generated PWA icons (built from SVG via prebuild)
|
|
client/public/icons/*.png
|
|
|
|
# Database
|
|
*.db
|
|
*.db-shm
|
|
*.db-wal
|
|
*.sqlite
|
|
*.sqlite-shm
|
|
*.sqlite-wal
|
|
|
|
# User data
|
|
server/data/*
|
|
server/uploads/
|
|
|
|
# Environment
|
|
.env
|
|
.env.*
|
|
!.env.example
|
|
|
|
# OS files
|
|
.DS_Store
|
|
Thumbs.db
|
|
|
|
# IDE
|
|
.vscode/
|
|
.idea/
|
|
.claude/
|
|
|
|
# Logs
|
|
logs
|
|
*.log
|
|
npm-debug.log*
|
|
yarn-debug.log*
|
|
yarn-error.log*
|
|
|
|
# Runtime data
|
|
*.pid
|
|
*.seed
|
|
*.pid.lock
|
|
|
|
# Coverage
|
|
coverage
|
|
*.lcov
|
|
.nyc_output
|
|
|
|
# Cache
|
|
.npm
|
|
.eslintcache
|
|
.cache
|
|
*.tsbuildinfo
|
|
*.tgz
|
|
|
|
.scannerwork
|
|
test-data
|
|
|
|
.run
|
|
.full-review
|