@vanikya/ota-react-native 0.2.6 → 0.2.7

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.
@@ -314,13 +314,8 @@ class OTAUpdateModule(reactContext: ReactApplicationContext) : ReactContextBaseJ
314
314
  try {
315
315
  // Use ProcessPhoenix for graceful app restart
316
316
  // This properly kills the current process and starts a new one
317
- val activity = currentActivity
318
- if (activity != null) {
319
- ProcessPhoenix.triggerRebirth(activity)
320
- } else {
321
- // Fallback to context-based restart
322
- ProcessPhoenix.triggerRebirth(reactApplicationContext)
323
- }
317
+ val context: android.content.Context = reactApplicationContext.applicationContext
318
+ ProcessPhoenix.triggerRebirth(context)
324
319
  } catch (e: Exception) {
325
320
  android.util.Log.e("OTAUpdate", "ProcessPhoenix restart failed: ${e.message}, using fallback")
326
321
  // Fallback to manual restart
@@ -361,12 +356,8 @@ class OTAUpdateModule(reactContext: ReactApplicationContext) : ReactContextBaseJ
361
356
  android.util.Log.d("OTAUpdate", "Reload requested...")
362
357
  mainHandler.postDelayed({
363
358
  try {
364
- val activity = currentActivity
365
- if (activity != null) {
366
- ProcessPhoenix.triggerRebirth(activity)
367
- } else {
368
- ProcessPhoenix.triggerRebirth(reactApplicationContext)
369
- }
359
+ val context: android.content.Context = reactApplicationContext.applicationContext
360
+ ProcessPhoenix.triggerRebirth(context)
370
361
  } catch (e: Exception) {
371
362
  android.util.Log.e("OTAUpdate", "Reload failed: ${e.message}")
372
363
  }
@@ -103,5 +103,5 @@ var _verification = require("./utils/verification");
103
103
  // Utilities
104
104
 
105
105
  // Version info
106
- const VERSION = exports.VERSION = '0.2.6';
106
+ const VERSION = exports.VERSION = '0.2.7';
107
107
  //# sourceMappingURL=index.js.map
@@ -10,5 +10,5 @@ export { OTAApiClient, getDeviceInfo } from './utils/api';
10
10
  export { UpdateStorage, getStorageAdapter } from './utils/storage';
11
11
  export { calculateHash, verifyBundleHash, verifySignature, verifyBundle } from './utils/verification';
12
12
  // Version info
13
- export const VERSION = '0.2.6';
13
+ export const VERSION = '0.2.7';
14
14
  //# sourceMappingURL=index.js.map
@@ -9,5 +9,5 @@ export { UpdateStorage, getStorageAdapter } from './utils/storage';
9
9
  export type { StoredUpdate, StorageAdapter } from './utils/storage';
10
10
  export { calculateHash, verifyBundleHash, verifySignature, verifyBundle, } from './utils/verification';
11
11
  export type { VerificationResult } from './utils/verification';
12
- export declare const VERSION = "0.2.6";
12
+ export declare const VERSION = "0.2.7";
13
13
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vanikya/ota-react-native",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "OTA Update SDK for React Native apps - self-hosted CodePush/EAS Updates alternative",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
package/src/index.ts CHANGED
@@ -36,4 +36,4 @@ export {
36
36
  export type { VerificationResult } from './utils/verification';
37
37
 
38
38
  // Version info
39
- export const VERSION = '0.2.6';
39
+ export const VERSION = '0.2.7';