expo-modules-core 1.12.17 → 1.12.19
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,19 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 1.12.19 — 2024-07-11
|
|
14
|
+
|
|
15
|
+
### 💡 Others
|
|
16
|
+
|
|
17
|
+
- [iOS] Added `customizeRootView:` support to `EXAppDelegateWrapper.createRCTRootViewFactory`. ([#30245](https://github.com/expo/expo/pull/30245) by [@kudo](https://github.com/kudo))
|
|
18
|
+
|
|
19
|
+
## 1.12.18 — 2024-06-28
|
|
20
|
+
|
|
21
|
+
### 🐛 Bug fixes
|
|
22
|
+
|
|
23
|
+
- Fixed `RCTTriggerReloadCommandListeners` not found build error on iOS. ([#30014](https://github.com/expo/expo/pull/30014) by [@kudo](https://github.com/kudo))
|
|
24
|
+
- Fixed blocking SSE responses from network interceptor on Android. ([#30062](https://github.com/expo/expo/pull/30062) by [@kudo](https://github.com/kudo))
|
|
25
|
+
|
|
13
26
|
## 1.12.17 — 2024-06-27
|
|
14
27
|
|
|
15
28
|
### 🐛 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.19'
|
|
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.19"
|
|
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
|
+
}
|
|
@@ -17,6 +17,12 @@
|
|
|
17
17
|
@interface RCTAppDelegate () <RCTTurboModuleManagerDelegate>
|
|
18
18
|
@end
|
|
19
19
|
|
|
20
|
+
@interface RCTRootViewFactoryConfiguration ()
|
|
21
|
+
|
|
22
|
+
- (void)setCustomizeRootView:(void (^)(UIView *rootView))customizeRootView;
|
|
23
|
+
|
|
24
|
+
@end
|
|
25
|
+
|
|
20
26
|
@interface EXAppDelegateWrapper()
|
|
21
27
|
|
|
22
28
|
@property (nonatomic, strong) EXReactDelegateWrapper *reactDelegate;
|
|
@@ -73,13 +79,18 @@
|
|
|
73
79
|
|
|
74
80
|
- (RCTRootViewFactory *)createRCTRootViewFactory
|
|
75
81
|
{
|
|
82
|
+
__weak __typeof(self) weakSelf = self;
|
|
83
|
+
RCTBundleURLBlock bundleUrlBlock = ^{
|
|
84
|
+
RCTAppDelegate *strongSelf = weakSelf;
|
|
85
|
+
return strongSelf.bundleURL;
|
|
86
|
+
};
|
|
87
|
+
|
|
76
88
|
RCTRootViewFactoryConfiguration *configuration =
|
|
77
|
-
[[RCTRootViewFactoryConfiguration alloc]
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
89
|
+
[[RCTRootViewFactoryConfiguration alloc] initWithBundleURLBlock:bundleUrlBlock
|
|
90
|
+
newArchEnabled:self.fabricEnabled
|
|
91
|
+
turboModuleEnabled:self.turboModuleEnabled
|
|
92
|
+
bridgelessEnabled:self.bridgelessEnabled];
|
|
81
93
|
|
|
82
|
-
__weak __typeof(self) weakSelf = self;
|
|
83
94
|
configuration.createRootViewWithBridge = ^UIView *(RCTBridge *bridge, NSString *moduleName, NSDictionary *initProps)
|
|
84
95
|
{
|
|
85
96
|
return [weakSelf createRootViewWithBridge:bridge moduleName:moduleName initProps:initProps];
|
|
@@ -90,6 +101,13 @@
|
|
|
90
101
|
return [weakSelf createBridgeWithDelegate:delegate launchOptions:launchOptions];
|
|
91
102
|
};
|
|
92
103
|
|
|
104
|
+
// TODO(kudo,20240706): Remove respondsToSelector and set the property directly when we upgrade to react-native 0.75
|
|
105
|
+
if ([configuration respondsToSelector:@selector(setCustomizeRootView:)]) {
|
|
106
|
+
[configuration setCustomizeRootView:^(UIView *_Nonnull rootView) {
|
|
107
|
+
[weakSelf customizeRootView:(RCTRootView *)rootView];
|
|
108
|
+
}];
|
|
109
|
+
}
|
|
110
|
+
|
|
93
111
|
return [[EXReactRootViewFactory alloc] initWithReactDelegate:self.reactDelegate configuration:configuration turboModuleManagerDelegate:self];
|
|
94
112
|
}
|
|
95
113
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-modules-core",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.19",
|
|
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": "f83423bebc947ad7e328daaa56b2e327912ae580"
|
|
48
48
|
}
|