Registry / devops / rn-ota-bundler

rn-ota-bundler

JSON →
library1.0.15jsnpmunverified

rn-ota-bundler is a command-line interface (CLI) tool designed to streamline Over-The-Air (OTA) updates for React Native applications that utilize a multi-bundle architecture. It provides a comprehensive suite of commands to bundle, optionally obfuscate using `javascript-obfuscator`, zip, and manage React Native modules, then upload them to a remote server for distribution. The current stable version is 1.0.15. While a specific release cadence isn't published, the tool appears actively maintained as a solution for modern React Native development. Key differentiators include its end-to-end CLI workflow for managing the entire OTA lifecycle, from local bundling and obfuscation to server interaction for authentication, module/variant management, and release deployment, catering specifically to multi-bundle React Native setups. It simplifies version detection for both Android and iOS platforms by parsing `build.gradle` or `Info.plist`/`project.pbxproj` and integrates optional JavaScript obfuscation for deployed bundles.

npm install rn-ota-bundler
INSTALL
IMPORT
SIG · RN-OTA-BUNDLER
R
rn-ota-bundler
devopsjavascriptv1.0.15
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CLI Execution
npx rn-ota-bundler <command> [options]
const rnOtaBundler = require('rn-ota-bundler');
This package is a command-line interface (CLI) tool. Its functionality is accessed by executing `npx rn-ota-bundler` followed by specific commands and options. It does not expose a programmatic API for direct JavaScript/TypeScript `import` or `require` usage.
Named Exports (N/A)
(N/A)
import { bundle, release } from 'rn-ota-bundler';
Attempting to import named exports for functions like `bundle` or `release` will fail as the package is designed solely as a command-line interface and does not provide such functions programmatically.
Default Export (N/A)
(N/A)
import rnOtaBundler from 'rn-ota-bundler';
There is no default export from this package. It is intended to be used via its CLI commands, not as a standard JavaScript module with default exports.

This quickstart demonstrates the core workflow of `rn-ota-bundler`: authenticating, setting up modules and environments, locally bundling with optional obfuscation, releasing (bundling and uploading) to a server, listing bundles, and managing bundle properties post-release via CLI commands.

// First, install the CLI tool as a dev dependency npm install -D rn-ota-bundler // Login to the OTA server. By default, it attempts to connect to http://localhost:3000. // This command opens a browser for authentication and saves the JWT token locally. npx rn-ota-bundler login // Add a new module named 'myAppModule'. This registers it with the OTA system. npx rn-ota-bundler modules --add myAppModule // Add a new environment/variant named 'staging' for organizing releases. npx rn-ota-bundler variants --add staging // Add a local app version '1.0.0' for tracking compatibility with bundles. npx rn-ota-bundler versions --add 1.0.0 // Bundle the 'myAppModule' for the Android platform, enabling obfuscation. // For obfuscation to take effect, an 'obfuscator.config.json' file must be present in your project's root directory. npx rn-ota-bundler bundle -m myAppModule -p android --obfuscate // Release (bundle and upload) the 'myAppModule' for the iOS platform to the configured server. // This command performs bundling and then uploads the generated zip file. npx rn-ota-bundler release -m myAppModule -p ios // List all remote bundles that have been uploaded. npx rn-ota-bundler bundles // Edit properties of a previously released bundle (e.g., bundle ID '123'). // Here, we activate the bundle and set its minimum compatible app version. npx rn-ota-bundler edit-bundle 123 --active true --min-app 1.0.0
rn-ota --version
Debug
Known issues
gotchaThe CLI expects a specific project structure, including `src/<module_name>/index.js` as the entry point for modules and standard React Native `android/` and `ios/` directories for app version detection. Deviations can lead to bundling failures or incorrect versioning.
fix
Ensure your project adheres to the expected structure. Module entry points should be `src/<module_name>/index.js`. Standard `android/` and `ios/` folders are required for automatic version detection.
affects: >=1.0.0
gotchaBy default, the CLI attempts to connect to an OTA server at `http://localhost:3000`. For production use, or if your server is elsewhere, this default must be overridden by modifying `src/default-config.json` before building the tool, or through environment variables/configuration if available.
fix
Modify the `src/default-config.json` file in the package's source to point to your desired server URL before building/using for non-local environments. Consult package documentation for potential runtime configuration options.
affects: >=1.0.0
gotchaObfuscation, when enabled with the `--obfuscate` flag, relies on the presence of an `obfuscator.config.json` file in the root directory of your project. If this file is missing, obfuscation will not be applied, even if the flag is set.
fix
To enable obfuscation, ensure `javascript-obfuscator` is installed as a dev dependency (`npm install -D javascript-obfuscator`) and a valid `obfuscator.config.json` file exists in your project's root directory, configured with your desired obfuscation settings.
affects: >=1.0.0
gotchaCommands such as `release`, `bundles`, `history`, and `edit-bundle` that interact with the remote OTA server require prior authentication. Failure to log in will result in authorization errors.
fix
Always run `npx rn-ota-bundler login` first to authenticate with the OTA server before attempting commands that require server interaction. Ensure your server is running and accessible.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Command not found: rn-ota-bundler
The `rn-ota-bundler` command was not found in your system's PATH, or `npx` couldn't locate it.
fix
Ensure you are running the command using `npx` (e.g., `npx rn-ota-bundler login`) or that the package is globally installed if you intend to use it without `npx` (`npm install -g rn-ota-bundler`).
Error: Module '<module_name>' not found. Please add it first.
You attempted to bundle or release a module that has not been registered with the OTA system.
fix
Register the module first using the `modules --add` command: `npx rn-ota-bundler modules --add <module_name>`.
Error: Not authenticated. Please login first.
You tried to execute a command that requires authentication with the OTA server without having logged in.
fix
Run `npx rn-ota-bundler login` to authenticate and save your JWT token locally before attempting server-interacting commands like `release` or `bundles`.
Error: Missing required option: --module <name>
You executed a command like `bundle` or `release` that requires a specific module name but did not provide it.
fix
Always provide the module name using the `-m` or `--module` option. For example: `npx rn-ota-bundler bundle -m homepage -p android`.
Upgrade
Version history
1.0.15latest on npm
Audit
Dependencies
javascript-obfuscatoroptionalRequired for bundle obfuscation if `--obfuscate` option is used and `obfuscator.config.json` is present.
Agent activity
4 hits · last 30 days
node
4
Resources
rn-ota-bundler — npm install rn-ota-bundler · libregistry