mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-10 02:25:56 +00:00
3a24d9694f
The mock:on and mock:off scripts used GNU 'sed -i' syntax, which fails on the default macOS BSD sed. The '||' fallback then appended a fresh PULSE_MOCK_MODE line on every invocation, so a local .env accumulated three contradictory entries. They also targeted the repo-root .env, which hot-dev.sh does not consult when choosing the data directory. hot-dev.sh reads the canonical flag from tmp/dev-config/.env, written authoritatively by toggle-mock.sh. The npm wrappers were therefore a no-op that corrupted .env as a side effect, while leaving the operator believing mock mode had switched. Point them at toggle-mock.sh, which handles BSD sed, writes the canonical file, syncs the runtime env and restarts the managed runtime. Add mock:status and mock:edit; the hot-dev startup banner already advertised 'npm run mock:edit', which did not exist. Extend the deployment-installability contract to cover the mock wrappers alongside the existing repo-root dev entry rules, and add a regression test asserting the wrappers delegate rather than rewriting the flag inline, and that every mock command named in the hot-dev banner exists.