feat(waiter): venue servers publish the native UI bundle (manifest + zip)

- scripts/pack-bundle.mjs zips dist-native deterministically (sorted paths,
  fixed mtimes) into dist/downloads/waiter-bundle-<hash>.zip and writes
  waiter-bundle.json {format, version "<APP_VERSION>-<hash12>", file,
  sha256 (hex), size, min_shell_build, app_version, built_at}
- src/native/shell.js: MIN_SHELL_BUILD - lowest APK versionCode a bundle
  runs in (bump with native changes)
- Dockerfile: node 22; builds web + native bundle + pack (APP_VERSION build
  arg, from ${VERSION} in docker-compose.dev.yml)
- vite native mode strips public/downloads from dist-native - the 10.8 MB
  APK was being copied into the native build (and would have ended up inside
  the next APK); bundle 15 MB → 5 MB
- nginx /downloads/: json/zip types, CORS * (the app reads the manifest from
  origin http://localhost), no-cache
- .dockerignore: android/, releases/, dist-native/ out of the build context

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-28 18:24:48 +03:00
co-authored by Claude Opus 5.5
parent 41250b7fc7
commit a1e415ac05
7 changed files with 115 additions and 3 deletions
+13
View File
@@ -0,0 +1,13 @@
/**
* Native shell compatibility (plan step 8).
*
* Venue servers hand phones their own copy of this UI (a "bundle"). A bundle
* can only run inside an APK that has the native pieces it calls (plugins,
* TrustStore, …). MIN_SHELL_BUILD is the lowest APK versionCode this bundle
* works with — scripts/pack-bundle.mjs copies it into the bundle manifest, and
* phones with an older APK skip the bundle and show "update the app" instead.
*
* Bump it ONLY when this web code starts depending on something new in the
* native project (android/…), in the same commit that bumps versionCode.
*/
export const MIN_SHELL_BUILD = 1