@onekeyfe/react-native-bundle-update 1.1.21

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 (130) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +36 -0
  3. package/ReactNativeBundleUpdate.podspec +34 -0
  4. package/android/CMakeLists.txt +24 -0
  5. package/android/build.gradle +139 -0
  6. package/android/gradle.properties +4 -0
  7. package/android/src/main/AndroidManifest.xml +1 -0
  8. package/android/src/main/cpp/cpp-adapter.cpp +6 -0
  9. package/android/src/main/java/com/margelo/nitro/reactnativebundleupdate/ReactNativeBundleUpdate.kt +1409 -0
  10. package/android/src/main/java/com/margelo/nitro/reactnativebundleupdate/ReactNativeBundleUpdatePackage.kt +24 -0
  11. package/ios/Frameworks/Gopenpgp.xcframework/Info.plist +52 -0
  12. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Gopenpgp +0 -0
  13. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Armor.objc.h +96 -0
  14. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Constants.objc.h +197 -0
  15. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Crypto.objc.h +1963 -0
  16. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Gopenpgp.h +23 -0
  17. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Mime.objc.h +59 -0
  18. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Mobile.objc.h +252 -0
  19. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Profile.objc.h +107 -0
  20. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Universe.objc.h +29 -0
  21. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/ref.h +35 -0
  22. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Info.plist +20 -0
  23. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Modules/module.modulemap +13 -0
  24. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Gopenpgp +0 -0
  25. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Armor.objc.h +96 -0
  26. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Constants.objc.h +197 -0
  27. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Crypto.objc.h +1963 -0
  28. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Gopenpgp.h +23 -0
  29. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Mime.objc.h +59 -0
  30. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Mobile.objc.h +252 -0
  31. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Profile.objc.h +107 -0
  32. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Universe.objc.h +29 -0
  33. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/ref.h +35 -0
  34. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Info.plist +20 -0
  35. package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Modules/module.modulemap +13 -0
  36. package/ios/ReactNativeBundleUpdate.swift +1338 -0
  37. package/lib/module/ReactNativeBundleUpdate.nitro.js +4 -0
  38. package/lib/module/ReactNativeBundleUpdate.nitro.js.map +1 -0
  39. package/lib/module/index.js +6 -0
  40. package/lib/module/index.js.map +1 -0
  41. package/lib/module/package.json +1 -0
  42. package/lib/typescript/package.json +1 -0
  43. package/lib/typescript/src/ReactNativeBundleUpdate.nitro.d.ts +101 -0
  44. package/lib/typescript/src/ReactNativeBundleUpdate.nitro.d.ts.map +1 -0
  45. package/lib/typescript/src/index.d.ts +4 -0
  46. package/lib/typescript/src/index.d.ts.map +1 -0
  47. package/nitro.json +17 -0
  48. package/nitrogen/generated/android/c++/JAscFileInfo.hpp +65 -0
  49. package/nitrogen/generated/android/c++/JBundleDownloadASCParams.hpp +77 -0
  50. package/nitrogen/generated/android/c++/JBundleDownloadEvent.hpp +65 -0
  51. package/nitrogen/generated/android/c++/JBundleDownloadParams.hpp +73 -0
  52. package/nitrogen/generated/android/c++/JBundleDownloadResult.hpp +73 -0
  53. package/nitrogen/generated/android/c++/JBundleInstallParams.hpp +69 -0
  54. package/nitrogen/generated/android/c++/JBundleSwitchParams.hpp +65 -0
  55. package/nitrogen/generated/android/c++/JBundleVerifyASCParams.hpp +73 -0
  56. package/nitrogen/generated/android/c++/JBundleVerifyParams.hpp +69 -0
  57. package/nitrogen/generated/android/c++/JFallbackBundleInfo.hpp +65 -0
  58. package/nitrogen/generated/android/c++/JFunc_void_BundleDownloadEvent.hpp +78 -0
  59. package/nitrogen/generated/android/c++/JHybridReactNativeBundleUpdateSpec.cpp +486 -0
  60. package/nitrogen/generated/android/c++/JHybridReactNativeBundleUpdateSpec.hpp +89 -0
  61. package/nitrogen/generated/android/c++/JLocalBundleInfo.hpp +61 -0
  62. package/nitrogen/generated/android/c++/JTestResult.hpp +61 -0
  63. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/AscFileInfo.kt +44 -0
  64. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleDownloadASCParams.kt +53 -0
  65. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleDownloadEvent.kt +44 -0
  66. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleDownloadParams.kt +50 -0
  67. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleDownloadResult.kt +50 -0
  68. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleInstallParams.kt +47 -0
  69. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleSwitchParams.kt +44 -0
  70. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleVerifyASCParams.kt +50 -0
  71. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleVerifyParams.kt +47 -0
  72. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/FallbackBundleInfo.kt +44 -0
  73. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/Func_void_BundleDownloadEvent.kt +80 -0
  74. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/HybridReactNativeBundleUpdateSpec.kt +159 -0
  75. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/LocalBundleInfo.kt +41 -0
  76. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/TestResult.kt +41 -0
  77. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/reactnativebundleupdateOnLoad.kt +35 -0
  78. package/nitrogen/generated/android/reactnativebundleupdate+autolinking.cmake +81 -0
  79. package/nitrogen/generated/android/reactnativebundleupdate+autolinking.gradle +27 -0
  80. package/nitrogen/generated/android/reactnativebundleupdateOnLoad.cpp +46 -0
  81. package/nitrogen/generated/android/reactnativebundleupdateOnLoad.hpp +25 -0
  82. package/nitrogen/generated/ios/ReactNativeBundleUpdate+autolinking.rb +60 -0
  83. package/nitrogen/generated/ios/ReactNativeBundleUpdate-Swift-Cxx-Bridge.cpp +113 -0
  84. package/nitrogen/generated/ios/ReactNativeBundleUpdate-Swift-Cxx-Bridge.hpp +513 -0
  85. package/nitrogen/generated/ios/ReactNativeBundleUpdate-Swift-Cxx-Umbrella.hpp +83 -0
  86. package/nitrogen/generated/ios/ReactNativeBundleUpdateAutolinking.mm +33 -0
  87. package/nitrogen/generated/ios/ReactNativeBundleUpdateAutolinking.swift +25 -0
  88. package/nitrogen/generated/ios/c++/HybridReactNativeBundleUpdateSpecSwift.cpp +11 -0
  89. package/nitrogen/generated/ios/c++/HybridReactNativeBundleUpdateSpecSwift.hpp +304 -0
  90. package/nitrogen/generated/ios/swift/AscFileInfo.swift +58 -0
  91. package/nitrogen/generated/ios/swift/BundleDownloadASCParams.swift +91 -0
  92. package/nitrogen/generated/ios/swift/BundleDownloadEvent.swift +58 -0
  93. package/nitrogen/generated/ios/swift/BundleDownloadParams.swift +80 -0
  94. package/nitrogen/generated/ios/swift/BundleDownloadResult.swift +80 -0
  95. package/nitrogen/generated/ios/swift/BundleInstallParams.swift +69 -0
  96. package/nitrogen/generated/ios/swift/BundleSwitchParams.swift +58 -0
  97. package/nitrogen/generated/ios/swift/BundleVerifyASCParams.swift +80 -0
  98. package/nitrogen/generated/ios/swift/BundleVerifyParams.swift +69 -0
  99. package/nitrogen/generated/ios/swift/FallbackBundleInfo.swift +58 -0
  100. package/nitrogen/generated/ios/swift/Func_void.swift +47 -0
  101. package/nitrogen/generated/ios/swift/Func_void_BundleDownloadEvent.swift +47 -0
  102. package/nitrogen/generated/ios/swift/Func_void_BundleDownloadResult.swift +47 -0
  103. package/nitrogen/generated/ios/swift/Func_void_TestResult.swift +47 -0
  104. package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
  105. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
  106. package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
  107. package/nitrogen/generated/ios/swift/Func_void_std__vector_AscFileInfo_.swift +47 -0
  108. package/nitrogen/generated/ios/swift/Func_void_std__vector_FallbackBundleInfo_.swift +47 -0
  109. package/nitrogen/generated/ios/swift/Func_void_std__vector_LocalBundleInfo_.swift +47 -0
  110. package/nitrogen/generated/ios/swift/HybridReactNativeBundleUpdateSpec.swift +80 -0
  111. package/nitrogen/generated/ios/swift/HybridReactNativeBundleUpdateSpec_cxx.swift +595 -0
  112. package/nitrogen/generated/ios/swift/LocalBundleInfo.swift +47 -0
  113. package/nitrogen/generated/ios/swift/TestResult.swift +47 -0
  114. package/nitrogen/generated/shared/c++/AscFileInfo.hpp +83 -0
  115. package/nitrogen/generated/shared/c++/BundleDownloadASCParams.hpp +95 -0
  116. package/nitrogen/generated/shared/c++/BundleDownloadEvent.hpp +83 -0
  117. package/nitrogen/generated/shared/c++/BundleDownloadParams.hpp +91 -0
  118. package/nitrogen/generated/shared/c++/BundleDownloadResult.hpp +91 -0
  119. package/nitrogen/generated/shared/c++/BundleInstallParams.hpp +87 -0
  120. package/nitrogen/generated/shared/c++/BundleSwitchParams.hpp +83 -0
  121. package/nitrogen/generated/shared/c++/BundleVerifyASCParams.hpp +91 -0
  122. package/nitrogen/generated/shared/c++/BundleVerifyParams.hpp +87 -0
  123. package/nitrogen/generated/shared/c++/FallbackBundleInfo.hpp +83 -0
  124. package/nitrogen/generated/shared/c++/HybridReactNativeBundleUpdateSpec.cpp +45 -0
  125. package/nitrogen/generated/shared/c++/HybridReactNativeBundleUpdateSpec.hpp +124 -0
  126. package/nitrogen/generated/shared/c++/LocalBundleInfo.hpp +79 -0
  127. package/nitrogen/generated/shared/c++/TestResult.hpp +79 -0
  128. package/package.json +169 -0
  129. package/src/ReactNativeBundleUpdate.nitro.ts +143 -0
  130. package/src/index.tsx +8 -0
@@ -0,0 +1,61 @@
1
+ ///
2
+ /// JTestResult.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #include <fbjni/fbjni.h>
11
+ #include "TestResult.hpp"
12
+
13
+ #include <string>
14
+
15
+ namespace margelo::nitro::reactnativebundleupdate {
16
+
17
+ using namespace facebook;
18
+
19
+ /**
20
+ * The C++ JNI bridge between the C++ struct "TestResult" and the the Kotlin data class "TestResult".
21
+ */
22
+ struct JTestResult final: public jni::JavaClass<JTestResult> {
23
+ public:
24
+ static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/reactnativebundleupdate/TestResult;";
25
+
26
+ public:
27
+ /**
28
+ * Convert this Java/Kotlin-based struct to the C++ struct TestResult by copying all values to C++.
29
+ */
30
+ [[maybe_unused]]
31
+ [[nodiscard]]
32
+ TestResult toCpp() const {
33
+ static const auto clazz = javaClassStatic();
34
+ static const auto fieldSuccess = clazz->getField<jboolean>("success");
35
+ jboolean success = this->getFieldValue(fieldSuccess);
36
+ static const auto fieldMessage = clazz->getField<jni::JString>("message");
37
+ jni::local_ref<jni::JString> message = this->getFieldValue(fieldMessage);
38
+ return TestResult(
39
+ static_cast<bool>(success),
40
+ message->toStdString()
41
+ );
42
+ }
43
+
44
+ public:
45
+ /**
46
+ * Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
47
+ */
48
+ [[maybe_unused]]
49
+ static jni::local_ref<JTestResult::javaobject> fromCpp(const TestResult& value) {
50
+ using JSignature = JTestResult(jboolean, jni::alias_ref<jni::JString>);
51
+ static const auto clazz = javaClassStatic();
52
+ static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
53
+ return create(
54
+ clazz,
55
+ value.success,
56
+ jni::make_jstring(value.message)
57
+ );
58
+ }
59
+ };
60
+
61
+ } // namespace margelo::nitro::reactnativebundleupdate
@@ -0,0 +1,44 @@
1
+ ///
2
+ /// AscFileInfo.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.reactnativebundleupdate
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+
13
+
14
+ /**
15
+ * Represents the JavaScript object/struct "AscFileInfo".
16
+ */
17
+ @DoNotStrip
18
+ @Keep
19
+ data class AscFileInfo(
20
+ @DoNotStrip
21
+ @Keep
22
+ val fileName: String,
23
+ @DoNotStrip
24
+ @Keep
25
+ val filePath: String,
26
+ @DoNotStrip
27
+ @Keep
28
+ val fileSize: Double
29
+ ) {
30
+ /* primary constructor */
31
+
32
+ private companion object {
33
+ /**
34
+ * Constructor called from C++
35
+ */
36
+ @DoNotStrip
37
+ @Keep
38
+ @Suppress("unused")
39
+ @JvmStatic
40
+ private fun fromCpp(fileName: String, filePath: String, fileSize: Double): AscFileInfo {
41
+ return AscFileInfo(fileName, filePath, fileSize)
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,53 @@
1
+ ///
2
+ /// BundleDownloadASCParams.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.reactnativebundleupdate
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+
13
+
14
+ /**
15
+ * Represents the JavaScript object/struct "BundleDownloadASCParams".
16
+ */
17
+ @DoNotStrip
18
+ @Keep
19
+ data class BundleDownloadASCParams(
20
+ @DoNotStrip
21
+ @Keep
22
+ val downloadUrl: String,
23
+ @DoNotStrip
24
+ @Keep
25
+ val downloadedFile: String,
26
+ @DoNotStrip
27
+ @Keep
28
+ val signature: String,
29
+ @DoNotStrip
30
+ @Keep
31
+ val latestVersion: String,
32
+ @DoNotStrip
33
+ @Keep
34
+ val bundleVersion: String,
35
+ @DoNotStrip
36
+ @Keep
37
+ val sha256: String
38
+ ) {
39
+ /* primary constructor */
40
+
41
+ private companion object {
42
+ /**
43
+ * Constructor called from C++
44
+ */
45
+ @DoNotStrip
46
+ @Keep
47
+ @Suppress("unused")
48
+ @JvmStatic
49
+ private fun fromCpp(downloadUrl: String, downloadedFile: String, signature: String, latestVersion: String, bundleVersion: String, sha256: String): BundleDownloadASCParams {
50
+ return BundleDownloadASCParams(downloadUrl, downloadedFile, signature, latestVersion, bundleVersion, sha256)
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,44 @@
1
+ ///
2
+ /// BundleDownloadEvent.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.reactnativebundleupdate
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+
13
+
14
+ /**
15
+ * Represents the JavaScript object/struct "BundleDownloadEvent".
16
+ */
17
+ @DoNotStrip
18
+ @Keep
19
+ data class BundleDownloadEvent(
20
+ @DoNotStrip
21
+ @Keep
22
+ val type: String,
23
+ @DoNotStrip
24
+ @Keep
25
+ val progress: Double,
26
+ @DoNotStrip
27
+ @Keep
28
+ val message: String
29
+ ) {
30
+ /* primary constructor */
31
+
32
+ private companion object {
33
+ /**
34
+ * Constructor called from C++
35
+ */
36
+ @DoNotStrip
37
+ @Keep
38
+ @Suppress("unused")
39
+ @JvmStatic
40
+ private fun fromCpp(type: String, progress: Double, message: String): BundleDownloadEvent {
41
+ return BundleDownloadEvent(type, progress, message)
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,50 @@
1
+ ///
2
+ /// BundleDownloadParams.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.reactnativebundleupdate
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+
13
+
14
+ /**
15
+ * Represents the JavaScript object/struct "BundleDownloadParams".
16
+ */
17
+ @DoNotStrip
18
+ @Keep
19
+ data class BundleDownloadParams(
20
+ @DoNotStrip
21
+ @Keep
22
+ val downloadUrl: String,
23
+ @DoNotStrip
24
+ @Keep
25
+ val latestVersion: String,
26
+ @DoNotStrip
27
+ @Keep
28
+ val bundleVersion: String,
29
+ @DoNotStrip
30
+ @Keep
31
+ val fileSize: Double,
32
+ @DoNotStrip
33
+ @Keep
34
+ val sha256: String
35
+ ) {
36
+ /* primary constructor */
37
+
38
+ private companion object {
39
+ /**
40
+ * Constructor called from C++
41
+ */
42
+ @DoNotStrip
43
+ @Keep
44
+ @Suppress("unused")
45
+ @JvmStatic
46
+ private fun fromCpp(downloadUrl: String, latestVersion: String, bundleVersion: String, fileSize: Double, sha256: String): BundleDownloadParams {
47
+ return BundleDownloadParams(downloadUrl, latestVersion, bundleVersion, fileSize, sha256)
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,50 @@
1
+ ///
2
+ /// BundleDownloadResult.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.reactnativebundleupdate
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+
13
+
14
+ /**
15
+ * Represents the JavaScript object/struct "BundleDownloadResult".
16
+ */
17
+ @DoNotStrip
18
+ @Keep
19
+ data class BundleDownloadResult(
20
+ @DoNotStrip
21
+ @Keep
22
+ val downloadedFile: String,
23
+ @DoNotStrip
24
+ @Keep
25
+ val downloadUrl: String,
26
+ @DoNotStrip
27
+ @Keep
28
+ val latestVersion: String,
29
+ @DoNotStrip
30
+ @Keep
31
+ val bundleVersion: String,
32
+ @DoNotStrip
33
+ @Keep
34
+ val sha256: String
35
+ ) {
36
+ /* primary constructor */
37
+
38
+ private companion object {
39
+ /**
40
+ * Constructor called from C++
41
+ */
42
+ @DoNotStrip
43
+ @Keep
44
+ @Suppress("unused")
45
+ @JvmStatic
46
+ private fun fromCpp(downloadedFile: String, downloadUrl: String, latestVersion: String, bundleVersion: String, sha256: String): BundleDownloadResult {
47
+ return BundleDownloadResult(downloadedFile, downloadUrl, latestVersion, bundleVersion, sha256)
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,47 @@
1
+ ///
2
+ /// BundleInstallParams.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.reactnativebundleupdate
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+
13
+
14
+ /**
15
+ * Represents the JavaScript object/struct "BundleInstallParams".
16
+ */
17
+ @DoNotStrip
18
+ @Keep
19
+ data class BundleInstallParams(
20
+ @DoNotStrip
21
+ @Keep
22
+ val downloadedFile: String,
23
+ @DoNotStrip
24
+ @Keep
25
+ val latestVersion: String,
26
+ @DoNotStrip
27
+ @Keep
28
+ val bundleVersion: String,
29
+ @DoNotStrip
30
+ @Keep
31
+ val signature: String
32
+ ) {
33
+ /* primary constructor */
34
+
35
+ private companion object {
36
+ /**
37
+ * Constructor called from C++
38
+ */
39
+ @DoNotStrip
40
+ @Keep
41
+ @Suppress("unused")
42
+ @JvmStatic
43
+ private fun fromCpp(downloadedFile: String, latestVersion: String, bundleVersion: String, signature: String): BundleInstallParams {
44
+ return BundleInstallParams(downloadedFile, latestVersion, bundleVersion, signature)
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,44 @@
1
+ ///
2
+ /// BundleSwitchParams.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.reactnativebundleupdate
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+
13
+
14
+ /**
15
+ * Represents the JavaScript object/struct "BundleSwitchParams".
16
+ */
17
+ @DoNotStrip
18
+ @Keep
19
+ data class BundleSwitchParams(
20
+ @DoNotStrip
21
+ @Keep
22
+ val appVersion: String,
23
+ @DoNotStrip
24
+ @Keep
25
+ val bundleVersion: String,
26
+ @DoNotStrip
27
+ @Keep
28
+ val signature: String
29
+ ) {
30
+ /* primary constructor */
31
+
32
+ private companion object {
33
+ /**
34
+ * Constructor called from C++
35
+ */
36
+ @DoNotStrip
37
+ @Keep
38
+ @Suppress("unused")
39
+ @JvmStatic
40
+ private fun fromCpp(appVersion: String, bundleVersion: String, signature: String): BundleSwitchParams {
41
+ return BundleSwitchParams(appVersion, bundleVersion, signature)
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,50 @@
1
+ ///
2
+ /// BundleVerifyASCParams.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.reactnativebundleupdate
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+
13
+
14
+ /**
15
+ * Represents the JavaScript object/struct "BundleVerifyASCParams".
16
+ */
17
+ @DoNotStrip
18
+ @Keep
19
+ data class BundleVerifyASCParams(
20
+ @DoNotStrip
21
+ @Keep
22
+ val downloadedFile: String,
23
+ @DoNotStrip
24
+ @Keep
25
+ val sha256: String,
26
+ @DoNotStrip
27
+ @Keep
28
+ val latestVersion: String,
29
+ @DoNotStrip
30
+ @Keep
31
+ val bundleVersion: String,
32
+ @DoNotStrip
33
+ @Keep
34
+ val signature: String
35
+ ) {
36
+ /* primary constructor */
37
+
38
+ private companion object {
39
+ /**
40
+ * Constructor called from C++
41
+ */
42
+ @DoNotStrip
43
+ @Keep
44
+ @Suppress("unused")
45
+ @JvmStatic
46
+ private fun fromCpp(downloadedFile: String, sha256: String, latestVersion: String, bundleVersion: String, signature: String): BundleVerifyASCParams {
47
+ return BundleVerifyASCParams(downloadedFile, sha256, latestVersion, bundleVersion, signature)
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,47 @@
1
+ ///
2
+ /// BundleVerifyParams.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.reactnativebundleupdate
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+
13
+
14
+ /**
15
+ * Represents the JavaScript object/struct "BundleVerifyParams".
16
+ */
17
+ @DoNotStrip
18
+ @Keep
19
+ data class BundleVerifyParams(
20
+ @DoNotStrip
21
+ @Keep
22
+ val downloadedFile: String,
23
+ @DoNotStrip
24
+ @Keep
25
+ val sha256: String,
26
+ @DoNotStrip
27
+ @Keep
28
+ val latestVersion: String,
29
+ @DoNotStrip
30
+ @Keep
31
+ val bundleVersion: String
32
+ ) {
33
+ /* primary constructor */
34
+
35
+ private companion object {
36
+ /**
37
+ * Constructor called from C++
38
+ */
39
+ @DoNotStrip
40
+ @Keep
41
+ @Suppress("unused")
42
+ @JvmStatic
43
+ private fun fromCpp(downloadedFile: String, sha256: String, latestVersion: String, bundleVersion: String): BundleVerifyParams {
44
+ return BundleVerifyParams(downloadedFile, sha256, latestVersion, bundleVersion)
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,44 @@
1
+ ///
2
+ /// FallbackBundleInfo.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.reactnativebundleupdate
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+
13
+
14
+ /**
15
+ * Represents the JavaScript object/struct "FallbackBundleInfo".
16
+ */
17
+ @DoNotStrip
18
+ @Keep
19
+ data class FallbackBundleInfo(
20
+ @DoNotStrip
21
+ @Keep
22
+ val appVersion: String,
23
+ @DoNotStrip
24
+ @Keep
25
+ val bundleVersion: String,
26
+ @DoNotStrip
27
+ @Keep
28
+ val signature: String
29
+ ) {
30
+ /* primary constructor */
31
+
32
+ private companion object {
33
+ /**
34
+ * Constructor called from C++
35
+ */
36
+ @DoNotStrip
37
+ @Keep
38
+ @Suppress("unused")
39
+ @JvmStatic
40
+ private fun fromCpp(appVersion: String, bundleVersion: String, signature: String): FallbackBundleInfo {
41
+ return FallbackBundleInfo(appVersion, bundleVersion, signature)
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,80 @@
1
+ ///
2
+ /// Func_void_BundleDownloadEvent.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.reactnativebundleupdate
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.jni.HybridData
12
+ import com.facebook.proguard.annotations.DoNotStrip
13
+ import dalvik.annotation.optimization.FastNative
14
+
15
+
16
+ /**
17
+ * Represents the JavaScript callback `(event: struct) => void`.
18
+ * This can be either implemented in C++ (in which case it might be a callback coming from JS),
19
+ * or in Kotlin/Java (in which case it is a native callback).
20
+ */
21
+ @DoNotStrip
22
+ @Keep
23
+ @Suppress("ClassName", "RedundantUnitReturnType")
24
+ fun interface Func_void_BundleDownloadEvent: (BundleDownloadEvent) -> Unit {
25
+ /**
26
+ * Call the given JS callback.
27
+ * @throws Throwable if the JS function itself throws an error, or if the JS function/runtime has already been deleted.
28
+ */
29
+ @DoNotStrip
30
+ @Keep
31
+ override fun invoke(event: BundleDownloadEvent): Unit
32
+ }
33
+
34
+ /**
35
+ * Represents the JavaScript callback `(event: struct) => void`.
36
+ * This is implemented in C++, via a `std::function<...>`.
37
+ * The callback might be coming from JS.
38
+ */
39
+ @DoNotStrip
40
+ @Keep
41
+ @Suppress(
42
+ "KotlinJniMissingFunction", "unused",
43
+ "RedundantSuppression", "RedundantUnitReturnType", "FunctionName",
44
+ "ConvertSecondaryConstructorToPrimary", "ClassName", "LocalVariableName",
45
+ )
46
+ class Func_void_BundleDownloadEvent_cxx: Func_void_BundleDownloadEvent {
47
+ @DoNotStrip
48
+ @Keep
49
+ private val mHybridData: HybridData
50
+
51
+ @DoNotStrip
52
+ @Keep
53
+ private constructor(hybridData: HybridData) {
54
+ mHybridData = hybridData
55
+ }
56
+
57
+ @DoNotStrip
58
+ @Keep
59
+ override fun invoke(event: BundleDownloadEvent): Unit
60
+ = invoke_cxx(event)
61
+
62
+ @FastNative
63
+ private external fun invoke_cxx(event: BundleDownloadEvent): Unit
64
+ }
65
+
66
+ /**
67
+ * Represents the JavaScript callback `(event: struct) => void`.
68
+ * This is implemented in Java/Kotlin, via a `(BundleDownloadEvent) -> Unit`.
69
+ * The callback is always coming from native.
70
+ */
71
+ @DoNotStrip
72
+ @Keep
73
+ @Suppress("ClassName", "RedundantUnitReturnType", "unused")
74
+ class Func_void_BundleDownloadEvent_java(private val function: (BundleDownloadEvent) -> Unit): Func_void_BundleDownloadEvent {
75
+ @DoNotStrip
76
+ @Keep
77
+ override fun invoke(event: BundleDownloadEvent): Unit {
78
+ return this.function(event)
79
+ }
80
+ }