@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,83 @@
1
+ ///
2
+ /// AscFileInfo.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
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+ #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
+ #include <NitroModules/JSIHelpers.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
25
+
26
+
27
+
28
+ #include <string>
29
+
30
+ namespace margelo::nitro::reactnativebundleupdate {
31
+
32
+ /**
33
+ * A struct which can be represented as a JavaScript object (AscFileInfo).
34
+ */
35
+ struct AscFileInfo {
36
+ public:
37
+ std::string fileName SWIFT_PRIVATE;
38
+ std::string filePath SWIFT_PRIVATE;
39
+ double fileSize SWIFT_PRIVATE;
40
+
41
+ public:
42
+ AscFileInfo() = default;
43
+ explicit AscFileInfo(std::string fileName, std::string filePath, double fileSize): fileName(fileName), filePath(filePath), fileSize(fileSize) {}
44
+ };
45
+
46
+ } // namespace margelo::nitro::reactnativebundleupdate
47
+
48
+ namespace margelo::nitro {
49
+
50
+ // C++ AscFileInfo <> JS AscFileInfo (object)
51
+ template <>
52
+ struct JSIConverter<margelo::nitro::reactnativebundleupdate::AscFileInfo> final {
53
+ static inline margelo::nitro::reactnativebundleupdate::AscFileInfo fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
54
+ jsi::Object obj = arg.asObject(runtime);
55
+ return margelo::nitro::reactnativebundleupdate::AscFileInfo(
56
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "fileName")),
57
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "filePath")),
58
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "fileSize"))
59
+ );
60
+ }
61
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativebundleupdate::AscFileInfo& arg) {
62
+ jsi::Object obj(runtime);
63
+ obj.setProperty(runtime, "fileName", JSIConverter<std::string>::toJSI(runtime, arg.fileName));
64
+ obj.setProperty(runtime, "filePath", JSIConverter<std::string>::toJSI(runtime, arg.filePath));
65
+ obj.setProperty(runtime, "fileSize", JSIConverter<double>::toJSI(runtime, arg.fileSize));
66
+ return obj;
67
+ }
68
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
69
+ if (!value.isObject()) {
70
+ return false;
71
+ }
72
+ jsi::Object obj = value.getObject(runtime);
73
+ if (!nitro::isPlainObject(runtime, obj)) {
74
+ return false;
75
+ }
76
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "fileName"))) return false;
77
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "filePath"))) return false;
78
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "fileSize"))) return false;
79
+ return true;
80
+ }
81
+ };
82
+
83
+ } // namespace margelo::nitro
@@ -0,0 +1,95 @@
1
+ ///
2
+ /// BundleDownloadASCParams.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
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+ #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
+ #include <NitroModules/JSIHelpers.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
25
+
26
+
27
+
28
+ #include <string>
29
+
30
+ namespace margelo::nitro::reactnativebundleupdate {
31
+
32
+ /**
33
+ * A struct which can be represented as a JavaScript object (BundleDownloadASCParams).
34
+ */
35
+ struct BundleDownloadASCParams {
36
+ public:
37
+ std::string downloadUrl SWIFT_PRIVATE;
38
+ std::string downloadedFile SWIFT_PRIVATE;
39
+ std::string signature SWIFT_PRIVATE;
40
+ std::string latestVersion SWIFT_PRIVATE;
41
+ std::string bundleVersion SWIFT_PRIVATE;
42
+ std::string sha256 SWIFT_PRIVATE;
43
+
44
+ public:
45
+ BundleDownloadASCParams() = default;
46
+ explicit BundleDownloadASCParams(std::string downloadUrl, std::string downloadedFile, std::string signature, std::string latestVersion, std::string bundleVersion, std::string sha256): downloadUrl(downloadUrl), downloadedFile(downloadedFile), signature(signature), latestVersion(latestVersion), bundleVersion(bundleVersion), sha256(sha256) {}
47
+ };
48
+
49
+ } // namespace margelo::nitro::reactnativebundleupdate
50
+
51
+ namespace margelo::nitro {
52
+
53
+ // C++ BundleDownloadASCParams <> JS BundleDownloadASCParams (object)
54
+ template <>
55
+ struct JSIConverter<margelo::nitro::reactnativebundleupdate::BundleDownloadASCParams> final {
56
+ static inline margelo::nitro::reactnativebundleupdate::BundleDownloadASCParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
57
+ jsi::Object obj = arg.asObject(runtime);
58
+ return margelo::nitro::reactnativebundleupdate::BundleDownloadASCParams(
59
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "downloadUrl")),
60
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "downloadedFile")),
61
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "signature")),
62
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "latestVersion")),
63
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "bundleVersion")),
64
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "sha256"))
65
+ );
66
+ }
67
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativebundleupdate::BundleDownloadASCParams& arg) {
68
+ jsi::Object obj(runtime);
69
+ obj.setProperty(runtime, "downloadUrl", JSIConverter<std::string>::toJSI(runtime, arg.downloadUrl));
70
+ obj.setProperty(runtime, "downloadedFile", JSIConverter<std::string>::toJSI(runtime, arg.downloadedFile));
71
+ obj.setProperty(runtime, "signature", JSIConverter<std::string>::toJSI(runtime, arg.signature));
72
+ obj.setProperty(runtime, "latestVersion", JSIConverter<std::string>::toJSI(runtime, arg.latestVersion));
73
+ obj.setProperty(runtime, "bundleVersion", JSIConverter<std::string>::toJSI(runtime, arg.bundleVersion));
74
+ obj.setProperty(runtime, "sha256", JSIConverter<std::string>::toJSI(runtime, arg.sha256));
75
+ return obj;
76
+ }
77
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
78
+ if (!value.isObject()) {
79
+ return false;
80
+ }
81
+ jsi::Object obj = value.getObject(runtime);
82
+ if (!nitro::isPlainObject(runtime, obj)) {
83
+ return false;
84
+ }
85
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "downloadUrl"))) return false;
86
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "downloadedFile"))) return false;
87
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "signature"))) return false;
88
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "latestVersion"))) return false;
89
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "bundleVersion"))) return false;
90
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "sha256"))) return false;
91
+ return true;
92
+ }
93
+ };
94
+
95
+ } // namespace margelo::nitro
@@ -0,0 +1,83 @@
1
+ ///
2
+ /// BundleDownloadEvent.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
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+ #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
+ #include <NitroModules/JSIHelpers.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
25
+
26
+
27
+
28
+ #include <string>
29
+
30
+ namespace margelo::nitro::reactnativebundleupdate {
31
+
32
+ /**
33
+ * A struct which can be represented as a JavaScript object (BundleDownloadEvent).
34
+ */
35
+ struct BundleDownloadEvent {
36
+ public:
37
+ std::string type SWIFT_PRIVATE;
38
+ double progress SWIFT_PRIVATE;
39
+ std::string message SWIFT_PRIVATE;
40
+
41
+ public:
42
+ BundleDownloadEvent() = default;
43
+ explicit BundleDownloadEvent(std::string type, double progress, std::string message): type(type), progress(progress), message(message) {}
44
+ };
45
+
46
+ } // namespace margelo::nitro::reactnativebundleupdate
47
+
48
+ namespace margelo::nitro {
49
+
50
+ // C++ BundleDownloadEvent <> JS BundleDownloadEvent (object)
51
+ template <>
52
+ struct JSIConverter<margelo::nitro::reactnativebundleupdate::BundleDownloadEvent> final {
53
+ static inline margelo::nitro::reactnativebundleupdate::BundleDownloadEvent fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
54
+ jsi::Object obj = arg.asObject(runtime);
55
+ return margelo::nitro::reactnativebundleupdate::BundleDownloadEvent(
56
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "type")),
57
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "progress")),
58
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "message"))
59
+ );
60
+ }
61
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativebundleupdate::BundleDownloadEvent& arg) {
62
+ jsi::Object obj(runtime);
63
+ obj.setProperty(runtime, "type", JSIConverter<std::string>::toJSI(runtime, arg.type));
64
+ obj.setProperty(runtime, "progress", JSIConverter<double>::toJSI(runtime, arg.progress));
65
+ obj.setProperty(runtime, "message", JSIConverter<std::string>::toJSI(runtime, arg.message));
66
+ return obj;
67
+ }
68
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
69
+ if (!value.isObject()) {
70
+ return false;
71
+ }
72
+ jsi::Object obj = value.getObject(runtime);
73
+ if (!nitro::isPlainObject(runtime, obj)) {
74
+ return false;
75
+ }
76
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "type"))) return false;
77
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "progress"))) return false;
78
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "message"))) return false;
79
+ return true;
80
+ }
81
+ };
82
+
83
+ } // namespace margelo::nitro
@@ -0,0 +1,91 @@
1
+ ///
2
+ /// BundleDownloadParams.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
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+ #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
+ #include <NitroModules/JSIHelpers.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
25
+
26
+
27
+
28
+ #include <string>
29
+
30
+ namespace margelo::nitro::reactnativebundleupdate {
31
+
32
+ /**
33
+ * A struct which can be represented as a JavaScript object (BundleDownloadParams).
34
+ */
35
+ struct BundleDownloadParams {
36
+ public:
37
+ std::string downloadUrl SWIFT_PRIVATE;
38
+ std::string latestVersion SWIFT_PRIVATE;
39
+ std::string bundleVersion SWIFT_PRIVATE;
40
+ double fileSize SWIFT_PRIVATE;
41
+ std::string sha256 SWIFT_PRIVATE;
42
+
43
+ public:
44
+ BundleDownloadParams() = default;
45
+ explicit BundleDownloadParams(std::string downloadUrl, std::string latestVersion, std::string bundleVersion, double fileSize, std::string sha256): downloadUrl(downloadUrl), latestVersion(latestVersion), bundleVersion(bundleVersion), fileSize(fileSize), sha256(sha256) {}
46
+ };
47
+
48
+ } // namespace margelo::nitro::reactnativebundleupdate
49
+
50
+ namespace margelo::nitro {
51
+
52
+ // C++ BundleDownloadParams <> JS BundleDownloadParams (object)
53
+ template <>
54
+ struct JSIConverter<margelo::nitro::reactnativebundleupdate::BundleDownloadParams> final {
55
+ static inline margelo::nitro::reactnativebundleupdate::BundleDownloadParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
56
+ jsi::Object obj = arg.asObject(runtime);
57
+ return margelo::nitro::reactnativebundleupdate::BundleDownloadParams(
58
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "downloadUrl")),
59
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "latestVersion")),
60
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "bundleVersion")),
61
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "fileSize")),
62
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "sha256"))
63
+ );
64
+ }
65
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativebundleupdate::BundleDownloadParams& arg) {
66
+ jsi::Object obj(runtime);
67
+ obj.setProperty(runtime, "downloadUrl", JSIConverter<std::string>::toJSI(runtime, arg.downloadUrl));
68
+ obj.setProperty(runtime, "latestVersion", JSIConverter<std::string>::toJSI(runtime, arg.latestVersion));
69
+ obj.setProperty(runtime, "bundleVersion", JSIConverter<std::string>::toJSI(runtime, arg.bundleVersion));
70
+ obj.setProperty(runtime, "fileSize", JSIConverter<double>::toJSI(runtime, arg.fileSize));
71
+ obj.setProperty(runtime, "sha256", JSIConverter<std::string>::toJSI(runtime, arg.sha256));
72
+ return obj;
73
+ }
74
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
75
+ if (!value.isObject()) {
76
+ return false;
77
+ }
78
+ jsi::Object obj = value.getObject(runtime);
79
+ if (!nitro::isPlainObject(runtime, obj)) {
80
+ return false;
81
+ }
82
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "downloadUrl"))) return false;
83
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "latestVersion"))) return false;
84
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "bundleVersion"))) return false;
85
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "fileSize"))) return false;
86
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "sha256"))) return false;
87
+ return true;
88
+ }
89
+ };
90
+
91
+ } // namespace margelo::nitro
@@ -0,0 +1,91 @@
1
+ ///
2
+ /// BundleDownloadResult.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
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+ #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
+ #include <NitroModules/JSIHelpers.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
25
+
26
+
27
+
28
+ #include <string>
29
+
30
+ namespace margelo::nitro::reactnativebundleupdate {
31
+
32
+ /**
33
+ * A struct which can be represented as a JavaScript object (BundleDownloadResult).
34
+ */
35
+ struct BundleDownloadResult {
36
+ public:
37
+ std::string downloadedFile SWIFT_PRIVATE;
38
+ std::string downloadUrl SWIFT_PRIVATE;
39
+ std::string latestVersion SWIFT_PRIVATE;
40
+ std::string bundleVersion SWIFT_PRIVATE;
41
+ std::string sha256 SWIFT_PRIVATE;
42
+
43
+ public:
44
+ BundleDownloadResult() = default;
45
+ explicit BundleDownloadResult(std::string downloadedFile, std::string downloadUrl, std::string latestVersion, std::string bundleVersion, std::string sha256): downloadedFile(downloadedFile), downloadUrl(downloadUrl), latestVersion(latestVersion), bundleVersion(bundleVersion), sha256(sha256) {}
46
+ };
47
+
48
+ } // namespace margelo::nitro::reactnativebundleupdate
49
+
50
+ namespace margelo::nitro {
51
+
52
+ // C++ BundleDownloadResult <> JS BundleDownloadResult (object)
53
+ template <>
54
+ struct JSIConverter<margelo::nitro::reactnativebundleupdate::BundleDownloadResult> final {
55
+ static inline margelo::nitro::reactnativebundleupdate::BundleDownloadResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
56
+ jsi::Object obj = arg.asObject(runtime);
57
+ return margelo::nitro::reactnativebundleupdate::BundleDownloadResult(
58
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "downloadedFile")),
59
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "downloadUrl")),
60
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "latestVersion")),
61
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "bundleVersion")),
62
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "sha256"))
63
+ );
64
+ }
65
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativebundleupdate::BundleDownloadResult& arg) {
66
+ jsi::Object obj(runtime);
67
+ obj.setProperty(runtime, "downloadedFile", JSIConverter<std::string>::toJSI(runtime, arg.downloadedFile));
68
+ obj.setProperty(runtime, "downloadUrl", JSIConverter<std::string>::toJSI(runtime, arg.downloadUrl));
69
+ obj.setProperty(runtime, "latestVersion", JSIConverter<std::string>::toJSI(runtime, arg.latestVersion));
70
+ obj.setProperty(runtime, "bundleVersion", JSIConverter<std::string>::toJSI(runtime, arg.bundleVersion));
71
+ obj.setProperty(runtime, "sha256", JSIConverter<std::string>::toJSI(runtime, arg.sha256));
72
+ return obj;
73
+ }
74
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
75
+ if (!value.isObject()) {
76
+ return false;
77
+ }
78
+ jsi::Object obj = value.getObject(runtime);
79
+ if (!nitro::isPlainObject(runtime, obj)) {
80
+ return false;
81
+ }
82
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "downloadedFile"))) return false;
83
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "downloadUrl"))) return false;
84
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "latestVersion"))) return false;
85
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "bundleVersion"))) return false;
86
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "sha256"))) return false;
87
+ return true;
88
+ }
89
+ };
90
+
91
+ } // namespace margelo::nitro
@@ -0,0 +1,87 @@
1
+ ///
2
+ /// BundleInstallParams.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
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+ #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
+ #include <NitroModules/JSIHelpers.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
25
+
26
+
27
+
28
+ #include <string>
29
+
30
+ namespace margelo::nitro::reactnativebundleupdate {
31
+
32
+ /**
33
+ * A struct which can be represented as a JavaScript object (BundleInstallParams).
34
+ */
35
+ struct BundleInstallParams {
36
+ public:
37
+ std::string downloadedFile SWIFT_PRIVATE;
38
+ std::string latestVersion SWIFT_PRIVATE;
39
+ std::string bundleVersion SWIFT_PRIVATE;
40
+ std::string signature SWIFT_PRIVATE;
41
+
42
+ public:
43
+ BundleInstallParams() = default;
44
+ explicit BundleInstallParams(std::string downloadedFile, std::string latestVersion, std::string bundleVersion, std::string signature): downloadedFile(downloadedFile), latestVersion(latestVersion), bundleVersion(bundleVersion), signature(signature) {}
45
+ };
46
+
47
+ } // namespace margelo::nitro::reactnativebundleupdate
48
+
49
+ namespace margelo::nitro {
50
+
51
+ // C++ BundleInstallParams <> JS BundleInstallParams (object)
52
+ template <>
53
+ struct JSIConverter<margelo::nitro::reactnativebundleupdate::BundleInstallParams> final {
54
+ static inline margelo::nitro::reactnativebundleupdate::BundleInstallParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
55
+ jsi::Object obj = arg.asObject(runtime);
56
+ return margelo::nitro::reactnativebundleupdate::BundleInstallParams(
57
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "downloadedFile")),
58
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "latestVersion")),
59
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "bundleVersion")),
60
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "signature"))
61
+ );
62
+ }
63
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativebundleupdate::BundleInstallParams& arg) {
64
+ jsi::Object obj(runtime);
65
+ obj.setProperty(runtime, "downloadedFile", JSIConverter<std::string>::toJSI(runtime, arg.downloadedFile));
66
+ obj.setProperty(runtime, "latestVersion", JSIConverter<std::string>::toJSI(runtime, arg.latestVersion));
67
+ obj.setProperty(runtime, "bundleVersion", JSIConverter<std::string>::toJSI(runtime, arg.bundleVersion));
68
+ obj.setProperty(runtime, "signature", JSIConverter<std::string>::toJSI(runtime, arg.signature));
69
+ return obj;
70
+ }
71
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
72
+ if (!value.isObject()) {
73
+ return false;
74
+ }
75
+ jsi::Object obj = value.getObject(runtime);
76
+ if (!nitro::isPlainObject(runtime, obj)) {
77
+ return false;
78
+ }
79
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "downloadedFile"))) return false;
80
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "latestVersion"))) return false;
81
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "bundleVersion"))) return false;
82
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "signature"))) return false;
83
+ return true;
84
+ }
85
+ };
86
+
87
+ } // namespace margelo::nitro
@@ -0,0 +1,83 @@
1
+ ///
2
+ /// BundleSwitchParams.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
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+ #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
+ #include <NitroModules/JSIHelpers.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
25
+
26
+
27
+
28
+ #include <string>
29
+
30
+ namespace margelo::nitro::reactnativebundleupdate {
31
+
32
+ /**
33
+ * A struct which can be represented as a JavaScript object (BundleSwitchParams).
34
+ */
35
+ struct BundleSwitchParams {
36
+ public:
37
+ std::string appVersion SWIFT_PRIVATE;
38
+ std::string bundleVersion SWIFT_PRIVATE;
39
+ std::string signature SWIFT_PRIVATE;
40
+
41
+ public:
42
+ BundleSwitchParams() = default;
43
+ explicit BundleSwitchParams(std::string appVersion, std::string bundleVersion, std::string signature): appVersion(appVersion), bundleVersion(bundleVersion), signature(signature) {}
44
+ };
45
+
46
+ } // namespace margelo::nitro::reactnativebundleupdate
47
+
48
+ namespace margelo::nitro {
49
+
50
+ // C++ BundleSwitchParams <> JS BundleSwitchParams (object)
51
+ template <>
52
+ struct JSIConverter<margelo::nitro::reactnativebundleupdate::BundleSwitchParams> final {
53
+ static inline margelo::nitro::reactnativebundleupdate::BundleSwitchParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
54
+ jsi::Object obj = arg.asObject(runtime);
55
+ return margelo::nitro::reactnativebundleupdate::BundleSwitchParams(
56
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "appVersion")),
57
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "bundleVersion")),
58
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "signature"))
59
+ );
60
+ }
61
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativebundleupdate::BundleSwitchParams& arg) {
62
+ jsi::Object obj(runtime);
63
+ obj.setProperty(runtime, "appVersion", JSIConverter<std::string>::toJSI(runtime, arg.appVersion));
64
+ obj.setProperty(runtime, "bundleVersion", JSIConverter<std::string>::toJSI(runtime, arg.bundleVersion));
65
+ obj.setProperty(runtime, "signature", JSIConverter<std::string>::toJSI(runtime, arg.signature));
66
+ return obj;
67
+ }
68
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
69
+ if (!value.isObject()) {
70
+ return false;
71
+ }
72
+ jsi::Object obj = value.getObject(runtime);
73
+ if (!nitro::isPlainObject(runtime, obj)) {
74
+ return false;
75
+ }
76
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "appVersion"))) return false;
77
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "bundleVersion"))) return false;
78
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "signature"))) return false;
79
+ return true;
80
+ }
81
+ };
82
+
83
+ } // namespace margelo::nitro