react-native 0.83.4 → 0.83.6
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/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Utilities/Appearance.js +6 -1
- package/Libraries/Utilities/HMRClient.js +28 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/RCTDevLoadingView.mm +17 -0
- package/React/DevSupport/RCTFrameTimingsObserver.h +24 -0
- package/React/DevSupport/RCTFrameTimingsObserver.mm +298 -0
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +16 -0
- package/ReactAndroid/api/ReactAndroid.api +0 -9
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgelessDevSupportManager.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.kt +7 -7
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/InspectorFlags.kt +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/FrameTimingSequence.kt +16 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/FrameTimingsObserver.kt +275 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/TracingState.kt +17 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/TracingStateListener.kt +15 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/{interfaces → inspector}/TracingStateProvider.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/perfmonitor/PerfMonitorInspectorTargetBinding.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/perfmonitor/PerfMonitorOverlayManager.kt +4 -4
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/perfmonitor/PerfMonitorOverlayView.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/perfmonitor/PerfMonitorUpdateListener.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +13 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +21 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +5 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +5 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +23 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +5 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/tracing/PerformanceTracer.kt +39 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobModule.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkEventUtil.kt +20 -19
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.kt +6 -12
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.kt +86 -4
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImplDevHelper.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostInspectorTarget.kt +10 -6
- package/ReactAndroid/src/main/jni/react/devsupport/JInspectorFlags.cpp +22 -0
- package/ReactAndroid/src/main/jni/react/devsupport/JInspectorFlags.h +2 -0
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +29 -1
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +7 -1
- package/ReactAndroid/src/main/jni/react/runtime/jni/JReactHostInspectorTarget.cpp +196 -17
- package/ReactAndroid/src/main/jni/react/runtime/jni/JReactHostInspectorTarget.h +168 -18
- package/ReactAndroid/src/main/jni/third-party/folly/CMakeLists.txt +1 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- package/ReactCommon/hermes/inspector-modern/chrome/Registration.cpp +44 -2
- package/ReactCommon/jsinspector-modern/HostAgent.cpp +45 -10
- package/ReactCommon/jsinspector-modern/HostAgent.h +2 -2
- package/ReactCommon/jsinspector-modern/HostTarget.cpp +14 -7
- package/ReactCommon/jsinspector-modern/HostTarget.h +101 -14
- package/ReactCommon/jsinspector-modern/HostTargetTraceRecording.cpp +39 -8
- package/ReactCommon/jsinspector-modern/HostTargetTraceRecording.h +42 -5
- package/ReactCommon/jsinspector-modern/HostTargetTracing.cpp +54 -21
- package/ReactCommon/jsinspector-modern/HostTargetTracing.h +89 -0
- package/ReactCommon/jsinspector-modern/InspectorFlags.cpp +12 -0
- package/ReactCommon/jsinspector-modern/InspectorFlags.h +12 -0
- package/ReactCommon/jsinspector-modern/InspectorInterfaces.cpp +3 -7
- package/ReactCommon/jsinspector-modern/InstanceAgent.cpp +2 -11
- package/ReactCommon/jsinspector-modern/NetworkIOAgent.cpp +1 -1
- package/ReactCommon/jsinspector-modern/RuntimeAgent.cpp +19 -0
- package/ReactCommon/jsinspector-modern/RuntimeAgent.h +7 -0
- package/ReactCommon/jsinspector-modern/RuntimeTarget.cpp +33 -0
- package/ReactCommon/jsinspector-modern/RuntimeTarget.h +6 -0
- package/ReactCommon/jsinspector-modern/TracingAgent.cpp +29 -13
- package/ReactCommon/jsinspector-modern/TracingAgent.h +5 -4
- package/ReactCommon/jsinspector-modern/tests/HostTargetTest.cpp +65 -0
- package/ReactCommon/jsinspector-modern/tests/InspectorMocks.h +23 -2
- package/ReactCommon/jsinspector-modern/tests/JsiIntegrationTest.cpp +1 -0
- package/ReactCommon/jsinspector-modern/tests/NetworkReporterTest.cpp +1 -0
- package/ReactCommon/jsinspector-modern/tests/TracingTest.cpp +335 -0
- package/ReactCommon/jsinspector-modern/tests/TracingTest.h +95 -0
- package/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.cpp +10 -0
- package/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.h +3 -1
- package/ReactCommon/jsinspector-modern/tracing/CMakeLists.txt +1 -0
- package/ReactCommon/jsinspector-modern/tracing/FrameTimingSequence.h +61 -0
- package/ReactCommon/jsinspector-modern/tracing/HostTracingProfile.h +43 -0
- package/ReactCommon/jsinspector-modern/tracing/HostTracingProfileSerializer.cpp +165 -0
- package/ReactCommon/jsinspector-modern/tracing/HostTracingProfileSerializer.h +50 -0
- package/ReactCommon/jsinspector-modern/tracing/PerformanceTracer.cpp +16 -14
- package/ReactCommon/jsinspector-modern/tracing/PerformanceTracerSection.h +113 -0
- package/ReactCommon/jsinspector-modern/tracing/React-jsinspectortracing.podspec +1 -0
- package/ReactCommon/jsinspector-modern/tracing/TimeWindowedBuffer.h +158 -0
- package/ReactCommon/jsinspector-modern/tracing/TraceEvent.h +2 -1
- package/ReactCommon/jsinspector-modern/tracing/TraceEventGenerator.cpp +100 -0
- package/ReactCommon/jsinspector-modern/tracing/TraceEventGenerator.h +60 -0
- package/ReactCommon/jsinspector-modern/tracing/TraceEventSerializer.cpp +44 -1
- package/ReactCommon/jsinspector-modern/tracing/TraceEventSerializer.h +7 -0
- package/ReactCommon/jsinspector-modern/tracing/TraceRecordingState.h +18 -7
- package/ReactCommon/jsinspector-modern/tracing/TracingCategory.h +136 -0
- package/ReactCommon/jsinspector-modern/tracing/tests/TimeWindowedBufferTest.cpp +352 -0
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +9 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +11 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +65 -29
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +6 -2
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +9 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +19 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +3 -1
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm +3 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +11 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +5 -1
- package/ReactCommon/react/performance/timeline/PerformanceObserver.cpp +18 -6
- package/ReactCommon/react/performance/timeline/PerformanceObserver.h +2 -0
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm +115 -0
- package/ReactCommon/{jsinspector-modern → react/utils}/Base64.h +2 -2
- package/gradle/libs.versions.toml +1 -1
- package/package.json +10 -10
- package/scripts/cocoapods/utils.rb +1 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +11 -1
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +3 -1
- package/third-party-podspecs/RCT-Folly.podspec +1 -1
- package/third-party-podspecs/fmt.podspec +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/TracingState.kt +0 -19
- package/ReactCommon/jsinspector-modern/tracing/TraceRecordingStateSerializer.cpp +0 -68
- package/ReactCommon/jsinspector-modern/tracing/TraceRecordingStateSerializer.h +0 -42
- package/ReactCommon/jsinspector-modern/tracing/TracingState.h +0 -24
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
#import <React/RCTConvert.h>
|
|
14
14
|
#import <React/RCTDevMenu.h>
|
|
15
15
|
#import <React/RCTFabricSurface.h>
|
|
16
|
+
#import <React/RCTFrameTimingsObserver.h>
|
|
16
17
|
#import <React/RCTInspectorDevServerHelper.h>
|
|
17
18
|
#import <React/RCTInspectorNetworkHelper.h>
|
|
18
19
|
#import <React/RCTInspectorUtils.h>
|
|
@@ -37,12 +38,52 @@ using namespace facebook::react;
|
|
|
37
38
|
@property (nonatomic, readonly) jsinspector_modern::HostTarget *inspectorTarget;
|
|
38
39
|
@end
|
|
39
40
|
|
|
41
|
+
#if TARGET_OS_IPHONE && defined(REACT_NATIVE_DEBUGGER_ENABLED)
|
|
42
|
+
class RCTHostTracingDelegate : public jsinspector_modern::HostTargetTracingDelegate {
|
|
43
|
+
public:
|
|
44
|
+
explicit RCTHostTracingDelegate(RCTHost *host) : host_(host) {}
|
|
45
|
+
|
|
46
|
+
void onTracingStarted(jsinspector_modern::tracing::Mode /*tracingMode*/, bool screenshotsCategoryEnabled) override
|
|
47
|
+
{
|
|
48
|
+
RCTHost *host = host_;
|
|
49
|
+
if (host == nil || host.inspectorTarget == nullptr) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
__weak RCTHost *weakHost = host;
|
|
53
|
+
|
|
54
|
+
observer_ = [[RCTFrameTimingsObserver alloc]
|
|
55
|
+
initWithScreenshotsEnabled:screenshotsCategoryEnabled
|
|
56
|
+
callback:^(jsinspector_modern::tracing::FrameTimingSequence sequence) {
|
|
57
|
+
RCTHost *strongHost = weakHost;
|
|
58
|
+
if (strongHost != nil && strongHost.inspectorTarget != nullptr) {
|
|
59
|
+
strongHost.inspectorTarget->recordFrameTimings(std::move(sequence));
|
|
60
|
+
}
|
|
61
|
+
}];
|
|
62
|
+
[observer_ start];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
void onTracingStopped() override
|
|
66
|
+
{
|
|
67
|
+
[observer_ stop];
|
|
68
|
+
observer_ = nil;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
private:
|
|
72
|
+
__weak RCTHost *host_;
|
|
73
|
+
RCTFrameTimingsObserver *observer_{nil};
|
|
74
|
+
};
|
|
75
|
+
#endif
|
|
76
|
+
|
|
40
77
|
class RCTHostHostTargetDelegate : public facebook::react::jsinspector_modern::HostTargetDelegate {
|
|
41
78
|
public:
|
|
42
79
|
RCTHostHostTargetDelegate(RCTHost *host)
|
|
43
80
|
: host_(host),
|
|
44
81
|
pauseOverlayController_([[RCTPausedInDebuggerOverlayController alloc] init]),
|
|
45
82
|
networkHelper_([[RCTInspectorNetworkHelper alloc] init])
|
|
83
|
+
#if TARGET_OS_IPHONE && defined(REACT_NATIVE_DEBUGGER_ENABLED)
|
|
84
|
+
,
|
|
85
|
+
tracingDelegate_(host)
|
|
86
|
+
#endif
|
|
46
87
|
{
|
|
47
88
|
}
|
|
48
89
|
|
|
@@ -100,10 +141,84 @@ class RCTHostHostTargetDelegate : public facebook::react::jsinspector_modern::Ho
|
|
|
100
141
|
[networkHelper_ loadNetworkResourceWithParams:params executor:executor];
|
|
101
142
|
}
|
|
102
143
|
|
|
144
|
+
#if TARGET_OS_IPHONE && defined(REACT_NATIVE_DEBUGGER_ENABLED)
|
|
145
|
+
std::optional<std::string> captureScreenshot(const PageCaptureScreenshotRequest &request) override
|
|
146
|
+
{
|
|
147
|
+
UIWindow *keyWindow = nil;
|
|
148
|
+
for (UIScene *scene in UIApplication.sharedApplication.connectedScenes) {
|
|
149
|
+
if (scene.activationState == UISceneActivationStateForegroundActive &&
|
|
150
|
+
[scene isKindOfClass:[UIWindowScene class]]) {
|
|
151
|
+
auto *windowScene = (UIWindowScene *)scene;
|
|
152
|
+
for (UIWindow *win in windowScene.windows) {
|
|
153
|
+
if (win.isKeyWindow) {
|
|
154
|
+
keyWindow = win;
|
|
155
|
+
break;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (keyWindow != nil) {
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (keyWindow == nil) {
|
|
165
|
+
return std::nullopt;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
UIView *rootView = keyWindow.rootViewController.view != nil ? keyWindow.rootViewController.view : keyWindow;
|
|
169
|
+
CGSize viewSize = rootView.bounds.size;
|
|
170
|
+
|
|
171
|
+
UIGraphicsImageRendererFormat *format = [UIGraphicsImageRendererFormat defaultFormat];
|
|
172
|
+
format.scale = 1.0;
|
|
173
|
+
UIGraphicsImageRenderer *renderer = [[UIGraphicsImageRenderer alloc] initWithSize:viewSize format:format];
|
|
174
|
+
|
|
175
|
+
UIImage *image = [renderer imageWithActions:^(UIGraphicsImageRendererContext *context) {
|
|
176
|
+
[rootView drawViewHierarchyInRect:CGRectMake(0, 0, viewSize.width, viewSize.height) afterScreenUpdates:NO];
|
|
177
|
+
}];
|
|
178
|
+
|
|
179
|
+
if (image == nil) {
|
|
180
|
+
return std::nullopt;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
NSData *encodedData = nil;
|
|
184
|
+
std::string formatStr = request.format.value_or("png");
|
|
185
|
+
|
|
186
|
+
if (formatStr == "jpeg") {
|
|
187
|
+
CGFloat quality = request.quality.has_value() ? (*request.quality / 100.0) : 0.8;
|
|
188
|
+
encodedData = UIImageJPEGRepresentation(image, quality);
|
|
189
|
+
} else {
|
|
190
|
+
// Default to PNG for "png" and "webp" (WebP encoding not available via UIKit)
|
|
191
|
+
encodedData = UIImagePNGRepresentation(image);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if (encodedData == nil) {
|
|
195
|
+
return std::nullopt;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
NSString *base64String = [encodedData base64EncodedStringWithOptions:0];
|
|
199
|
+
return std::string([base64String UTF8String]);
|
|
200
|
+
}
|
|
201
|
+
#endif
|
|
202
|
+
|
|
203
|
+
#if TARGET_OS_IPHONE && defined(REACT_NATIVE_DEBUGGER_ENABLED)
|
|
204
|
+
jsinspector_modern::HostTargetTracingDelegate *getTracingDelegate() override
|
|
205
|
+
{
|
|
206
|
+
auto &inspectorFlags = jsinspector_modern::InspectorFlags::getInstance();
|
|
207
|
+
if (!inspectorFlags.getFrameRecordingEnabled()) {
|
|
208
|
+
return nullptr;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return &tracingDelegate_;
|
|
212
|
+
}
|
|
213
|
+
#endif
|
|
214
|
+
|
|
103
215
|
private:
|
|
104
216
|
__weak RCTHost *host_;
|
|
105
217
|
RCTPausedInDebuggerOverlayController *pauseOverlayController_;
|
|
106
218
|
RCTInspectorNetworkHelper *networkHelper_;
|
|
219
|
+
#if TARGET_OS_IPHONE && defined(REACT_NATIVE_DEBUGGER_ENABLED)
|
|
220
|
+
RCTHostTracingDelegate tracingDelegate_;
|
|
221
|
+
#endif
|
|
107
222
|
};
|
|
108
223
|
|
|
109
224
|
@implementation RCTHost {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
#include <string>
|
|
11
11
|
#include <string_view>
|
|
12
12
|
|
|
13
|
-
namespace facebook::react
|
|
13
|
+
namespace facebook::react {
|
|
14
14
|
|
|
15
15
|
namespace {
|
|
16
16
|
// Vendored from Folly
|
|
@@ -96,4 +96,4 @@ inline std::string base64Encode(const std::string_view s)
|
|
|
96
96
|
return res;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
} // namespace facebook::react
|
|
99
|
+
} // namespace facebook::react
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.83.
|
|
3
|
+
"version": "0.83.6",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -160,13 +160,13 @@
|
|
|
160
160
|
},
|
|
161
161
|
"dependencies": {
|
|
162
162
|
"@jest/create-cache-key-function": "^29.7.0",
|
|
163
|
-
"@react-native/assets-registry": "0.83.
|
|
164
|
-
"@react-native/codegen": "0.83.
|
|
165
|
-
"@react-native/community-cli-plugin": "0.83.
|
|
166
|
-
"@react-native/gradle-plugin": "0.83.
|
|
167
|
-
"@react-native/js-polyfills": "0.83.
|
|
168
|
-
"@react-native/normalize-colors": "0.83.
|
|
169
|
-
"@react-native/virtualized-lists": "0.83.
|
|
163
|
+
"@react-native/assets-registry": "0.83.6",
|
|
164
|
+
"@react-native/codegen": "0.83.6",
|
|
165
|
+
"@react-native/community-cli-plugin": "0.83.6",
|
|
166
|
+
"@react-native/gradle-plugin": "0.83.6",
|
|
167
|
+
"@react-native/js-polyfills": "0.83.6",
|
|
168
|
+
"@react-native/normalize-colors": "0.83.6",
|
|
169
|
+
"@react-native/virtualized-lists": "0.83.6",
|
|
170
170
|
"abort-controller": "^3.0.0",
|
|
171
171
|
"anser": "^1.4.9",
|
|
172
172
|
"ansi-regex": "^5.0.0",
|
|
@@ -180,8 +180,8 @@
|
|
|
180
180
|
"invariant": "^2.2.4",
|
|
181
181
|
"jest-environment-node": "^29.7.0",
|
|
182
182
|
"memoize-one": "^5.0.0",
|
|
183
|
-
"metro-runtime": "^0.83.
|
|
184
|
-
"metro-source-map": "^0.83.
|
|
183
|
+
"metro-runtime": "^0.83.6",
|
|
184
|
+
"metro-source-map": "^0.83.6",
|
|
185
185
|
"nullthrows": "^1.1.1",
|
|
186
186
|
"pretty-format": "^29.7.0",
|
|
187
187
|
"promise": "^8.3.0",
|
|
@@ -61,6 +61,7 @@ class ReactNativePodsUtils
|
|
|
61
61
|
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-jsinspectornetwork", :debug)
|
|
62
62
|
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-RCTNetwork", :debug)
|
|
63
63
|
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-networking", :debug)
|
|
64
|
+
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-RuntimeApple", :debug)
|
|
64
65
|
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1", "React-jsinspector", :debug)
|
|
65
66
|
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1", "React-jsinspectornetwork", :debug)
|
|
66
67
|
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1", "React-RCTNetwork", :debug)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<075c9fd7af1eab0ffdde75a05daa8cac>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
* @noformat
|
|
10
10
|
*/
|
|
@@ -107,7 +107,9 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
107
107
|
fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean>,
|
|
108
108
|
fuseboxAssertSingleHostState: Getter<boolean>,
|
|
109
109
|
fuseboxEnabledRelease: Getter<boolean>,
|
|
110
|
+
fuseboxFrameRecordingEnabled: Getter<boolean>,
|
|
110
111
|
fuseboxNetworkInspectionEnabled: Getter<boolean>,
|
|
112
|
+
fuseboxScreenshotCaptureEnabled: Getter<boolean>,
|
|
111
113
|
hideOffscreenVirtualViewsOnIOS: Getter<boolean>,
|
|
112
114
|
overrideBySynchronousMountPropsAtMountingAndroid: Getter<boolean>,
|
|
113
115
|
perfIssuesEnabled: Getter<boolean>,
|
|
@@ -444,10 +446,18 @@ export const fuseboxAssertSingleHostState: Getter<boolean> = createNativeFlagGet
|
|
|
444
446
|
* Flag determining if the React Native DevTools (Fusebox) CDP backend should be enabled in release builds. This flag is global and should not be changed across React Host lifetimes.
|
|
445
447
|
*/
|
|
446
448
|
export const fuseboxEnabledRelease: Getter<boolean> = createNativeFlagGetter('fuseboxEnabledRelease', false);
|
|
449
|
+
/**
|
|
450
|
+
* Enable frame timings and screenshots support in the React Native DevTools CDP backend. This flag is global and should not be changed across React Host lifetimes.
|
|
451
|
+
*/
|
|
452
|
+
export const fuseboxFrameRecordingEnabled: Getter<boolean> = createNativeFlagGetter('fuseboxFrameRecordingEnabled', false);
|
|
447
453
|
/**
|
|
448
454
|
* Enable network inspection support in the React Native DevTools CDP backend. Requires `enableBridgelessArchitecture`. This flag is global and should not be changed across React Host lifetimes.
|
|
449
455
|
*/
|
|
450
456
|
export const fuseboxNetworkInspectionEnabled: Getter<boolean> = createNativeFlagGetter('fuseboxNetworkInspectionEnabled', true);
|
|
457
|
+
/**
|
|
458
|
+
* Enable Page.captureScreenshot CDP method support in the React Native DevTools CDP backend. This flag is global and should not be changed across React Host lifetimes.
|
|
459
|
+
*/
|
|
460
|
+
export const fuseboxScreenshotCaptureEnabled: Getter<boolean> = createNativeFlagGetter('fuseboxScreenshotCaptureEnabled', false);
|
|
451
461
|
/**
|
|
452
462
|
* Hides offscreen VirtualViews on iOS by setting hidden = YES to avoid extra cost of views
|
|
453
463
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<aa35c6393540204037785af5833bb442>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
* @noformat
|
|
10
10
|
*/
|
|
@@ -82,7 +82,9 @@ export interface Spec extends TurboModule {
|
|
|
82
82
|
+fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean;
|
|
83
83
|
+fuseboxAssertSingleHostState?: () => boolean;
|
|
84
84
|
+fuseboxEnabledRelease?: () => boolean;
|
|
85
|
+
+fuseboxFrameRecordingEnabled?: () => boolean;
|
|
85
86
|
+fuseboxNetworkInspectionEnabled?: () => boolean;
|
|
87
|
+
+fuseboxScreenshotCaptureEnabled?: () => boolean;
|
|
86
88
|
+hideOffscreenVirtualViewsOnIOS?: () => boolean;
|
|
87
89
|
+overrideBySynchronousMountPropsAtMountingAndroid?: () => boolean;
|
|
88
90
|
+perfIssuesEnabled?: () => boolean;
|
|
@@ -25,7 +25,7 @@ Pod::Spec.new do |spec|
|
|
|
25
25
|
spec.dependency "DoubleConversion"
|
|
26
26
|
spec.dependency "glog"
|
|
27
27
|
spec.dependency "fast_float", "8.0.0"
|
|
28
|
-
spec.dependency "fmt", "
|
|
28
|
+
spec.dependency "fmt", "12.1.0"
|
|
29
29
|
spec.compiler_flags = '-Wno-documentation -faligned-new'
|
|
30
30
|
spec.source_files = 'folly/String.cpp',
|
|
31
31
|
'folly/Conv.cpp',
|
|
@@ -8,14 +8,14 @@ fmt_git_url = fmt_config[:git]
|
|
|
8
8
|
|
|
9
9
|
Pod::Spec.new do |spec|
|
|
10
10
|
spec.name = "fmt"
|
|
11
|
-
spec.version = "
|
|
11
|
+
spec.version = "12.1.0"
|
|
12
12
|
spec.license = { :type => "MIT" }
|
|
13
13
|
spec.homepage = "https://github.com/fmtlib/fmt"
|
|
14
14
|
spec.summary = "{fmt} is an open-source formatting library for C++. It can be used as a safe and fast alternative to (s)printf and iostreams."
|
|
15
15
|
spec.authors = "The fmt contributors"
|
|
16
16
|
spec.source = {
|
|
17
17
|
:git => fmt_git_url,
|
|
18
|
-
:tag => "
|
|
18
|
+
:tag => "12.1.0"
|
|
19
19
|
}
|
|
20
20
|
spec.pod_target_xcconfig = {
|
|
21
21
|
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
package com.facebook.react.devsupport.interfaces
|
|
9
|
-
|
|
10
|
-
import com.facebook.proguard.annotations.DoNotStripAny
|
|
11
|
-
|
|
12
|
-
// Keep in sync with `TracingState.h`
|
|
13
|
-
// JNI wrapper for `jsinspector_modern::Tracing::TracingState`.
|
|
14
|
-
@DoNotStripAny
|
|
15
|
-
public enum class TracingState {
|
|
16
|
-
DISABLED, // There is no active trace
|
|
17
|
-
ENABLEDINBACKGROUNDMODE, // Trace is currently running in background mode
|
|
18
|
-
ENABLEDINCDPMODE, // Trace is currently running in CDP mode
|
|
19
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#include "TraceRecordingStateSerializer.h"
|
|
9
|
-
#include "RuntimeSamplingProfileTraceEventSerializer.h"
|
|
10
|
-
#include "TraceEventSerializer.h"
|
|
11
|
-
|
|
12
|
-
namespace facebook::react::jsinspector_modern::tracing {
|
|
13
|
-
|
|
14
|
-
namespace {
|
|
15
|
-
|
|
16
|
-
folly::dynamic generateNewChunk(uint16_t chunkSize) {
|
|
17
|
-
folly::dynamic chunk = folly::dynamic::array();
|
|
18
|
-
chunk.reserve(chunkSize);
|
|
19
|
-
|
|
20
|
-
return chunk;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
} // namespace
|
|
24
|
-
|
|
25
|
-
/* static */ void TraceRecordingStateSerializer::emitAsDataCollectedChunks(
|
|
26
|
-
TraceRecordingState&& recording,
|
|
27
|
-
const std::function<void(folly::dynamic&&)>& chunkCallback,
|
|
28
|
-
uint16_t performanceTraceEventsChunkSize,
|
|
29
|
-
uint16_t profileTraceEventsChunkSize) {
|
|
30
|
-
auto instancesProfiles = std::move(recording.instanceTracingProfiles);
|
|
31
|
-
IdGenerator profileIdGenerator;
|
|
32
|
-
|
|
33
|
-
for (auto& instanceProfile : instancesProfiles) {
|
|
34
|
-
emitPerformanceTraceEvents(
|
|
35
|
-
std::move(instanceProfile.performanceTraceEvents),
|
|
36
|
-
chunkCallback,
|
|
37
|
-
performanceTraceEventsChunkSize);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
RuntimeSamplingProfileTraceEventSerializer::serializeAndDispatch(
|
|
41
|
-
std::move(recording.runtimeSamplingProfiles),
|
|
42
|
-
profileIdGenerator,
|
|
43
|
-
recording.startTime,
|
|
44
|
-
chunkCallback,
|
|
45
|
-
profileTraceEventsChunkSize);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/* static */ void TraceRecordingStateSerializer::emitPerformanceTraceEvents(
|
|
49
|
-
std::vector<TraceEvent>&& events,
|
|
50
|
-
const std::function<void(folly::dynamic&&)>& chunkCallback,
|
|
51
|
-
uint16_t chunkSize) {
|
|
52
|
-
folly::dynamic chunk = generateNewChunk(chunkSize);
|
|
53
|
-
|
|
54
|
-
for (auto& event : events) {
|
|
55
|
-
if (chunk.size() == chunkSize) {
|
|
56
|
-
chunkCallback(std::move(chunk));
|
|
57
|
-
chunk = generateNewChunk(chunkSize);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
chunk.push_back(TraceEventSerializer::serialize(std::move(event)));
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
if (!chunk.empty()) {
|
|
64
|
-
chunkCallback(std::move(chunk));
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
} // namespace facebook::react::jsinspector_modern::tracing
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#pragma once
|
|
9
|
-
|
|
10
|
-
#include "TraceEvent.h"
|
|
11
|
-
#include "TraceRecordingState.h"
|
|
12
|
-
|
|
13
|
-
#include <folly/dynamic.h>
|
|
14
|
-
#include <vector>
|
|
15
|
-
|
|
16
|
-
namespace facebook::react::jsinspector_modern::tracing {
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* A serializer for TraceRecordingState that can be used for tranforming the
|
|
20
|
-
* recording into sequence of serialized Trace Events.
|
|
21
|
-
*/
|
|
22
|
-
class TraceRecordingStateSerializer {
|
|
23
|
-
public:
|
|
24
|
-
/**
|
|
25
|
-
* Transforms the recording into a sequence of serialized Trace Events, which
|
|
26
|
-
* is split in chunks of sizes \p performanceTraceEventsChunkSize or
|
|
27
|
-
* \p profileTraceEventsChunkSize, depending on type, and sent with \p
|
|
28
|
-
* chunkCallback.
|
|
29
|
-
*/
|
|
30
|
-
static void emitAsDataCollectedChunks(
|
|
31
|
-
TraceRecordingState &&recording,
|
|
32
|
-
const std::function<void(folly::dynamic &&chunk)> &chunkCallback,
|
|
33
|
-
uint16_t performanceTraceEventsChunkSize,
|
|
34
|
-
uint16_t profileTraceEventsChunkSize);
|
|
35
|
-
|
|
36
|
-
static void emitPerformanceTraceEvents(
|
|
37
|
-
std::vector<TraceEvent> &&events,
|
|
38
|
-
const std::function<void(folly::dynamic &&chunk)> &chunkCallback,
|
|
39
|
-
uint16_t chunkSize);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
} // namespace facebook::react::jsinspector_modern::tracing
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#pragma once
|
|
9
|
-
|
|
10
|
-
#include <cstdint>
|
|
11
|
-
|
|
12
|
-
namespace facebook::react::jsinspector_modern::tracing {
|
|
13
|
-
|
|
14
|
-
// Keep in sync with `TracingState.kt`
|
|
15
|
-
enum class TracingState : int32_t {
|
|
16
|
-
// There is no active trace
|
|
17
|
-
Disabled = 0,
|
|
18
|
-
// Trace is currently running in background mode
|
|
19
|
-
EnabledInBackgroundMode = 1,
|
|
20
|
-
// Trace is currently running in CDP mode
|
|
21
|
-
EnabledInCDPMode = 2,
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
} // namespace facebook::react::jsinspector_modern::tracing
|