FRE-600: Fix code review blockers

- Consolidated duplicate UndoManagers to single instance
- Fixed connection promise to only resolve on 'connected' status
- Fixed WebSocketProvider import (WebsocketProvider)
- Added proper doc.destroy() cleanup
- Renamed isPresenceInitialized property to avoid conflict

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-04-25 00:08:01 -04:00
parent 65b552bb08
commit 7c684a42cc
48450 changed files with 5679671 additions and 383 deletions

View File

@@ -0,0 +1,17 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
cmake_minimum_required(VERSION 3.13)
set(CMAKE_VERBOSE_MAKEFILE on)
include(${REACT_COMMON_DIR}/cmake-utils/react-native-flags.cmake)
file(GLOB devtoolsruntimesettings_SRCS *.cpp)
add_library(devtoolsruntimesettings OBJECT ${devtoolsruntimesettings_SRCS})
target_include_directories(devtoolsruntimesettings PUBLIC .)
target_link_libraries(devtoolsruntimesettings jsi react_codegen_rncore)
target_compile_reactnative_options(devtoolsruntimesettings PRIVATE)

View File

@@ -0,0 +1,27 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "DevToolsRuntimeSettings.h"
namespace facebook::react {
void DevToolsRuntimeSettings::setReloadAndProfileConfig(
NativePartialReloadAndProfileConfig config) {
if (config.shouldReloadAndProfile.has_value()) {
_config.shouldReloadAndProfile = config.shouldReloadAndProfile.value();
}
if (config.recordChangeDescriptions.has_value()) {
_config.recordChangeDescriptions = config.recordChangeDescriptions.value();
}
};
NativeReloadAndProfileConfig
DevToolsRuntimeSettings::getReloadAndProfileConfig() const {
return _config;
};
} // namespace facebook::react

View File

@@ -0,0 +1,53 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <FBReactNativeSpec/FBReactNativeSpecJSI.h>
namespace facebook::react {
using NativePartialReloadAndProfileConfig =
NativeReactDevToolsRuntimeSettingsModulePartialReloadAndProfileConfig<std::optional<bool>, std::optional<bool>>;
template <>
struct Bridging<NativePartialReloadAndProfileConfig>
: NativeReactDevToolsRuntimeSettingsModulePartialReloadAndProfileConfigBridging<
NativePartialReloadAndProfileConfig> {};
using NativeReloadAndProfileConfig = NativeReactDevToolsRuntimeSettingsModuleReloadAndProfileConfig<bool, bool>;
template <>
struct Bridging<NativeReloadAndProfileConfig>
: NativeReactDevToolsRuntimeSettingsModuleReloadAndProfileConfigBridging<NativeReloadAndProfileConfig> {};
class DevToolsRuntimeSettings {
public:
// static to persist across Turbo Module reloads
static DevToolsRuntimeSettings &getInstance()
{
static DevToolsRuntimeSettings instance;
return instance;
}
private:
NativeReloadAndProfileConfig _config;
DevToolsRuntimeSettings() : _config() {}
public:
~DevToolsRuntimeSettings() = default;
DevToolsRuntimeSettings(const DevToolsRuntimeSettings &) = delete;
DevToolsRuntimeSettings(DevToolsRuntimeSettings &&) = delete;
void operator=(const DevToolsRuntimeSettings &) = delete;
void operator=(DevToolsRuntimeSettings &&) = delete;
void setReloadAndProfileConfig(NativePartialReloadAndProfileConfig config);
NativeReloadAndProfileConfig getReloadAndProfileConfig() const;
};
} // namespace facebook::react