feat: store .jsdos bundle inside game directory instead of as flat file
Build & Deploy / build-and-deploy (push) Successful in 52s

Before: data/games/{id}.jsdos (flat, alongside the game dir)
After:  data/games/{id}/{id}.jsdos (inside the game directory)

Benefits:
- Delete is atomic — removing the game dir removes everything
- Cleaner data directory structure
- No orphan .jsdos files on delete

Also updated frontend bundleUrl() to use game.bundle_file from
the backend, making it path-agnostic. Old flat layout is still
served via StaticResource for backward compat.
This commit is contained in:
Hermes Agent
2026-05-29 23:07:07 +02:00
parent 4c3ded802b
commit ab1ba503ff
3 changed files with 7 additions and 6 deletions
+3 -1
View File
@@ -106,7 +106,9 @@ export function artworkUrl(path) {
/** Get game bundle URL for normal play */
export function bundleUrl(game) {
if (!game) return null;
return `/games/${game.id}.jsdos`;
// Use the bundle_file path from the backend (handles both old flat layout
// and new in-directory layout transparently)
return `/games/${game.bundle_file}`;
}
/** Get game bundle URL for setup mode (runs SETUP.EXE instead) */