mirror of
https://github.com/hanzoai/gui.git
synced 2026-10-25 02:31:41 +00:00
This repo could never sync. There was NO merge-base with tamagui — 372 commits
here against 15,791 there, unrelated histories — because it began as a
copy-paste rebrand with a flattened layout. Every "sync" since was a hand
re-application that drifted, which is why the tree sat on 7.3.1 while upstream
shipped fixes we then rediscovered by hand.
This commit's PARENT IS TAMAGUI. A future sync is `git merge tama/main` then
`node scripts/rebrand.mjs` — a real merge, because the history is now shared.
174 packages: 166 upstream, our 8 restored (chrome, shell, telemetry, recipes,
get, font-geist-{sans,mono}, @hanzo/booker), bento-get gained. 170/170 build.
Our patches to files UPSTREAM ALSO OWNS are carried, which the package-level
delta missed and which was where the value actually was:
- useMedia's server snapshot (`initState ?? getMedia()`). Upstream still
returns undefined there, so every Tamagui Dialog kills a prerender — the
exact crash hanzo.app spent a day on.
- data-slot on web host nodes, absent upstream entirely.
Both applied ONTO upstream's newer files (it rewrote useMedia +150/-63 and
createComponent +160/-55), marked `PATCH (ours, carried across the transplant)`.
Seven traps are encoded in scripts/rebrand.mjs, each found by a gate:
skip itself and lockfiles; special-case the double-branded names in BOTH scoped
and bare form; map path strings, not just paths; drop a level for the flattened
group; check disk rather than a stale index.
Rust build artifacts are NOT committed. An earlier draft of this commit swept
apps/desktop/src-tauri/target/debug in via `git add -A` — 3,859 files including
a 272MB .a, over GitHub's 100MB cap, so the push could never have landed. They
are gitignored now.
Co-Authored-By: Hanzo Dev <[email protected]>
76 lines
3.0 KiB
Ruby
76 lines
3.0 KiB
Ruby
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
|
|
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
|
|
|
|
require 'json'
|
|
podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {}
|
|
|
|
def ccache_enabled?(podfile_properties)
|
|
# Environment variable takes precedence
|
|
return ENV['USE_CCACHE'] == '1' if ENV['USE_CCACHE']
|
|
|
|
# Fall back to Podfile properties
|
|
podfile_properties['apple.ccacheEnabled'] == 'true'
|
|
end
|
|
|
|
ENV['RCT_NEW_ARCH_ENABLED'] ||= '0' if podfile_properties['newArchEnabled'] == 'false'
|
|
ENV['EX_DEV_CLIENT_NETWORK_INSPECTOR'] ||= podfile_properties['EX_DEV_CLIENT_NETWORK_INSPECTOR']
|
|
ENV['RCT_USE_RN_DEP'] ||= '1' if podfile_properties['ios.buildReactNativeFromSource'] != 'true' && podfile_properties['newArchEnabled'] != 'false'
|
|
ENV['RCT_USE_PREBUILT_RNCORE'] ||= '1' if podfile_properties['ios.buildReactNativeFromSource'] != 'true' && podfile_properties['newArchEnabled'] != 'false'
|
|
platform :ios, podfile_properties['ios.deploymentTarget'] || '15.1'
|
|
|
|
prepare_react_native_project!
|
|
|
|
target 'kitchensinkgo' do
|
|
use_expo_modules!
|
|
|
|
if ENV['EXPO_USE_COMMUNITY_AUTOLINKING'] == '1'
|
|
config_command = ['node', '-e', "process.argv=['', '', 'config'];require('@react-native-community/cli').run()"];
|
|
else
|
|
config_command = [
|
|
'node',
|
|
'--no-warnings',
|
|
'--eval',
|
|
'require(\'expo/bin/autolinking\')',
|
|
'expo-modules-autolinking',
|
|
'react-native-config',
|
|
'--json',
|
|
'--platform',
|
|
'ios'
|
|
]
|
|
end
|
|
|
|
config = use_native_modules!(config_command)
|
|
|
|
use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']
|
|
use_frameworks! :linkage => ENV['USE_FRAMEWORKS'].to_sym if ENV['USE_FRAMEWORKS']
|
|
|
|
use_react_native!(
|
|
:path => config[:reactNativePath],
|
|
:hermes_enabled => podfile_properties['expo.jsEngine'] == nil || podfile_properties['expo.jsEngine'] == 'hermes',
|
|
# An absolute path to your application root.
|
|
:app_path => "#{Pod::Config.instance.installation_root}/..",
|
|
:privacy_file_aggregation_enabled => podfile_properties['apple.privacyManifestAggregationEnabled'] != 'false',
|
|
)
|
|
|
|
post_install do |installer|
|
|
react_native_post_install(
|
|
installer,
|
|
config[:reactNativePath],
|
|
:mac_catalyst_enabled => false,
|
|
:ccache_enabled => ccache_enabled?(podfile_properties),
|
|
)
|
|
|
|
# workaround: expo-modules-core 55.x requires Swift 6 strict concurrency
|
|
# which is incompatible with current Xcode versions in CI
|
|
installer.pods_project.targets.each do |target|
|
|
if target.name == 'ExpoModulesCore'
|
|
target.build_configurations.each do |build_config|
|
|
build_config.build_settings['SWIFT_VERSION'] = '5.10'
|
|
build_config.build_settings['SWIFT_STRICT_CONCURRENCY'] = 'minimal'
|
|
build_config.build_settings['SWIFT_COMPILATION_MODE'] = 'singlefile'
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|