react-native-bspatch 2.0.0 → 2.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/tools/build_ota.sh +16 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-bspatch",
3
- "version": "2.0.0",
3
+ "version": "2.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",
@@ -13,7 +13,14 @@
13
13
  # ─────────────────────────────────────────────────────────────────────────────
14
14
 
15
15
  set -e
16
- SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
16
+ # Resolve symlinks: npx runs us via node_modules/.bin/react-native-bspatch
17
+ SOURCE="$0"
18
+ while [ -L "$SOURCE" ]; do
19
+ LINK_DIR="$(cd "$(dirname "$SOURCE")" && pwd)"
20
+ SOURCE="$(readlink "$SOURCE")"
21
+ case "$SOURCE" in /*) ;; *) SOURCE="$LINK_DIR/$SOURCE" ;; esac
22
+ done
23
+ SCRIPT_DIR="$(cd "$(dirname "$SOURCE")" && pwd)"
17
24
  MODULE_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
18
25
  ROOT="$PWD"
19
26
  BUNDLE_XCODE_IOS="$ROOT/ios/output/main.jsbundle"
@@ -85,7 +92,14 @@ FLAVOR_LOWER=$(echo "$FLAVOR" | tr '[:upper:]' '[:lower:]')
85
92
  if [ "$FLAVOR_LOWER" = "dev" ]; then FLAVOR_LOWER="development"; fi
86
93
  if [ "$FLAVOR_LOWER" = "prod" ]; then FLAVOR_LOWER="production"; fi
87
94
 
88
- # ── Setup ──────────────────────────────────────────────────────────────────
95
+ # ── Setup (project wiring only, no build env needed) ─────────────────────────
96
+ if [ "$ACTION" = "setup" ]; then
97
+ echo "Setting up react-native-bspatch in this project..."
98
+ node "$SCRIPT_DIR/setup_project.js" --root "$ROOT"
99
+ exit 0
100
+ fi
101
+
102
+ # ── Build environment ──────────────────────────────────────────────────────
89
103
  echo "Preparing build environment..."
90
104
  # Kill any existing Metro processes to prevent file locks
91
105
  pkill -f "react-native/local-cli/cli.js" || true
@@ -312,13 +326,6 @@ if [ "$ACTION" = "reset" ]; then
312
326
  exit 0
313
327
  fi
314
328
 
315
- # ── Setup ─────────────────────────────────────────────────────────────────────
316
- if [ "$ACTION" = "setup" ]; then
317
- echo "Setting up react-native-bspatch in this project..."
318
- node "$SCRIPT_DIR/setup_project.js" --root "$ROOT"
319
- exit 0
320
- fi
321
-
322
329
  # ── Ensure bsdiff compiled ───────────────────────────────────────────────────
323
330
  if [ ! -f "$BSDIFF" ]; then
324
331
  echo "Compiling bsdiff..."