feat(rn): Capgo React Native updater + CLI with file-level delta
Closed
RI
12d ago+4945+4945+0123456789012345678901234567890123456789-42-42-01234567890123456789
Summary (AI generated)
- Add
@capgo/react-native-updater: React Native native module (iOS/Android) that speaks Capgo/updates+/statsand applies Capgo file-level delta manifests (SHA-256 + optional Brotli), same backend contract as@capgo/capacitor-updater. - Add
@capgo/rn-cli(capgo-rn): Metro export ofindex.android.bundle+main.jsbundle+ assets, then upload via@capgo/cli bundle upload --delta. - Extend
@capgo/cliso upload/delta/brotli detection accepts@capgo/react-native-updater, and skip Capacitorindex.html/notifyAppReadychecks for RN export folders.
Motivation (AI generated)
React Native teams need Capgo-style OTA with the same Capgo Cloud delta system (not binary bspatch). This mirrors the RN integration pattern from zepto-labs/react-native-delta (JS bundle path override + check/download/apply), while reusing Capgo’s existing file-manifest delta pipeline end to end.
Business Impact (AI generated)
Opens Capgo live updates to React Native without forking storage/backend. One cloud, one delta format, new client + CLI surface.
Test Plan (AI generated)
-
bun run --cwd packages/rn-cli test -
bun run --cwd packages/react-native-updater test -
bun test ./cli/test/test-rn-updater-version.test.mjs - Wire a sample RN app:
getJSBundleFile/getJSBundleURL, callnotifyAppReady(), upload withcapgo-rn upload <appId> --channel production, verify/updatesreturnsmanifestand only changed files download - Confirm Capacitor uploads still detect
@capgo/capacitor-updaterand requireindex.html/notifyAppReadyunless--no-code-check
Generated with AI
Made with Cursor
Summary by CodeRabbit
- New Features
- Added a React Native updater for Android and iOS with bundle downloads, file-level delta updates, Brotli compression, checksum validation, rollback, channels, progress events, and bundle management.
- Added a React Native CLI with
init,bundle,upload, and compatibility-check commands. - Added native dependency scanning, compatibility reporting, and precomputed package metadata support for uploads.
- Added automatic detection of installed Capacitor and React Native updater packages.
- Bug Fixes
- Improved React Native export handling and updater compatibility validation during uploads.
- Documentation
- Added setup, native integration, CLI usage, and update workflow documentation.
- Tests
- Added coverage for updater detection, API contracts, metadata scanning, compatibility options, and export validation.