react-native-ota-hot-update 2.0.8 → 2.0.9

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.
@@ -66,6 +66,7 @@ class OtaHotUpdateModule internal constructor(context: ReactApplicationContext)
66
66
  zip.entries().asSequence().forEach { entry ->
67
67
  zip.getInputStream(entry).use { input ->
68
68
  if (topLevelFolder == null) {
69
+ // Get root folder of zip file after unzip
69
70
  val parts = entry.name.split("/")
70
71
  if (parts.size > 1) {
71
72
  topLevelFolder = parts.first()
@@ -113,7 +114,6 @@ class OtaHotUpdateModule internal constructor(context: ReactApplicationContext)
113
114
  deleteOldBundleIfneeded(null)
114
115
  val fileUnzip = extractZipFile(file, extension ?: ".bundle")
115
116
  if (fileUnzip != null) {
116
- Log.d("setupBundlePath----: ", fileUnzip)
117
117
  file.delete()
118
118
  val sharedPrefs = SharedPrefs(reactApplicationContext)
119
119
  val oldPath = sharedPrefs.getString(PATH)
@@ -196,8 +196,6 @@ RCT_EXPORT_MODULE()
196
196
  if (removeError) {
197
197
  NSLog(@"Failed to delete zip file: %@", removeError.localizedDescription);
198
198
  }
199
- NSLog(@"File path----: %@", jsbundleFilePath);
200
- // Return the .jsbundle file path or nil if not found
201
199
  return jsbundleFilePath;
202
200
  }
203
201
 
@@ -210,7 +208,6 @@ RCT_EXPORT_METHOD(setupBundlePath:(NSString *)path extension:(NSString *)extensi
210
208
  //Unzip file
211
209
  NSString *extractedFilePath = [self unzipFileAtPath:path extension:(extension != nil) ? extension : @".jsbundle"];
212
210
  if (extractedFilePath) {
213
- NSLog(@"file extraction----- %@", extractedFilePath);
214
211
  NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
215
212
  NSString *oldPath = [defaults stringForKey:@"PATH"];
216
213
  if (oldPath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-ota-hot-update",
3
- "version": "2.0.8",
3
+ "version": "2.0.9",
4
4
  "description": "Hot update for react native",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",