- 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
81 lines
2.4 KiB
Ruby
81 lines
2.4 KiB
Ruby
|
|
module Expo
|
|
|
|
class PackagePod
|
|
|
|
# Name of the pod
|
|
attr_reader :pod_name
|
|
|
|
# The directory where the podspec is
|
|
attr_reader :podspec_dir
|
|
|
|
# Specification of the pod.
|
|
attr_reader :spec
|
|
|
|
def initialize(json)
|
|
@pod_name = json['podName']
|
|
@podspec_dir = json['podspecDir']
|
|
@spec = get_podspec_for_pod(self)
|
|
end
|
|
|
|
# Checks whether the podspec declares support for the given platform.
|
|
# It compares not only the platform name, but also the deployment target.
|
|
def supports_platform?(platform)
|
|
return platform && @spec.available_platforms().any? do |available_platform|
|
|
next platform.supports?(available_platform)
|
|
end
|
|
end
|
|
|
|
end # class PackagePod
|
|
|
|
class Package
|
|
|
|
# Name of the npm package
|
|
attr_reader :name
|
|
|
|
# Version of the npm package
|
|
attr_reader :version
|
|
|
|
# An array of pods found in the package
|
|
attr_reader :pods
|
|
|
|
# Flags to pass to the pod definition
|
|
attr_reader :flags
|
|
|
|
# Class names of the modules that need to be included in the generated modules provider.
|
|
attr_reader :modules
|
|
|
|
# Whether this module should only be added to the debug configuration.
|
|
attr_reader :debugOnly
|
|
|
|
# Names of Swift classes that hooks into `ExpoAppDelegate` to receive AppDelegate life-cycle events.
|
|
attr_reader :appDelegateSubscribers
|
|
|
|
# Names of Swift classes that implement `ExpoReactDelegateHandler` to hook React instance creation.
|
|
attr_reader :reactDelegateHandlers
|
|
|
|
def initialize(json)
|
|
@name = json['packageName']
|
|
@version = json['packageVersion']
|
|
@pods = json['pods'].map { |pod| PackagePod.new(pod) }
|
|
@flags = json.fetch('flags', {})
|
|
@modules = json.fetch('modules', [])
|
|
@debugOnly = json['debugOnly']
|
|
@appDelegateSubscribers = json.fetch('appDelegateSubscribers', [])
|
|
@reactDelegateHandlers = json.fetch('reactDelegateHandlers', [])
|
|
end
|
|
|
|
# Returns a boolean value whether the package has any module, app delegate subscriber or react delegate handler to link.
|
|
def has_something_to_link?
|
|
return !@modules.empty? || !@appDelegateSubscribers.empty? || !@reactDelegateHandlers.empty?
|
|
end
|
|
|
|
end # class Package
|
|
|
|
end # module Expo
|
|
|
|
private def get_podspec_for_pod(pod)
|
|
podspec_file_path = File.join(pod.podspec_dir, pod.pod_name + ".podspec")
|
|
return Pod::Specification.from_file(podspec_file_path)
|
|
end
|