react-native-bspatch 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -539,6 +539,7 @@ react-native-bspatch/
539
539
  │ └── OtaBundleResolver.swift # Bundle resolution + crash rollback (before JS)
540
540
  ├── cpp/bsdiff/ # bspatch (C, mmap)
541
541
  └── tools/
542
+ ├── cli.js # bin entry (Yarn Berry runs bins with node)
542
543
  ├── build_ota.sh # CLI: patch / reset / setup / version
543
544
  ├── upload_ota.sh # Upload to Cloudflare R2 or a GitHub storage repo
544
545
  ├── update_registry.js # Writes ota_registry.json entries + signatures
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-bspatch",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Premium OTA Update Solution for React Native using TurboModules and bsdiff",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -56,7 +56,7 @@
56
56
  "access": "public"
57
57
  },
58
58
  "bin": {
59
- "react-native-bspatch": "./tools/build_ota.sh"
59
+ "react-native-bspatch": "./tools/cli.js"
60
60
  },
61
61
  "scripts": {
62
62
  "setup": "node ./tools/setup_project.js",
package/tools/cli.js ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ // Yarn Berry runs package bins with node regardless of the shebang, so the bash CLI needs a JS entry
3
+ const { spawnSync } = require('child_process');
4
+ const path = require('path');
5
+
6
+ const result = spawnSync('bash', [path.join(__dirname, 'build_ota.sh'), ...process.argv.slice(2)], {
7
+ stdio: 'inherit',
8
+ });
9
+ process.exit(result.status ?? 1);