expo-modules-core 1.12.17 → 1.12.18
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
CHANGED
|
@@ -10,6 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 1.12.18 — 2024-06-28
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- Fixed `RCTTriggerReloadCommandListeners` not found build error on iOS. ([#30014](https://github.com/expo/expo/pull/30014) by [@kudo](https://github.com/kudo))
|
|
18
|
+
- Fixed blocking SSE responses from network interceptor on Android. ([#30062](https://github.com/expo/expo/pull/30062) by [@kudo](https://github.com/kudo))
|
|
19
|
+
|
|
13
20
|
## 1.12.17 — 2024-06-27
|
|
14
21
|
|
|
15
22
|
### 🐛 Bug fixes
|
package/android/build.gradle
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
apply plugin: 'com.android.library'
|
|
2
2
|
|
|
3
3
|
group = 'host.exp.exponent'
|
|
4
|
-
version = '1.12.
|
|
4
|
+
version = '1.12.18'
|
|
5
5
|
|
|
6
6
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
7
7
|
apply from: expoModulesCorePlugin
|
|
@@ -63,7 +63,7 @@ android {
|
|
|
63
63
|
defaultConfig {
|
|
64
64
|
consumerProguardFiles 'proguard-rules.pro'
|
|
65
65
|
versionCode 1
|
|
66
|
-
versionName "1.12.
|
|
66
|
+
versionName "1.12.18"
|
|
67
67
|
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled.toString()
|
|
68
68
|
|
|
69
69
|
testInstrumentationRunner "expo.modules.TestRunner"
|
package/android/src/main/java/expo/modules/kotlin/devtools/ExpoNetworkInspectOkHttpInterceptors.kt
CHANGED
|
@@ -36,7 +36,7 @@ class ExpoNetworkInspectOkHttpNetworkInterceptor : Interceptor {
|
|
|
36
36
|
it.priorResponse = response
|
|
37
37
|
}
|
|
38
38
|
} else {
|
|
39
|
-
val body = peekResponseBody(response)
|
|
39
|
+
val body = if (shouldParseBody(response)) peekResponseBody(response) else null
|
|
40
40
|
delegate.didReceiveResponse(requestId, request, response, body)
|
|
41
41
|
body?.close()
|
|
42
42
|
}
|
|
@@ -123,3 +123,27 @@ internal fun peekResponseBody(
|
|
|
123
123
|
buffer.write(source, minOf(byteCount, source.buffer.size))
|
|
124
124
|
return buffer.asResponseBody(body.contentType(), buffer.size)
|
|
125
125
|
}
|
|
126
|
+
|
|
127
|
+
internal fun shouldParseBody(response: Response): Boolean {
|
|
128
|
+
// Check for Content-Type
|
|
129
|
+
val skipContentTypes = listOf(
|
|
130
|
+
"text/event-stream", // Server Sent Events
|
|
131
|
+
"text/x-component", // React Server Components
|
|
132
|
+
"audio", // Media might be streaming and not inspectable in DevTools
|
|
133
|
+
"video" // Media might be streaming and not inspectable in DevTools
|
|
134
|
+
)
|
|
135
|
+
val contentType = response.header("Content-Type") ?: ""
|
|
136
|
+
if (skipContentTypes.any { contentType.startsWith(it) }) {
|
|
137
|
+
return false
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// HTTP 1.1 chunked encoding
|
|
141
|
+
val transferEncoding = response.header("Transfer-Encoding")
|
|
142
|
+
if ("chunked".equals(transferEncoding, ignoreCase = true)) {
|
|
143
|
+
return false
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// If Content-Length is known to exceed the limit
|
|
147
|
+
val contentLength = response.header("Content-Length")?.toLong() ?: -1
|
|
148
|
+
return contentLength < 1 || contentLength <= ExpoNetworkInspectOkHttpNetworkInterceptor.MAX_BODY_SIZE
|
|
149
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-modules-core",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.18",
|
|
4
4
|
"description": "The core of Expo Modules architecture",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"@testing-library/react-hooks": "^7.0.1",
|
|
45
45
|
"expo-module-scripts": "^3.0.0"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "5e6538be9ebd87877867d0710029a64c883ca00e"
|
|
48
48
|
}
|