react-native-bspatch 3.0.3 → 3.0.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-bspatch",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
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",
@@ -81,9 +81,14 @@ load_env() {
81
81
  export "$k=$v"
82
82
  done < "$1"
83
83
  }
84
+ if [ "$FLAVOR_LOWER" = "android" ] || [ "$FLAVOR_LOWER" = "ios" ]; then
85
+ echo "❌ '$FLAVOR_LOWER' is a platform, not a flavor. Usage: patch $FLAVOR_LOWER [--flavor development|staging|production]"
86
+ exit 1
87
+ fi
84
88
  if [ "$ACTION" != "setup" ]; then
85
89
  if [ ! -f "$ROOT/.env.$FLAVOR_LOWER" ]; then
86
- echo "❌ $ROOT/.env.$FLAVOR_LOWER not found (OTA_BASE_URL / OTA_FOLDER for flavor '$FLAVOR_LOWER')"
90
+ AVAILABLE=$(cd "$ROOT" && ls .env.* 2>/dev/null | sed 's/^\.env\.//' | grep -vx 'ota' | tr '\n' ' ')
91
+ echo "❌ .env.$FLAVOR_LOWER not found for flavor '$FLAVOR_LOWER'. Flavors with an env file: ${AVAILABLE:-none}"
87
92
  exit 1
88
93
  fi
89
94
  load_env "$ROOT/.env.$FLAVOR_LOWER"