OmniRoute/scripts/build
diegosouzapw 49dedecc42 fix(build): assemble static/server-files/chunks under distDir, not literal .next
CRITICAL white-screen bug from the build-output-isolation refactor: the standalone
server.js bakes distDir ("./.build/next") into its config and serves /_next/static
from <root>/.build/next/static — but assembleStandalone hard-coded the destination
to <outDir>/.next/static (+ sanitised/patched <outDir>/.next/{required-server-files,
server}). Result: the server's static dir was EMPTY → every JS/CSS chunk 404'd →
blank login page (health stayed 200, so it slipped past the health-only dry-run).

Mirror the distDir path (relative to projectRoot) for static, required-server-files
sanitization (was a silent no-op → 0 paths sanitised, now 11), and the Turbopack
chunk patch. Verified: booting the assembled bundle serves the webpack chunk 200.
Affects every consumer (npm/Docker/Electron/VPS).
2026-06-04 02:17:51 -03:00
..
assembleStandalone.mjs fix(build): assemble static/server-files/chunks under distDir, not literal .next 2026-06-04 02:17:51 -03:00
bootstrap-env.mjs refactor(scripts): organize into build/dev/check/docs/i18n/ad-hoc subfolders 2026-05-13 10:14:25 -03:00
build-next-isolated.mjs build(layer1): rename standalone output app/ -> dist/; delete both App-Router move hacks 2026-06-03 14:59:20 -03:00
native-binary-compat.mjs refactor(scripts): organize into build/dev/check/docs/i18n/ad-hoc subfolders 2026-05-13 10:14:25 -03:00
pack-artifact-policy.ts build(layer1): add build:release clean rebuild + HEAD sentinel guard 2026-06-03 15:16:28 -03:00
postinstall.mjs build(layer1): rename standalone output app/ -> dist/; delete both App-Router move hacks 2026-06-03 14:59:20 -03:00
postinstallSupport.mjs fix(ci): hasStandaloneAppBundle dist/->app/ fallback + gate obsidian-plugin e2e 2026-06-03 22:48:24 -03:00
prepare-electron-standalone.mjs build(layer2+3): propagate .build/+dist/ to Docker/Electron/CI; codify light deploy; docs 2026-06-03 15:51:26 -03:00
prepublish.ts build(verify): close ralph-loop-1 gaps — align tests + fix stale .next/app refs 2026-06-03 16:06:59 -03:00
runtime-env.mjs docs(docker): align memory default docs 2026-05-31 18:16:45 -03:00
sync-env.mjs fix: harden stream readiness and build output (#2317) 2026-05-16 21:47:40 -03:00
uninstall.mjs refactor(scripts): organize into build/dev/check/docs/i18n/ad-hoc subfolders 2026-05-13 10:14:25 -03:00
validate-pack-artifact.ts build(layer1): rename standalone output app/ -> dist/; delete both App-Router move hacks 2026-06-03 14:59:20 -03:00
write-build-sha.mjs build(layer1): add build:release clean rebuild + HEAD sentinel guard 2026-06-03 15:16:28 -03:00