@onekeyfe/react-native-bundle-update 3.0.85 → 3.0.87
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/ReactNativeBundleUpdate.podspec +1 -1
- package/nitrogen/generated/android/c++/JAscFileInfo.hpp +1 -1
- package/nitrogen/generated/android/c++/JBundleDownloadASCParams.hpp +1 -1
- package/nitrogen/generated/android/c++/JBundleDownloadEvent.hpp +1 -1
- package/nitrogen/generated/android/c++/JBundleDownloadParams.hpp +1 -1
- package/nitrogen/generated/android/c++/JBundleDownloadResult.hpp +1 -1
- package/nitrogen/generated/android/c++/JBundleInstallParams.hpp +1 -1
- package/nitrogen/generated/android/c++/JBundleSwitchParams.hpp +1 -1
- package/nitrogen/generated/android/c++/JBundleVerifyASCParams.hpp +1 -1
- package/nitrogen/generated/android/c++/JBundleVerifyParams.hpp +1 -1
- package/nitrogen/generated/android/c++/JFallbackBundleInfo.hpp +1 -1
- package/nitrogen/generated/android/c++/JHybridReactNativeBundleUpdateSpec.cpp +12 -12
- package/nitrogen/generated/android/c++/JLocalBundleInfo.hpp +1 -1
- package/nitrogen/generated/android/c++/JTestResult.hpp +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/AscFileInfo.kt +17 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleDownloadASCParams.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleDownloadEvent.kt +17 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleDownloadParams.kt +21 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleDownloadResult.kt +21 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleInstallParams.kt +19 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleSwitchParams.kt +17 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleVerifyASCParams.kt +21 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/BundleVerifyParams.kt +19 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/FallbackBundleInfo.kt +17 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/Func_void_BundleDownloadEvent.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/HybridReactNativeBundleUpdateSpec.kt +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/LocalBundleInfo.kt +15 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/TestResult.kt +15 -0
- package/nitrogen/generated/ios/ReactNativeBundleUpdate+autolinking.rb +2 -0
- package/package.json +4 -4
|
@@ -44,7 +44,7 @@ Pod::Spec.new do |s|
|
|
|
44
44
|
# >= 2.5.4 pulls the fix for the zip-slip / symlink path-traversal CVEs
|
|
45
45
|
# (CVE-2023-39139 etc.) — important since OTA unzips downloaded archives.
|
|
46
46
|
s.dependency 'SSZipArchive', '>= 2.5.4'
|
|
47
|
-
s.dependency 'MMKV', '
|
|
47
|
+
s.dependency 'MMKV', '2.4.0'
|
|
48
48
|
|
|
49
49
|
load 'nitrogen/generated/ios/ReactNativeBundleUpdate+autolinking.rb'
|
|
50
50
|
add_nitrogen_files(s)
|
|
@@ -17,7 +17,7 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
17
17
|
using namespace facebook;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The C++ JNI bridge between the C++ struct "AscFileInfo" and the
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "AscFileInfo" and the Kotlin data class "AscFileInfo".
|
|
21
21
|
*/
|
|
22
22
|
struct JAscFileInfo final: public jni::JavaClass<JAscFileInfo> {
|
|
23
23
|
public:
|
|
@@ -17,7 +17,7 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
17
17
|
using namespace facebook;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The C++ JNI bridge between the C++ struct "BundleDownloadASCParams" and the
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "BundleDownloadASCParams" and the Kotlin data class "BundleDownloadASCParams".
|
|
21
21
|
*/
|
|
22
22
|
struct JBundleDownloadASCParams final: public jni::JavaClass<JBundleDownloadASCParams> {
|
|
23
23
|
public:
|
|
@@ -17,7 +17,7 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
17
17
|
using namespace facebook;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The C++ JNI bridge between the C++ struct "BundleDownloadEvent" and the
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "BundleDownloadEvent" and the Kotlin data class "BundleDownloadEvent".
|
|
21
21
|
*/
|
|
22
22
|
struct JBundleDownloadEvent final: public jni::JavaClass<JBundleDownloadEvent> {
|
|
23
23
|
public:
|
|
@@ -17,7 +17,7 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
17
17
|
using namespace facebook;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The C++ JNI bridge between the C++ struct "BundleDownloadParams" and the
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "BundleDownloadParams" and the Kotlin data class "BundleDownloadParams".
|
|
21
21
|
*/
|
|
22
22
|
struct JBundleDownloadParams final: public jni::JavaClass<JBundleDownloadParams> {
|
|
23
23
|
public:
|
|
@@ -17,7 +17,7 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
17
17
|
using namespace facebook;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The C++ JNI bridge between the C++ struct "BundleDownloadResult" and the
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "BundleDownloadResult" and the Kotlin data class "BundleDownloadResult".
|
|
21
21
|
*/
|
|
22
22
|
struct JBundleDownloadResult final: public jni::JavaClass<JBundleDownloadResult> {
|
|
23
23
|
public:
|
|
@@ -17,7 +17,7 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
17
17
|
using namespace facebook;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The C++ JNI bridge between the C++ struct "BundleInstallParams" and the
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "BundleInstallParams" and the Kotlin data class "BundleInstallParams".
|
|
21
21
|
*/
|
|
22
22
|
struct JBundleInstallParams final: public jni::JavaClass<JBundleInstallParams> {
|
|
23
23
|
public:
|
|
@@ -17,7 +17,7 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
17
17
|
using namespace facebook;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The C++ JNI bridge between the C++ struct "BundleSwitchParams" and the
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "BundleSwitchParams" and the Kotlin data class "BundleSwitchParams".
|
|
21
21
|
*/
|
|
22
22
|
struct JBundleSwitchParams final: public jni::JavaClass<JBundleSwitchParams> {
|
|
23
23
|
public:
|
|
@@ -17,7 +17,7 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
17
17
|
using namespace facebook;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The C++ JNI bridge between the C++ struct "BundleVerifyASCParams" and the
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "BundleVerifyASCParams" and the Kotlin data class "BundleVerifyASCParams".
|
|
21
21
|
*/
|
|
22
22
|
struct JBundleVerifyASCParams final: public jni::JavaClass<JBundleVerifyASCParams> {
|
|
23
23
|
public:
|
|
@@ -17,7 +17,7 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
17
17
|
using namespace facebook;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The C++ JNI bridge between the C++ struct "BundleVerifyParams" and the
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "BundleVerifyParams" and the Kotlin data class "BundleVerifyParams".
|
|
21
21
|
*/
|
|
22
22
|
struct JBundleVerifyParams final: public jni::JavaClass<JBundleVerifyParams> {
|
|
23
23
|
public:
|
|
@@ -17,7 +17,7 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
17
17
|
using namespace facebook;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The C++ JNI bridge between the C++ struct "FallbackBundleInfo" and the
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "FallbackBundleInfo" and the Kotlin data class "FallbackBundleInfo".
|
|
21
21
|
*/
|
|
22
22
|
struct JFallbackBundleInfo final: public jni::JavaClass<JFallbackBundleInfo> {
|
|
23
23
|
public:
|
|
@@ -258,16 +258,16 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
258
258
|
auto __promise = Promise<std::vector<FallbackBundleInfo>>::create();
|
|
259
259
|
__result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
|
|
260
260
|
auto __result = jni::static_ref_cast<jni::JArrayClass<JFallbackBundleInfo>>(__boxedResult);
|
|
261
|
-
__promise->resolve([&]() {
|
|
262
|
-
size_t __size =
|
|
261
|
+
__promise->resolve([&](auto&& __input) {
|
|
262
|
+
size_t __size = __input->size();
|
|
263
263
|
std::vector<FallbackBundleInfo> __vector;
|
|
264
264
|
__vector.reserve(__size);
|
|
265
265
|
for (size_t __i = 0; __i < __size; __i++) {
|
|
266
|
-
auto __element =
|
|
266
|
+
auto __element = __input->getElement(__i);
|
|
267
267
|
__vector.push_back(__element->toCpp());
|
|
268
268
|
}
|
|
269
269
|
return __vector;
|
|
270
|
-
}());
|
|
270
|
+
}(__result));
|
|
271
271
|
});
|
|
272
272
|
__result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
|
|
273
273
|
jni::JniException __jniError(__throwable);
|
|
@@ -477,16 +477,16 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
477
477
|
auto __promise = Promise<std::vector<LocalBundleInfo>>::create();
|
|
478
478
|
__result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
|
|
479
479
|
auto __result = jni::static_ref_cast<jni::JArrayClass<JLocalBundleInfo>>(__boxedResult);
|
|
480
|
-
__promise->resolve([&]() {
|
|
481
|
-
size_t __size =
|
|
480
|
+
__promise->resolve([&](auto&& __input) {
|
|
481
|
+
size_t __size = __input->size();
|
|
482
482
|
std::vector<LocalBundleInfo> __vector;
|
|
483
483
|
__vector.reserve(__size);
|
|
484
484
|
for (size_t __i = 0; __i < __size; __i++) {
|
|
485
|
-
auto __element =
|
|
485
|
+
auto __element = __input->getElement(__i);
|
|
486
486
|
__vector.push_back(__element->toCpp());
|
|
487
487
|
}
|
|
488
488
|
return __vector;
|
|
489
|
-
}());
|
|
489
|
+
}(__result));
|
|
490
490
|
});
|
|
491
491
|
__result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
|
|
492
492
|
jni::JniException __jniError(__throwable);
|
|
@@ -502,16 +502,16 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
502
502
|
auto __promise = Promise<std::vector<AscFileInfo>>::create();
|
|
503
503
|
__result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
|
|
504
504
|
auto __result = jni::static_ref_cast<jni::JArrayClass<JAscFileInfo>>(__boxedResult);
|
|
505
|
-
__promise->resolve([&]() {
|
|
506
|
-
size_t __size =
|
|
505
|
+
__promise->resolve([&](auto&& __input) {
|
|
506
|
+
size_t __size = __input->size();
|
|
507
507
|
std::vector<AscFileInfo> __vector;
|
|
508
508
|
__vector.reserve(__size);
|
|
509
509
|
for (size_t __i = 0; __i < __size; __i++) {
|
|
510
|
-
auto __element =
|
|
510
|
+
auto __element = __input->getElement(__i);
|
|
511
511
|
__vector.push_back(__element->toCpp());
|
|
512
512
|
}
|
|
513
513
|
return __vector;
|
|
514
|
-
}());
|
|
514
|
+
}(__result));
|
|
515
515
|
});
|
|
516
516
|
__result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
|
|
517
517
|
jni::JniException __jniError(__throwable);
|
|
@@ -17,7 +17,7 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
17
17
|
using namespace facebook;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The C++ JNI bridge between the C++ struct "LocalBundleInfo" and the
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "LocalBundleInfo" and the Kotlin data class "LocalBundleInfo".
|
|
21
21
|
*/
|
|
22
22
|
struct JLocalBundleInfo final: public jni::JavaClass<JLocalBundleInfo> {
|
|
23
23
|
public:
|
|
@@ -17,7 +17,7 @@ namespace margelo::nitro::reactnativebundleupdate {
|
|
|
17
17
|
using namespace facebook;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The C++ JNI bridge between the C++ struct "TestResult" and the
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "TestResult" and the Kotlin data class "TestResult".
|
|
21
21
|
*/
|
|
22
22
|
struct JTestResult final: public jni::JavaClass<JTestResult> {
|
|
23
23
|
public:
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/AscFileInfo.kt
CHANGED
|
@@ -9,6 +9,7 @@ package com.margelo.nitro.reactnativebundleupdate
|
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import java.util.Objects
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -29,6 +30,22 @@ data class AscFileInfo(
|
|
|
29
30
|
) {
|
|
30
31
|
/* primary constructor */
|
|
31
32
|
|
|
33
|
+
override fun equals(other: Any?): Boolean {
|
|
34
|
+
if (this === other) return true
|
|
35
|
+
if (other !is AscFileInfo) return false
|
|
36
|
+
return Objects.deepEquals(this.fileName, other.fileName)
|
|
37
|
+
&& Objects.deepEquals(this.filePath, other.filePath)
|
|
38
|
+
&& Objects.deepEquals(this.fileSize, other.fileSize)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
override fun hashCode(): Int {
|
|
42
|
+
return arrayOf<Any?>(
|
|
43
|
+
fileName,
|
|
44
|
+
filePath,
|
|
45
|
+
fileSize
|
|
46
|
+
).contentDeepHashCode()
|
|
47
|
+
}
|
|
48
|
+
|
|
32
49
|
companion object {
|
|
33
50
|
/**
|
|
34
51
|
* Constructor called from C++
|
|
@@ -9,6 +9,7 @@ package com.margelo.nitro.reactnativebundleupdate
|
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import java.util.Objects
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -38,6 +39,28 @@ data class BundleDownloadASCParams(
|
|
|
38
39
|
) {
|
|
39
40
|
/* primary constructor */
|
|
40
41
|
|
|
42
|
+
override fun equals(other: Any?): Boolean {
|
|
43
|
+
if (this === other) return true
|
|
44
|
+
if (other !is BundleDownloadASCParams) return false
|
|
45
|
+
return Objects.deepEquals(this.downloadUrl, other.downloadUrl)
|
|
46
|
+
&& Objects.deepEquals(this.downloadedFile, other.downloadedFile)
|
|
47
|
+
&& Objects.deepEquals(this.signature, other.signature)
|
|
48
|
+
&& Objects.deepEquals(this.latestVersion, other.latestVersion)
|
|
49
|
+
&& Objects.deepEquals(this.bundleVersion, other.bundleVersion)
|
|
50
|
+
&& Objects.deepEquals(this.sha256, other.sha256)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
override fun hashCode(): Int {
|
|
54
|
+
return arrayOf<Any?>(
|
|
55
|
+
downloadUrl,
|
|
56
|
+
downloadedFile,
|
|
57
|
+
signature,
|
|
58
|
+
latestVersion,
|
|
59
|
+
bundleVersion,
|
|
60
|
+
sha256
|
|
61
|
+
).contentDeepHashCode()
|
|
62
|
+
}
|
|
63
|
+
|
|
41
64
|
companion object {
|
|
42
65
|
/**
|
|
43
66
|
* Constructor called from C++
|
|
@@ -9,6 +9,7 @@ package com.margelo.nitro.reactnativebundleupdate
|
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import java.util.Objects
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -29,6 +30,22 @@ data class BundleDownloadEvent(
|
|
|
29
30
|
) {
|
|
30
31
|
/* primary constructor */
|
|
31
32
|
|
|
33
|
+
override fun equals(other: Any?): Boolean {
|
|
34
|
+
if (this === other) return true
|
|
35
|
+
if (other !is BundleDownloadEvent) return false
|
|
36
|
+
return Objects.deepEquals(this.type, other.type)
|
|
37
|
+
&& Objects.deepEquals(this.progress, other.progress)
|
|
38
|
+
&& Objects.deepEquals(this.message, other.message)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
override fun hashCode(): Int {
|
|
42
|
+
return arrayOf<Any?>(
|
|
43
|
+
type,
|
|
44
|
+
progress,
|
|
45
|
+
message
|
|
46
|
+
).contentDeepHashCode()
|
|
47
|
+
}
|
|
48
|
+
|
|
32
49
|
companion object {
|
|
33
50
|
/**
|
|
34
51
|
* Constructor called from C++
|
|
@@ -9,6 +9,7 @@ package com.margelo.nitro.reactnativebundleupdate
|
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import java.util.Objects
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -35,6 +36,26 @@ data class BundleDownloadParams(
|
|
|
35
36
|
) {
|
|
36
37
|
/* primary constructor */
|
|
37
38
|
|
|
39
|
+
override fun equals(other: Any?): Boolean {
|
|
40
|
+
if (this === other) return true
|
|
41
|
+
if (other !is BundleDownloadParams) return false
|
|
42
|
+
return Objects.deepEquals(this.downloadUrl, other.downloadUrl)
|
|
43
|
+
&& Objects.deepEquals(this.latestVersion, other.latestVersion)
|
|
44
|
+
&& Objects.deepEquals(this.bundleVersion, other.bundleVersion)
|
|
45
|
+
&& Objects.deepEquals(this.fileSize, other.fileSize)
|
|
46
|
+
&& Objects.deepEquals(this.sha256, other.sha256)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
override fun hashCode(): Int {
|
|
50
|
+
return arrayOf<Any?>(
|
|
51
|
+
downloadUrl,
|
|
52
|
+
latestVersion,
|
|
53
|
+
bundleVersion,
|
|
54
|
+
fileSize,
|
|
55
|
+
sha256
|
|
56
|
+
).contentDeepHashCode()
|
|
57
|
+
}
|
|
58
|
+
|
|
38
59
|
companion object {
|
|
39
60
|
/**
|
|
40
61
|
* Constructor called from C++
|
|
@@ -9,6 +9,7 @@ package com.margelo.nitro.reactnativebundleupdate
|
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import java.util.Objects
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -35,6 +36,26 @@ data class BundleDownloadResult(
|
|
|
35
36
|
) {
|
|
36
37
|
/* primary constructor */
|
|
37
38
|
|
|
39
|
+
override fun equals(other: Any?): Boolean {
|
|
40
|
+
if (this === other) return true
|
|
41
|
+
if (other !is BundleDownloadResult) return false
|
|
42
|
+
return Objects.deepEquals(this.downloadedFile, other.downloadedFile)
|
|
43
|
+
&& Objects.deepEquals(this.downloadUrl, other.downloadUrl)
|
|
44
|
+
&& Objects.deepEquals(this.latestVersion, other.latestVersion)
|
|
45
|
+
&& Objects.deepEquals(this.bundleVersion, other.bundleVersion)
|
|
46
|
+
&& Objects.deepEquals(this.sha256, other.sha256)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
override fun hashCode(): Int {
|
|
50
|
+
return arrayOf<Any?>(
|
|
51
|
+
downloadedFile,
|
|
52
|
+
downloadUrl,
|
|
53
|
+
latestVersion,
|
|
54
|
+
bundleVersion,
|
|
55
|
+
sha256
|
|
56
|
+
).contentDeepHashCode()
|
|
57
|
+
}
|
|
58
|
+
|
|
38
59
|
companion object {
|
|
39
60
|
/**
|
|
40
61
|
* Constructor called from C++
|
|
@@ -9,6 +9,7 @@ package com.margelo.nitro.reactnativebundleupdate
|
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import java.util.Objects
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -32,6 +33,24 @@ data class BundleInstallParams(
|
|
|
32
33
|
) {
|
|
33
34
|
/* primary constructor */
|
|
34
35
|
|
|
36
|
+
override fun equals(other: Any?): Boolean {
|
|
37
|
+
if (this === other) return true
|
|
38
|
+
if (other !is BundleInstallParams) return false
|
|
39
|
+
return Objects.deepEquals(this.downloadedFile, other.downloadedFile)
|
|
40
|
+
&& Objects.deepEquals(this.latestVersion, other.latestVersion)
|
|
41
|
+
&& Objects.deepEquals(this.bundleVersion, other.bundleVersion)
|
|
42
|
+
&& Objects.deepEquals(this.signature, other.signature)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
override fun hashCode(): Int {
|
|
46
|
+
return arrayOf<Any?>(
|
|
47
|
+
downloadedFile,
|
|
48
|
+
latestVersion,
|
|
49
|
+
bundleVersion,
|
|
50
|
+
signature
|
|
51
|
+
).contentDeepHashCode()
|
|
52
|
+
}
|
|
53
|
+
|
|
35
54
|
companion object {
|
|
36
55
|
/**
|
|
37
56
|
* Constructor called from C++
|
|
@@ -9,6 +9,7 @@ package com.margelo.nitro.reactnativebundleupdate
|
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import java.util.Objects
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -29,6 +30,22 @@ data class BundleSwitchParams(
|
|
|
29
30
|
) {
|
|
30
31
|
/* primary constructor */
|
|
31
32
|
|
|
33
|
+
override fun equals(other: Any?): Boolean {
|
|
34
|
+
if (this === other) return true
|
|
35
|
+
if (other !is BundleSwitchParams) return false
|
|
36
|
+
return Objects.deepEquals(this.appVersion, other.appVersion)
|
|
37
|
+
&& Objects.deepEquals(this.bundleVersion, other.bundleVersion)
|
|
38
|
+
&& Objects.deepEquals(this.signature, other.signature)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
override fun hashCode(): Int {
|
|
42
|
+
return arrayOf<Any?>(
|
|
43
|
+
appVersion,
|
|
44
|
+
bundleVersion,
|
|
45
|
+
signature
|
|
46
|
+
).contentDeepHashCode()
|
|
47
|
+
}
|
|
48
|
+
|
|
32
49
|
companion object {
|
|
33
50
|
/**
|
|
34
51
|
* Constructor called from C++
|
|
@@ -9,6 +9,7 @@ package com.margelo.nitro.reactnativebundleupdate
|
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import java.util.Objects
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -35,6 +36,26 @@ data class BundleVerifyASCParams(
|
|
|
35
36
|
) {
|
|
36
37
|
/* primary constructor */
|
|
37
38
|
|
|
39
|
+
override fun equals(other: Any?): Boolean {
|
|
40
|
+
if (this === other) return true
|
|
41
|
+
if (other !is BundleVerifyASCParams) return false
|
|
42
|
+
return Objects.deepEquals(this.downloadedFile, other.downloadedFile)
|
|
43
|
+
&& Objects.deepEquals(this.sha256, other.sha256)
|
|
44
|
+
&& Objects.deepEquals(this.latestVersion, other.latestVersion)
|
|
45
|
+
&& Objects.deepEquals(this.bundleVersion, other.bundleVersion)
|
|
46
|
+
&& Objects.deepEquals(this.signature, other.signature)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
override fun hashCode(): Int {
|
|
50
|
+
return arrayOf<Any?>(
|
|
51
|
+
downloadedFile,
|
|
52
|
+
sha256,
|
|
53
|
+
latestVersion,
|
|
54
|
+
bundleVersion,
|
|
55
|
+
signature
|
|
56
|
+
).contentDeepHashCode()
|
|
57
|
+
}
|
|
58
|
+
|
|
38
59
|
companion object {
|
|
39
60
|
/**
|
|
40
61
|
* Constructor called from C++
|
|
@@ -9,6 +9,7 @@ package com.margelo.nitro.reactnativebundleupdate
|
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import java.util.Objects
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -32,6 +33,24 @@ data class BundleVerifyParams(
|
|
|
32
33
|
) {
|
|
33
34
|
/* primary constructor */
|
|
34
35
|
|
|
36
|
+
override fun equals(other: Any?): Boolean {
|
|
37
|
+
if (this === other) return true
|
|
38
|
+
if (other !is BundleVerifyParams) return false
|
|
39
|
+
return Objects.deepEquals(this.downloadedFile, other.downloadedFile)
|
|
40
|
+
&& Objects.deepEquals(this.sha256, other.sha256)
|
|
41
|
+
&& Objects.deepEquals(this.latestVersion, other.latestVersion)
|
|
42
|
+
&& Objects.deepEquals(this.bundleVersion, other.bundleVersion)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
override fun hashCode(): Int {
|
|
46
|
+
return arrayOf<Any?>(
|
|
47
|
+
downloadedFile,
|
|
48
|
+
sha256,
|
|
49
|
+
latestVersion,
|
|
50
|
+
bundleVersion
|
|
51
|
+
).contentDeepHashCode()
|
|
52
|
+
}
|
|
53
|
+
|
|
35
54
|
companion object {
|
|
36
55
|
/**
|
|
37
56
|
* Constructor called from C++
|
|
@@ -9,6 +9,7 @@ package com.margelo.nitro.reactnativebundleupdate
|
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import java.util.Objects
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -29,6 +30,22 @@ data class FallbackBundleInfo(
|
|
|
29
30
|
) {
|
|
30
31
|
/* primary constructor */
|
|
31
32
|
|
|
33
|
+
override fun equals(other: Any?): Boolean {
|
|
34
|
+
if (this === other) return true
|
|
35
|
+
if (other !is FallbackBundleInfo) return false
|
|
36
|
+
return Objects.deepEquals(this.appVersion, other.appVersion)
|
|
37
|
+
&& Objects.deepEquals(this.bundleVersion, other.bundleVersion)
|
|
38
|
+
&& Objects.deepEquals(this.signature, other.signature)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
override fun hashCode(): Int {
|
|
42
|
+
return arrayOf<Any?>(
|
|
43
|
+
appVersion,
|
|
44
|
+
bundleVersion,
|
|
45
|
+
signature
|
|
46
|
+
).contentDeepHashCode()
|
|
47
|
+
}
|
|
48
|
+
|
|
32
49
|
companion object {
|
|
33
50
|
/**
|
|
34
51
|
* Constructor called from C++
|
|
@@ -10,7 +10,6 @@ package com.margelo.nitro.reactnativebundleupdate
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.jni.HybridData
|
|
12
12
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
-
import dalvik.annotation.optimization.FastNative
|
|
14
13
|
|
|
15
14
|
|
|
16
15
|
/**
|
|
@@ -59,7 +58,6 @@ class Func_void_BundleDownloadEvent_cxx: Func_void_BundleDownloadEvent {
|
|
|
59
58
|
override fun invoke(event: BundleDownloadEvent): Unit
|
|
60
59
|
= invoke_cxx(event)
|
|
61
60
|
|
|
62
|
-
@FastNative
|
|
63
61
|
private external fun invoke_cxx(event: BundleDownloadEvent): Unit
|
|
64
62
|
}
|
|
65
63
|
|
|
@@ -10,6 +10,7 @@ package com.margelo.nitro.reactnativebundleupdate
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.jni.HybridData
|
|
12
12
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
+
import dalvik.annotation.optimization.FastNative
|
|
13
14
|
import com.margelo.nitro.core.Promise
|
|
14
15
|
import com.margelo.nitro.core.HybridObject
|
|
15
16
|
|
|
@@ -184,6 +185,7 @@ abstract class HybridReactNativeBundleUpdateSpec: HybridObject() {
|
|
|
184
185
|
@Keep
|
|
185
186
|
protected open class CxxPart(javaPart: HybridReactNativeBundleUpdateSpec): HybridObject.CxxPart(javaPart) {
|
|
186
187
|
// C++ JHybridReactNativeBundleUpdateSpec::CxxPart::initHybrid(...)
|
|
188
|
+
@FastNative
|
|
187
189
|
external override fun initHybrid(): HybridData
|
|
188
190
|
}
|
|
189
191
|
override fun createCxxPart(): CxxPart {
|
|
@@ -9,6 +9,7 @@ package com.margelo.nitro.reactnativebundleupdate
|
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import java.util.Objects
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -26,6 +27,20 @@ data class LocalBundleInfo(
|
|
|
26
27
|
) {
|
|
27
28
|
/* primary constructor */
|
|
28
29
|
|
|
30
|
+
override fun equals(other: Any?): Boolean {
|
|
31
|
+
if (this === other) return true
|
|
32
|
+
if (other !is LocalBundleInfo) return false
|
|
33
|
+
return Objects.deepEquals(this.appVersion, other.appVersion)
|
|
34
|
+
&& Objects.deepEquals(this.bundleVersion, other.bundleVersion)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
override fun hashCode(): Int {
|
|
38
|
+
return arrayOf<Any?>(
|
|
39
|
+
appVersion,
|
|
40
|
+
bundleVersion
|
|
41
|
+
).contentDeepHashCode()
|
|
42
|
+
}
|
|
43
|
+
|
|
29
44
|
companion object {
|
|
30
45
|
/**
|
|
31
46
|
* Constructor called from C++
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/TestResult.kt
CHANGED
|
@@ -9,6 +9,7 @@ package com.margelo.nitro.reactnativebundleupdate
|
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import java.util.Objects
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -26,6 +27,20 @@ data class TestResult(
|
|
|
26
27
|
) {
|
|
27
28
|
/* primary constructor */
|
|
28
29
|
|
|
30
|
+
override fun equals(other: Any?): Boolean {
|
|
31
|
+
if (this === other) return true
|
|
32
|
+
if (other !is TestResult) return false
|
|
33
|
+
return Objects.deepEquals(this.success, other.success)
|
|
34
|
+
&& Objects.deepEquals(this.message, other.message)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
override fun hashCode(): Int {
|
|
38
|
+
return arrayOf<Any?>(
|
|
39
|
+
success,
|
|
40
|
+
message
|
|
41
|
+
).contentDeepHashCode()
|
|
42
|
+
}
|
|
43
|
+
|
|
29
44
|
companion object {
|
|
30
45
|
/**
|
|
31
46
|
* Constructor called from C++
|
|
@@ -56,5 +56,7 @@ def add_nitrogen_files(spec)
|
|
|
56
56
|
"SWIFT_OBJC_INTEROP_MODE" => "objcxx",
|
|
57
57
|
# Enables stricter modular headers
|
|
58
58
|
"DEFINES_MODULE" => "YES",
|
|
59
|
+
# Disable auto-generated ObjC header for Swift (Static linkage on Xcode 26.4 breaks here)
|
|
60
|
+
"SWIFT_INSTALL_OBJC_HEADER" => "NO",
|
|
59
61
|
})
|
|
60
62
|
end
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/react-native-bundle-update",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.87",
|
|
4
4
|
"description": "react-native-bundle-update",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -78,12 +78,12 @@
|
|
|
78
78
|
"eslint-plugin-prettier": "^5.5.4",
|
|
79
79
|
"jest": "^29.7.0",
|
|
80
80
|
"lefthook": "^2.0.3",
|
|
81
|
-
"nitrogen": "0.
|
|
81
|
+
"nitrogen": "0.36.5",
|
|
82
82
|
"prettier": "^2.8.8",
|
|
83
83
|
"react": "19.2.0",
|
|
84
84
|
"react-native": "patch:react-native@npm%3A0.83.0#~/.yarn/patches/react-native-npm-0.83.0-577d0f2d83.patch",
|
|
85
85
|
"react-native-builder-bob": "^0.40.13",
|
|
86
|
-
"react-native-nitro-modules": "0.
|
|
86
|
+
"react-native-nitro-modules": "0.36.5",
|
|
87
87
|
"release-it": "^19.0.4",
|
|
88
88
|
"turbo": "^2.5.6",
|
|
89
89
|
"typescript": "^5.9.2"
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"react": "*",
|
|
93
93
|
"react-native": "*",
|
|
94
|
-
"react-native-nitro-modules": "0.
|
|
94
|
+
"react-native-nitro-modules": "0.36.5"
|
|
95
95
|
},
|
|
96
96
|
"react-native-builder-bob": {
|
|
97
97
|
"source": "src",
|