Process persisted package json before web sync

Merged
HA
4mo ago
+69-1

Summary

Fixes #6765.

This updates the root lockfile sync path so package.json is processed before being mirrored into .web/.

Previously, a stale or corrupted reflex.lock/package.json could be copied directly into .web/package.json, which
could drop Reflex-managed scripts like dev and export.

Changes

  • Add a dedicated package.json sync helper instead of treating it like a raw lockfile.
  • Re-render persisted package.json content through Reflex’s package JSON compiler.
  • Preserve the existing .web/package.json when no root persisted package.json exists.
  • Add regression coverage for both direct sync and frontend install repair behavior.