Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
@@ -12,7 +12,3 @@ package com.wix.detox.reactnative.idlingresources.animations | ||
| import com.wix.detox.common.DetoxLog.Companion.LOG_TAG | ||
| import com.wix.detox.common.KotlinReflectUtils | ||
| import com.wix.detox.reactnative.ReactNativeInfo | ||
| import com.wix.detox.reactnative.idlingresources.DetoxIdlingResource | ||
| import kotlin.reflect.full.memberProperties | ||
| import kotlin.reflect.jvm.isAccessible | ||
@@ -35,4 +31,3 @@ class AnimatedModuleIdlingResource(private val reactContext: ReactContext) : DetoxIdlingResource(), | ||
| if (animatedModule.hasQueuedAnimations() || | ||
| animatedModule.hasActiveAnimations()) { | ||
| if (animatedModule.hasActiveAnimations()) { | ||
| Choreographer.getInstance().postFrameCallback(this) | ||
@@ -61,3 +56,3 @@ return false | ||
| private fun getAnimatedModule(): AnimatedModuleFacade? = | ||
| if (animatedModule != null) { | ||
| if (animatedModule != null) { | ||
| animatedModule | ||
@@ -74,35 +69,6 @@ } else { | ||
| private class AnimatedModuleFacade(private val animatedModule: NativeAnimatedModule) { | ||
| private val operationsQueue: OperationsQueueReflected | ||
| private val preOperationsQueue: OperationsQueueReflected | ||
| private val nodesManager: NativeAnimatedNodesManager | ||
| private val nodesManager: NativeAnimatedNodesManager = animatedModule.nodesManager | ||
| ?: throw DetoxErrors.DetoxIllegalStateException("AnimatedModule exists but nodesManager is null") | ||
| init { | ||
| val operationsQueueName = if (ReactNativeInfo.rnVersion().minor > 79) "operations" else "mOperations" | ||
| val preOperationsQueueName = if (ReactNativeInfo.rnVersion().minor > 79) "preOperations" else "mPreOperations" | ||
| operationsQueue = (NativeAnimatedModule::class.memberProperties.find { it.name == operationsQueueName } ?: | ||
| throw DetoxErrors.DetoxIllegalStateException("$operationsQueueName property cannot be accessed")).let { | ||
| it.isAccessible = true | ||
| OperationsQueueReflected(it.get(animatedModule) as Any) | ||
| } | ||
| preOperationsQueue = (NativeAnimatedModule::class.memberProperties.find { it.name == preOperationsQueueName } ?: | ||
| throw DetoxErrors.DetoxIllegalStateException("$preOperationsQueueName property cannot be accessed")).let { | ||
| it.isAccessible = true | ||
| OperationsQueueReflected(it.get(animatedModule) as Any) | ||
| } | ||
| nodesManager = animatedModule.nodesManager ?: | ||
| throw DetoxErrors.DetoxIllegalStateException("AnimatedModule exists but nodesManager is null") | ||
| } | ||
| @UiThread | ||
| fun hasQueuedAnimations(): Boolean = | ||
| !preOperationsQueue.isEmpty() || | ||
| !operationsQueue.isEmpty() | ||
| @UiThread | ||
| fun hasActiveAnimations(): Boolean { | ||
@@ -112,11 +78,1 @@ return nodesManager.hasActiveAnimations() | ||
| } | ||
| class OperationsQueueReflected(private val operationsQueue: Any) { | ||
| fun isEmpty(): Boolean { | ||
| KotlinReflectUtils.getPropertyValueWithCustomGetter<Boolean>(operationsQueue, "isEmpty")?.let { | ||
| return it | ||
| } | ||
| throw DetoxErrors.DetoxIllegalStateException("isEmpty method/property cannot be reached") | ||
| } | ||
| } |
@@ -6,9 +6,9 @@ <?xml version="1.0" encoding="UTF-8"?> | ||
| <versioning> | ||
| <latest>20.45.0</latest> | ||
| <release>20.45.0</release> | ||
| <latest>20.45.1</latest> | ||
| <release>20.45.1</release> | ||
| <versions> | ||
| <version>20.45.0</version> | ||
| <version>20.45.1</version> | ||
| </versions> | ||
| <lastUpdated>20251028100110</lastUpdated> | ||
| <lastUpdated>20251030165738</lastUpdated> | ||
| </versioning> | ||
| </metadata> |
+2
-2
| { | ||
| "name": "detox", | ||
| "description": "E2E tests and automation for mobile", | ||
| "version": "20.45.0", | ||
| "version": "20.45.1", | ||
| "bin": { | ||
@@ -123,3 +123,3 @@ "detox": "local-cli/cli.js" | ||
| ], | ||
| "gitHead": "b0c8c7b768ce7c625cca12367cbd753c339886c3" | ||
| "gitHead": "43b45aefe4249aebe34622f63389b363591362ae" | ||
| } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 20 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 20 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
14944297
-0.03%