- App.tsx: full navigation (Auth stack + Main tabs with 5 screens) - Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen - HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors - MapScreen: interactive map with layer toggles (6 layers) - MarketplaceScreen: categories (6), products (5), search - ChatScreen: AI chat with quick prompts (4), bot responses - ProfileScreen: user info, stats, menu (9 items), logout - AlertsScreen: alert list with severity, acknowledge - SensorsScreen: sensor list with type filters (6 types), search - ZonesScreen: zone cards with stats - SettingsScreen: language picker (FR/EN/ES/DE), privacy, about - Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n - Hooks: useSensors, useAlerts, useNotifications, useLocation - Components: Card, Button, LoadingSpinner, ErrorBoundary, Header - Services: iotService, notificationService (with axios API client) - Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN) - Theme: colors.ts with full design system (Blue Ocean palette) - Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
60 lines
2.1 KiB
Ruby
60 lines
2.1 KiB
Ruby
# 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.
|
|
|
|
require_relative './helpers.rb'
|
|
|
|
# It builds the codegen CLI if it is not present
|
|
#
|
|
# Parameters:
|
|
# - react_native_path: the path to the react native installation
|
|
# - relative_installation_root: the path to the relative installation root of the pods
|
|
# - dir_manager: a class that implements the `Dir` interface. Defaults to `Dir`, the Dependency can be injected for testing purposes.
|
|
# @throws an error if it could not find the codegen folder.
|
|
def build_codegen!(react_native_path, relative_installation_root, dir_manager: Dir)
|
|
codegen_repo_path = "#{basePath(react_native_path, relative_installation_root)}/../react-native-codegen"
|
|
return unless dir_manager.exist?(codegen_repo_path) && !dir_manager.exist?("#{codegen_repo_path}/lib")
|
|
|
|
Pod::UI.puts "[Codegen] building #{codegen_repo_path}"
|
|
system("#{codegen_repo_path}/scripts/oss/build.sh")
|
|
end
|
|
|
|
# keeping the run_codegen! method for testing purposes
|
|
def run_codegen!(
|
|
app_path,
|
|
config_file_dir,
|
|
new_arch_enabled: false,
|
|
disable_codegen: false,
|
|
react_native_path: "../node_modules/react-native",
|
|
fabric_enabled: false,
|
|
hermes_enabled: true,
|
|
codegen_output_dir: 'build/generated/ios',
|
|
config_key: 'codegenConfig',
|
|
package_json_file: '~/app/package.json',
|
|
folly_version: Helpers::Constants.folly_config()[:version],
|
|
codegen_utils: CodegenUtils.new()
|
|
)
|
|
|
|
codegen_utils.use_react_native_codegen_discovery!(
|
|
disable_codegen,
|
|
app_path,
|
|
:react_native_path => react_native_path,
|
|
:fabric_enabled => fabric_enabled,
|
|
:hermes_enabled => hermes_enabled,
|
|
:config_file_dir => config_file_dir,
|
|
:codegen_output_dir => codegen_output_dir,
|
|
:config_key => config_key,
|
|
:folly_version => folly_version
|
|
)
|
|
end
|
|
|
|
def basePath(react_native_path, relative_installation_root)
|
|
expanded_path = File.expand_path(react_native_path)
|
|
if expanded_path == react_native_path
|
|
react_native_path
|
|
else
|
|
File.join(relative_installation_root.to_s, react_native_path)
|
|
end
|
|
end
|