From 69caf1feb58ad03d4856e97cbdaae6b28c879eae Mon Sep 17 00:00:00 2001 From: artus9033 Date: Wed, 10 Dec 2025 21:10:20 +0100 Subject: [PATCH 01/72] chore: move RN CLI example app to dedicated folder --- .github/workflows/build.yml | 6 +- .gitignore | 2 +- docs/JAVA.md | 2 +- docs/KOTLIN.md | 2 +- docs/SWIFT.md | 2 +- example/{ => react-native-cli}/App.tsx | 0 .../{ => react-native-cli}/babel.config.cjs | 0 example/{ => react-native-cli}/index.js | 0 .../{ => react-native-cli}/kotlin/.gitignore | 0 .../{ => react-native-cli}/kotlin/.project | 0 .../org.eclipse.buildship.core.prefs | 0 .../kotlin/app/.gitignore | 0 .../kotlin/app/build.gradle | 0 .../kotlin/app/proguard-rules.pro | 0 .../kotlinexample/ExampleInstrumentedTest.kt | 0 .../kotlin/app/src/debug/AndroidManifest.xml | 0 .../kotlin/app/src/main/AndroidManifest.xml | 0 .../callstack/kotlinexample/MainActivity.kt | 0 .../kotlinexample/MainApplication.kt | 0 .../ReactNativeFragmentActivity.kt | 0 .../app/src/main/res/anim/slide_fade_in.xml | 0 .../drawable-v24/ic_launcher_foreground.xml | 0 .../res/drawable/ic_launcher_background.xml | 0 .../app/src/main/res/layout/activity_main.xml | 0 .../layout/activity_react_native_fragment.xml | 0 .../res/mipmap-anydpi-v26/ic_launcher.xml | 0 .../mipmap-anydpi-v26/ic_launcher_round.xml | 0 .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin .../res/mipmap-hdpi/ic_launcher_round.png | Bin .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin .../res/mipmap-mdpi/ic_launcher_round.png | Bin .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin .../res/mipmap-xhdpi/ic_launcher_round.png | Bin .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin .../kotlin/app/src/main/res/values/colors.xml | 0 .../app/src/main/res/values/strings.xml | 0 .../kotlin/app/src/main/res/values/styles.xml | 0 .../kotlinexample/ExampleUnitTest.kt | 0 .../kotlin/build.gradle | 0 .../kotlin/gradle.properties | 0 .../kotlin/gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 example/{ => react-native-cli}/kotlin/gradlew | 0 .../{ => react-native-cli}/kotlin/gradlew.bat | 0 .../kotlin/settings.gradle | 0 .../{ => react-native-cli}/metro.config.cjs | 0 example/{ => react-native-cli}/package.json | 0 .../react-native.config.js | 0 .../{ => react-native-cli}/swift/.xcode.env | 0 .../{ => react-native-cli}/swift/App.swift | 0 .../AppIcon.appiconset/Contents.json | 0 .../swift/Assets.xcassets/Contents.json | 0 .../swift/Base.lproj/LaunchScreen.storyboard | 0 .../{ => react-native-cli}/swift/Info.plist | 0 example/{ => react-native-cli}/swift/Podfile | 0 .../{ => react-native-cli}/swift/Podfile.lock | 0 .../swift/PrivacyInfo.xcprivacy | 0 .../SwiftExample.xcodeproj/project.pbxproj | 0 .../xcschemes/SwiftExample.xcscheme | 0 .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 example/{ => react-native-cli}/yarn.lock | 0 yarn.lock | 457 +++++++++++++++--- 66 files changed, 406 insertions(+), 65 deletions(-) rename example/{ => react-native-cli}/App.tsx (100%) rename example/{ => react-native-cli}/babel.config.cjs (100%) rename example/{ => react-native-cli}/index.js (100%) rename example/{ => react-native-cli}/kotlin/.gitignore (100%) rename example/{ => react-native-cli}/kotlin/.project (100%) rename example/{ => react-native-cli}/kotlin/.settings/org.eclipse.buildship.core.prefs (100%) rename example/{ => react-native-cli}/kotlin/app/.gitignore (100%) rename example/{ => react-native-cli}/kotlin/app/build.gradle (100%) rename example/{ => react-native-cli}/kotlin/app/proguard-rules.pro (100%) rename example/{ => react-native-cli}/kotlin/app/src/androidTest/java/com/callstack/kotlinexample/ExampleInstrumentedTest.kt (100%) rename example/{ => react-native-cli}/kotlin/app/src/debug/AndroidManifest.xml (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/AndroidManifest.xml (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/java/com/callstack/kotlinexample/MainActivity.kt (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/java/com/callstack/kotlinexample/MainApplication.kt (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/java/com/callstack/kotlinexample/ReactNativeFragmentActivity.kt (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/res/anim/slide_fade_in.xml (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/res/drawable-v24/ic_launcher_foreground.xml (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/res/drawable/ic_launcher_background.xml (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/res/layout/activity_main.xml (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/res/layout/activity_react_native_fragment.xml (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/res/mipmap-hdpi/ic_launcher.png (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/res/mipmap-hdpi/ic_launcher_round.png (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/res/mipmap-mdpi/ic_launcher.png (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/res/mipmap-mdpi/ic_launcher_round.png (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/res/mipmap-xhdpi/ic_launcher.png (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/res/values/colors.xml (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/res/values/strings.xml (100%) rename example/{ => react-native-cli}/kotlin/app/src/main/res/values/styles.xml (100%) rename example/{ => react-native-cli}/kotlin/app/src/test/java/com/callstack/kotlinexample/ExampleUnitTest.kt (100%) rename example/{ => react-native-cli}/kotlin/build.gradle (100%) rename example/{ => react-native-cli}/kotlin/gradle.properties (100%) rename example/{ => react-native-cli}/kotlin/gradle/wrapper/gradle-wrapper.jar (100%) rename example/{ => react-native-cli}/kotlin/gradle/wrapper/gradle-wrapper.properties (100%) rename example/{ => react-native-cli}/kotlin/gradlew (100%) rename example/{ => react-native-cli}/kotlin/gradlew.bat (100%) rename example/{ => react-native-cli}/kotlin/settings.gradle (100%) rename example/{ => react-native-cli}/metro.config.cjs (100%) rename example/{ => react-native-cli}/package.json (100%) rename example/{ => react-native-cli}/react-native.config.js (100%) rename example/{ => react-native-cli}/swift/.xcode.env (100%) rename example/{ => react-native-cli}/swift/App.swift (100%) rename example/{ => react-native-cli}/swift/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename example/{ => react-native-cli}/swift/Assets.xcassets/Contents.json (100%) rename example/{ => react-native-cli}/swift/Base.lproj/LaunchScreen.storyboard (100%) rename example/{ => react-native-cli}/swift/Info.plist (100%) rename example/{ => react-native-cli}/swift/Podfile (100%) rename example/{ => react-native-cli}/swift/Podfile.lock (100%) rename example/{ => react-native-cli}/swift/PrivacyInfo.xcprivacy (100%) rename example/{ => react-native-cli}/swift/SwiftExample.xcodeproj/project.pbxproj (100%) rename example/{ => react-native-cli}/swift/SwiftExample.xcodeproj/xcshareddata/xcschemes/SwiftExample.xcscheme (100%) rename example/{ => react-native-cli}/swift/SwiftExample.xcworkspace/contents.xcworkspacedata (100%) rename example/{ => react-native-cli}/swift/SwiftExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename example/{ => react-native-cli}/yarn.lock (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 38b2343d..78685715 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,7 +40,7 @@ jobs: - name: Build Android App run: | - cd example/kotlin + cd example/react-native-cli/kotlin ./gradlew assembleDebug ios: @@ -79,10 +79,10 @@ jobs: - name: Install pods run: | - cd example/swift + cd example/react-native-cli/swift pod install - name: Build iOS App run: | - cd example/swift + cd example/react-native-cli/swift xcodebuild -workspace SwiftExample.xcworkspace -scheme SwiftExample -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 16' build CODE_SIGNING_ALLOWED=NO diff --git a/.gitignore b/.gitignore index ea5f60a2..49615d95 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,7 @@ build/ .gradle local.properties *.iml -example/kotlin/build/ +example/react-native-cli/kotlin/build/ *.iml *.hprof **/.cxx/ diff --git a/docs/JAVA.md b/docs/JAVA.md index e6f80106..fe504851 100644 --- a/docs/JAVA.md +++ b/docs/JAVA.md @@ -247,4 +247,4 @@ ReactNativeFragment.createReactNativeFragment("ReactNative", map); ### Example -You can find an example app [here](../example/kotlin). +You can find an example app [here](../example/react-native-cli/kotlin). diff --git a/docs/KOTLIN.md b/docs/KOTLIN.md index d8c353af..bc6867a2 100644 --- a/docs/KOTLIN.md +++ b/docs/KOTLIN.md @@ -255,4 +255,4 @@ AndroidFragment(arguments = Bundle().apply { ### Example -You can find an example app [here](../example/kotlin). +You can find an example app [here](../example/react-native-cli/kotlin). diff --git a/docs/SWIFT.md b/docs/SWIFT.md index 06681614..01d5e402 100644 --- a/docs/SWIFT.md +++ b/docs/SWIFT.md @@ -258,4 +258,4 @@ NavigationLink("Open React Native Screen") { ### Example -You can find an example app [here](../example/swift). +You can find an example app [here](../example/react-native-cli/swift). diff --git a/example/App.tsx b/example/react-native-cli/App.tsx similarity index 100% rename from example/App.tsx rename to example/react-native-cli/App.tsx diff --git a/example/babel.config.cjs b/example/react-native-cli/babel.config.cjs similarity index 100% rename from example/babel.config.cjs rename to example/react-native-cli/babel.config.cjs diff --git a/example/index.js b/example/react-native-cli/index.js similarity index 100% rename from example/index.js rename to example/react-native-cli/index.js diff --git a/example/kotlin/.gitignore b/example/react-native-cli/kotlin/.gitignore similarity index 100% rename from example/kotlin/.gitignore rename to example/react-native-cli/kotlin/.gitignore diff --git a/example/kotlin/.project b/example/react-native-cli/kotlin/.project similarity index 100% rename from example/kotlin/.project rename to example/react-native-cli/kotlin/.project diff --git a/example/kotlin/.settings/org.eclipse.buildship.core.prefs b/example/react-native-cli/kotlin/.settings/org.eclipse.buildship.core.prefs similarity index 100% rename from example/kotlin/.settings/org.eclipse.buildship.core.prefs rename to example/react-native-cli/kotlin/.settings/org.eclipse.buildship.core.prefs diff --git a/example/kotlin/app/.gitignore b/example/react-native-cli/kotlin/app/.gitignore similarity index 100% rename from example/kotlin/app/.gitignore rename to example/react-native-cli/kotlin/app/.gitignore diff --git a/example/kotlin/app/build.gradle b/example/react-native-cli/kotlin/app/build.gradle similarity index 100% rename from example/kotlin/app/build.gradle rename to example/react-native-cli/kotlin/app/build.gradle diff --git a/example/kotlin/app/proguard-rules.pro b/example/react-native-cli/kotlin/app/proguard-rules.pro similarity index 100% rename from example/kotlin/app/proguard-rules.pro rename to example/react-native-cli/kotlin/app/proguard-rules.pro diff --git a/example/kotlin/app/src/androidTest/java/com/callstack/kotlinexample/ExampleInstrumentedTest.kt b/example/react-native-cli/kotlin/app/src/androidTest/java/com/callstack/kotlinexample/ExampleInstrumentedTest.kt similarity index 100% rename from example/kotlin/app/src/androidTest/java/com/callstack/kotlinexample/ExampleInstrumentedTest.kt rename to example/react-native-cli/kotlin/app/src/androidTest/java/com/callstack/kotlinexample/ExampleInstrumentedTest.kt diff --git a/example/kotlin/app/src/debug/AndroidManifest.xml b/example/react-native-cli/kotlin/app/src/debug/AndroidManifest.xml similarity index 100% rename from example/kotlin/app/src/debug/AndroidManifest.xml rename to example/react-native-cli/kotlin/app/src/debug/AndroidManifest.xml diff --git a/example/kotlin/app/src/main/AndroidManifest.xml b/example/react-native-cli/kotlin/app/src/main/AndroidManifest.xml similarity index 100% rename from example/kotlin/app/src/main/AndroidManifest.xml rename to example/react-native-cli/kotlin/app/src/main/AndroidManifest.xml diff --git a/example/kotlin/app/src/main/java/com/callstack/kotlinexample/MainActivity.kt b/example/react-native-cli/kotlin/app/src/main/java/com/callstack/kotlinexample/MainActivity.kt similarity index 100% rename from example/kotlin/app/src/main/java/com/callstack/kotlinexample/MainActivity.kt rename to example/react-native-cli/kotlin/app/src/main/java/com/callstack/kotlinexample/MainActivity.kt diff --git a/example/kotlin/app/src/main/java/com/callstack/kotlinexample/MainApplication.kt b/example/react-native-cli/kotlin/app/src/main/java/com/callstack/kotlinexample/MainApplication.kt similarity index 100% rename from example/kotlin/app/src/main/java/com/callstack/kotlinexample/MainApplication.kt rename to example/react-native-cli/kotlin/app/src/main/java/com/callstack/kotlinexample/MainApplication.kt diff --git a/example/kotlin/app/src/main/java/com/callstack/kotlinexample/ReactNativeFragmentActivity.kt b/example/react-native-cli/kotlin/app/src/main/java/com/callstack/kotlinexample/ReactNativeFragmentActivity.kt similarity index 100% rename from example/kotlin/app/src/main/java/com/callstack/kotlinexample/ReactNativeFragmentActivity.kt rename to example/react-native-cli/kotlin/app/src/main/java/com/callstack/kotlinexample/ReactNativeFragmentActivity.kt diff --git a/example/kotlin/app/src/main/res/anim/slide_fade_in.xml b/example/react-native-cli/kotlin/app/src/main/res/anim/slide_fade_in.xml similarity index 100% rename from example/kotlin/app/src/main/res/anim/slide_fade_in.xml rename to example/react-native-cli/kotlin/app/src/main/res/anim/slide_fade_in.xml diff --git a/example/kotlin/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/example/react-native-cli/kotlin/app/src/main/res/drawable-v24/ic_launcher_foreground.xml similarity index 100% rename from example/kotlin/app/src/main/res/drawable-v24/ic_launcher_foreground.xml rename to example/react-native-cli/kotlin/app/src/main/res/drawable-v24/ic_launcher_foreground.xml diff --git a/example/kotlin/app/src/main/res/drawable/ic_launcher_background.xml b/example/react-native-cli/kotlin/app/src/main/res/drawable/ic_launcher_background.xml similarity index 100% rename from example/kotlin/app/src/main/res/drawable/ic_launcher_background.xml rename to example/react-native-cli/kotlin/app/src/main/res/drawable/ic_launcher_background.xml diff --git a/example/kotlin/app/src/main/res/layout/activity_main.xml b/example/react-native-cli/kotlin/app/src/main/res/layout/activity_main.xml similarity index 100% rename from example/kotlin/app/src/main/res/layout/activity_main.xml rename to example/react-native-cli/kotlin/app/src/main/res/layout/activity_main.xml diff --git a/example/kotlin/app/src/main/res/layout/activity_react_native_fragment.xml b/example/react-native-cli/kotlin/app/src/main/res/layout/activity_react_native_fragment.xml similarity index 100% rename from example/kotlin/app/src/main/res/layout/activity_react_native_fragment.xml rename to example/react-native-cli/kotlin/app/src/main/res/layout/activity_react_native_fragment.xml diff --git a/example/kotlin/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/example/react-native-cli/kotlin/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from example/kotlin/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml rename to example/react-native-cli/kotlin/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/example/kotlin/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/example/react-native-cli/kotlin/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml similarity index 100% rename from example/kotlin/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml rename to example/react-native-cli/kotlin/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml diff --git a/example/kotlin/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example/react-native-cli/kotlin/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from example/kotlin/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to example/react-native-cli/kotlin/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/example/kotlin/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/example/react-native-cli/kotlin/app/src/main/res/mipmap-hdpi/ic_launcher_round.png similarity index 100% rename from example/kotlin/app/src/main/res/mipmap-hdpi/ic_launcher_round.png rename to example/react-native-cli/kotlin/app/src/main/res/mipmap-hdpi/ic_launcher_round.png diff --git a/example/kotlin/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example/react-native-cli/kotlin/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from example/kotlin/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to example/react-native-cli/kotlin/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/example/kotlin/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/example/react-native-cli/kotlin/app/src/main/res/mipmap-mdpi/ic_launcher_round.png similarity index 100% rename from example/kotlin/app/src/main/res/mipmap-mdpi/ic_launcher_round.png rename to example/react-native-cli/kotlin/app/src/main/res/mipmap-mdpi/ic_launcher_round.png diff --git a/example/kotlin/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/example/react-native-cli/kotlin/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from example/kotlin/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to example/react-native-cli/kotlin/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/example/kotlin/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/example/react-native-cli/kotlin/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png similarity index 100% rename from example/kotlin/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png rename to example/react-native-cli/kotlin/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png diff --git a/example/kotlin/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/example/react-native-cli/kotlin/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from example/kotlin/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to example/react-native-cli/kotlin/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/example/kotlin/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/example/react-native-cli/kotlin/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png similarity index 100% rename from example/kotlin/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png rename to example/react-native-cli/kotlin/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png diff --git a/example/kotlin/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/example/react-native-cli/kotlin/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from example/kotlin/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to example/react-native-cli/kotlin/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/example/kotlin/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/example/react-native-cli/kotlin/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png similarity index 100% rename from example/kotlin/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png rename to example/react-native-cli/kotlin/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png diff --git a/example/kotlin/app/src/main/res/values/colors.xml b/example/react-native-cli/kotlin/app/src/main/res/values/colors.xml similarity index 100% rename from example/kotlin/app/src/main/res/values/colors.xml rename to example/react-native-cli/kotlin/app/src/main/res/values/colors.xml diff --git a/example/kotlin/app/src/main/res/values/strings.xml b/example/react-native-cli/kotlin/app/src/main/res/values/strings.xml similarity index 100% rename from example/kotlin/app/src/main/res/values/strings.xml rename to example/react-native-cli/kotlin/app/src/main/res/values/strings.xml diff --git a/example/kotlin/app/src/main/res/values/styles.xml b/example/react-native-cli/kotlin/app/src/main/res/values/styles.xml similarity index 100% rename from example/kotlin/app/src/main/res/values/styles.xml rename to example/react-native-cli/kotlin/app/src/main/res/values/styles.xml diff --git a/example/kotlin/app/src/test/java/com/callstack/kotlinexample/ExampleUnitTest.kt b/example/react-native-cli/kotlin/app/src/test/java/com/callstack/kotlinexample/ExampleUnitTest.kt similarity index 100% rename from example/kotlin/app/src/test/java/com/callstack/kotlinexample/ExampleUnitTest.kt rename to example/react-native-cli/kotlin/app/src/test/java/com/callstack/kotlinexample/ExampleUnitTest.kt diff --git a/example/kotlin/build.gradle b/example/react-native-cli/kotlin/build.gradle similarity index 100% rename from example/kotlin/build.gradle rename to example/react-native-cli/kotlin/build.gradle diff --git a/example/kotlin/gradle.properties b/example/react-native-cli/kotlin/gradle.properties similarity index 100% rename from example/kotlin/gradle.properties rename to example/react-native-cli/kotlin/gradle.properties diff --git a/example/kotlin/gradle/wrapper/gradle-wrapper.jar b/example/react-native-cli/kotlin/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from example/kotlin/gradle/wrapper/gradle-wrapper.jar rename to example/react-native-cli/kotlin/gradle/wrapper/gradle-wrapper.jar diff --git a/example/kotlin/gradle/wrapper/gradle-wrapper.properties b/example/react-native-cli/kotlin/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from example/kotlin/gradle/wrapper/gradle-wrapper.properties rename to example/react-native-cli/kotlin/gradle/wrapper/gradle-wrapper.properties diff --git a/example/kotlin/gradlew b/example/react-native-cli/kotlin/gradlew similarity index 100% rename from example/kotlin/gradlew rename to example/react-native-cli/kotlin/gradlew diff --git a/example/kotlin/gradlew.bat b/example/react-native-cli/kotlin/gradlew.bat similarity index 100% rename from example/kotlin/gradlew.bat rename to example/react-native-cli/kotlin/gradlew.bat diff --git a/example/kotlin/settings.gradle b/example/react-native-cli/kotlin/settings.gradle similarity index 100% rename from example/kotlin/settings.gradle rename to example/react-native-cli/kotlin/settings.gradle diff --git a/example/metro.config.cjs b/example/react-native-cli/metro.config.cjs similarity index 100% rename from example/metro.config.cjs rename to example/react-native-cli/metro.config.cjs diff --git a/example/package.json b/example/react-native-cli/package.json similarity index 100% rename from example/package.json rename to example/react-native-cli/package.json diff --git a/example/react-native.config.js b/example/react-native-cli/react-native.config.js similarity index 100% rename from example/react-native.config.js rename to example/react-native-cli/react-native.config.js diff --git a/example/swift/.xcode.env b/example/react-native-cli/swift/.xcode.env similarity index 100% rename from example/swift/.xcode.env rename to example/react-native-cli/swift/.xcode.env diff --git a/example/swift/App.swift b/example/react-native-cli/swift/App.swift similarity index 100% rename from example/swift/App.swift rename to example/react-native-cli/swift/App.swift diff --git a/example/swift/Assets.xcassets/AppIcon.appiconset/Contents.json b/example/react-native-cli/swift/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from example/swift/Assets.xcassets/AppIcon.appiconset/Contents.json rename to example/react-native-cli/swift/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/example/swift/Assets.xcassets/Contents.json b/example/react-native-cli/swift/Assets.xcassets/Contents.json similarity index 100% rename from example/swift/Assets.xcassets/Contents.json rename to example/react-native-cli/swift/Assets.xcassets/Contents.json diff --git a/example/swift/Base.lproj/LaunchScreen.storyboard b/example/react-native-cli/swift/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from example/swift/Base.lproj/LaunchScreen.storyboard rename to example/react-native-cli/swift/Base.lproj/LaunchScreen.storyboard diff --git a/example/swift/Info.plist b/example/react-native-cli/swift/Info.plist similarity index 100% rename from example/swift/Info.plist rename to example/react-native-cli/swift/Info.plist diff --git a/example/swift/Podfile b/example/react-native-cli/swift/Podfile similarity index 100% rename from example/swift/Podfile rename to example/react-native-cli/swift/Podfile diff --git a/example/swift/Podfile.lock b/example/react-native-cli/swift/Podfile.lock similarity index 100% rename from example/swift/Podfile.lock rename to example/react-native-cli/swift/Podfile.lock diff --git a/example/swift/PrivacyInfo.xcprivacy b/example/react-native-cli/swift/PrivacyInfo.xcprivacy similarity index 100% rename from example/swift/PrivacyInfo.xcprivacy rename to example/react-native-cli/swift/PrivacyInfo.xcprivacy diff --git a/example/swift/SwiftExample.xcodeproj/project.pbxproj b/example/react-native-cli/swift/SwiftExample.xcodeproj/project.pbxproj similarity index 100% rename from example/swift/SwiftExample.xcodeproj/project.pbxproj rename to example/react-native-cli/swift/SwiftExample.xcodeproj/project.pbxproj diff --git a/example/swift/SwiftExample.xcodeproj/xcshareddata/xcschemes/SwiftExample.xcscheme b/example/react-native-cli/swift/SwiftExample.xcodeproj/xcshareddata/xcschemes/SwiftExample.xcscheme similarity index 100% rename from example/swift/SwiftExample.xcodeproj/xcshareddata/xcschemes/SwiftExample.xcscheme rename to example/react-native-cli/swift/SwiftExample.xcodeproj/xcshareddata/xcschemes/SwiftExample.xcscheme diff --git a/example/swift/SwiftExample.xcworkspace/contents.xcworkspacedata b/example/react-native-cli/swift/SwiftExample.xcworkspace/contents.xcworkspacedata similarity index 100% rename from example/swift/SwiftExample.xcworkspace/contents.xcworkspacedata rename to example/react-native-cli/swift/SwiftExample.xcworkspace/contents.xcworkspacedata diff --git a/example/swift/SwiftExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/react-native-cli/swift/SwiftExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from example/swift/SwiftExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to example/react-native-cli/swift/SwiftExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/example/yarn.lock b/example/react-native-cli/yarn.lock similarity index 100% rename from example/yarn.lock rename to example/react-native-cli/yarn.lock diff --git a/yarn.lock b/yarn.lock index 97dee964..f22da20b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1068,6 +1068,23 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@clack/core@0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@clack/core/-/core-0.5.0.tgz#970df024a927d6af90111667a0384e233b5ffa1a" + integrity sha512-p3y0FIOwaYRUPRcMO7+dlmLh8PSRcrjuTndsiA0WAFbWES0mLZlrjVoBRZ9DzkPFJZG6KGkJmoEAY0ZcVWTkow== + dependencies: + picocolors "^1.0.0" + sisteransi "^1.0.5" + +"@clack/prompts@^0.11.0": + version "0.11.0" + resolved "https://registry.yarnpkg.com/@clack/prompts/-/prompts-0.11.0.tgz#5c0218f2b46626a50d72d8a485681eb8d94bd2a7" + integrity sha512-pMN5FcrEw9hUkZA4f+zLlzivQSeQf5dRGJjSUbvVYDLvpKCdQx5OaknvKzgbtXOizhP+SJJJjqEbOe55uKKfAw== + dependencies: + "@clack/core" "0.5.0" + picocolors "^1.0.0" + sisteransi "^1.0.5" + "@commitlint/cli@^20.1.0": version "20.1.0" resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-20.1.0.tgz#07365e2849d86f771e76ea0ceb96cd88bb945e03" @@ -1285,6 +1302,18 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2" integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== +"@hapi/hoek@^9.0.0", "@hapi/hoek@^9.3.0": + version "9.3.0" + resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" + integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== + +"@hapi/topo@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-5.1.0.tgz#dc448e332c6c6e37a4dc02fd84ba8d44b9afb012" + integrity sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg== + dependencies: + "@hapi/hoek" "^9.0.0" + "@humanwhocodes/config-array@^0.13.0": version "0.13.0" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748" @@ -1466,6 +1495,13 @@ wrap-ansi "^8.1.0" wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" +"@isaacs/fs-minipass@^4.0.0": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz#2d59ae3ab4b38fb4270bfa23d30f8e2e86c7fe32" + integrity sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w== + dependencies: + minipass "^7.0.4" + "@isaacs/ttlcache@^1.4.1": version "1.4.1" resolved "https://registry.yarnpkg.com/@isaacs/ttlcache/-/ttlcache-1.4.1.tgz#21fb23db34e9b6220c6ba023a0118a2dd3461ea2" @@ -1572,13 +1608,6 @@ dependencies: "@jest/get-type" "30.1.0" -"@jest/expect-utils@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6" - integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA== - dependencies: - jest-get-type "^29.6.3" - "@jest/expect@30.2.0": version "30.2.0" resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-30.2.0.tgz#9a5968499bb8add2bbb09136f69f7df5ddbf3185" @@ -1990,6 +2019,61 @@ resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.9.tgz#d229a7b7f9dac167a156992ef23c7f023653f53b" integrity sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA== +"@react-native-community/cli-config-android@^20.0.0", "@react-native-community/cli-config-android@^20.0.2": + version "20.0.2" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-config-android/-/cli-config-android-20.0.2.tgz#5feeafb6fdc8ed0b22374490ab22de4aa7bcb9ff" + integrity sha512-5yZ2Grr89omnMptV36ilV4EIrRLrIYQAsTTVU/hNI2vL7lz6WB8rPhP5QuovXk3TIjl1Wz2r9A6ZNO2SNJ8nig== + dependencies: + "@react-native-community/cli-tools" "20.0.2" + chalk "^4.1.2" + fast-glob "^3.3.2" + fast-xml-parser "^4.4.1" + +"@react-native-community/cli-config-apple@^20.0.0": + version "20.0.2" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-config-apple/-/cli-config-apple-20.0.2.tgz#996a726903d66371fbe0210388d5edce3eb05cf1" + integrity sha512-6MLL9Duu/JytqI6XfYuc78LSkRGfJoCqTSfqTJzBNSnz6S7XJps9spGBlgvrGh/j0howBpQlFH0J8Ws4N4mCxA== + dependencies: + "@react-native-community/cli-tools" "20.0.2" + chalk "^4.1.2" + execa "^5.0.0" + fast-glob "^3.3.2" + +"@react-native-community/cli-config@^20.0.0", "@react-native-community/cli-config@^20.0.2": + version "20.0.2" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-20.0.2.tgz#e65a4aec8ce8404eff512de96eb854e682fa9064" + integrity sha512-OuSAyqTv0MBbRqSyO+80IKasHnwLESydZBTrLjIGwGhDokMH07mZo8Io2H8X300WWa57LC2L8vQf73TzGS3ikQ== + dependencies: + "@react-native-community/cli-tools" "20.0.2" + chalk "^4.1.2" + cosmiconfig "^9.0.0" + deepmerge "^4.3.0" + fast-glob "^3.3.2" + joi "^17.2.1" + +"@react-native-community/cli-tools@20.0.2": + version "20.0.2" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-20.0.2.tgz#dbeacf6f05dffb354d8f488e9e09bc365061993b" + integrity sha512-bPYhRYggW9IIM8pvrZF/0r6HaxCyEWDn6zfPQPMWlkQUwkzFZ8GBY/M7yiHgDzozWKPT4DqZPumrq806Vcksow== + dependencies: + "@vscode/sudo-prompt" "^9.0.0" + appdirsjs "^1.2.4" + chalk "^4.1.2" + execa "^5.0.0" + find-up "^5.0.0" + launch-editor "^2.9.1" + mime "^2.4.1" + ora "^5.4.1" + prompts "^2.4.2" + semver "^7.5.2" + +"@react-native-community/cli-types@^20.0.0", "@react-native-community/cli-types@^20.0.2": + version "20.0.2" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-20.0.2.tgz#92e33ba34eb7915e8d6d519b046160a0383ab70d" + integrity sha512-OZzy6U4M8Szg8iiF459OoTjRKggxLrdhZVHKfRhrAUfojhjRiWbJNkkPxJtOIPeNSgsB0heizgpE4QwCgnYeuQ== + dependencies: + joi "^17.2.1" + "@react-native/assets-registry@0.82.1": version "0.82.1" resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.82.1.tgz#834058f9391fa7aa85404f833ece2ab70754a332" @@ -2193,6 +2277,72 @@ git-semver-tags "^8.0.0" semver "^7.6.3" +"@rock-js/platform-android@^0.11.12": + version "0.11.12" + resolved "https://registry.yarnpkg.com/@rock-js/platform-android/-/platform-android-0.11.12.tgz#11b9f56f75cc946fd43713b0f40249b4e807b085" + integrity sha512-7YEQXTQd2RRlA9KbliN7hTAYQIE4F60oCkoMjNDPpqNSiSlrUeiaba5fw3qYw/YHOsJnJ8ri7oPs7v19PMz1dQ== + dependencies: + "@react-native-community/cli-config-android" "^20.0.0" + "@rock-js/tools" "^0.11.12" + adm-zip "^0.5.16" + tslib "^2.3.0" + +"@rock-js/platform-apple-helpers@^0.11.12": + version "0.11.12" + resolved "https://registry.yarnpkg.com/@rock-js/platform-apple-helpers/-/platform-apple-helpers-0.11.12.tgz#17aebdd5510aaeafe0520e28481d690fc6626176" + integrity sha512-HIK5ZgtDrkTRW1sGeElHYYDmmuLIV4es/35HsR6Y8wNjkQAbrzBhYjZAJpUIPURLqVMkwd3h85qQcVk+CHFXew== + dependencies: + "@react-native-community/cli-config" "^20.0.0" + "@react-native-community/cli-config-apple" "^20.0.0" + "@rock-js/tools" "^0.11.12" + adm-zip "^0.5.16" + fast-xml-parser "^4.5.0" + tslib "^2.3.0" + +"@rock-js/platform-ios@^0.11.12": + version "0.11.12" + resolved "https://registry.yarnpkg.com/@rock-js/platform-ios/-/platform-ios-0.11.12.tgz#84612c6ffaaf3cfe9223647c96279c4992d464ad" + integrity sha512-RIfxJtmNZkQyK5fYeFVL2PQY3p97xIaHlrsBvFezMhx3oSBQ+AioTiThUxu6j80NHaJj+b8aM3ioRuZgatDDMQ== + dependencies: + "@react-native-community/cli-config-apple" "^20.0.0" + "@react-native-community/cli-types" "^20.0.0" + "@rock-js/platform-apple-helpers" "^0.11.12" + "@rock-js/tools" "^0.11.12" + tslib "^2.3.0" + +"@rock-js/tools@^0.11.12": + version "0.11.12" + resolved "https://registry.yarnpkg.com/@rock-js/tools/-/tools-0.11.12.tgz#5e9d90ae1a3c1d46dc4317ea4722db9448123e7e" + integrity sha512-YQTlH2IJRYCoBk82h2qqf/QcZK/CvNtBZfcu30iJvXWMEQYYPKgixyqXNodxn55mJBczGUbFzSDePp8xaH0www== + dependencies: + "@clack/prompts" "^0.11.0" + adm-zip "^0.5.16" + appdirsjs "^1.2.7" + fs-fingerprint "^0.11.0" + is-unicode-supported "^2.1.0" + nano-spawn "^0.2.0" + picocolors "^1.1.1" + string-argv "^0.3.2" + tar "^7.5.1" + tslib "^2.3.0" + +"@sideway/address@^4.1.5": + version "4.1.5" + resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.5.tgz#4bc149a0076623ced99ca8208ba780d65a99b9d5" + integrity sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q== + dependencies: + "@hapi/hoek" "^9.0.0" + +"@sideway/formula@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.1.tgz#80fcbcbaf7ce031e0ef2dd29b1bfc7c3f583611f" + integrity sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg== + +"@sideway/pinpoint@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" + integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== + "@sinclair/typebox@^0.27.8": version "0.27.8" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" @@ -2310,6 +2460,18 @@ expect "^30.0.0" pretty-format "^30.0.0" +"@types/lodash.clonedeep@^4.5.9": + version "4.5.9" + resolved "https://registry.yarnpkg.com/@types/lodash.clonedeep/-/lodash.clonedeep-4.5.9.tgz#ea48276c7cc18d080e00bb56cf965bcceb3f0fc1" + integrity sha512-19429mWC+FyaAhOLzsS8kZUsI+/GmBAQ0HFiCPsKGU+7pBXOQWhyrY6xNNDwUSX8SMZMJvuFVMF9O5dQOlQK9Q== + dependencies: + "@types/lodash" "*" + +"@types/lodash@*": + version "4.17.21" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.21.tgz#b806831543d696b14f8112db600ea9d3a1df6ea4" + integrity sha512-FOvQ0YPD5NOfPgMzJihoT+Za5pdkDJWcbpuj1DjaKZIr/gxodQjY/uWEFlTNqW2ugXHUiL8lRQgw63dzKHZdeQ== + "@types/node@*": version "24.10.0" resolved "https://registry.yarnpkg.com/@types/node/-/node-24.10.0.tgz#6b79086b0dfc54e775a34ba8114dcc4e0221f31f" @@ -2317,6 +2479,13 @@ dependencies: undici-types "~7.16.0" +"@types/node@^24.10.2": + version "24.10.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-24.10.2.tgz#82a57476a19647d8f2c7750d0924788245e39b26" + integrity sha512-WOhQTZ4G8xZ1tjJTvKOpyEVSGgOTvJAfDK3FNFgELyaTpzhdgHVHeqW8V+UJvzF5BT+/B54T/1S2K6gd9c7bbA== + dependencies: + undici-types "~7.16.0" + "@types/normalize-package-data@^2.4.3": version "2.4.4" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901" @@ -2572,6 +2741,11 @@ resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.11.1.tgz#538b1e103bf8d9864e7b85cc96fa8d6fb6c40777" integrity sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g== +"@vscode/sudo-prompt@^9.0.0": + version "9.3.1" + resolved "https://registry.yarnpkg.com/@vscode/sudo-prompt/-/sudo-prompt-9.3.1.tgz#c562334bc6647733649fd42afc96c0eea8de3b65" + integrity sha512-9ORTwwS74VaTn38tNbQhsA5U44zkJfcb0BdTSyyG6frP4e8KMtHuTXYmwefe5dpL8XB1aGSIVTaLjD3BbWb5iA== + JSONStream@^1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -2610,6 +2784,11 @@ add-stream@^1.0.0: resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" integrity sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ== +adm-zip@^0.5.16: + version "0.5.16" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.5.16.tgz#0b5e4c779f07dedea5805cdccb1147071d94a909" + integrity sha512-TGw5yVi4saajsSEgz25grObGHEUaDrniwvA2qwSC060KfqGPdglhvPMA2lPIoxs3PQIItj2iag35fONcQqgUaQ== + agent-base@^7.1.0, agent-base@^7.1.2: version "7.1.4" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.4.tgz#e3cd76d4c548ee895d3c3fd8dc1f6c5b9032e7a8" @@ -2690,6 +2869,11 @@ anymatch@^3.0.3, anymatch@^3.1.3: normalize-path "^3.0.0" picomatch "^2.0.4" +appdirsjs@^1.2.4, appdirsjs@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/appdirsjs/-/appdirsjs-1.2.7.tgz#50b4b7948a26ba6090d4aede2ae2dc2b051be3b3" + integrity sha512-Quji6+8kLBC3NnBeo14nPDq0+2jUs5s3/xEye+udFHumHhRk4M7aAMXp/PBJqkKYGuuyR9M/6Dq7d2AViiGmhw== + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -3005,7 +3189,7 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base64-js@^1.5.1: +base64-js@^1.3.1, base64-js@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -3025,6 +3209,15 @@ before-after-hook@^4.0.0: resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-4.0.0.tgz#cf1447ab9160df6a40f3621da64d6ffc36050cb9" integrity sha512-q6tR3RPqIB1pMiTRMFcZwuG5T8vwp+vUvEG0vuI6B+Rikh5BfPp2fQ82c925FOs+b0lcFQ8CFrL+KbilfZFhOQ== +bl@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" + integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + brace-expansion@^1.1.7: version "1.1.12" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843" @@ -3070,6 +3263,14 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== +buffer@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + bundle-name@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-4.1.0.tgz#f3b96b34160d6431a19d7688135af7cfb8797889" @@ -3141,7 +3342,7 @@ caniuse-lite@^1.0.30001754: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001754.tgz#7758299d9a72cce4e6b038788a15b12b44002759" integrity sha512-x6OeBXueoAceOmotzx3PO4Zpt4rzpeIFsSr6AAePTZxSkXiYDUmpypEl7e2+8NCd9bD7bXjqyef8CJYPC1jfxg== -chalk@^4.0.0, chalk@^4.1.2: +chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -3171,6 +3372,11 @@ chokidar@^4.0.3: dependencies: readdirp "^4.0.1" +chownr@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-3.0.0.tgz#9855e64ecd240a9cc4267ce8a4aa5d24a1da15e4" + integrity sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g== + chrome-launcher@^0.15.2: version "0.15.2" resolved "https://registry.yarnpkg.com/chrome-launcher/-/chrome-launcher-0.15.2.tgz#4e6404e32200095fdce7f6a1e1004f9bd36fa5da" @@ -3225,6 +3431,13 @@ clean-stack@^2.0.0: resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + cli-cursor@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-5.0.0.tgz#24a4831ecf5a6b01ddeb32fb71a4b2088b0dce38" @@ -3232,6 +3445,11 @@ cli-cursor@^5.0.0: dependencies: restore-cursor "^5.0.0" +cli-spinners@^2.5.0: + version "2.9.2" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" + integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== + cli-spinners@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-3.3.0.tgz#2ba7c98b4f4662e67315b5634365661be8574440" @@ -3251,6 +3469,11 @@ cliui@^8.0.1: strip-ansi "^6.0.1" wrap-ansi "^7.0.0" +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== + co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -3278,6 +3501,11 @@ commander@^12.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3" integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA== +commander@^14.0.2: + version "14.0.2" + resolved "https://registry.yarnpkg.com/commander/-/commander-14.0.2.tgz#b71fd37fe4069e4c3c7c13925252ada4eba14e8e" + integrity sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ== + commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -3581,7 +3809,7 @@ deep-is@^0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== -deepmerge@^4.3.1: +deepmerge@^4.3.0, deepmerge@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== @@ -3599,6 +3827,13 @@ default-browser@^5.2.1: bundle-name "^4.1.0" default-browser-id "^5.0.0" +defaults@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.4.tgz#b0b02062c1e2aa62ff5d9528f0f98baa90978d7a" + integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== + dependencies: + clone "^1.0.2" + define-data-property@^1.0.1, define-data-property@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" @@ -3670,11 +3905,6 @@ detect-newline@^3.1.0: resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== -diff-sequences@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" - integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== - dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -4179,7 +4409,7 @@ execa@^4.0.3: signal-exit "^3.0.2" strip-final-newline "^2.0.0" -execa@^5.1.1: +execa@^5.0.0, execa@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== @@ -4214,7 +4444,7 @@ exit-x@^0.2.2: resolved "https://registry.yarnpkg.com/exit-x/-/exit-x-0.2.2.tgz#1f9052de3b8d99a696b10dad5bced9bdd5c3aa64" integrity sha512-+I6B/IkJc1o/2tiURyz/ivu/O0nKNEArIUB5O7zBrlDVJr22SCLH3xTeEry428LvFhRzIA1g8izguxJ/gbNcVQ== -expect@30.2.0: +expect@30.2.0, expect@^30.0.0: version "30.2.0" resolved "https://registry.yarnpkg.com/expect/-/expect-30.2.0.tgz#d4013bed267013c14bc1199cec8aa57cee9b5869" integrity sha512-u/feCi0GPsI+988gU2FLcsHyAHTU0MX1Wg68NhAnN7z/+C5wqG+CY8J53N9ioe8RXgaoz0nBR/TYMf3AycUuPw== @@ -4226,17 +4456,6 @@ expect@30.2.0: jest-mock "30.2.0" jest-util "30.2.0" -expect@^29.0.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" - integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== - dependencies: - "@jest/expect-utils" "^29.7.0" - jest-get-type "^29.6.3" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - exponential-backoff@^3.1.1: version "3.1.3" resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.3.tgz#51cf92c1c0493c766053f9d3abee4434c244d2f6" @@ -4288,6 +4507,13 @@ fast-uri@^3.0.1: resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.1.0.tgz#66eecff6c764c0df9b762e62ca7edcfb53b4edfa" integrity sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA== +fast-xml-parser@^4.4.1, fast-xml-parser@^4.5.0: + version "4.5.3" + resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.5.3.tgz#c54d6b35aa0f23dc1ea60b6c884340c006dc6efb" + integrity sha512-RKihhV+SHsIUGXObeVy9AXiBbFwkVk7Syp8XgwN5U3JV416+Gwp/GO9i0JYKmikykgz/UHRrrV4ROuZEo/T0ig== + dependencies: + strnum "^1.1.1" + fastq@^1.6.0: version "1.19.1" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.19.1.tgz#d50eaba803c8846a883c16492821ebcd2cda55f5" @@ -4431,6 +4657,14 @@ fs-extra@^10.1.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-fingerprint@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/fs-fingerprint/-/fs-fingerprint-0.11.0.tgz#6ce31599225edd100f96de6e720f0e999aecb20b" + integrity sha512-EpEtmn1T9bLxxf+506gVdpehs6pAIFAM6UCDtT9/J7tfLXg8FPn+3jmuVnMjjRFshJohR2lb2TZGwuZAhIOcKg== + dependencies: + p-limit "^7.1.0" + tinyglobby "^0.2.15" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -4852,6 +5086,11 @@ iconv-lite@^0.7.0: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" +ieee754@^1.1.13: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + ignore@^5.0.5, ignore@^5.2.0: version "5.3.2" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" @@ -4913,7 +5152,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -5107,6 +5346,11 @@ is-inside-container@^1.0.0: dependencies: is-docker "^3.0.0" +is-interactive@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" + integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== + is-interactive@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-2.0.0.tgz#40c57614593826da1100ade6059778d597f16e90" @@ -5234,6 +5478,11 @@ is-unc-path@^1.0.0: dependencies: unc-path-regex "^0.1.2" +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + is-unicode-supported@^2.0.0, is-unicode-supported@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz#09f0ab0de6d3744d48d265ebb98f65d11f2a9b3a" @@ -5464,16 +5713,6 @@ jest-diff@30.2.0: chalk "^4.1.2" pretty-format "30.2.0" -jest-diff@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" - integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== - dependencies: - chalk "^4.0.0" - diff-sequences "^29.6.3" - jest-get-type "^29.6.3" - pretty-format "^29.7.0" - jest-docblock@30.2.0: version "30.2.0" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-30.2.0.tgz#42cd98d69f887e531c7352309542b1ce4ee10256" @@ -5577,16 +5816,6 @@ jest-matcher-utils@30.2.0: jest-diff "30.2.0" pretty-format "30.2.0" -jest-matcher-utils@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12" - integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g== - dependencies: - chalk "^4.0.0" - jest-diff "^29.7.0" - jest-get-type "^29.6.3" - pretty-format "^29.7.0" - jest-message-util@30.2.0: version "30.2.0" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-30.2.0.tgz#fc97bf90d11f118b31e6131e2b67fc4f39f92152" @@ -5853,6 +6082,17 @@ jiti@^2.6.1: resolved "https://registry.yarnpkg.com/jiti/-/jiti-2.6.1.tgz#178ef2fc9a1a594248c20627cd820187a4d78d92" integrity sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ== +joi@^17.2.1: + version "17.13.3" + resolved "https://registry.yarnpkg.com/joi/-/joi-17.13.3.tgz#0f5cc1169c999b30d344366d384b12d92558bcec" + integrity sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA== + dependencies: + "@hapi/hoek" "^9.3.0" + "@hapi/topo" "^5.1.0" + "@sideway/address" "^4.1.5" + "@sideway/formula" "^3.0.1" + "@sideway/pinpoint" "^2.0.0" + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -5954,6 +6194,14 @@ kleur@^4.1.4: resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780" integrity sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ== +launch-editor@^2.9.1: + version "2.12.0" + resolved "https://registry.yarnpkg.com/launch-editor/-/launch-editor-2.12.0.tgz#cc740f4e0263a6b62ead2485f9896e545321f817" + integrity sha512-giOHXoOtifjdHqUamwKq6c49GzBdLjvxrd2D+Q4V6uOHopJv7p9VJxikDsQ/CBXZbEITgUqSVHXLTG3VhPP1Dg== + dependencies: + picocolors "^1.1.1" + shell-quote "^1.8.3" + lefthook-darwin-arm64@2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/lefthook-darwin-arm64/-/lefthook-darwin-arm64-2.0.3.tgz#fd969c613e4b0d0889bf614b9ba5175f05e1326d" @@ -6085,6 +6333,11 @@ lodash.capitalize@^4.2.1: resolved "https://registry.yarnpkg.com/lodash.capitalize/-/lodash.capitalize-4.2.1.tgz#f826c9b4e2a8511d84e3aca29db05e1a4f3b72a9" integrity sha512-kZzYOKspf8XVX5AvmQF94gQW0lejFVgb80G85bU4ZWzoJ6C03PQg3coYAUpSTpQWelrZELd3XWgHzw4Ck5kaIw== +lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + integrity sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ== + lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" @@ -6155,6 +6408,14 @@ lodash@^4.15.0, lodash@^4.17.21: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== +log-symbols@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + log-symbols@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-7.0.1.tgz#f52e68037d96f589fc572ff2193dc424d48c195b" @@ -6471,6 +6732,11 @@ mime@1.6.0: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== +mime@^2.4.1: + version "2.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" + integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== + mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -6524,11 +6790,18 @@ minipass@^4.2.4: resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.2.8.tgz#f0010f64393ecfc1d1ccb5f582bcaf45f48e1a3a" integrity sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ== -"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.1.2: +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.4, minipass@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== +minizlib@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-3.1.0.tgz#6ad76c3a8f10227c9b51d1c9ac8e30b27f5a251c" + integrity sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw== + dependencies: + minipass "^7.1.2" + mkdirp@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" @@ -6554,6 +6827,11 @@ mute-stream@^3.0.0: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-3.0.0.tgz#cd8014dd2acb72e1e91bb67c74f0019e620ba2d1" integrity sha512-dkEJPVvun4FryqBmZ5KhDo0K9iDXAwn08tMLDinNdRBNPcYEDiWYysLcc6k3mjTMlbP9KyylvRpd4wFtwrT9rw== +nano-spawn@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/nano-spawn/-/nano-spawn-0.2.1.tgz#2ba747f9206b8c71b1ce95380be45ff71b9ce3fb" + integrity sha512-/pULofvsF8mOVcl/nUeVXL/GYOEvc7eJWSIxa+K4OYUolvXa5zwSgevsn4eoHs1xvh/BO3vx/PZiD9+Ow2ZVuw== + napi-postinstall@^0.3.0: version "0.3.4" resolved "https://registry.yarnpkg.com/napi-postinstall/-/napi-postinstall-0.3.4.tgz#7af256d6588b5f8e952b9190965d6b019653bbb9" @@ -6801,6 +7079,21 @@ ora@9.0.0: string-width "^8.1.0" strip-ansi "^7.1.2" +ora@^5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" + integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== + dependencies: + bl "^4.1.0" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-spinners "^2.5.0" + is-interactive "^1.0.0" + is-unicode-supported "^0.1.0" + log-symbols "^4.1.0" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + os-name@6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/os-name/-/os-name-6.1.0.tgz#eddc732f5fcf9d942b9183011aea008107bf7af1" @@ -6839,6 +7132,13 @@ p-limit@^4.0.0: dependencies: yocto-queue "^1.0.0" +p-limit@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-7.2.0.tgz#afcf6b5a86d093660140497dda0e640dd01a7b3b" + integrity sha512-ATHLtwoTNDloHRFFxFJdHnG6n2WUeFjaR8XQMFdKIv0xkXjrER8/iG9iu265jOM95zXHAfv9oTkqhrfbIzosrQ== + dependencies: + yocto-queue "^1.2.1" + p-locate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" @@ -7010,7 +7310,7 @@ perfect-debounce@^2.0.0: resolved "https://registry.yarnpkg.com/perfect-debounce/-/perfect-debounce-2.0.0.tgz#0ff94f1ecbe0a6bca4b1703a2ed08bbe43739aa7" integrity sha512-fkEH/OBiKrqqI/yIgjR92lMfs2K8105zt/VT6+7eTjNwisrsh47CeIED9z58zI7DfKdH3uHAn25ziRZn3kgAow== -picocolors@^1.1.1: +picocolors@^1.0.0, picocolors@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== @@ -7075,7 +7375,7 @@ prettier@^3.5.3: resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.6.2.tgz#ccda02a1003ebbb2bfda6f83a074978f608b9393" integrity sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ== -pretty-format@30.2.0: +pretty-format@30.2.0, pretty-format@^30.0.0: version "30.2.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-30.2.0.tgz#2d44fe6134529aed18506f6d11509d8a62775ebe" integrity sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA== @@ -7084,7 +7384,7 @@ pretty-format@30.2.0: ansi-styles "^5.2.0" react-is "^18.3.1" -pretty-format@^29.0.0, pretty-format@^29.7.0: +pretty-format@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== @@ -7322,7 +7622,7 @@ read-pkg@^9.0.0: type-fest "^4.6.0" unicorn-magic "^0.1.0" -readable-stream@^3.0.2: +readable-stream@^3.0.2, readable-stream@^3.4.0: version "3.6.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== @@ -7482,6 +7782,14 @@ resolve@^2.0.0-next.5: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + restore-cursor@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-5.1.0.tgz#0766d95699efacb14150993f55baf0953ea1ebe7" @@ -7671,7 +7979,7 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shell-quote@^1.6.1: +shell-quote@^1.6.1, shell-quote@^1.8.3: version "1.8.3" resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.3.tgz#55e40ef33cf5c689902353a3d8cd1a6725f08b4b" integrity sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw== @@ -7862,6 +8170,11 @@ stop-iteration-iterator@^1.1.0: es-errors "^1.3.0" internal-slot "^1.1.0" +string-argv@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" + integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== + string-length@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" @@ -8001,6 +8314,11 @@ strip-json-comments@^3.1.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +strnum@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.1.2.tgz#57bca4fbaa6f271081715dbc9ed7cee5493e28e4" + integrity sha512-vrN+B7DBIoTTZjnPNewwhx6cBA/H+IS7rfW68n7XxC1y7uoiGQBxaKzqucGUgavX15dJgiGztLJ8vxuEzwqBdA== + supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" @@ -8027,6 +8345,17 @@ synckit@^0.11.7, synckit@^0.11.8: dependencies: "@pkgr/core" "^0.2.9" +tar@^7.5.1: + version "7.5.2" + resolved "https://registry.yarnpkg.com/tar/-/tar-7.5.2.tgz#115c061495ec51ff3c6745ff8f6d0871c5b1dedc" + integrity sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg== + dependencies: + "@isaacs/fs-minipass" "^4.0.0" + chownr "^3.0.0" + minipass "^7.1.2" + minizlib "^3.1.0" + yallist "^5.0.0" + terser@^5.15.0: version "5.44.1" resolved "https://registry.yarnpkg.com/terser/-/terser-5.44.1.tgz#e391e92175c299b8c284ad6ded609e37303b0a9c" @@ -8071,7 +8400,7 @@ tinyexec@^1.0.0, tinyexec@^1.0.1: resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-1.0.2.tgz#bdd2737fe2ba40bd6f918ae26642f264b99ca251" integrity sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg== -tinyglobby@0.2.15: +tinyglobby@0.2.15, tinyglobby@^0.2.15: version "0.2.15" resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.15.tgz#e228dd1e638cea993d2fdb4fcd2d4602a79951c2" integrity sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ== @@ -8101,7 +8430,7 @@ ts-api-utils@^2.1.0: resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.1.0.tgz#595f7094e46eed364c13fd23e75f9513d29baf91" integrity sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ== -tslib@^2.0.1, tslib@^2.1.0, tslib@^2.4.0: +tslib@^2.0.1, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.0: version "2.8.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== @@ -8357,6 +8686,13 @@ walker@^1.0.7, walker@^1.0.8: dependencies: makeerror "1.0.12" +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== + dependencies: + defaults "^1.0.3" + whatwg-fetch@^3.0.0: version "3.6.20" resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz#580ce6d791facec91d37c72890995a0b48d31c70" @@ -8521,6 +8857,11 @@ yallist@^3.0.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== +yallist@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-5.0.0.tgz#00e2de443639ed0d78fd87de0d27469fbcffb533" + integrity sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw== + yaml@^2.6.1: version "2.8.1" resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.8.1.tgz#1870aa02b631f7e8328b93f8bc574fac5d6c4d79" @@ -8549,7 +8890,7 @@ yocto-queue@^0.1.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== -yocto-queue@^1.0.0: +yocto-queue@^1.0.0, yocto-queue@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.2.2.tgz#3e09c95d3f1aa89a58c114c99223edf639152c00" integrity sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ== From 7c3025f46446a8853310f46e4dbf3d7674369e3a Mon Sep 17 00:00:00 2001 From: artus9033 Date: Wed, 10 Dec 2025 21:10:42 +0100 Subject: [PATCH 02/72] feat: bootstrap CLI & add Android commands --- package.json | 16 +++++++ src/cli/index.ts | 122 +++++++++++++++++++++++++++++++++++++++++++++++ src/cli/types.ts | 4 ++ src/cli/utils.ts | 61 ++++++++++++++++++++++++ 4 files changed, 203 insertions(+) create mode 100644 src/cli/index.ts create mode 100644 src/cli/types.ts create mode 100644 src/cli/utils.ts diff --git a/package.json b/package.json index c347b180..82ea3e69 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,9 @@ "main": "lib/commonjs/index", "module": "lib/module/index", "types": "./lib/typescript/commonjs/src/index.d.ts", + "bin": { + "react-native-brownfield": "lib/commonjs/cli/index.js" + }, "react-native": "src/index", "exports": { ".": { @@ -64,6 +67,9 @@ "@types/react": "19.1.1" }, "peerDependencies": { + "@react-native-community/cli-config": "*", + "@react-native-community/cli-config-android": "*", + "@react-native-community/cli-types": "*", "react": "*", "react-native": "*" }, @@ -73,20 +79,30 @@ "@babel/runtime": "^7.25.0", "@commitlint/cli": "^20.1.0", "@commitlint/config-conventional": "^20.0.0", + "@react-native-community/cli-config": "^20.0.2", + "@react-native-community/cli-config-android": "^20.0.2", + "@react-native-community/cli-types": "^20.0.2", "@react-native/babel-preset": "0.82.1", "@react-native/eslint-config": "0.82.1", "@react-native/metro-config": "0.82.1", "@react-native/typescript-config": "0.82.1", "@release-it/conventional-changelog": "^10.0.1", + "@rock-js/platform-android": "^0.11.12", + "@rock-js/platform-ios": "^0.11.12", + "@rock-js/tools": "^0.11.12", "@types/jest": "^30.0.0", + "@types/lodash.clonedeep": "^4.5.9", + "@types/node": "^24.10.2", "@types/react": "^19.1.1", "@types/react-test-renderer": "^19.1.0", "babel-plugin-module-resolver": "5.0.2", + "commander": "^14.0.2", "eslint": "^8.57.1", "eslint-config-prettier": "^10.1.8", "eslint-plugin-prettier": "^5.1.3", "jest": "^30.2.0", "lefthook": "^2.0.3", + "lodash.clonedeep": "^4.5.0", "prettier": "^3.5.3", "react": "19.1.1", "react-native": "0.82.1", diff --git a/src/cli/index.ts b/src/cli/index.ts new file mode 100644 index 00000000..135bb54a --- /dev/null +++ b/src/cli/index.ts @@ -0,0 +1,122 @@ +#!/usr/bin/env node + +import loadConfig from '@react-native-community/cli-config/build/loadConfig'; +import { projectConfig } from '@react-native-community/cli-config-android'; + +import { Command } from 'commander'; + +import { version } from '../../package.json'; + +import { + packageAar, + packageAarOptions, + publishLocalAar, + publishLocalAarOptions, +} from '@rock-js/platform-android'; + +import { intro, logger } from '@rock-js/tools'; + +import { + curryOptions, + findProjectRoot, + getAarConfig, + makeRelativeAndroidProjectConfigPaths, +} from './utils'; + +const program = new Command(); + +program + .name('react-native-brownfield') + .description('React Native Brownfield library CLI') + .version(version) + .option('--verbose', 'Enable verbose output') + .hook('preAction', (_cmd) => { + const opts = program.opts(); + if (opts.verbose) { + logger.setVerbose(opts.verbose ?? false); + } + }); + +function commonAndroidPackageConfigParser( + projectRoot: string, + options: any, + callback: (config: ReturnType) => T +): T { + if (!options.moduleName) { + logger.warn( + 'No module name specified, packaging from root project. Usually, this is not what you want; if this fails, specify --module-name to target a specific module, which is usually "app".' + ); + } + + logger.debug('Project root found at:', projectRoot); + + const userConfig = loadConfig({ projectRoot, selectedPlatform: 'android' }); + + logger.debug('RN CLI user config loaded:', userConfig); + + const androidConfig = projectConfig( + projectRoot, + makeRelativeAndroidProjectConfigPaths( + projectRoot, + userConfig.project.android + ) + ); + + logger.debug('Android user config loaded:', userConfig); + + if (androidConfig) { + const config = getAarConfig(options, androidConfig); + return callback(config); + } else { + throw new Error('Android project not found.'); + } +} + +curryOptions( + program.command('package:android').description('Build Android package'), + packageAarOptions +).action(async (options) => { + const projectRoot = findProjectRoot(); + + intro( + `Building Android package ${options.moduleName ? `for module '${options.moduleName}'` : 'from root project'}...` + ); + + await commonAndroidPackageConfigParser(projectRoot, options, (config) => + packageAar(config, options) + ); +}); + +curryOptions( + program + .command('publish:android') + .description('Publish Android package to Maven local'), + publishLocalAarOptions +).action(async (options) => { + const projectRoot = findProjectRoot(); + + intro( + `Publishing Android package to Maven local ${options.moduleName ? `for module '${options.moduleName}'` : 'from root project'}...` + ); + + await commonAndroidPackageConfigParser(projectRoot, options, (config) => + publishLocalAar(config) + ); +}); + +// TODO: implement the below +program + .command('package:ios') + .description('Build iOS package') + .action((_options) => { + intro('Building iOS package...'); + + // const projectRoot = findProjectRoot(); + // const iosDir = path.join(projectRoot, 'ios'); + }); + +program.parse(process.argv); + +if (!process.argv.slice(2).length) { + program.outputHelp(); +} diff --git a/src/cli/types.ts b/src/cli/types.ts new file mode 100644 index 00000000..3be06856 --- /dev/null +++ b/src/cli/types.ts @@ -0,0 +1,4 @@ +export type RockOptions = { + name: string; + description: string; +}[]; diff --git a/src/cli/utils.ts b/src/cli/utils.ts new file mode 100644 index 00000000..713ef331 --- /dev/null +++ b/src/cli/utils.ts @@ -0,0 +1,61 @@ +import * as path from 'path'; +import * as fs from 'fs'; + +import type { AndroidProjectConfig } from '@react-native-community/cli-types'; +import { Command } from 'commander'; + +import cloneDeep from 'lodash.clonedeep'; + +import { type PackageAarFlags } from '@rock-js/platform-android'; +import type { RockOptions } from './types'; + +/** + * Helper function to find project root + * @returns The path to the project root directory + */ +export function findProjectRoot(): string { + let currentDir = process.cwd(); + + while (currentDir !== '/') { + if (fs.existsSync(path.join(currentDir, 'package.json'))) { + return currentDir; + } + currentDir = path.dirname(currentDir); + } + + throw new Error('Could not find project root (no package.json found)'); +} + +export const getAarConfig = ( + args: PackageAarFlags, + androidConfig: AndroidProjectConfig +) => { + const config = { + sourceDir: androidConfig.sourceDir, + moduleName: args.moduleName ?? '', + }; + return config; +}; + +export function curryOptions(programCommand: Command, options: RockOptions) { + options.forEach((option) => { + programCommand = programCommand.option(option.name, option.description); + }); + + return programCommand; +} + +export function makeRelativeAndroidProjectConfigPaths< + UserCfg extends AndroidProjectConfig | undefined, +>(projectRoot: string, userConfig: UserCfg): UserCfg { + const relativeConfig = cloneDeep(userConfig); + + if (userConfig?.sourceDir) { + relativeConfig!.sourceDir = path.relative( + projectRoot, + userConfig.sourceDir + ); + } + + return relativeConfig; +} From 3a402e53f912abfaf482ad2461e33c6f31cd9343 Mon Sep 17 00:00:00 2001 From: artus9033 Date: Wed, 10 Dec 2025 21:17:13 +0100 Subject: [PATCH 03/72] docs: added CLI docs --- README.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 693c321a..c4c0f05b 100644 --- a/README.md +++ b/README.md @@ -58,8 +58,61 @@ npm install @callstack/react-native-brownfield First, we need to package our React Native app as an XCFramework or Fat-AAR. +#### With the built-in CLI + +You can use the built-in CLI that comes with this library to package your React Native app for iOS and Android: + +##### Publish for iOS + +Simply run `npx react-native-brownfield package:ios` to create an XCFramework that you can later integrate into your native iOS app according to other instruction sections below. + +Available arguments: + +| Argument | Description | Default | +| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------- | +| --configuration | Explicitly set the scheme configuration to use. This option is case sensitive. | | +| --scheme | Explicitly set Xcode scheme to use | | +| --target | Explicitly set Xcode target to use | | +| --extra-params | Custom params that will be passed to xcodebuild command. | +| --export-extra-params | Custom params that will be passed to xcodebuild export archive command. Example: --export-extra-params "-allowProvisioningUpdates" | | +| --export-options-plist | Name of the export options file for archiving. Defaults to: ExportOptions.plist | ExportOptions.plist | +| --build-folder | Location for iOS build artifacts. Corresponds to Xcode's "-derivedDataPath". | "build" | +| --destination | Define destination(s) for the build. You can pass multiple destinations as separate values or repeated use of the flag. Values can be either: "simulator", "device" or destinations supported by "xcodebuild -destination" flag, e.g. "generic/platform=iOS" | | +| --archive | Create an Xcode archive (IPA) of the build, required for uploading to App Store Connect or distributing to TestFlight | | +| --no-install-pods | Skip automatic CocoaPods installation | | +| --no-new-arch | Run React Native in legacy async architecture. | | +| --local | Force local build with xcodebuild. | +| --verbose | | Enable verbose logging | false | + +##### Build for Android + +To build the artifact for Android without publishing, run `npx react-native-brownfield package:aar --module-name app`. + +Available arguments: + +| Argument | Description | Default | +| ------------- | ------------------------------------------------------------------------------------------------------------------------- | ---------------------- | +| --variant | Specify your app's build variant, which is constructed from build type and product flavor, e.g. 'debug' or 'freeRelease'. | 'debug' | +| --module-name | AAR module name | '' (root project) | +| --verbose | | Enable verbose logging | false | + + +##### Publish locally for Android + +To publish the `.aar`(s) built beforehand with `react-native-brownfield package:aar` to Maven local, which will allow Gradle to be able to load it from Maven local repository, run: + +`npx react-native-brownfield publish:android --module-name app` + +| Argument | Description | Default | +| ------------- | ------------------------------------------------------------------------------------------------------------------------- | ---------------------- | +| --variant | Specify your app's build variant, which is constructed from build type and product flavor, e.g. 'debug' or 'freeRelease'. | 'debug' | +| --module-name | AAR module name | '' (root project) | +| --verbose | | Enable verbose logging | false | + #### With Rock +It is very likely you will find Rock the easiest way to use brownfield in your React Native project. Rock provides for instance a clean template with `@callstack/react-native-brownfield` already integrated so you can easily bootstrap a new, clean brownfield project with zero manual configuration required. Below you will find instructions both for bootstrapping a new brownfield project and integrating your existing React Native app with Rock. + Follow [Integrating with Native Apps](https://www.rockjs.dev/docs/brownfield/intro) steps in Rock docs and run: - `rock package:ios` for iOS @@ -67,7 +120,7 @@ Follow [Integrating with Native Apps](https://www.rockjs.dev/docs/brownfield/int #### With custom scripts -Instead of using Rock, you can create your own custom packaging scripts. Here are base versions for iOS and Android that you'll need to adjust for your project-specific setup: +Alternatively, you can create your own custom packaging scripts. Here are base versions for iOS and Android that you'll need to adjust for your project-specific setup: - [Example iOS script](https://github.com/callstackincubator/modern-brownfield-ref/blob/main/scripts/build-xcframework.sh) - [Example Android script](https://github.com/callstackincubator/modern-brownfield-ref/blob/main/scripts/build-aar.sh) From 554ceb4edaed23eca5457f7457b744c73e23570a Mon Sep 17 00:00:00 2001 From: artus9033 Date: Wed, 10 Dec 2025 21:37:32 +0100 Subject: [PATCH 04/72] fix: update path to root project in metro and react-native config files --- example/react-native-cli/metro.config.cjs | 2 +- example/react-native-cli/react-native.config.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/react-native-cli/metro.config.cjs b/example/react-native-cli/metro.config.cjs index e55dbba7..b9e6d9b0 100644 --- a/example/react-native-cli/metro.config.cjs +++ b/example/react-native-cli/metro.config.cjs @@ -1,7 +1,7 @@ const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config'); const path = require('path'); -const root = path.resolve(__dirname, '..'); +const root = path.resolve(__dirname, '..', '..'); /** * Metro configuration diff --git a/example/react-native-cli/react-native.config.js b/example/react-native-cli/react-native.config.js index 78625816..63d55632 100644 --- a/example/react-native-cli/react-native.config.js +++ b/example/react-native-cli/react-native.config.js @@ -1,5 +1,5 @@ const path = require('path'); -const pkg = require('../package.json'); +const pkg = require('../../package.json'); module.exports = { project: { @@ -12,7 +12,7 @@ module.exports = { }, dependencies: { [pkg.name]: { - root: path.join(__dirname, '..'), + root: path.join(__dirname, '..', '..'), platforms: { // Codegen script incorrectly fails without this // So we explicitly specify the platforms with empty object From 106e4a63f11f93b6ef677486f6041784661b4d48 Mon Sep 17 00:00:00 2001 From: artus9033 Date: Thu, 11 Dec 2025 01:02:54 +0100 Subject: [PATCH 05/72] chore: upgraded pods in example app --- example/react-native-cli/swift/Podfile.lock | 92 +++++++++---------- .../SwiftExample.xcodeproj/project.pbxproj | 52 ++++++++--- 2 files changed, 84 insertions(+), 60 deletions(-) diff --git a/example/react-native-cli/swift/Podfile.lock b/example/react-native-cli/swift/Podfile.lock index a2f6d068..d4f1d477 100644 --- a/example/react-native-cli/swift/Podfile.lock +++ b/example/react-native-cli/swift/Podfile.lock @@ -2322,7 +2322,7 @@ PODS: - SocketRocket - ReactAppDependencyProvider (0.82.1): - ReactCodegen - - ReactBrownfield (1.2.0): + - ReactBrownfield (2.0.1): - boost - DoubleConversion - fast_float @@ -2573,7 +2573,7 @@ DEPENDENCIES: - React-utils (from `../node_modules/react-native/ReactCommon/react/utils`) - React-webperformancenativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/webperformance`) - ReactAppDependencyProvider (from `build/generated/ios`) - - ReactBrownfield (from `../..`) + - ReactBrownfield (from `../../..`) - ReactCodegen (from `build/generated/ios`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) - RNScreens (from `../node_modules/react-native-screens`) @@ -2729,7 +2729,7 @@ EXTERNAL SOURCES: ReactAppDependencyProvider: :path: build/generated/ios ReactBrownfield: - :path: "../.." + :path: "../../.." ReactCodegen: :path: build/generated/ios ReactCommon: @@ -2756,67 +2756,67 @@ SPEC CHECKSUMS: React-Core: 956ac86b4d9b0c0fd9a14b9cc533aa297bb501c0 React-CoreModules: 3a8d39778cf9eeca40e419814e875da1a8e29855 React-cxxreact: db275765e1eb08f038599fb44114cf57ee0d18cd - React-debug: 1dfa1d1cbd93bdaffa3b140190829f9fd9e27985 - React-defaultsnativemodule: 35f353ba06901fb5e374bc56e750fde05cbb05b9 - React-domnativemodule: cf9e1b1b520ce0e66396c2744b3eb6d419711c13 - React-Fabric: c0b0c1ad70476d354b3da9fef96094f7b37804da - React-FabricComponents: 8c6861c5233cf0d5685cee301a979313090e2f57 - React-FabricImage: cef8883d2fb6c892003fefcad261d2898adbe926 - React-featureflags: 0e2b969019c2b118de64a6d4c55ef7c05f2b0f1d - React-featureflagsnativemodule: e1ef619d14fe0a68d4783b32293309dbb13ef2a5 - React-graphics: 0fc6b7acaff7161bda05bf8bffceacc2b0b4e38d + React-debug: c8356d908286b1dc4cf90cd0977227dd61b7b1eb + React-defaultsnativemodule: df1a41d072194c96d0077dd30ee8d5d452397f26 + React-domnativemodule: 8abd63d26685a5c1c88c8ccc902876dc9c0e2d6f + React-Fabric: 1dea7e164181d7d688cfbd70a6e5f026e2df6bf5 + React-FabricComponents: 2a6f81481fa240a9239536402d72823f9d642925 + React-FabricImage: 513940cfd43193d3befb45dba9911f936bd74df7 + React-featureflags: bc1d980ff8356b931cd87c16700a39aaede1ed5a + React-featureflagsnativemodule: 4f7beedf0c241c44dcffc51e52a6178b5e0d541d + React-graphics: 69311413b44b6d228dbc705d8ce57ad0a4d55daf React-hermes: b454b9352bc26e638704d103009f659a125b86d3 - React-idlecallbacksnativemodule: 35ab292f8404c469744db5a5dd5f0f27f95e5ebf - React-ImageManager: 3312c550ebcf6b7d911d9993082adcb3e1407ce8 - React-jserrorhandler: 2a7f2d94566f05f8cb82288afd46bc0fd8b2ffc7 + React-idlecallbacksnativemodule: d15d469a152b7677d184a9538fae0744692e4575 + React-ImageManager: cce591e16cc6fa63ad5d45de012b4ddf31fd21e9 + React-jserrorhandler: 05fb248a535148a7eec94c786bd0e9e1413c6b3a React-jsi: 7aa265cf8372d8385ccc7935729e76d27e694dfe React-jsiexecutor: 8dd53bebfb3bc12f0541282aa4c858a433914e37 - React-jsinspector: f89b9ae62a4e2f6035b452442ef20a7f98f9cb27 - React-jsinspectorcdp: 44e46c1473a8deecf7b188389ed409be83fb3cc7 - React-jsinspectornetwork: dc9524f6e3d7694b1b6f4bd22dedad8ccc2c0a80 - React-jsinspectortracing: 0166ebbdfb125936a5d231895de3c11a19521dfc - React-jsitooling: 34692514ec8d8735938eda3677808a58f41c925b - React-jsitracing: a598dae84a87f8013635d09c5e7884023bda8501 + React-jsinspector: 0f62d1ffa7242033a1106f0af9f83ec12a381401 + React-jsinspectorcdp: 5ae22d48dcf03812cd4f8c4a6fd7c7204cd8789d + React-jsinspectornetwork: 9052eb6bbd876bfdafa1605874dd848511236844 + React-jsinspectortracing: 6d89a5caab7b86947607cf654fc94cf1c31f8330 + React-jsitooling: ecbd81f751b79ba748d4d0d54445da1b53e363fd + React-jsitracing: 8068734240da604902fead29287dc21b820bc7d3 React-logger: 500f2fa5697d224e63c33d913c8a4765319e19bf - React-Mapbuffer: 06d59c448da7e34eb05b3fb2189e12f6a30fec57 - React-microtasksnativemodule: d1ee999dc9052e23f6488b730fa2d383a4ea40e5 - react-native-safe-area-context: c00143b4823773bba23f2f19f85663ae89ceb460 - React-NativeModulesApple: 46690a0fe94ec28fc6fc686ec797b911d251ded0 + React-Mapbuffer: 4c50cf6af44286015a20a5995d5321f625c93459 + React-microtasksnativemodule: a84b9331106616ab1fa36de9ae555718d4bbdcf5 + react-native-safe-area-context: 0a3b034bb63a5b684dd2f5fffd3c90ef6ed41ee8 + React-NativeModulesApple: efd0906463c79d9b86197dbcf0d58358dff8c5ed React-oscompat: 95875e81f5d4b3c7b2c888d5bd2c9d83450d8bdb React-perflogger: 2e229bf33e42c094fd64516d89ec1187a2b79b5b - React-performancecdpmetrics: 05ba4bd83f36acf192071bb5d9c8f45faf04d140 - React-performancetimeline: bfc96fcd2b79f7489dd54e3df4cba186dd8dd141 + React-performancecdpmetrics: fd9bbc52960c6aa008fdae263849eb14411ae13e + React-performancetimeline: 16eaea3f8be5d42eb3bf8a261d87df2fe7e6e111 React-RCTActionSheet: 2399bb6cc8adaef2e5850878102fea2ad1788a0e React-RCTAnimation: d1deb6946e83e22a795a7d0148b94faad8851644 React-RCTAppDelegate: 10b35d5cec3f8653f6de843ae800b3ba8050b801 React-RCTBlob: 85150378edc42862d7c13ff2502693f32b174f91 - React-RCTFabric: 736f9da3ad57e2cef5fa4c132999933a89bb8378 - React-RCTFBReactNativeSpec: 705ec584758966950a31fa235539b57523059837 + React-RCTFabric: f57a14a48756480a7c96670d633cb39692eed453 + React-RCTFBReactNativeSpec: 725c3bb08b2f86741df136455960f2b58dd8f6e4 React-RCTImage: bb6cbdc22698b3afc8eb8d81ef03ee840d24c6f6 React-RCTLinking: e8b006d101c45651925de3e82189f03449eedfe7 React-RCTNetwork: 7999731af05ec8f591cbc6ad4e29d79e209c581a - React-RCTRuntime: 99d8a2a17747866fb972561cdb205afe9b26d369 + React-RCTRuntime: cdbbadadafcad5836fb0616073d7011c39c30ffd React-RCTSettings: 839f334abb92e917bc24322036081ffe15c84086 React-RCTText: 272f60e9a5dbfd14c348c85881ee7d5c7749a67c React-RCTVibration: 1ffa30a21e2227be3afe28d657ac8e6616c91bae - React-rendererconsistency: 3c3e198aba0255524ed7126aa812d22ce750d217 - React-renderercss: 6b3ce3dfadf991937ae3229112be843ef1438c32 - React-rendererdebug: baf9e1daa07ac7f9aca379555126d29f963ba38b - React-RuntimeApple: 4136aee89257894955ef09e9f9ef74f0c27596be - React-RuntimeCore: e9a743d7de4bbd741b16e10b26078d815d6513ab - React-runtimeexecutor: 781e292362066af82fa2478d95c6b0e374421844 - React-RuntimeHermes: 6ab3c2847516769fc860d711814f1735859cad74 - React-runtimescheduler: 824c83a5fd68b35396de6d4f2f9ae995daac861b - React-timing: 1ebc7102dd52a3edcc63534686bb156e12648411 - React-utils: abf37b162f560cd0e3e5d037af30bb796512246d - React-webperformancenativemodule: 50a57c713a90d27ae3ab947a6c9c8859bcb49709 + React-rendererconsistency: a51dcbe4b3c1159413cfdb85abace6a5c871a4b3 + React-renderercss: 5fdc31a529021337e7eac6f1e9bf4410947b877e + React-rendererdebug: 8427d2e5d1b7e39971c9c59e55bbfcb7884a942f + React-RuntimeApple: 9ba3723a539ed1701b8ba08dc317f1255c269a37 + React-RuntimeCore: 61b10d50472e29cd1ec98aba797d0d8d4f325283 + React-runtimeexecutor: 8e5135a09dcb012a15a025dc514361c927ea5db9 + React-RuntimeHermes: f06c7288967d0209fc075e5eabd5e851580047e9 + React-runtimescheduler: bd92275b3a847c71d10210ae89a8e04dba076630 + React-timing: 91f11a6537770b698eb8152e4669012992710b27 + React-utils: f06ff240e06e2bd4b34e48f1b34cac00866e8979 + React-webperformancenativemodule: b3398f8175fa96d992c071b1fa59bd6f9646b840 ReactAppDependencyProvider: a45ef34bb22dc1c9b2ac1f74167d9a28af961176 - ReactBrownfield: ba90b7c2be36c3ef4ad47e777610ca7c2b0fdf06 - ReactCodegen: 878add6c7d8ff8cea87697c44d29c03b79b6f2d9 - ReactCommon: 804dc80944fa90b86800b43c871742ec005ca424 - RNScreens: d821082c6dd1cb397cc0c98b026eeafaa68be479 + ReactBrownfield: 1609c411abb926b1fd3c8557ef67d4138fb56a02 + ReactCodegen: 0bce2d209e2e802589f4c5ff76d21618200e74cb + ReactCommon: 801eff8cb9c940c04d3a89ce399c343ee3eff654 + RNScreens: 98771ad898d1c0528fc8139606bbacf5a2e9d237 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 - Yoga: 8e01cef9947ca77f0477a098f0b32848a8e448c6 + Yoga: 46ff53afcbeda2bae19c85b65e17487c3e3984dd PODFILE CHECKSUM: c4add71d30d7b14523f41a732fbf4937f4edbe0f diff --git a/example/react-native-cli/swift/SwiftExample.xcodeproj/project.pbxproj b/example/react-native-cli/swift/SwiftExample.xcodeproj/project.pbxproj index 8e0dfd2c..c646cb3f 100644 --- a/example/react-native-cli/swift/SwiftExample.xcodeproj/project.pbxproj +++ b/example/react-native-cli/swift/SwiftExample.xcodeproj/project.pbxproj @@ -7,10 +7,10 @@ objects = { /* Begin PBXBuildFile section */ + 07DDA3BBB03D9EF5430BC4A3 /* Pods_SwiftExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F09897B6313D097F0F506EC3 /* Pods_SwiftExample.framework */; }; 2869185C23129ECF00458242 /* App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2869185B23129ECF00458242 /* App.swift */; }; 2869186323129ED100458242 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2869186223129ED100458242 /* Assets.xcassets */; }; 2869186623129ED100458242 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2869186423129ED100458242 /* LaunchScreen.storyboard */; }; - AC7E040409DFEE553311B27E /* libPods-SwiftExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CF9653D1882655DA02862F71 /* libPods-SwiftExample.a */; }; ED52AE6E1313AAE3C968412D /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 33BE347ABB4EE17F7F99D32D /* PrivacyInfo.xcprivacy */; }; /* End PBXBuildFile section */ @@ -22,8 +22,8 @@ 2869186723129ED100458242 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 33BE347ABB4EE17F7F99D32D /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 5BE9069F7C8AF5853F650B68 /* Pods-SwiftExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftExample.debug.xcconfig"; path = "Target Support Files/Pods-SwiftExample/Pods-SwiftExample.debug.xcconfig"; sourceTree = ""; }; - CF9653D1882655DA02862F71 /* libPods-SwiftExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SwiftExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; E74DC3AFAC0967529ED1C063 /* Pods-SwiftExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftExample.release.xcconfig"; path = "Target Support Files/Pods-SwiftExample/Pods-SwiftExample.release.xcconfig"; sourceTree = ""; }; + F09897B6313D097F0F506EC3 /* Pods_SwiftExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -31,7 +31,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - AC7E040409DFEE553311B27E /* libPods-SwiftExample.a in Frameworks */, + 07DDA3BBB03D9EF5430BC4A3 /* Pods_SwiftExample.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -72,7 +72,7 @@ F4733EE8C5738566111C3C12 /* Frameworks */ = { isa = PBXGroup; children = ( - CF9653D1882655DA02862F71 /* libPods-SwiftExample.a */, + F09897B6313D097F0F506EC3 /* Pods_SwiftExample.framework */, ); name = Frameworks; sourceTree = ""; @@ -157,14 +157,10 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); - outputPaths = ( - ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-frameworks.sh\"\n"; @@ -236,14 +232,10 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-resources-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - ); name = "[CP] Copy Pods Resources"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-resources-${CONFIGURATION}-output-files.xcfilelist", ); - outputPaths = ( - ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-resources.sh\"\n"; @@ -328,6 +320,19 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core", + "${PODS_CONFIGURATION_BUILD_DIR}/React-runtimeexecutor/React_runtimeexecutor.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-runtimeexecutor/React_runtimeexecutor.framework/Headers/platform/ios", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", + "${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios", + ); IPHONEOS_DEPLOYMENT_TARGET = 15.6; LD = ""; LDPLUSPLUS = ""; @@ -336,7 +341,10 @@ ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = "$(inherited)"; OTHER_CPLUSPLUSFLAGS = "$(inherited)"; - OTHER_LDFLAGS = "$(inherited) "; + OTHER_LDFLAGS = ( + "$(inherited)", + " ", + ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; @@ -393,6 +401,19 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core", + "${PODS_CONFIGURATION_BUILD_DIR}/React-runtimeexecutor/React_runtimeexecutor.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-runtimeexecutor/React_runtimeexecutor.framework/Headers/platform/ios", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", + "${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios", + ); IPHONEOS_DEPLOYMENT_TARGET = 15.6; LD = ""; LDPLUSPLUS = ""; @@ -400,7 +421,10 @@ MTL_FAST_MATH = YES; OTHER_CFLAGS = "$(inherited)"; OTHER_CPLUSPLUSFLAGS = "$(inherited)"; - OTHER_LDFLAGS = "$(inherited) "; + OTHER_LDFLAGS = ( + "$(inherited)", + " ", + ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; From b1d95102405cca5d0def99b9c8e8731f5d25a532 Mon Sep 17 00:00:00 2001 From: artus9033 Date: Thu, 11 Dec 2025 12:38:07 +0100 Subject: [PATCH 06/72] feat: ios support PoC using Rock utilities --- .../SwiftExample.xcodeproj/project.pbxproj | 18 +-- package.json | 1 + src/cli/index.ts | 118 +++++++++++++++--- src/cli/types.ts | 2 + src/cli/utils.ts | 75 ++++++++++- 5 files changed, 188 insertions(+), 26 deletions(-) diff --git a/example/react-native-cli/swift/SwiftExample.xcodeproj/project.pbxproj b/example/react-native-cli/swift/SwiftExample.xcodeproj/project.pbxproj index c646cb3f..5e2fb9eb 100644 --- a/example/react-native-cli/swift/SwiftExample.xcodeproj/project.pbxproj +++ b/example/react-native-cli/swift/SwiftExample.xcodeproj/project.pbxproj @@ -157,10 +157,14 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); + inputPaths = ( + ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); + outputPaths = ( + ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-frameworks.sh\"\n"; @@ -232,10 +236,14 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-resources-${CONFIGURATION}-input-files.xcfilelist", ); + inputPaths = ( + ); name = "[CP] Copy Pods Resources"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-resources-${CONFIGURATION}-output-files.xcfilelist", ); + outputPaths = ( + ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-resources.sh\"\n"; @@ -341,10 +349,7 @@ ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = "$(inherited)"; OTHER_CPLUSPLUSFLAGS = "$(inherited)"; - OTHER_LDFLAGS = ( - "$(inherited)", - " ", - ); + OTHER_LDFLAGS = "$(inherited) "; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; @@ -421,10 +426,7 @@ MTL_FAST_MATH = YES; OTHER_CFLAGS = "$(inherited)"; OTHER_CPLUSPLUSFLAGS = "$(inherited)"; - OTHER_LDFLAGS = ( - "$(inherited)", - " ", - ); + OTHER_LDFLAGS = "$(inherited) "; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/package.json b/package.json index 82ea3e69..ff15faf7 100644 --- a/package.json +++ b/package.json @@ -88,6 +88,7 @@ "@react-native/typescript-config": "0.82.1", "@release-it/conventional-changelog": "^10.0.1", "@rock-js/platform-android": "^0.11.12", + "@rock-js/platform-apple-helpers": "^0.11.12", "@rock-js/platform-ios": "^0.11.12", "@rock-js/tools": "^0.11.12", "@types/jest": "^30.0.0", diff --git a/src/cli/index.ts b/src/cli/index.ts index 135bb54a..1c6469e7 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -1,12 +1,11 @@ #!/usr/bin/env node +import path from 'node:path'; + import loadConfig from '@react-native-community/cli-config/build/loadConfig'; import { projectConfig } from '@react-native-community/cli-config-android'; -import { Command } from 'commander'; - -import { version } from '../../package.json'; - +import { spinner, intro, logger, outro, relativeToCwd } from '@rock-js/tools'; import { packageAar, packageAarOptions, @@ -14,14 +13,16 @@ import { publishLocalAarOptions, } from '@rock-js/platform-android'; -import { intro, logger } from '@rock-js/tools'; +import { Command } from 'commander'; import { curryOptions, + executeCommand, findProjectRoot, getAarConfig, makeRelativeAndroidProjectConfigPaths, } from './utils'; +import { version } from '../../package.json'; const program = new Command(); @@ -44,7 +45,7 @@ function commonAndroidPackageConfigParser( ): T { if (!options.moduleName) { logger.warn( - 'No module name specified, packaging from root project. Usually, this is not what you want; if this fails, specify --module-name to target a specific module, which is usually "app".' + 'No module name specified, packaging from root project. Usually, this is not what you want; if this fails, specify --module-name to target a specific module.' ); } @@ -104,16 +105,103 @@ curryOptions( ); }); -// TODO: implement the below -program - .command('package:ios') - .description('Build iOS package') - .action((_options) => { - intro('Building iOS package...'); +curryOptions(program.command('package:ios').description('Build iOS package'), [ + { + name: '--workspace ', + description: 'The Xcode workspace to build', + }, + { + name: '--scheme ', + description: 'The Xcode scheme to build', + }, + { + name: '--configuration ', + description: 'The build configuration to use (Debug/Release)', + value: 'Debug', + }, + { + name: '--sdk ', + description: 'The SDK to build for (e.g. iphoneos/iphonesimulator)', + value: 'iphonesimulator', + }, +]).action(async (options) => { + const projectRoot = findProjectRoot(); + const userConfig = loadConfig({ projectRoot, selectedPlatform: 'ios' }); - // const projectRoot = findProjectRoot(); - // const iosDir = path.join(projectRoot, 'ios'); - }); + const { xcodeProject, sourceDir: iosBaseDir } = userConfig.project.ios!; + + intro( + `Building iOS package from project '${xcodeProject?.name ?? '(no name configured)'}'...` + ); + + logger.debug('Detected user config:', userConfig); + logger.debug('Detected Xcode project config:', xcodeProject); + + const buildFolder = options.buildFolder ?? path.join(iosBaseDir, 'build'); + + let scheme = options.scheme; + + if (!scheme) { + const results = await executeCommand('xcodebuild', ['-list', '-json'], { + cwd: iosBaseDir, + }); + + let schemes: string[]; + try { + const parsed = JSON.parse(results.join(' ')); + schemes = parsed!.project!.schemes; + } catch { + throw new Error("Couldn't parse xcodebuild output"); + } + + if (schemes.length === 0) { + throw new Error( + 'No schemes found in the Xcode project. Please specify one using --scheme.' + ); + } + + scheme = schemes[0]; + } + + const workspace = options.workspace ?? xcodeProject!.name; + + if (!workspace) { + throw new Error( + 'No workspace specified and could not be inferred from the config. Please specify one using --workspace.' + ); + } + + const platform = options.sdk === 'iphonesimulator' ? 'iOS Simulator' : 'iOS'; + + const { start, stop } = spinner(); + + start(`Packaging framework for ${platform}...`); + await executeCommand( + 'xcodebuild', + [ + '-workspace', + workspace, + '-scheme', + scheme, + '-configuration', + options.configuration, + '-sdk', + options.sdk, + '-destination', + `platform=${platform}`, + 'build', + 'CODE_SIGNING_ALLOWED=NO', + `BUILD_DIR=${relativeToCwd(buildFolder)}`, + ], + { + cwd: iosBaseDir, + } + ); + + stop(); + + outro('Success 🎉'); +}); program.parse(process.argv); diff --git a/src/cli/types.ts b/src/cli/types.ts index 3be06856..314b2a3e 100644 --- a/src/cli/types.ts +++ b/src/cli/types.ts @@ -1,4 +1,6 @@ export type RockOptions = { name: string; description: string; + parse?: (args: string) => string; + value?: string; }[]; diff --git a/src/cli/utils.ts b/src/cli/utils.ts index 713ef331..bd8cd077 100644 --- a/src/cli/utils.ts +++ b/src/cli/utils.ts @@ -2,11 +2,12 @@ import * as path from 'path'; import * as fs from 'fs'; import type { AndroidProjectConfig } from '@react-native-community/cli-types'; -import { Command } from 'commander'; +import { type PackageAarFlags } from '@rock-js/platform-android'; +import { spawn, type SpawnOptions } from 'child_process'; +import { Command } from 'commander'; import cloneDeep from 'lodash.clonedeep'; -import { type PackageAarFlags } from '@rock-js/platform-android'; import type { RockOptions } from './types'; /** @@ -39,7 +40,20 @@ export const getAarConfig = ( export function curryOptions(programCommand: Command, options: RockOptions) { options.forEach((option) => { - programCommand = programCommand.option(option.name, option.description); + if (option.parse) { + programCommand = programCommand.option( + option.name, + option.description, + option.parse, + option.value + ); + } else { + programCommand = programCommand.option( + option.name, + option.description, + option.value + ); + } }); return programCommand; @@ -59,3 +73,58 @@ export function makeRelativeAndroidProjectConfigPaths< return relativeConfig; } + +export async function executeCommand( + command: string, + args: string[], + options: SpawnOptions = {} +): Promise { + return new Promise((resolve, reject) => { + const child = spawn(command, args, { + stdio: ['inherit', 'pipe', 'pipe'], + ...options, + }); + + let stdout = ''; + let stderr = ''; + + if (child.stdout) { + child.stdout.on('data', (data) => { + stdout += data.toString(); + }); + } + + if (child.stderr) { + child.stderr.on('data', (data) => { + stderr += data.toString(); + }); + } + + const onSigint = () => { + child.kill('SIGINT'); + }; + + process.once('SIGINT', onSigint); + + child.on('close', (code) => { + process.removeListener('SIGINT', onSigint); + + if (code !== 0) { + console.error(stdout); + console.error(stderr); + return reject( + new Error( + `Command "${command} ${args.join(' ')}" failed with exit code ${code}` + ) + ); + } + + resolve([stdout, stderr]); + }); + + child.on('error', (err) => { + process.removeListener('SIGINT', onSigint); + reject(err); + }); + }); +} From 01ad7b46e057363b6d8873c89ab6a7a8eeb66833 Mon Sep 17 00:00:00 2001 From: artus9033 Date: Thu, 11 Dec 2025 14:42:33 +0100 Subject: [PATCH 07/72] chore: bootstrap new RN app with RN CLI --- .github/workflows/build.yml | 6 +- .gitignore | 2 +- example/RNApp/.bundle/config | 2 + example/RNApp/.gitignore | 75 + example/RNApp/.watchmanconfig | 1 + example/RNApp/App.tsx | 95 + example/RNApp/Gemfile | 16 + example/RNApp/Gemfile.lock | 121 + example/RNApp/README.md | 97 + example/RNApp/__tests__/App.test.tsx | 13 + example/RNApp/android/app/build.gradle | 119 + example/RNApp/android/app/debug.keystore | Bin 0 -> 2257 bytes example/RNApp/android/app/proguard-rules.pro | 10 + .../android/app/src/main/AndroidManifest.xml | 27 + .../src/main/java/com/rnapp/MainActivity.kt | 22 + .../main/java/com/rnapp/MainApplication.kt | 27 + .../res/drawable/rn_edit_text_material.xml | 37 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 3056 bytes .../res/mipmap-hdpi/ic_launcher_round.png | Bin 0 -> 5024 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 2096 bytes .../res/mipmap-mdpi/ic_launcher_round.png | Bin 0 -> 2858 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 4569 bytes .../res/mipmap-xhdpi/ic_launcher_round.png | Bin 0 -> 7098 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 6464 bytes .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin 0 -> 10676 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 9250 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 0 -> 15523 bytes .../app/src/main/res/values/strings.xml | 3 + .../app/src/main/res/values/styles.xml | 9 + example/RNApp/android/build.gradle | 21 + example/RNApp/android/gradle.properties | 44 + .../android/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 45457 bytes .../gradle/wrapper/gradle-wrapper.properties | 7 + example/RNApp/android/gradlew | 251 + example/RNApp/android/gradlew.bat | 99 + example/RNApp/android/settings.gradle | 6 + example/RNApp/app.json | 4 + example/RNApp/babel.config.js | 13 + example/RNApp/index.js | 9 + example/RNApp/ios/.xcode.env | 11 + example/RNApp/ios/Podfile | 34 + example/RNApp/ios/Podfile.lock | 2870 ++++++++ .../RNApp/ios/RNApp.xcodeproj/project.pbxproj | 480 ++ .../xcshareddata/xcschemes/RNApp.xcscheme | 88 + .../contents.xcworkspacedata | 10 + example/RNApp/ios/RNApp/AppDelegate.swift | 48 + .../AppIcon.appiconset/Contents.json | 53 + .../ios/RNApp/Images.xcassets/Contents.json | 6 + example/RNApp/ios/RNApp/Info.plist | 55 + .../RNApp/ios/RNApp/LaunchScreen.storyboard | 47 + example/RNApp/ios/RNApp/PrivacyInfo.xcprivacy | 37 + example/RNApp/metro.config.js | 11 + example/RNApp/package.json | 44 + example/RNApp/react-native.config.js | 21 + example/RNApp/yarn.lock | 6541 +++++++++++++++++ 55 files changed, 11488 insertions(+), 4 deletions(-) create mode 100644 example/RNApp/.bundle/config create mode 100644 example/RNApp/.gitignore create mode 100644 example/RNApp/.watchmanconfig create mode 100644 example/RNApp/App.tsx create mode 100644 example/RNApp/Gemfile create mode 100644 example/RNApp/Gemfile.lock create mode 100644 example/RNApp/README.md create mode 100644 example/RNApp/__tests__/App.test.tsx create mode 100644 example/RNApp/android/app/build.gradle create mode 100644 example/RNApp/android/app/debug.keystore create mode 100644 example/RNApp/android/app/proguard-rules.pro create mode 100644 example/RNApp/android/app/src/main/AndroidManifest.xml create mode 100644 example/RNApp/android/app/src/main/java/com/rnapp/MainActivity.kt create mode 100644 example/RNApp/android/app/src/main/java/com/rnapp/MainApplication.kt create mode 100644 example/RNApp/android/app/src/main/res/drawable/rn_edit_text_material.xml create mode 100644 example/RNApp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 example/RNApp/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png create mode 100644 example/RNApp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 example/RNApp/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png create mode 100644 example/RNApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 example/RNApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png create mode 100644 example/RNApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 example/RNApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png create mode 100644 example/RNApp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 example/RNApp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png create mode 100644 example/RNApp/android/app/src/main/res/values/strings.xml create mode 100644 example/RNApp/android/app/src/main/res/values/styles.xml create mode 100644 example/RNApp/android/build.gradle create mode 100644 example/RNApp/android/gradle.properties create mode 100644 example/RNApp/android/gradle/wrapper/gradle-wrapper.jar create mode 100644 example/RNApp/android/gradle/wrapper/gradle-wrapper.properties create mode 100755 example/RNApp/android/gradlew create mode 100644 example/RNApp/android/gradlew.bat create mode 100644 example/RNApp/android/settings.gradle create mode 100644 example/RNApp/app.json create mode 100644 example/RNApp/babel.config.js create mode 100644 example/RNApp/index.js create mode 100644 example/RNApp/ios/.xcode.env create mode 100644 example/RNApp/ios/Podfile create mode 100644 example/RNApp/ios/Podfile.lock create mode 100644 example/RNApp/ios/RNApp.xcodeproj/project.pbxproj create mode 100644 example/RNApp/ios/RNApp.xcodeproj/xcshareddata/xcschemes/RNApp.xcscheme create mode 100644 example/RNApp/ios/RNApp.xcworkspace/contents.xcworkspacedata create mode 100644 example/RNApp/ios/RNApp/AppDelegate.swift create mode 100644 example/RNApp/ios/RNApp/Images.xcassets/AppIcon.appiconset/Contents.json create mode 100644 example/RNApp/ios/RNApp/Images.xcassets/Contents.json create mode 100644 example/RNApp/ios/RNApp/Info.plist create mode 100644 example/RNApp/ios/RNApp/LaunchScreen.storyboard create mode 100644 example/RNApp/ios/RNApp/PrivacyInfo.xcprivacy create mode 100644 example/RNApp/metro.config.js create mode 100644 example/RNApp/package.json create mode 100644 example/RNApp/react-native.config.js create mode 100644 example/RNApp/yarn.lock diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 78685715..e22f11ec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,7 +40,7 @@ jobs: - name: Build Android App run: | - cd example/react-native-cli/kotlin + cd example/self-contained-app/kotlin ./gradlew assembleDebug ios: @@ -79,10 +79,10 @@ jobs: - name: Install pods run: | - cd example/react-native-cli/swift + cd example/self-contained-app/swift pod install - name: Build iOS App run: | - cd example/react-native-cli/swift + cd example/self-contained-app/swift xcodebuild -workspace SwiftExample.xcworkspace -scheme SwiftExample -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 16' build CODE_SIGNING_ALLOWED=NO diff --git a/.gitignore b/.gitignore index 49615d95..f8a19589 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,7 @@ build/ .gradle local.properties *.iml -example/react-native-cli/kotlin/build/ +example/self-contained-app/kotlin/build/ *.iml *.hprof **/.cxx/ diff --git a/example/RNApp/.bundle/config b/example/RNApp/.bundle/config new file mode 100644 index 00000000..848943bb --- /dev/null +++ b/example/RNApp/.bundle/config @@ -0,0 +1,2 @@ +BUNDLE_PATH: "vendor/bundle" +BUNDLE_FORCE_RUBY_PLATFORM: 1 diff --git a/example/RNApp/.gitignore b/example/RNApp/.gitignore new file mode 100644 index 00000000..de999559 --- /dev/null +++ b/example/RNApp/.gitignore @@ -0,0 +1,75 @@ +# OSX +# +.DS_Store + +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate +**/.xcode.env.local + +# Android/IntelliJ +# +build/ +.idea +.gradle +local.properties +*.iml +*.hprof +.cxx/ +*.keystore +!debug.keystore +.kotlin/ + +# node.js +# +node_modules/ +npm-debug.log +yarn-error.log + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/ + +**/fastlane/report.xml +**/fastlane/Preview.html +**/fastlane/screenshots +**/fastlane/test_output + +# Bundle artifact +*.jsbundle + +# Ruby / CocoaPods +**/Pods/ +/vendor/bundle/ + +# Temporary files created by Metro to check the health of the file watcher +.metro-health-check* + +# testing +/coverage + +# Yarn +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions diff --git a/example/RNApp/.watchmanconfig b/example/RNApp/.watchmanconfig new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/example/RNApp/.watchmanconfig @@ -0,0 +1 @@ +{} diff --git a/example/RNApp/App.tsx b/example/RNApp/App.tsx new file mode 100644 index 00000000..8c52685f --- /dev/null +++ b/example/RNApp/App.tsx @@ -0,0 +1,95 @@ +import React, { useEffect } from 'react'; +import { StyleSheet, Text, View, Button } from 'react-native'; +import { + createNativeStackNavigator, + type NativeStackScreenProps, +} from '@react-navigation/native-stack'; +import ReactNativeBrownfield from '@callstack/react-native-brownfield'; +import { NavigationContainer } from '@react-navigation/native'; + +const getRandomValue = () => Math.round(Math.random() * 255); +const getRandomTheme = () => { + const primary = [getRandomValue(), getRandomValue(), getRandomValue()]; + const secondary = [ + 255 - (primary?.[0] || 0), + 255 - (primary?.[1] || 0), + 255 - (primary?.[2] || 0), + ]; + + return { + primary: `rgb(${primary[0]}, ${primary[1]}, ${primary[2]})`, + secondary: `rgb(${secondary[0]}, ${secondary[1]}, ${secondary[2]})`, + }; +}; + +type Props = NativeStackScreenProps; + +function HomeScreen({ navigation, route }: Props) { + const colors = route.params?.theme || getRandomTheme(); + + useEffect(() => { + const unsubscribe = navigation.addListener('focus', () => { + const isFirstRoute = !navigation.canGoBack(); + ReactNativeBrownfield.setNativeBackGestureAndButtonEnabled(isFirstRoute); + }); + return unsubscribe; + }, [navigation]); + + return ( + + + React Native Screen + + +