@onekeyfe/react-native-bundle-update 6.7.0-1 → 6.7.0-3

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 (25) hide show
  1. package/android/src/main/java/com/margelo/nitro/reactnativebundleupdate/ReactNativeBundleUpdate.kt +604 -230
  2. package/ios/ReactNativeBundleUpdate.swift +782 -198
  3. package/lib/typescript/src/ReactNativeBundleUpdate.nitro.d.ts +0 -5
  4. package/nitrogen/generated/android/c++/JBundleDownloadASCParams.hpp +1 -5
  5. package/nitrogen/generated/android/c++/JBundleDownloadResult.hpp +1 -5
  6. package/nitrogen/generated/android/c++/JBundleInstallParams.hpp +1 -5
  7. package/nitrogen/generated/android/c++/JBundleVerifyASCParams.hpp +1 -5
  8. package/nitrogen/generated/android/c++/JBundleVerifyParams.hpp +1 -5
  9. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleDownloadASCParams.kt +2 -7
  10. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleDownloadResult.kt +3 -8
  11. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleInstallParams.kt +3 -8
  12. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleVerifyASCParams.kt +3 -8
  13. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleVerifyParams.kt +3 -8
  14. package/nitrogen/generated/ios/swift/BundleDownloadASCParams.swift +2 -7
  15. package/nitrogen/generated/ios/swift/BundleDownloadResult.swift +2 -7
  16. package/nitrogen/generated/ios/swift/BundleInstallParams.swift +2 -7
  17. package/nitrogen/generated/ios/swift/BundleVerifyASCParams.swift +2 -7
  18. package/nitrogen/generated/ios/swift/BundleVerifyParams.swift +2 -7
  19. package/nitrogen/generated/shared/c++/BundleDownloadASCParams.hpp +1 -5
  20. package/nitrogen/generated/shared/c++/BundleDownloadResult.hpp +1 -5
  21. package/nitrogen/generated/shared/c++/BundleInstallParams.hpp +1 -5
  22. package/nitrogen/generated/shared/c++/BundleVerifyASCParams.hpp +1 -5
  23. package/nitrogen/generated/shared/c++/BundleVerifyParams.hpp +1 -5
  24. package/package.json +1 -1
  25. package/src/ReactNativeBundleUpdate.nitro.ts +0 -5
@@ -39,7 +39,6 @@ namespace margelo::nitro::reactnativebundleupdate {
39
39
  */
40
40
  struct BundleVerifyASCParams final {
41
41
  public:
42
- std::string downloadedFile SWIFT_PRIVATE;
43
42
  std::string sha256 SWIFT_PRIVATE;
44
43
  std::string latestVersion SWIFT_PRIVATE;
45
44
  std::string bundleVersion SWIFT_PRIVATE;
@@ -47,7 +46,7 @@ namespace margelo::nitro::reactnativebundleupdate {
47
46
 
48
47
  public:
49
48
  BundleVerifyASCParams() = default;
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) {}
49
+ explicit BundleVerifyASCParams(std::string sha256, std::string latestVersion, std::string bundleVersion, std::string signature): sha256(sha256), latestVersion(latestVersion), bundleVersion(bundleVersion), signature(signature) {}
51
50
 
52
51
  public:
53
52
  friend bool operator==(const BundleVerifyASCParams& lhs, const BundleVerifyASCParams& rhs) = default;
@@ -63,7 +62,6 @@ namespace margelo::nitro {
63
62
  static inline margelo::nitro::reactnativebundleupdate::BundleVerifyASCParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
64
63
  jsi::Object obj = arg.asObject(runtime);
65
64
  return margelo::nitro::reactnativebundleupdate::BundleVerifyASCParams(
66
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "downloadedFile"))),
67
65
  JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sha256"))),
68
66
  JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "latestVersion"))),
69
67
  JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion"))),
@@ -72,7 +70,6 @@ namespace margelo::nitro {
72
70
  }
73
71
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativebundleupdate::BundleVerifyASCParams& arg) {
74
72
  jsi::Object obj(runtime);
75
- obj.setProperty(runtime, PropNameIDCache::get(runtime, "downloadedFile"), JSIConverter<std::string>::toJSI(runtime, arg.downloadedFile));
76
73
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "sha256"), JSIConverter<std::string>::toJSI(runtime, arg.sha256));
77
74
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "latestVersion"), JSIConverter<std::string>::toJSI(runtime, arg.latestVersion));
78
75
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion"), JSIConverter<std::string>::toJSI(runtime, arg.bundleVersion));
@@ -87,7 +84,6 @@ namespace margelo::nitro {
87
84
  if (!nitro::isPlainObject(runtime, obj)) {
88
85
  return false;
89
86
  }
90
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "downloadedFile")))) return false;
91
87
  if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sha256")))) return false;
92
88
  if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "latestVersion")))) return false;
93
89
  if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion")))) return false;
@@ -39,14 +39,13 @@ namespace margelo::nitro::reactnativebundleupdate {
39
39
  */
40
40
  struct BundleVerifyParams final {
41
41
  public:
42
- std::string downloadedFile SWIFT_PRIVATE;
43
42
  std::string sha256 SWIFT_PRIVATE;
44
43
  std::string latestVersion SWIFT_PRIVATE;
45
44
  std::string bundleVersion SWIFT_PRIVATE;
46
45
 
47
46
  public:
48
47
  BundleVerifyParams() = default;
49
- explicit BundleVerifyParams(std::string downloadedFile, std::string sha256, std::string latestVersion, std::string bundleVersion): downloadedFile(downloadedFile), sha256(sha256), latestVersion(latestVersion), bundleVersion(bundleVersion) {}
48
+ explicit BundleVerifyParams(std::string sha256, std::string latestVersion, std::string bundleVersion): sha256(sha256), latestVersion(latestVersion), bundleVersion(bundleVersion) {}
50
49
 
51
50
  public:
52
51
  friend bool operator==(const BundleVerifyParams& lhs, const BundleVerifyParams& rhs) = default;
@@ -62,7 +61,6 @@ namespace margelo::nitro {
62
61
  static inline margelo::nitro::reactnativebundleupdate::BundleVerifyParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
63
62
  jsi::Object obj = arg.asObject(runtime);
64
63
  return margelo::nitro::reactnativebundleupdate::BundleVerifyParams(
65
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "downloadedFile"))),
66
64
  JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sha256"))),
67
65
  JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "latestVersion"))),
68
66
  JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion")))
@@ -70,7 +68,6 @@ namespace margelo::nitro {
70
68
  }
71
69
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativebundleupdate::BundleVerifyParams& arg) {
72
70
  jsi::Object obj(runtime);
73
- obj.setProperty(runtime, PropNameIDCache::get(runtime, "downloadedFile"), JSIConverter<std::string>::toJSI(runtime, arg.downloadedFile));
74
71
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "sha256"), JSIConverter<std::string>::toJSI(runtime, arg.sha256));
75
72
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "latestVersion"), JSIConverter<std::string>::toJSI(runtime, arg.latestVersion));
76
73
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion"), JSIConverter<std::string>::toJSI(runtime, arg.bundleVersion));
@@ -84,7 +81,6 @@ namespace margelo::nitro {
84
81
  if (!nitro::isPlainObject(runtime, obj)) {
85
82
  return false;
86
83
  }
87
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "downloadedFile")))) return false;
88
84
  if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sha256")))) return false;
89
85
  if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "latestVersion")))) return false;
90
86
  if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "bundleVersion")))) return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/react-native-bundle-update",
3
- "version": "6.7.0-1",
3
+ "version": "6.7.0-3",
4
4
  "description": "Native JavaScript bundle download, verification and version management for OneKey",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -9,7 +9,6 @@ export interface BundleDownloadParams {
9
9
  }
10
10
 
11
11
  export interface BundleDownloadResult {
12
- downloadedFile: string;
13
12
  downloadUrl: string;
14
13
  latestVersion: string;
15
14
  bundleVersion: string;
@@ -17,14 +16,12 @@ export interface BundleDownloadResult {
17
16
  }
18
17
 
19
18
  export interface BundleVerifyParams {
20
- downloadedFile: string;
21
19
  sha256: string;
22
20
  latestVersion: string;
23
21
  bundleVersion: string;
24
22
  }
25
23
 
26
24
  export interface BundleVerifyASCParams {
27
- downloadedFile: string;
28
25
  sha256: string;
29
26
  latestVersion: string;
30
27
  bundleVersion: string;
@@ -33,7 +30,6 @@ export interface BundleVerifyASCParams {
33
30
 
34
31
  export interface BundleDownloadASCParams {
35
32
  downloadUrl: string;
36
- downloadedFile: string;
37
33
  signature: string;
38
34
  latestVersion: string;
39
35
  bundleVersion: string;
@@ -41,7 +37,6 @@ export interface BundleDownloadASCParams {
41
37
  }
42
38
 
43
39
  export interface BundleInstallParams {
44
- downloadedFile: string;
45
40
  latestVersion: string;
46
41
  bundleVersion: string;
47
42
  signature: string;