@onekeyfe/react-native-range-downloader 3.0.81-alpha.9 → 3.0.82

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 (135) hide show
  1. package/ReactNativeRangeDownloader.podspec +1 -2
  2. package/android/build.gradle +0 -1
  3. package/android/src/main/java/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactStore.kt +9 -25
  4. package/android/src/main/java/com/margelo/nitro/reactnativerangedownloader/ReactNativeRangeDownloader.kt +6 -2
  5. package/ios/FirmwareArtifactStore.swift +33 -40
  6. package/ios/RangeDownloadLogic.swift +41 -2
  7. package/ios/ReactNativeRangeDownloader.swift +20 -15
  8. package/lib/typescript/src/ReactNativeRangeDownloader.nitro.d.ts +1 -0
  9. package/lib/typescript/src/ReactNativeRangeDownloader.nitro.d.ts.map +1 -1
  10. package/nitrogen/generated/android/c++/JDownloadChannel.hpp +6 -7
  11. package/nitrogen/generated/android/c++/JFirmwareArchiveExpectedEntry.hpp +2 -2
  12. package/nitrogen/generated/android/c++/JFirmwareArchiveMaterializeParams.hpp +2 -2
  13. package/nitrogen/generated/android/c++/JFirmwareArchiveMaterializeResult.hpp +2 -2
  14. package/nitrogen/generated/android/c++/JFirmwareArchiveMaterializedArtifact.hpp +2 -2
  15. package/nitrogen/generated/android/c++/JFirmwareArtifactCancelParams.hpp +2 -2
  16. package/nitrogen/generated/android/c++/JFirmwareArtifactCapabilities.hpp +2 -2
  17. package/nitrogen/generated/android/c++/JFirmwareArtifactDownloadParams.hpp +2 -2
  18. package/nitrogen/generated/android/c++/JFirmwareArtifactLease.hpp +2 -2
  19. package/nitrogen/generated/android/c++/JFirmwareArtifactLeaseCreateParams.hpp +2 -2
  20. package/nitrogen/generated/android/c++/JFirmwareArtifactLeaseReleaseParams.hpp +2 -2
  21. package/nitrogen/generated/android/c++/JFirmwareArtifactLeaseRetainParams.hpp +2 -2
  22. package/nitrogen/generated/android/c++/JFirmwareArtifactReaderCloseParams.hpp +2 -2
  23. package/nitrogen/generated/android/c++/JFirmwareArtifactReaderInfo.hpp +2 -2
  24. package/nitrogen/generated/android/c++/JFirmwareArtifactReaderReadParams.hpp +2 -2
  25. package/nitrogen/generated/android/c++/JFirmwareArtifactReceipt.hpp +9 -5
  26. package/nitrogen/generated/android/c++/JFirmwareArtifactRefParams.hpp +2 -2
  27. package/nitrogen/generated/android/c++/JFirmwareArtifactSweepResult.hpp +2 -2
  28. package/nitrogen/generated/android/c++/JFunc_void_RangeDownloadEvent.hpp +3 -3
  29. package/nitrogen/generated/android/c++/JHybridReactNativeRangeDownloaderSpec.cpp +39 -38
  30. package/nitrogen/generated/android/c++/JHybridReactNativeRangeDownloaderSpec.hpp +20 -22
  31. package/nitrogen/generated/android/c++/JRangeDownloadEvent.hpp +2 -2
  32. package/nitrogen/generated/android/c++/JRangeDownloadOutcome.hpp +6 -7
  33. package/nitrogen/generated/android/c++/JRangeDownloadParams.hpp +2 -2
  34. package/nitrogen/generated/android/c++/JRangeDownloadResult.hpp +2 -2
  35. package/nitrogen/generated/android/c++/JRangeFallbackKind.hpp +12 -13
  36. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/DownloadChannel.kt +3 -1
  37. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveExpectedEntry.kt +2 -2
  38. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveMaterializeParams.kt +2 -2
  39. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveMaterializeResult.kt +2 -2
  40. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveMaterializedArtifact.kt +2 -2
  41. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactCancelParams.kt +2 -2
  42. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactCapabilities.kt +2 -2
  43. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactDownloadParams.kt +2 -2
  44. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactLease.kt +2 -2
  45. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactLeaseCreateParams.kt +2 -2
  46. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactLeaseReleaseParams.kt +2 -2
  47. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactLeaseRetainParams.kt +2 -2
  48. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactReaderCloseParams.kt +2 -2
  49. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactReaderInfo.kt +2 -2
  50. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactReaderReadParams.kt +2 -2
  51. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactReceipt.kt +8 -5
  52. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactRefParams.kt +2 -2
  53. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactSweepResult.kt +2 -2
  54. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/Func_void_RangeDownloadEvent.kt +1 -1
  55. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/HybridReactNativeRangeDownloaderSpec.kt +16 -19
  56. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/RangeDownloadEvent.kt +2 -2
  57. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/RangeDownloadOutcome.kt +3 -1
  58. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/RangeDownloadParams.kt +2 -2
  59. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/RangeDownloadResult.kt +2 -2
  60. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/RangeFallbackKind.kt +3 -1
  61. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/reactnativerangedownloaderOnLoad.kt +1 -1
  62. package/nitrogen/generated/android/reactnativerangedownloader+autolinking.cmake +1 -1
  63. package/nitrogen/generated/android/reactnativerangedownloader+autolinking.gradle +1 -1
  64. package/nitrogen/generated/android/reactnativerangedownloaderOnLoad.cpp +28 -18
  65. package/nitrogen/generated/android/reactnativerangedownloaderOnLoad.hpp +14 -5
  66. package/nitrogen/generated/ios/ReactNativeRangeDownloader+autolinking.rb +2 -2
  67. package/nitrogen/generated/ios/ReactNativeRangeDownloader-Swift-Cxx-Bridge.cpp +1 -1
  68. package/nitrogen/generated/ios/ReactNativeRangeDownloader-Swift-Cxx-Bridge.hpp +5 -5
  69. package/nitrogen/generated/ios/ReactNativeRangeDownloader-Swift-Cxx-Umbrella.hpp +1 -1
  70. package/nitrogen/generated/ios/ReactNativeRangeDownloaderAutolinking.mm +1 -1
  71. package/nitrogen/generated/ios/ReactNativeRangeDownloaderAutolinking.swift +9 -8
  72. package/nitrogen/generated/ios/c++/HybridReactNativeRangeDownloaderSpecSwift.cpp +1 -1
  73. package/nitrogen/generated/ios/c++/HybridReactNativeRangeDownloaderSpecSwift.hpp +7 -1
  74. package/nitrogen/generated/ios/swift/DownloadChannel.swift +1 -1
  75. package/nitrogen/generated/ios/swift/FirmwareArchiveExpectedEntry.swift +9 -34
  76. package/nitrogen/generated/ios/swift/FirmwareArchiveMaterializeParams.swift +14 -45
  77. package/nitrogen/generated/ios/swift/FirmwareArchiveMaterializeResult.swift +3 -16
  78. package/nitrogen/generated/ios/swift/FirmwareArchiveMaterializedArtifact.swift +5 -18
  79. package/nitrogen/generated/ios/swift/FirmwareArtifactCancelParams.swift +3 -10
  80. package/nitrogen/generated/ios/swift/FirmwareArtifactCapabilities.swift +9 -40
  81. package/nitrogen/generated/ios/swift/FirmwareArtifactDownloadParams.swift +51 -128
  82. package/nitrogen/generated/ios/swift/FirmwareArtifactLease.swift +3 -10
  83. package/nitrogen/generated/ios/swift/FirmwareArtifactLeaseCreateParams.swift +3 -10
  84. package/nitrogen/generated/ios/swift/FirmwareArtifactLeaseReleaseParams.swift +5 -18
  85. package/nitrogen/generated/ios/swift/FirmwareArtifactLeaseRetainParams.swift +5 -18
  86. package/nitrogen/generated/ios/swift/FirmwareArtifactReaderCloseParams.swift +3 -10
  87. package/nitrogen/generated/ios/swift/FirmwareArtifactReaderInfo.swift +5 -18
  88. package/nitrogen/generated/ios/swift/FirmwareArtifactReaderReadParams.swift +7 -26
  89. package/nitrogen/generated/ios/swift/FirmwareArtifactReceipt.swift +14 -28
  90. package/nitrogen/generated/ios/swift/FirmwareArtifactRefParams.swift +3 -10
  91. package/nitrogen/generated/ios/swift/FirmwareArtifactSweepResult.swift +5 -18
  92. package/nitrogen/generated/ios/swift/Func_void.swift +1 -2
  93. package/nitrogen/generated/ios/swift/Func_void_FirmwareArchiveMaterializeResult.swift +1 -2
  94. package/nitrogen/generated/ios/swift/Func_void_FirmwareArtifactLease.swift +1 -2
  95. package/nitrogen/generated/ios/swift/Func_void_FirmwareArtifactReaderInfo.swift +1 -2
  96. package/nitrogen/generated/ios/swift/Func_void_FirmwareArtifactReceipt.swift +1 -2
  97. package/nitrogen/generated/ios/swift/Func_void_FirmwareArtifactSweepResult.swift +1 -2
  98. package/nitrogen/generated/ios/swift/Func_void_RangeDownloadEvent.swift +1 -2
  99. package/nitrogen/generated/ios/swift/Func_void_RangeDownloadResult.swift +1 -2
  100. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +1 -2
  101. package/nitrogen/generated/ios/swift/Func_void_std__shared_ptr_ArrayBuffer_.swift +1 -2
  102. package/nitrogen/generated/ios/swift/HybridReactNativeRangeDownloaderSpec.swift +3 -4
  103. package/nitrogen/generated/ios/swift/HybridReactNativeRangeDownloaderSpec_cxx.swift +9 -2
  104. package/nitrogen/generated/ios/swift/RangeDownloadEvent.swift +11 -42
  105. package/nitrogen/generated/ios/swift/RangeDownloadOutcome.swift +1 -1
  106. package/nitrogen/generated/ios/swift/RangeDownloadParams.swift +72 -139
  107. package/nitrogen/generated/ios/swift/RangeDownloadResult.swift +16 -53
  108. package/nitrogen/generated/ios/swift/RangeFallbackKind.swift +1 -1
  109. package/nitrogen/generated/shared/c++/DownloadChannel.hpp +1 -1
  110. package/nitrogen/generated/shared/c++/FirmwareArchiveExpectedEntry.hpp +22 -14
  111. package/nitrogen/generated/shared/c++/FirmwareArchiveMaterializeParams.hpp +19 -11
  112. package/nitrogen/generated/shared/c++/FirmwareArchiveMaterializeResult.hpp +13 -5
  113. package/nitrogen/generated/shared/c++/FirmwareArchiveMaterializedArtifact.hpp +16 -8
  114. package/nitrogen/generated/shared/c++/FirmwareArtifactCancelParams.hpp +13 -5
  115. package/nitrogen/generated/shared/c++/FirmwareArtifactCapabilities.hpp +22 -14
  116. package/nitrogen/generated/shared/c++/FirmwareArtifactDownloadParams.hpp +43 -35
  117. package/nitrogen/generated/shared/c++/FirmwareArtifactLease.hpp +13 -5
  118. package/nitrogen/generated/shared/c++/FirmwareArtifactLeaseCreateParams.hpp +13 -5
  119. package/nitrogen/generated/shared/c++/FirmwareArtifactLeaseReleaseParams.hpp +16 -8
  120. package/nitrogen/generated/shared/c++/FirmwareArtifactLeaseRetainParams.hpp +16 -8
  121. package/nitrogen/generated/shared/c++/FirmwareArtifactReaderCloseParams.hpp +13 -5
  122. package/nitrogen/generated/shared/c++/FirmwareArtifactReaderInfo.hpp +16 -8
  123. package/nitrogen/generated/shared/c++/FirmwareArtifactReaderReadParams.hpp +19 -11
  124. package/nitrogen/generated/shared/c++/FirmwareArtifactReceipt.hpp +24 -12
  125. package/nitrogen/generated/shared/c++/FirmwareArtifactRefParams.hpp +13 -5
  126. package/nitrogen/generated/shared/c++/FirmwareArtifactSweepResult.hpp +16 -8
  127. package/nitrogen/generated/shared/c++/HybridReactNativeRangeDownloaderSpec.cpp +1 -1
  128. package/nitrogen/generated/shared/c++/HybridReactNativeRangeDownloaderSpec.hpp +1 -1
  129. package/nitrogen/generated/shared/c++/RangeDownloadEvent.hpp +25 -17
  130. package/nitrogen/generated/shared/c++/RangeDownloadOutcome.hpp +1 -1
  131. package/nitrogen/generated/shared/c++/RangeDownloadParams.hpp +43 -35
  132. package/nitrogen/generated/shared/c++/RangeDownloadResult.hpp +22 -14
  133. package/nitrogen/generated/shared/c++/RangeFallbackKind.hpp +1 -1
  134. package/package.json +5 -7
  135. package/src/ReactNativeRangeDownloader.nitro.ts +3 -0
@@ -2,7 +2,7 @@
2
2
  /// FirmwareArtifactLeaseReleaseParams.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
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::reactnativerangedownloader {
32
37
  /**
33
38
  * A struct which can be represented as a JavaScript object (FirmwareArtifactLeaseReleaseParams).
34
39
  */
35
- struct FirmwareArtifactLeaseReleaseParams {
40
+ struct FirmwareArtifactLeaseReleaseParams final {
36
41
  public:
37
42
  std::string leaseRef SWIFT_PRIVATE;
38
43
  std::string disposition SWIFT_PRIVATE;
@@ -40,6 +45,9 @@ namespace margelo::nitro::reactnativerangedownloader {
40
45
  public:
41
46
  FirmwareArtifactLeaseReleaseParams() = default;
42
47
  explicit FirmwareArtifactLeaseReleaseParams(std::string leaseRef, std::string disposition): leaseRef(leaseRef), disposition(disposition) {}
48
+
49
+ public:
50
+ friend bool operator==(const FirmwareArtifactLeaseReleaseParams& lhs, const FirmwareArtifactLeaseReleaseParams& rhs) = default;
43
51
  };
44
52
 
45
53
  } // namespace margelo::nitro::reactnativerangedownloader
@@ -52,14 +60,14 @@ namespace margelo::nitro {
52
60
  static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseReleaseParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
53
61
  jsi::Object obj = arg.asObject(runtime);
54
62
  return margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseReleaseParams(
55
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "leaseRef")),
56
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "disposition"))
63
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "leaseRef"))),
64
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "disposition")))
57
65
  );
58
66
  }
59
67
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseReleaseParams& arg) {
60
68
  jsi::Object obj(runtime);
61
- obj.setProperty(runtime, "leaseRef", JSIConverter<std::string>::toJSI(runtime, arg.leaseRef));
62
- obj.setProperty(runtime, "disposition", JSIConverter<std::string>::toJSI(runtime, arg.disposition));
69
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "leaseRef"), JSIConverter<std::string>::toJSI(runtime, arg.leaseRef));
70
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "disposition"), JSIConverter<std::string>::toJSI(runtime, arg.disposition));
63
71
  return obj;
64
72
  }
65
73
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -70,8 +78,8 @@ namespace margelo::nitro {
70
78
  if (!nitro::isPlainObject(runtime, obj)) {
71
79
  return false;
72
80
  }
73
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "leaseRef"))) return false;
74
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "disposition"))) return false;
81
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "leaseRef")))) return false;
82
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "disposition")))) return false;
75
83
  return true;
76
84
  }
77
85
  };
@@ -2,7 +2,7 @@
2
2
  /// FirmwareArtifactLeaseRetainParams.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
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::reactnativerangedownloader {
32
37
  /**
33
38
  * A struct which can be represented as a JavaScript object (FirmwareArtifactLeaseRetainParams).
34
39
  */
35
- struct FirmwareArtifactLeaseRetainParams {
40
+ struct FirmwareArtifactLeaseRetainParams final {
36
41
  public:
37
42
  std::string leaseRef SWIFT_PRIVATE;
38
43
  std::string artifactRef SWIFT_PRIVATE;
@@ -40,6 +45,9 @@ namespace margelo::nitro::reactnativerangedownloader {
40
45
  public:
41
46
  FirmwareArtifactLeaseRetainParams() = default;
42
47
  explicit FirmwareArtifactLeaseRetainParams(std::string leaseRef, std::string artifactRef): leaseRef(leaseRef), artifactRef(artifactRef) {}
48
+
49
+ public:
50
+ friend bool operator==(const FirmwareArtifactLeaseRetainParams& lhs, const FirmwareArtifactLeaseRetainParams& rhs) = default;
43
51
  };
44
52
 
45
53
  } // namespace margelo::nitro::reactnativerangedownloader
@@ -52,14 +60,14 @@ namespace margelo::nitro {
52
60
  static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseRetainParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
53
61
  jsi::Object obj = arg.asObject(runtime);
54
62
  return margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseRetainParams(
55
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "leaseRef")),
56
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "artifactRef"))
63
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "leaseRef"))),
64
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "artifactRef")))
57
65
  );
58
66
  }
59
67
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseRetainParams& arg) {
60
68
  jsi::Object obj(runtime);
61
- obj.setProperty(runtime, "leaseRef", JSIConverter<std::string>::toJSI(runtime, arg.leaseRef));
62
- obj.setProperty(runtime, "artifactRef", JSIConverter<std::string>::toJSI(runtime, arg.artifactRef));
69
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "leaseRef"), JSIConverter<std::string>::toJSI(runtime, arg.leaseRef));
70
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "artifactRef"), JSIConverter<std::string>::toJSI(runtime, arg.artifactRef));
63
71
  return obj;
64
72
  }
65
73
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -70,8 +78,8 @@ namespace margelo::nitro {
70
78
  if (!nitro::isPlainObject(runtime, obj)) {
71
79
  return false;
72
80
  }
73
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "leaseRef"))) return false;
74
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "artifactRef"))) return false;
81
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "leaseRef")))) return false;
82
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "artifactRef")))) return false;
75
83
  return true;
76
84
  }
77
85
  };
@@ -2,7 +2,7 @@
2
2
  /// FirmwareArtifactReaderCloseParams.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
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,13 +37,16 @@ namespace margelo::nitro::reactnativerangedownloader {
32
37
  /**
33
38
  * A struct which can be represented as a JavaScript object (FirmwareArtifactReaderCloseParams).
34
39
  */
35
- struct FirmwareArtifactReaderCloseParams {
40
+ struct FirmwareArtifactReaderCloseParams final {
36
41
  public:
37
42
  std::string readerId SWIFT_PRIVATE;
38
43
 
39
44
  public:
40
45
  FirmwareArtifactReaderCloseParams() = default;
41
46
  explicit FirmwareArtifactReaderCloseParams(std::string readerId): readerId(readerId) {}
47
+
48
+ public:
49
+ friend bool operator==(const FirmwareArtifactReaderCloseParams& lhs, const FirmwareArtifactReaderCloseParams& rhs) = default;
42
50
  };
43
51
 
44
52
  } // namespace margelo::nitro::reactnativerangedownloader
@@ -51,12 +59,12 @@ namespace margelo::nitro {
51
59
  static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactReaderCloseParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
52
60
  jsi::Object obj = arg.asObject(runtime);
53
61
  return margelo::nitro::reactnativerangedownloader::FirmwareArtifactReaderCloseParams(
54
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "readerId"))
62
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "readerId")))
55
63
  );
56
64
  }
57
65
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactReaderCloseParams& arg) {
58
66
  jsi::Object obj(runtime);
59
- obj.setProperty(runtime, "readerId", JSIConverter<std::string>::toJSI(runtime, arg.readerId));
67
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "readerId"), JSIConverter<std::string>::toJSI(runtime, arg.readerId));
60
68
  return obj;
61
69
  }
62
70
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -67,7 +75,7 @@ namespace margelo::nitro {
67
75
  if (!nitro::isPlainObject(runtime, obj)) {
68
76
  return false;
69
77
  }
70
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "readerId"))) return false;
78
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "readerId")))) return false;
71
79
  return true;
72
80
  }
73
81
  };
@@ -2,7 +2,7 @@
2
2
  /// FirmwareArtifactReaderInfo.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
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::reactnativerangedownloader {
32
37
  /**
33
38
  * A struct which can be represented as a JavaScript object (FirmwareArtifactReaderInfo).
34
39
  */
35
- struct FirmwareArtifactReaderInfo {
40
+ struct FirmwareArtifactReaderInfo final {
36
41
  public:
37
42
  std::string readerId SWIFT_PRIVATE;
38
43
  double size SWIFT_PRIVATE;
@@ -40,6 +45,9 @@ namespace margelo::nitro::reactnativerangedownloader {
40
45
  public:
41
46
  FirmwareArtifactReaderInfo() = default;
42
47
  explicit FirmwareArtifactReaderInfo(std::string readerId, double size): readerId(readerId), size(size) {}
48
+
49
+ public:
50
+ friend bool operator==(const FirmwareArtifactReaderInfo& lhs, const FirmwareArtifactReaderInfo& rhs) = default;
43
51
  };
44
52
 
45
53
  } // namespace margelo::nitro::reactnativerangedownloader
@@ -52,14 +60,14 @@ namespace margelo::nitro {
52
60
  static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactReaderInfo fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
53
61
  jsi::Object obj = arg.asObject(runtime);
54
62
  return margelo::nitro::reactnativerangedownloader::FirmwareArtifactReaderInfo(
55
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "readerId")),
56
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "size"))
63
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "readerId"))),
64
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "size")))
57
65
  );
58
66
  }
59
67
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactReaderInfo& arg) {
60
68
  jsi::Object obj(runtime);
61
- obj.setProperty(runtime, "readerId", JSIConverter<std::string>::toJSI(runtime, arg.readerId));
62
- obj.setProperty(runtime, "size", JSIConverter<double>::toJSI(runtime, arg.size));
69
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "readerId"), JSIConverter<std::string>::toJSI(runtime, arg.readerId));
70
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "size"), JSIConverter<double>::toJSI(runtime, arg.size));
63
71
  return obj;
64
72
  }
65
73
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -70,8 +78,8 @@ namespace margelo::nitro {
70
78
  if (!nitro::isPlainObject(runtime, obj)) {
71
79
  return false;
72
80
  }
73
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "readerId"))) return false;
74
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "size"))) return false;
81
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "readerId")))) return false;
82
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "size")))) return false;
75
83
  return true;
76
84
  }
77
85
  };
@@ -2,7 +2,7 @@
2
2
  /// FirmwareArtifactReaderReadParams.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
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::reactnativerangedownloader {
32
37
  /**
33
38
  * A struct which can be represented as a JavaScript object (FirmwareArtifactReaderReadParams).
34
39
  */
35
- struct FirmwareArtifactReaderReadParams {
40
+ struct FirmwareArtifactReaderReadParams final {
36
41
  public:
37
42
  std::string readerId SWIFT_PRIVATE;
38
43
  double offset SWIFT_PRIVATE;
@@ -41,6 +46,9 @@ namespace margelo::nitro::reactnativerangedownloader {
41
46
  public:
42
47
  FirmwareArtifactReaderReadParams() = default;
43
48
  explicit FirmwareArtifactReaderReadParams(std::string readerId, double offset, double length): readerId(readerId), offset(offset), length(length) {}
49
+
50
+ public:
51
+ friend bool operator==(const FirmwareArtifactReaderReadParams& lhs, const FirmwareArtifactReaderReadParams& rhs) = default;
44
52
  };
45
53
 
46
54
  } // namespace margelo::nitro::reactnativerangedownloader
@@ -53,16 +61,16 @@ namespace margelo::nitro {
53
61
  static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactReaderReadParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
54
62
  jsi::Object obj = arg.asObject(runtime);
55
63
  return margelo::nitro::reactnativerangedownloader::FirmwareArtifactReaderReadParams(
56
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "readerId")),
57
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "offset")),
58
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "length"))
64
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "readerId"))),
65
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "offset"))),
66
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "length")))
59
67
  );
60
68
  }
61
69
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactReaderReadParams& arg) {
62
70
  jsi::Object obj(runtime);
63
- obj.setProperty(runtime, "readerId", JSIConverter<std::string>::toJSI(runtime, arg.readerId));
64
- obj.setProperty(runtime, "offset", JSIConverter<double>::toJSI(runtime, arg.offset));
65
- obj.setProperty(runtime, "length", JSIConverter<double>::toJSI(runtime, arg.length));
71
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "readerId"), JSIConverter<std::string>::toJSI(runtime, arg.readerId));
72
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "offset"), JSIConverter<double>::toJSI(runtime, arg.offset));
73
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "length"), JSIConverter<double>::toJSI(runtime, arg.length));
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, "readerId"))) return false;
77
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "offset"))) return false;
78
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "length"))) return false;
84
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "readerId")))) return false;
85
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "offset")))) return false;
86
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "length")))) return false;
79
87
  return true;
80
88
  }
81
89
  };
@@ -2,7 +2,7 @@
2
2
  /// FirmwareArtifactReceipt.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
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,15 +37,19 @@ namespace margelo::nitro::reactnativerangedownloader {
32
37
  /**
33
38
  * A struct which can be represented as a JavaScript object (FirmwareArtifactReceipt).
34
39
  */
35
- struct FirmwareArtifactReceipt {
40
+ struct FirmwareArtifactReceipt final {
36
41
  public:
37
42
  std::string artifactRef SWIFT_PRIVATE;
38
43
  double size SWIFT_PRIVATE;
39
44
  std::string sha256 SWIFT_PRIVATE;
45
+ bool expectedSha256Verified SWIFT_PRIVATE;
40
46
 
41
47
  public:
42
48
  FirmwareArtifactReceipt() = default;
43
- explicit FirmwareArtifactReceipt(std::string artifactRef, double size, std::string sha256): artifactRef(artifactRef), size(size), sha256(sha256) {}
49
+ explicit FirmwareArtifactReceipt(std::string artifactRef, double size, std::string sha256, bool expectedSha256Verified): artifactRef(artifactRef), size(size), sha256(sha256), expectedSha256Verified(expectedSha256Verified) {}
50
+
51
+ public:
52
+ friend bool operator==(const FirmwareArtifactReceipt& lhs, const FirmwareArtifactReceipt& rhs) = default;
44
53
  };
45
54
 
46
55
  } // namespace margelo::nitro::reactnativerangedownloader
@@ -53,16 +62,18 @@ namespace margelo::nitro {
53
62
  static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactReceipt fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
54
63
  jsi::Object obj = arg.asObject(runtime);
55
64
  return margelo::nitro::reactnativerangedownloader::FirmwareArtifactReceipt(
56
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "artifactRef")),
57
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "size")),
58
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "sha256"))
65
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "artifactRef"))),
66
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "size"))),
67
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sha256"))),
68
+ JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "expectedSha256Verified")))
59
69
  );
60
70
  }
61
71
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactReceipt& arg) {
62
72
  jsi::Object obj(runtime);
63
- obj.setProperty(runtime, "artifactRef", JSIConverter<std::string>::toJSI(runtime, arg.artifactRef));
64
- obj.setProperty(runtime, "size", JSIConverter<double>::toJSI(runtime, arg.size));
65
- obj.setProperty(runtime, "sha256", JSIConverter<std::string>::toJSI(runtime, arg.sha256));
73
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "artifactRef"), JSIConverter<std::string>::toJSI(runtime, arg.artifactRef));
74
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "size"), JSIConverter<double>::toJSI(runtime, arg.size));
75
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "sha256"), JSIConverter<std::string>::toJSI(runtime, arg.sha256));
76
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "expectedSha256Verified"), JSIConverter<bool>::toJSI(runtime, arg.expectedSha256Verified));
66
77
  return obj;
67
78
  }
68
79
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -73,9 +84,10 @@ namespace margelo::nitro {
73
84
  if (!nitro::isPlainObject(runtime, obj)) {
74
85
  return false;
75
86
  }
76
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "artifactRef"))) return false;
77
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "size"))) return false;
78
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "sha256"))) return false;
87
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "artifactRef")))) return false;
88
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "size")))) return false;
89
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sha256")))) return false;
90
+ if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "expectedSha256Verified")))) return false;
79
91
  return true;
80
92
  }
81
93
  };
@@ -2,7 +2,7 @@
2
2
  /// FirmwareArtifactRefParams.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
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,13 +37,16 @@ namespace margelo::nitro::reactnativerangedownloader {
32
37
  /**
33
38
  * A struct which can be represented as a JavaScript object (FirmwareArtifactRefParams).
34
39
  */
35
- struct FirmwareArtifactRefParams {
40
+ struct FirmwareArtifactRefParams final {
36
41
  public:
37
42
  std::string artifactRef SWIFT_PRIVATE;
38
43
 
39
44
  public:
40
45
  FirmwareArtifactRefParams() = default;
41
46
  explicit FirmwareArtifactRefParams(std::string artifactRef): artifactRef(artifactRef) {}
47
+
48
+ public:
49
+ friend bool operator==(const FirmwareArtifactRefParams& lhs, const FirmwareArtifactRefParams& rhs) = default;
42
50
  };
43
51
 
44
52
  } // namespace margelo::nitro::reactnativerangedownloader
@@ -51,12 +59,12 @@ namespace margelo::nitro {
51
59
  static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactRefParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
52
60
  jsi::Object obj = arg.asObject(runtime);
53
61
  return margelo::nitro::reactnativerangedownloader::FirmwareArtifactRefParams(
54
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "artifactRef"))
62
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "artifactRef")))
55
63
  );
56
64
  }
57
65
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactRefParams& arg) {
58
66
  jsi::Object obj(runtime);
59
- obj.setProperty(runtime, "artifactRef", JSIConverter<std::string>::toJSI(runtime, arg.artifactRef));
67
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "artifactRef"), JSIConverter<std::string>::toJSI(runtime, arg.artifactRef));
60
68
  return obj;
61
69
  }
62
70
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -67,7 +75,7 @@ namespace margelo::nitro {
67
75
  if (!nitro::isPlainObject(runtime, obj)) {
68
76
  return false;
69
77
  }
70
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "artifactRef"))) return false;
78
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "artifactRef")))) return false;
71
79
  return true;
72
80
  }
73
81
  };
@@ -2,7 +2,7 @@
2
2
  /// FirmwareArtifactSweepResult.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
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::reactnativerangedownloader {
32
37
  /**
33
38
  * A struct which can be represented as a JavaScript object (FirmwareArtifactSweepResult).
34
39
  */
35
- struct FirmwareArtifactSweepResult {
40
+ struct FirmwareArtifactSweepResult final {
36
41
  public:
37
42
  double deletedFiles SWIFT_PRIVATE;
38
43
  double deletedBytes SWIFT_PRIVATE;
@@ -40,6 +45,9 @@ namespace margelo::nitro::reactnativerangedownloader {
40
45
  public:
41
46
  FirmwareArtifactSweepResult() = default;
42
47
  explicit FirmwareArtifactSweepResult(double deletedFiles, double deletedBytes): deletedFiles(deletedFiles), deletedBytes(deletedBytes) {}
48
+
49
+ public:
50
+ friend bool operator==(const FirmwareArtifactSweepResult& lhs, const FirmwareArtifactSweepResult& rhs) = default;
43
51
  };
44
52
 
45
53
  } // namespace margelo::nitro::reactnativerangedownloader
@@ -52,14 +60,14 @@ namespace margelo::nitro {
52
60
  static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactSweepResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
53
61
  jsi::Object obj = arg.asObject(runtime);
54
62
  return margelo::nitro::reactnativerangedownloader::FirmwareArtifactSweepResult(
55
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "deletedFiles")),
56
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "deletedBytes"))
63
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "deletedFiles"))),
64
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "deletedBytes")))
57
65
  );
58
66
  }
59
67
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactSweepResult& arg) {
60
68
  jsi::Object obj(runtime);
61
- obj.setProperty(runtime, "deletedFiles", JSIConverter<double>::toJSI(runtime, arg.deletedFiles));
62
- obj.setProperty(runtime, "deletedBytes", JSIConverter<double>::toJSI(runtime, arg.deletedBytes));
69
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "deletedFiles"), JSIConverter<double>::toJSI(runtime, arg.deletedFiles));
70
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "deletedBytes"), JSIConverter<double>::toJSI(runtime, arg.deletedBytes));
63
71
  return obj;
64
72
  }
65
73
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -70,8 +78,8 @@ namespace margelo::nitro {
70
78
  if (!nitro::isPlainObject(runtime, obj)) {
71
79
  return false;
72
80
  }
73
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "deletedFiles"))) return false;
74
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "deletedBytes"))) return false;
81
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "deletedFiles")))) return false;
82
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "deletedBytes")))) return false;
75
83
  return true;
76
84
  }
77
85
  };
@@ -2,7 +2,7 @@
2
2
  /// HybridReactNativeRangeDownloaderSpec.cpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #include "HybridReactNativeRangeDownloaderSpec.hpp"
@@ -2,7 +2,7 @@
2
2
  /// HybridReactNativeRangeDownloaderSpec.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once