@onekeyfe/react-native-bundle-update 3.0.81 → 3.0.85
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/nitrogen/generated/android/c++/JAscFileInfo.hpp +2 -2
- package/nitrogen/generated/android/c++/JBundleDownloadASCParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JBundleDownloadEvent.hpp +2 -2
- package/nitrogen/generated/android/c++/JBundleDownloadParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JBundleDownloadResult.hpp +2 -2
- package/nitrogen/generated/android/c++/JBundleInstallParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JBundleSwitchParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JBundleVerifyASCParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JBundleVerifyParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JFallbackBundleInfo.hpp +2 -2
- package/nitrogen/generated/android/c++/JFunc_void_BundleDownloadEvent.hpp +3 -3
- package/nitrogen/generated/android/c++/JHybridReactNativeBundleUpdateSpec.cpp +56 -54
- package/nitrogen/generated/android/c++/JHybridReactNativeBundleUpdateSpec.hpp +20 -22
- package/nitrogen/generated/android/c++/JLocalBundleInfo.hpp +2 -2
- package/nitrogen/generated/android/c++/JTestResult.hpp +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/AscFileInfo.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleDownloadASCParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleDownloadEvent.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleDownloadParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleDownloadResult.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleInstallParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleSwitchParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleVerifyASCParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleVerifyParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/FallbackBundleInfo.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/Func_void_BundleDownloadEvent.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/HybridReactNativeBundleUpdateSpec.kt +16 -19
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/LocalBundleInfo.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/TestResult.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/reactnativebundleupdateOnLoad.kt +1 -1
- package/nitrogen/generated/android/reactnativebundleupdate+autolinking.cmake +1 -1
- package/nitrogen/generated/android/reactnativebundleupdate+autolinking.gradle +1 -1
- package/nitrogen/generated/android/reactnativebundleupdateOnLoad.cpp +28 -18
- package/nitrogen/generated/android/reactnativebundleupdateOnLoad.hpp +14 -5
- package/nitrogen/generated/ios/ReactNativeBundleUpdate+autolinking.rb +2 -2
- package/nitrogen/generated/ios/ReactNativeBundleUpdate-Swift-Cxx-Bridge.cpp +1 -1
- package/nitrogen/generated/ios/ReactNativeBundleUpdate-Swift-Cxx-Bridge.hpp +1 -1
- package/nitrogen/generated/ios/ReactNativeBundleUpdate-Swift-Cxx-Umbrella.hpp +1 -1
- package/nitrogen/generated/ios/ReactNativeBundleUpdateAutolinking.mm +1 -1
- package/nitrogen/generated/ios/ReactNativeBundleUpdateAutolinking.swift +9 -8
- package/nitrogen/generated/ios/c++/HybridReactNativeBundleUpdateSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridReactNativeBundleUpdateSpecSwift.hpp +7 -1
- package/nitrogen/generated/ios/swift/AscFileInfo.swift +7 -26
- package/nitrogen/generated/ios/swift/BundleDownloadASCParams.swift +13 -50
- package/nitrogen/generated/ios/swift/BundleDownloadEvent.swift +7 -26
- package/nitrogen/generated/ios/swift/BundleDownloadParams.swift +11 -42
- package/nitrogen/generated/ios/swift/BundleDownloadResult.swift +11 -42
- package/nitrogen/generated/ios/swift/BundleInstallParams.swift +9 -34
- package/nitrogen/generated/ios/swift/BundleSwitchParams.swift +7 -26
- package/nitrogen/generated/ios/swift/BundleVerifyASCParams.swift +11 -42
- package/nitrogen/generated/ios/swift/BundleVerifyParams.swift +9 -34
- package/nitrogen/generated/ios/swift/FallbackBundleInfo.swift +7 -26
- package/nitrogen/generated/ios/swift/Func_void.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_BundleDownloadEvent.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_BundleDownloadResult.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_TestResult.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_double.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__vector_AscFileInfo_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__vector_FallbackBundleInfo_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__vector_LocalBundleInfo_.swift +1 -2
- package/nitrogen/generated/ios/swift/HybridReactNativeBundleUpdateSpec.swift +3 -4
- package/nitrogen/generated/ios/swift/HybridReactNativeBundleUpdateSpec_cxx.swift +9 -2
- package/nitrogen/generated/ios/swift/LocalBundleInfo.swift +5 -18
- package/nitrogen/generated/ios/swift/TestResult.swift +5 -18
- package/nitrogen/generated/shared/c++/AscFileInfo.hpp +19 -11
- package/nitrogen/generated/shared/c++/BundleDownloadASCParams.hpp +28 -20
- package/nitrogen/generated/shared/c++/BundleDownloadEvent.hpp +19 -11
- package/nitrogen/generated/shared/c++/BundleDownloadParams.hpp +25 -17
- package/nitrogen/generated/shared/c++/BundleDownloadResult.hpp +25 -17
- package/nitrogen/generated/shared/c++/BundleInstallParams.hpp +22 -14
- package/nitrogen/generated/shared/c++/BundleSwitchParams.hpp +19 -11
- package/nitrogen/generated/shared/c++/BundleVerifyASCParams.hpp +25 -17
- package/nitrogen/generated/shared/c++/BundleVerifyParams.hpp +22 -14
- package/nitrogen/generated/shared/c++/FallbackBundleInfo.hpp +19 -11
- package/nitrogen/generated/shared/c++/HybridReactNativeBundleUpdateSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridReactNativeBundleUpdateSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/LocalBundleInfo.hpp +16 -8
- package/nitrogen/generated/shared/c++/TestResult.hpp +16 -8
- package/package.json +4 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// BundleDownloadParams.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
|
|
27
32
|
|
|
@@ -32,7 +37,7 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
32
37
|
/**
|
|
33
38
|
* A struct which can be represented as a JavaScript object (BundleDownloadParams).
|
|
34
39
|
*/
|
|
35
|
-
struct BundleDownloadParams {
|
|
40
|
+
struct BundleDownloadParams final {
|
|
36
41
|
public:
|
|
37
42
|
std::string downloadUrl SWIFT_PRIVATE;
|
|
38
43
|
std::string latestVersion SWIFT_PRIVATE;
|
|
@@ -43,6 +48,9 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
43
48
|
public:
|
|
44
49
|
BundleDownloadParams() = default;
|
|
45
50
|
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) {}
|
|
51
|
+
|
|
52
|
+
public:
|
|
53
|
+
friend bool operator==(const BundleDownloadParams& lhs, const BundleDownloadParams& rhs) = default;
|
|
46
54
|
};
|
|
47
55
|
|
|
48
56
|
} // namespace margelo::nitro::reactnativebundleupdate
|
|
@@ -55,20 +63,20 @@ namespace margelo::nitro {
|
|
|
55
63
|
static inline margelo::nitro::reactnativebundleupdate::BundleDownloadParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
56
64
|
jsi::Object obj = arg.asObject(runtime);
|
|
57
65
|
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"))
|
|
66
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "downloadUrl"))),
|
|
67
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "latestVersion"))),
|
|
68
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion"))),
|
|
69
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "fileSize"))),
|
|
70
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sha256")))
|
|
63
71
|
);
|
|
64
72
|
}
|
|
65
73
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativebundleupdate::BundleDownloadParams& arg) {
|
|
66
74
|
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));
|
|
75
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "downloadUrl"), JSIConverter<std::string>::toJSI(runtime, arg.downloadUrl));
|
|
76
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "latestVersion"), JSIConverter<std::string>::toJSI(runtime, arg.latestVersion));
|
|
77
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion"), JSIConverter<std::string>::toJSI(runtime, arg.bundleVersion));
|
|
78
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "fileSize"), JSIConverter<double>::toJSI(runtime, arg.fileSize));
|
|
79
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "sha256"), JSIConverter<std::string>::toJSI(runtime, arg.sha256));
|
|
72
80
|
return obj;
|
|
73
81
|
}
|
|
74
82
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -79,11 +87,11 @@ namespace margelo::nitro {
|
|
|
79
87
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
80
88
|
return false;
|
|
81
89
|
}
|
|
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;
|
|
90
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "downloadUrl")))) return false;
|
|
91
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "latestVersion")))) return false;
|
|
92
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion")))) return false;
|
|
93
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "fileSize")))) return false;
|
|
94
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sha256")))) return false;
|
|
87
95
|
return true;
|
|
88
96
|
}
|
|
89
97
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// BundleDownloadResult.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
|
|
27
32
|
|
|
@@ -32,7 +37,7 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
32
37
|
/**
|
|
33
38
|
* A struct which can be represented as a JavaScript object (BundleDownloadResult).
|
|
34
39
|
*/
|
|
35
|
-
struct BundleDownloadResult {
|
|
40
|
+
struct BundleDownloadResult final {
|
|
36
41
|
public:
|
|
37
42
|
std::string downloadedFile SWIFT_PRIVATE;
|
|
38
43
|
std::string downloadUrl SWIFT_PRIVATE;
|
|
@@ -43,6 +48,9 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
43
48
|
public:
|
|
44
49
|
BundleDownloadResult() = default;
|
|
45
50
|
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) {}
|
|
51
|
+
|
|
52
|
+
public:
|
|
53
|
+
friend bool operator==(const BundleDownloadResult& lhs, const BundleDownloadResult& rhs) = default;
|
|
46
54
|
};
|
|
47
55
|
|
|
48
56
|
} // namespace margelo::nitro::reactnativebundleupdate
|
|
@@ -55,20 +63,20 @@ namespace margelo::nitro {
|
|
|
55
63
|
static inline margelo::nitro::reactnativebundleupdate::BundleDownloadResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
56
64
|
jsi::Object obj = arg.asObject(runtime);
|
|
57
65
|
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"))
|
|
66
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "downloadedFile"))),
|
|
67
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "downloadUrl"))),
|
|
68
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "latestVersion"))),
|
|
69
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion"))),
|
|
70
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sha256")))
|
|
63
71
|
);
|
|
64
72
|
}
|
|
65
73
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativebundleupdate::BundleDownloadResult& arg) {
|
|
66
74
|
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));
|
|
75
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "downloadedFile"), JSIConverter<std::string>::toJSI(runtime, arg.downloadedFile));
|
|
76
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "downloadUrl"), JSIConverter<std::string>::toJSI(runtime, arg.downloadUrl));
|
|
77
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "latestVersion"), JSIConverter<std::string>::toJSI(runtime, arg.latestVersion));
|
|
78
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion"), JSIConverter<std::string>::toJSI(runtime, arg.bundleVersion));
|
|
79
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "sha256"), JSIConverter<std::string>::toJSI(runtime, arg.sha256));
|
|
72
80
|
return obj;
|
|
73
81
|
}
|
|
74
82
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -79,11 +87,11 @@ namespace margelo::nitro {
|
|
|
79
87
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
80
88
|
return false;
|
|
81
89
|
}
|
|
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;
|
|
90
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "downloadedFile")))) return false;
|
|
91
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "downloadUrl")))) return false;
|
|
92
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "latestVersion")))) return false;
|
|
93
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion")))) return false;
|
|
94
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sha256")))) return false;
|
|
87
95
|
return true;
|
|
88
96
|
}
|
|
89
97
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// BundleInstallParams.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
|
|
27
32
|
|
|
@@ -32,7 +37,7 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
32
37
|
/**
|
|
33
38
|
* A struct which can be represented as a JavaScript object (BundleInstallParams).
|
|
34
39
|
*/
|
|
35
|
-
struct BundleInstallParams {
|
|
40
|
+
struct BundleInstallParams final {
|
|
36
41
|
public:
|
|
37
42
|
std::string downloadedFile SWIFT_PRIVATE;
|
|
38
43
|
std::string latestVersion SWIFT_PRIVATE;
|
|
@@ -42,6 +47,9 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
42
47
|
public:
|
|
43
48
|
BundleInstallParams() = default;
|
|
44
49
|
explicit BundleInstallParams(std::string downloadedFile, std::string latestVersion, std::string bundleVersion, std::string signature): downloadedFile(downloadedFile), latestVersion(latestVersion), bundleVersion(bundleVersion), signature(signature) {}
|
|
50
|
+
|
|
51
|
+
public:
|
|
52
|
+
friend bool operator==(const BundleInstallParams& lhs, const BundleInstallParams& rhs) = default;
|
|
45
53
|
};
|
|
46
54
|
|
|
47
55
|
} // namespace margelo::nitro::reactnativebundleupdate
|
|
@@ -54,18 +62,18 @@ namespace margelo::nitro {
|
|
|
54
62
|
static inline margelo::nitro::reactnativebundleupdate::BundleInstallParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
55
63
|
jsi::Object obj = arg.asObject(runtime);
|
|
56
64
|
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"))
|
|
65
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "downloadedFile"))),
|
|
66
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "latestVersion"))),
|
|
67
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion"))),
|
|
68
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "signature")))
|
|
61
69
|
);
|
|
62
70
|
}
|
|
63
71
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativebundleupdate::BundleInstallParams& arg) {
|
|
64
72
|
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));
|
|
73
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "downloadedFile"), JSIConverter<std::string>::toJSI(runtime, arg.downloadedFile));
|
|
74
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "latestVersion"), JSIConverter<std::string>::toJSI(runtime, arg.latestVersion));
|
|
75
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion"), JSIConverter<std::string>::toJSI(runtime, arg.bundleVersion));
|
|
76
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "signature"), JSIConverter<std::string>::toJSI(runtime, arg.signature));
|
|
69
77
|
return obj;
|
|
70
78
|
}
|
|
71
79
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -76,10 +84,10 @@ namespace margelo::nitro {
|
|
|
76
84
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
77
85
|
return false;
|
|
78
86
|
}
|
|
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;
|
|
87
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "downloadedFile")))) return false;
|
|
88
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "latestVersion")))) return false;
|
|
89
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion")))) return false;
|
|
90
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "signature")))) return false;
|
|
83
91
|
return true;
|
|
84
92
|
}
|
|
85
93
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// BundleSwitchParams.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
|
|
27
32
|
|
|
@@ -32,7 +37,7 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
32
37
|
/**
|
|
33
38
|
* A struct which can be represented as a JavaScript object (BundleSwitchParams).
|
|
34
39
|
*/
|
|
35
|
-
struct BundleSwitchParams {
|
|
40
|
+
struct BundleSwitchParams final {
|
|
36
41
|
public:
|
|
37
42
|
std::string appVersion SWIFT_PRIVATE;
|
|
38
43
|
std::string bundleVersion SWIFT_PRIVATE;
|
|
@@ -41,6 +46,9 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
41
46
|
public:
|
|
42
47
|
BundleSwitchParams() = default;
|
|
43
48
|
explicit BundleSwitchParams(std::string appVersion, std::string bundleVersion, std::string signature): appVersion(appVersion), bundleVersion(bundleVersion), signature(signature) {}
|
|
49
|
+
|
|
50
|
+
public:
|
|
51
|
+
friend bool operator==(const BundleSwitchParams& lhs, const BundleSwitchParams& rhs) = default;
|
|
44
52
|
};
|
|
45
53
|
|
|
46
54
|
} // namespace margelo::nitro::reactnativebundleupdate
|
|
@@ -53,16 +61,16 @@ namespace margelo::nitro {
|
|
|
53
61
|
static inline margelo::nitro::reactnativebundleupdate::BundleSwitchParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
54
62
|
jsi::Object obj = arg.asObject(runtime);
|
|
55
63
|
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"))
|
|
64
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "appVersion"))),
|
|
65
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion"))),
|
|
66
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "signature")))
|
|
59
67
|
);
|
|
60
68
|
}
|
|
61
69
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativebundleupdate::BundleSwitchParams& arg) {
|
|
62
70
|
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));
|
|
71
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "appVersion"), JSIConverter<std::string>::toJSI(runtime, arg.appVersion));
|
|
72
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion"), JSIConverter<std::string>::toJSI(runtime, arg.bundleVersion));
|
|
73
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "signature"), JSIConverter<std::string>::toJSI(runtime, arg.signature));
|
|
66
74
|
return obj;
|
|
67
75
|
}
|
|
68
76
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -73,9 +81,9 @@ namespace margelo::nitro {
|
|
|
73
81
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
74
82
|
return false;
|
|
75
83
|
}
|
|
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;
|
|
84
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "appVersion")))) return false;
|
|
85
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion")))) return false;
|
|
86
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "signature")))) return false;
|
|
79
87
|
return true;
|
|
80
88
|
}
|
|
81
89
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// BundleVerifyASCParams.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
|
|
27
32
|
|
|
@@ -32,7 +37,7 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
32
37
|
/**
|
|
33
38
|
* A struct which can be represented as a JavaScript object (BundleVerifyASCParams).
|
|
34
39
|
*/
|
|
35
|
-
struct BundleVerifyASCParams {
|
|
40
|
+
struct BundleVerifyASCParams final {
|
|
36
41
|
public:
|
|
37
42
|
std::string downloadedFile SWIFT_PRIVATE;
|
|
38
43
|
std::string sha256 SWIFT_PRIVATE;
|
|
@@ -43,6 +48,9 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
43
48
|
public:
|
|
44
49
|
BundleVerifyASCParams() = default;
|
|
45
50
|
explicit BundleVerifyASCParams(std::string downloadedFile, std::string sha256, std::string latestVersion, std::string bundleVersion, std::string signature): downloadedFile(downloadedFile), sha256(sha256), latestVersion(latestVersion), bundleVersion(bundleVersion), signature(signature) {}
|
|
51
|
+
|
|
52
|
+
public:
|
|
53
|
+
friend bool operator==(const BundleVerifyASCParams& lhs, const BundleVerifyASCParams& rhs) = default;
|
|
46
54
|
};
|
|
47
55
|
|
|
48
56
|
} // namespace margelo::nitro::reactnativebundleupdate
|
|
@@ -55,20 +63,20 @@ namespace margelo::nitro {
|
|
|
55
63
|
static inline margelo::nitro::reactnativebundleupdate::BundleVerifyASCParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
56
64
|
jsi::Object obj = arg.asObject(runtime);
|
|
57
65
|
return margelo::nitro::reactnativebundleupdate::BundleVerifyASCParams(
|
|
58
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "downloadedFile")),
|
|
59
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "sha256")),
|
|
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, "signature"))
|
|
66
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "downloadedFile"))),
|
|
67
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sha256"))),
|
|
68
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "latestVersion"))),
|
|
69
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion"))),
|
|
70
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "signature")))
|
|
63
71
|
);
|
|
64
72
|
}
|
|
65
73
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativebundleupdate::BundleVerifyASCParams& arg) {
|
|
66
74
|
jsi::Object obj(runtime);
|
|
67
|
-
obj.setProperty(runtime, "downloadedFile", JSIConverter<std::string>::toJSI(runtime, arg.downloadedFile));
|
|
68
|
-
obj.setProperty(runtime, "sha256", JSIConverter<std::string>::toJSI(runtime, arg.sha256));
|
|
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, "signature", JSIConverter<std::string>::toJSI(runtime, arg.signature));
|
|
75
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "downloadedFile"), JSIConverter<std::string>::toJSI(runtime, arg.downloadedFile));
|
|
76
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "sha256"), JSIConverter<std::string>::toJSI(runtime, arg.sha256));
|
|
77
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "latestVersion"), JSIConverter<std::string>::toJSI(runtime, arg.latestVersion));
|
|
78
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion"), JSIConverter<std::string>::toJSI(runtime, arg.bundleVersion));
|
|
79
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "signature"), JSIConverter<std::string>::toJSI(runtime, arg.signature));
|
|
72
80
|
return obj;
|
|
73
81
|
}
|
|
74
82
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -79,11 +87,11 @@ namespace margelo::nitro {
|
|
|
79
87
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
80
88
|
return false;
|
|
81
89
|
}
|
|
82
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "downloadedFile"))) return false;
|
|
83
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "sha256"))) 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, "signature"))) return false;
|
|
90
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "downloadedFile")))) return false;
|
|
91
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sha256")))) return false;
|
|
92
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "latestVersion")))) return false;
|
|
93
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion")))) return false;
|
|
94
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "signature")))) return false;
|
|
87
95
|
return true;
|
|
88
96
|
}
|
|
89
97
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// BundleVerifyParams.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
|
|
27
32
|
|
|
@@ -32,7 +37,7 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
32
37
|
/**
|
|
33
38
|
* A struct which can be represented as a JavaScript object (BundleVerifyParams).
|
|
34
39
|
*/
|
|
35
|
-
struct BundleVerifyParams {
|
|
40
|
+
struct BundleVerifyParams final {
|
|
36
41
|
public:
|
|
37
42
|
std::string downloadedFile SWIFT_PRIVATE;
|
|
38
43
|
std::string sha256 SWIFT_PRIVATE;
|
|
@@ -42,6 +47,9 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
42
47
|
public:
|
|
43
48
|
BundleVerifyParams() = default;
|
|
44
49
|
explicit BundleVerifyParams(std::string downloadedFile, std::string sha256, std::string latestVersion, std::string bundleVersion): downloadedFile(downloadedFile), sha256(sha256), latestVersion(latestVersion), bundleVersion(bundleVersion) {}
|
|
50
|
+
|
|
51
|
+
public:
|
|
52
|
+
friend bool operator==(const BundleVerifyParams& lhs, const BundleVerifyParams& rhs) = default;
|
|
45
53
|
};
|
|
46
54
|
|
|
47
55
|
} // namespace margelo::nitro::reactnativebundleupdate
|
|
@@ -54,18 +62,18 @@ namespace margelo::nitro {
|
|
|
54
62
|
static inline margelo::nitro::reactnativebundleupdate::BundleVerifyParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
55
63
|
jsi::Object obj = arg.asObject(runtime);
|
|
56
64
|
return margelo::nitro::reactnativebundleupdate::BundleVerifyParams(
|
|
57
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "downloadedFile")),
|
|
58
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "sha256")),
|
|
59
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "latestVersion")),
|
|
60
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "bundleVersion"))
|
|
65
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "downloadedFile"))),
|
|
66
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sha256"))),
|
|
67
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "latestVersion"))),
|
|
68
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion")))
|
|
61
69
|
);
|
|
62
70
|
}
|
|
63
71
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativebundleupdate::BundleVerifyParams& arg) {
|
|
64
72
|
jsi::Object obj(runtime);
|
|
65
|
-
obj.setProperty(runtime, "downloadedFile", JSIConverter<std::string>::toJSI(runtime, arg.downloadedFile));
|
|
66
|
-
obj.setProperty(runtime, "sha256", JSIConverter<std::string>::toJSI(runtime, arg.sha256));
|
|
67
|
-
obj.setProperty(runtime, "latestVersion", JSIConverter<std::string>::toJSI(runtime, arg.latestVersion));
|
|
68
|
-
obj.setProperty(runtime, "bundleVersion", JSIConverter<std::string>::toJSI(runtime, arg.bundleVersion));
|
|
73
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "downloadedFile"), JSIConverter<std::string>::toJSI(runtime, arg.downloadedFile));
|
|
74
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "sha256"), JSIConverter<std::string>::toJSI(runtime, arg.sha256));
|
|
75
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "latestVersion"), JSIConverter<std::string>::toJSI(runtime, arg.latestVersion));
|
|
76
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion"), JSIConverter<std::string>::toJSI(runtime, arg.bundleVersion));
|
|
69
77
|
return obj;
|
|
70
78
|
}
|
|
71
79
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -76,10 +84,10 @@ namespace margelo::nitro {
|
|
|
76
84
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
77
85
|
return false;
|
|
78
86
|
}
|
|
79
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "downloadedFile"))) return false;
|
|
80
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "sha256"))) return false;
|
|
81
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "latestVersion"))) return false;
|
|
82
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "bundleVersion"))) return false;
|
|
87
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "downloadedFile")))) return false;
|
|
88
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sha256")))) return false;
|
|
89
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "latestVersion")))) return false;
|
|
90
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion")))) return false;
|
|
83
91
|
return true;
|
|
84
92
|
}
|
|
85
93
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// FallbackBundleInfo.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
|
|
27
32
|
|
|
@@ -32,7 +37,7 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
32
37
|
/**
|
|
33
38
|
* A struct which can be represented as a JavaScript object (FallbackBundleInfo).
|
|
34
39
|
*/
|
|
35
|
-
struct FallbackBundleInfo {
|
|
40
|
+
struct FallbackBundleInfo final {
|
|
36
41
|
public:
|
|
37
42
|
std::string appVersion SWIFT_PRIVATE;
|
|
38
43
|
std::string bundleVersion SWIFT_PRIVATE;
|
|
@@ -41,6 +46,9 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
41
46
|
public:
|
|
42
47
|
FallbackBundleInfo() = default;
|
|
43
48
|
explicit FallbackBundleInfo(std::string appVersion, std::string bundleVersion, std::string signature): appVersion(appVersion), bundleVersion(bundleVersion), signature(signature) {}
|
|
49
|
+
|
|
50
|
+
public:
|
|
51
|
+
friend bool operator==(const FallbackBundleInfo& lhs, const FallbackBundleInfo& rhs) = default;
|
|
44
52
|
};
|
|
45
53
|
|
|
46
54
|
} // namespace margelo::nitro::reactnativebundleupdate
|
|
@@ -53,16 +61,16 @@ namespace margelo::nitro {
|
|
|
53
61
|
static inline margelo::nitro::reactnativebundleupdate::FallbackBundleInfo fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
54
62
|
jsi::Object obj = arg.asObject(runtime);
|
|
55
63
|
return margelo::nitro::reactnativebundleupdate::FallbackBundleInfo(
|
|
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"))
|
|
64
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "appVersion"))),
|
|
65
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion"))),
|
|
66
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "signature")))
|
|
59
67
|
);
|
|
60
68
|
}
|
|
61
69
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativebundleupdate::FallbackBundleInfo& arg) {
|
|
62
70
|
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));
|
|
71
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "appVersion"), JSIConverter<std::string>::toJSI(runtime, arg.appVersion));
|
|
72
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion"), JSIConverter<std::string>::toJSI(runtime, arg.bundleVersion));
|
|
73
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "signature"), JSIConverter<std::string>::toJSI(runtime, arg.signature));
|
|
66
74
|
return obj;
|
|
67
75
|
}
|
|
68
76
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -73,9 +81,9 @@ namespace margelo::nitro {
|
|
|
73
81
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
74
82
|
return false;
|
|
75
83
|
}
|
|
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;
|
|
84
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "appVersion")))) return false;
|
|
85
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion")))) return false;
|
|
86
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "signature")))) return false;
|
|
79
87
|
return true;
|
|
80
88
|
}
|
|
81
89
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridReactNativeBundleUpdateSpec.cpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#include "HybridReactNativeBundleUpdateSpec.hpp"
|