Files
OmniRoute/bin/cli/commands
AmirHossein Rezaei df9550fce9 fix(cli): prepare Next.js cache dir on Android/Termux before serve (#8593)
* fix(cli): ensure `~/.cache` is created and `XDG_CACHE_HOME` is set before Next.js loads on Android/Termux to prevent silent HTTP 500 errors due to instrumentation hook failures (#8519)

* chore(quality): ignore XDG_CACHE_HOME in the env/docs contract scanner

XDG_CACHE_HOME is an XDG Base Directory spec variable set by the OS or the
operator, never OmniRoute product config — the same reason XDG_CONFIG_HOME is
already ignored. The Android/Termux cache-dir preparation added here reads it
to honor an operator-set cache location, which made check-env-doc-sync demand
an .env.example/ENVIRONMENT.md entry for a variable we do not own.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>

* build(pack): require bin/cli/utils/ensureAndroidCacheDir.mjs in the tarball

bin/omniroute.mjs imports this module at startup to prepare the Next.js cache
dir before serve on Android/Termux. bin/cli/ is only an allowlist PREFIX, so a
file missing from the tarball would not fail the unexpected-paths check — it
would ship a CLI that throws ERR_MODULE_NOT_FOUND on the very platform this
change targets. Registering it makes the absence loud, same guard class as
storageKeyProvision.mjs and versionFastPath.mjs.

Caught by tests/unit/pack-artifact-entrypoint-closures.test.ts in the v3.8.49
merge-train.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>

---------

Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
2026-07-27 19:07:19 -03:00
..
2026-06-11 04:01:24 -03:00
2026-05-26 23:51:47 -03:00
2026-06-19 06:49:01 -03:00
2026-06-19 06:49:01 -03:00
2026-06-21 08:56:51 -03:00
2026-06-28 06:58:29 -03:00
2026-06-23 03:08:29 -03:00
2026-05-26 23:51:47 -03:00
2026-06-20 14:55:24 -03:00
2026-06-20 07:09:43 -03:00
2026-07-04 13:00:30 -03:00
2026-06-20 07:09:43 -03:00
2026-07-04 13:00:30 -03:00
2026-06-20 07:09:43 -03:00
2026-06-20 07:09:43 -03:00
2026-06-20 07:09:43 -03:00
2026-06-20 07:09:43 -03:00
2026-06-20 07:09:43 -03:00
2026-06-20 07:09:43 -03:00
2026-06-20 07:09:43 -03:00
2026-05-26 23:51:47 -03:00
2026-06-19 06:49:01 -03:00
2026-06-21 08:56:51 -03:00