@hexar/biometric-identity-sdk-react-native 1.25.0 → 1.25.1
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/package.json
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
diff --git a/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/core/utils/runOnUiThread.kt b/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/core/utils/runOnUiThread.kt
|
|
2
|
-
index e96e78e..
|
|
2
|
+
index e96e78e..c840643 100644
|
|
3
3
|
--- a/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/core/utils/runOnUiThread.kt
|
|
4
4
|
+++ b/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/core/utils/runOnUiThread.kt
|
|
5
|
-
@@ -
|
|
5
|
+
@@ -3,6 +3,7 @@ package com.mrousavy.camera.core.utils
|
|
6
|
+
import com.facebook.react.bridge.UiThreadUtil
|
|
7
|
+
import kotlin.coroutines.cancellation.CancellationException
|
|
8
|
+
import kotlin.coroutines.resume
|
|
9
|
+
+import kotlin.coroutines.resumeWithException
|
|
10
|
+
import kotlinx.coroutines.suspendCancellableCoroutine
|
|
11
|
+
|
|
12
|
+
suspend inline fun <T> runOnUiThreadAndWait(crossinline function: () -> T): T {
|
|
13
|
+
@@ -13,9 +14,13 @@ suspend inline fun <T> runOnUiThreadAndWait(crossinline function: () -> T): T {
|
|
6
14
|
|
|
7
15
|
return suspendCancellableCoroutine { continuation ->
|
|
8
16
|
UiThreadUtil.runOnUiThread {
|
package/scripts/postinstall.js
CHANGED
|
@@ -102,7 +102,15 @@ function applyPatch() {
|
|
|
102
102
|
);
|
|
103
103
|
|
|
104
104
|
if (patchedRunOnUiThread !== runOnUiThreadContent) {
|
|
105
|
-
|
|
105
|
+
// Add the missing import for resumeWithException
|
|
106
|
+
let finalContent = patchedRunOnUiThread;
|
|
107
|
+
if (!finalContent.includes('import kotlin.coroutines.resumeWithException')) {
|
|
108
|
+
finalContent = finalContent.replace(
|
|
109
|
+
'import kotlin.coroutines.resume',
|
|
110
|
+
'import kotlin.coroutines.resume\nimport kotlin.coroutines.resumeWithException'
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
fs.writeFileSync(runOnUiThreadFile, finalContent, 'utf8');
|
|
106
114
|
console.log('[biometric-sdk] ✓ Patched runOnUiThread.kt');
|
|
107
115
|
}
|
|
108
116
|
|