expo-dev-launcher 5.0.3 → 5.0.4
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/CHANGELOG.md +10 -0
- package/android/build.gradle +1 -1
- package/android/src/debug/assets/expo_dev_launcher_android.bundle +717 -718
- package/android/src/debug/java/expo/modules/devlauncher/launcher/DevLauncherNetworkInterceptor.kt +11 -1
- package/bundle/index.ts +3 -0
- package/ios/main.jsbundle +717 -718
- package/package.json +3 -3
package/android/src/debug/java/expo/modules/devlauncher/launcher/DevLauncherNetworkInterceptor.kt
CHANGED
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
package expo.modules.devlauncher.launcher
|
|
4
4
|
|
|
5
5
|
import android.net.Uri
|
|
6
|
+
import android.util.Log
|
|
6
7
|
import com.facebook.react.packagerconnection.ReconnectingWebSocket
|
|
7
8
|
import expo.modules.kotlin.devtools.ExpoRequestCdpInterceptor
|
|
8
9
|
import java.io.Closeable
|
|
10
|
+
import java.io.IOException
|
|
9
11
|
|
|
10
12
|
internal class DevLauncherNetworkInterceptor(appUrl: Uri) : Closeable, ExpoRequestCdpInterceptor.Delegate {
|
|
11
13
|
private val metroConnection = ReconnectingWebSocket(
|
|
@@ -30,9 +32,17 @@ internal class DevLauncherNetworkInterceptor(appUrl: Uri) : Closeable, ExpoReque
|
|
|
30
32
|
|
|
31
33
|
//region ExpoRequestCdpInterceptor.Delegate implementations
|
|
32
34
|
override fun dispatch(event: String) {
|
|
33
|
-
|
|
35
|
+
try {
|
|
36
|
+
metroConnection.sendMessage(event)
|
|
37
|
+
} catch (_: IOException) {
|
|
38
|
+
Log.w(TAG, "Failed to send CDP network event")
|
|
39
|
+
}
|
|
34
40
|
}
|
|
35
41
|
//endregion ExpoRequestCdpInterceptor.Delegate implementations
|
|
42
|
+
|
|
43
|
+
companion object {
|
|
44
|
+
private val TAG = DevLauncherNetworkInterceptor::class.java.simpleName
|
|
45
|
+
}
|
|
36
46
|
}
|
|
37
47
|
|
|
38
48
|
private fun createNetworkInspectorUrl(appUrl: Uri): String {
|
package/bundle/index.ts
CHANGED
|
@@ -3,6 +3,9 @@ import { enableScreens } from 'react-native-screens';
|
|
|
3
3
|
|
|
4
4
|
import { App } from './App';
|
|
5
5
|
|
|
6
|
+
// Hide this target from the JS inspector
|
|
7
|
+
globalThis.__expo_hide_from_inspector__ = 'expo-dev-launcher';
|
|
8
|
+
|
|
6
9
|
LogBox.ignoreLogs(['EventEmitter']);
|
|
7
10
|
|
|
8
11
|
enableScreens(false);
|