@nrwl/react-native 16.0.0-beta.0 → 16.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/executors.json +40 -40
- package/generators.json +2 -107
- package/index.d.ts +1 -5
- package/index.js +2 -11
- package/index.js.map +1 -1
- package/package.json +7 -25
- package/plugins/jest/svg-mock.js.map +1 -1
- package/plugins/with-nx-metro.d.ts +1 -8
- package/plugins/with-nx-metro.js +2 -29
- package/plugins/with-nx-metro.js.map +1 -1
- package/.eslintrc.json +0 -19
- package/README.md +0 -63
- package/migrations.json +0 -1285
- package/plugins/metro-resolver.d.ts +0 -1
- package/plugins/metro-resolver.js +0 -135
- package/plugins/metro-resolver.js.map +0 -1
- package/project.json +0 -61
- package/src/executors/build-android/build-android.impl.d.ts +0 -6
- package/src/executors/build-android/build-android.impl.js +0 -76
- package/src/executors/build-android/build-android.impl.js.map +0 -1
- package/src/executors/build-android/build-android.impl.ts +0 -108
- package/src/executors/build-android/compat.d.ts +0 -2
- package/src/executors/build-android/compat.js +0 -6
- package/src/executors/build-android/compat.js.map +0 -1
- package/src/executors/build-android/schema.d.ts +0 -31
- package/src/executors/build-android/schema.json +0 -102
- package/src/executors/build-ios/build-ios.impl.d.ts +0 -6
- package/src/executors/build-ios/build-ios.impl.js +0 -77
- package/src/executors/build-ios/build-ios.impl.js.map +0 -1
- package/src/executors/build-ios/build-ios.impl.ts +0 -118
- package/src/executors/build-ios/compat.d.ts +0 -2
- package/src/executors/build-ios/compat.js +0 -6
- package/src/executors/build-ios/compat.js.map +0 -1
- package/src/executors/build-ios/schema.d.ts +0 -22
- package/src/executors/build-ios/schema.json +0 -106
- package/src/executors/bundle/bundle.impl.d.ts +0 -6
- package/src/executors/bundle/bundle.impl.js +0 -58
- package/src/executors/bundle/bundle.impl.js.map +0 -1
- package/src/executors/bundle/bundle.impl.ts +0 -76
- package/src/executors/bundle/compat.d.ts +0 -2
- package/src/executors/bundle/compat.js +0 -6
- package/src/executors/bundle/compat.js.map +0 -1
- package/src/executors/bundle/schema.d.ts +0 -16
- package/src/executors/bundle/schema.json +0 -92
- package/src/executors/ensure-symlink/compat.d.ts +0 -2
- package/src/executors/ensure-symlink/compat.js +0 -6
- package/src/executors/ensure-symlink/compat.js.map +0 -1
- package/src/executors/ensure-symlink/ensure-symlink.impl.d.ts +0 -5
- package/src/executors/ensure-symlink/ensure-symlink.impl.js +0 -13
- package/src/executors/ensure-symlink/ensure-symlink.impl.js.map +0 -1
- package/src/executors/ensure-symlink/ensure-symlink.impl.ts +0 -18
- package/src/executors/ensure-symlink/schema.json +0 -11
- package/src/executors/pod-install/compat.d.ts +0 -2
- package/src/executors/pod-install/compat.js +0 -6
- package/src/executors/pod-install/compat.js.map +0 -1
- package/src/executors/pod-install/pod-install.impl.d.ts +0 -6
- package/src/executors/pod-install/pod-install.impl.js +0 -15
- package/src/executors/pod-install/pod-install.impl.js.map +0 -1
- package/src/executors/pod-install/pod-install.impl.ts +0 -21
- package/src/executors/pod-install/schema.d.ts +0 -3
- package/src/executors/pod-install/schema.json +0 -18
- package/src/executors/run-android/compat.d.ts +0 -2
- package/src/executors/run-android/compat.js +0 -6
- package/src/executors/run-android/compat.js.map +0 -1
- package/src/executors/run-android/run-android.impl.d.ts +0 -6
- package/src/executors/run-android/run-android.impl.js +0 -72
- package/src/executors/run-android/run-android.impl.js.map +0 -1
- package/src/executors/run-android/run-android.impl.ts +0 -110
- package/src/executors/run-android/schema.d.ts +0 -24
- package/src/executors/run-android/schema.json +0 -121
- package/src/executors/run-ios/compat.d.ts +0 -2
- package/src/executors/run-ios/compat.js +0 -6
- package/src/executors/run-ios/compat.js.map +0 -1
- package/src/executors/run-ios/run-ios.impl.d.ts +0 -6
- package/src/executors/run-ios/run-ios.impl.js +0 -78
- package/src/executors/run-ios/run-ios.impl.js.map +0 -1
- package/src/executors/run-ios/run-ios.impl.ts +0 -120
- package/src/executors/run-ios/schema.d.ts +0 -12
- package/src/executors/run-ios/schema.json +0 -119
- package/src/executors/start/compat.d.ts +0 -2
- package/src/executors/start/compat.js +0 -6
- package/src/executors/start/compat.js.map +0 -1
- package/src/executors/start/lib/is-packager-running.d.ts +0 -1
- package/src/executors/start/lib/is-packager-running.js +0 -19
- package/src/executors/start/lib/is-packager-running.js.map +0 -1
- package/src/executors/start/schema.d.ts +0 -7
- package/src/executors/start/schema.json +0 -28
- package/src/executors/start/start.impl.d.ts +0 -8
- package/src/executors/start/start.impl.js +0 -99
- package/src/executors/start/start.impl.js.map +0 -1
- package/src/executors/start/start.impl.ts +0 -120
- package/src/executors/storybook/compat.d.ts +0 -2
- package/src/executors/storybook/compat.js +0 -6
- package/src/executors/storybook/compat.js.map +0 -1
- package/src/executors/storybook/schema.d.ts +0 -7
- package/src/executors/storybook/schema.json +0 -34
- package/src/executors/storybook/storybook.impl.d.ts +0 -5
- package/src/executors/storybook/storybook.impl.js +0 -76
- package/src/executors/storybook/storybook.impl.js.map +0 -1
- package/src/executors/storybook/storybook.impl.ts +0 -105
- package/src/executors/sync-deps/compat.d.ts +0 -2
- package/src/executors/sync-deps/compat.js +0 -6
- package/src/executors/sync-deps/compat.js.map +0 -1
- package/src/executors/sync-deps/schema.d.ts +0 -4
- package/src/executors/sync-deps/schema.json +0 -28
- package/src/executors/sync-deps/sync-deps.impl.d.ts +0 -8
- package/src/executors/sync-deps/sync-deps.impl.js +0 -62
- package/src/executors/sync-deps/sync-deps.impl.js.map +0 -1
- package/src/executors/sync-deps/sync-deps.impl.ts +0 -101
- package/src/generators/application/application.d.ts +0 -5
- package/src/generators/application/application.js +0 -40
- package/src/generators/application/application.js.map +0 -1
- package/src/generators/application/application.spec.ts +0 -214
- package/src/generators/application/files/app/.ruby-version +0 -1
- package/src/generators/application/files/app/Gemfile.template +0 -6
- package/src/generators/application/files/app/android/app/build.gradle.template +0 -184
- package/src/generators/application/files/app/android/app/debug.keystore +0 -0
- package/src/generators/application/files/app/android/app/proguard-rules.pro +0 -10
- package/src/generators/application/files/app/android/app/src/androidTest/java/com/__lowerCaseName__/DetoxTest.java.template +0 -30
- package/src/generators/application/files/app/android/app/src/debug/AndroidManifest.xml.template +0 -14
- package/src/generators/application/files/app/android/app/src/debug/java/com/__lowerCaseName__/ReactNativeFlipper.java.template +0 -75
- package/src/generators/application/files/app/android/app/src/main/AndroidManifest.xml.template +0 -26
- package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainActivity.java.template +0 -35
- package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainApplication.java.template +0 -63
- package/src/generators/application/files/app/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/values/strings.xml.template +0 -3
- package/src/generators/application/files/app/android/app/src/main/res/values/styles.xml +0 -9
- package/src/generators/application/files/app/android/app/src/main/res/xml/network_security_config.xml +0 -7
- package/src/generators/application/files/app/android/app/src/release/java/com/__lowerCaseName__/ReactNativeFlipper.java.template +0 -20
- package/src/generators/application/files/app/android/build.gradle.template +0 -34
- package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/src/generators/application/files/app/android/gradle.properties +0 -44
- package/src/generators/application/files/app/android/gradlew.bat +0 -89
- package/src/generators/application/files/app/android/gradlew.template +0 -234
- package/src/generators/application/files/app/android/settings.gradle.template +0 -7
- package/src/generators/application/files/app/app.json.template +0 -4
- package/src/generators/application/files/app/babel.config.json.template +0 -3
- package/src/generators/application/files/app/ios/.xcode.env.template +0 -12
- package/src/generators/application/files/app/ios/Podfile.template +0 -60
- package/src/generators/application/files/app/ios/__className__/AppDelegate.h +0 -6
- package/src/generators/application/files/app/ios/__className__/AppDelegate.mm.template +0 -36
- package/src/generators/application/files/app/ios/__className__/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
- package/src/generators/application/files/app/ios/__className__/Images.xcassets/Contents.json +0 -6
- package/src/generators/application/files/app/ios/__className__/Info.plist.template +0 -55
- package/src/generators/application/files/app/ios/__className__/LaunchScreen.storyboard.template +0 -47
- package/src/generators/application/files/app/ios/__className__/main.m +0 -10
- package/src/generators/application/files/app/ios/__className__.xcodeproj/project.pbxproj.template +0 -702
- package/src/generators/application/files/app/ios/__className__.xcodeproj/xcshareddata/xcschemes/__className__.xcscheme.template +0 -88
- package/src/generators/application/files/app/ios/__className__.xcworkspace/contents.xcworkspacedata +0 -10
- package/src/generators/application/files/app/ios/__className__Tests/Info.plist +0 -24
- package/src/generators/application/files/app/ios/__className__Tests/__className__Tests.m +0 -66
- package/src/generators/application/files/app/metro.config.js.template +0 -38
- package/src/generators/application/files/app/package.json.template +0 -15
- package/src/generators/application/files/app/src/app/App.spec.tsx.template +0 -9
- package/src/generators/application/files/app/src/app/App.tsx.template +0 -694
- package/src/generators/application/files/app/src/main.tsx.template +0 -4
- package/src/generators/application/files/app/test-setup.ts.template +0 -1
- package/src/generators/application/files/app/tsconfig.app.json.template +0 -9
- package/src/generators/application/files/app/tsconfig.json.template +0 -25
- package/src/generators/application/lib/add-detox.d.ts +0 -3
- package/src/generators/application/lib/add-detox.js +0 -16
- package/src/generators/application/lib/add-detox.js.map +0 -1
- package/src/generators/application/lib/add-project.d.ts +0 -3
- package/src/generators/application/lib/add-project.js +0 -83
- package/src/generators/application/lib/add-project.js.map +0 -1
- package/src/generators/application/lib/create-application-files.d.ts +0 -3
- package/src/generators/application/lib/create-application-files.js +0 -20
- package/src/generators/application/lib/create-application-files.js.map +0 -1
- package/src/generators/application/lib/nomalize-options.spec.ts +0 -138
- package/src/generators/application/lib/normalize-options.d.ts +0 -13
- package/src/generators/application/lib/normalize-options.js +0 -36
- package/src/generators/application/lib/normalize-options.js.map +0 -1
- package/src/generators/application/schema.d.ts +0 -19
- package/src/generators/application/schema.json +0 -89
- package/src/generators/component/component.d.ts +0 -5
- package/src/generators/component/component.js +0 -53
- package/src/generators/component/component.js.map +0 -1
- package/src/generators/component/component.spec.ts +0 -135
- package/src/generators/component/files/__fileName__.spec.tsx__tmpl__ +0 -11
- package/src/generators/component/files/__fileName__.tsx__tmpl__ +0 -32
- package/src/generators/component/lib/add-import.d.ts +0 -3
- package/src/generators/component/lib/add-import.js +0 -34
- package/src/generators/component/lib/add-import.js.map +0 -1
- package/src/generators/component/lib/normalize-options.d.ts +0 -8
- package/src/generators/component/lib/normalize-options.js +0 -58
- package/src/generators/component/lib/normalize-options.js.map +0 -1
- package/src/generators/component/schema.d.ts +0 -14
- package/src/generators/component/schema.json +0 -78
- package/src/generators/component-story/component-story.d.ts +0 -8
- package/src/generators/component-story/component-story.js +0 -113
- package/src/generators/component-story/component-story.js.map +0 -1
- package/src/generators/component-story/component-story.spec.ts +0 -433
- package/src/generators/component-story/files/__componentFileName__.stories.__fileExt__ +0 -24
- package/src/generators/component-story/schema.d.ts +0 -5
- package/src/generators/component-story/schema.json +0 -34
- package/src/generators/init/init.d.ts +0 -6
- package/src/generators/init/init.js +0 -58
- package/src/generators/init/init.js.map +0 -1
- package/src/generators/init/init.spec.ts +0 -81
- package/src/generators/init/lib/add-git-ignore-entry.d.ts +0 -2
- package/src/generators/init/lib/add-git-ignore-entry.js +0 -25
- package/src/generators/init/lib/add-git-ignore-entry.js.map +0 -1
- package/src/generators/init/lib/gitignore-entries.d.ts +0 -1
- package/src/generators/init/lib/gitignore-entries.js +0 -75
- package/src/generators/init/lib/gitignore-entries.js.map +0 -1
- package/src/generators/init/schema.d.ts +0 -7
- package/src/generators/init/schema.json +0 -40
- package/src/generators/library/files/lib/README.md +0 -7
- package/src/generators/library/files/lib/babel.config.json.template +0 -17
- package/src/generators/library/files/lib/package.json__tmpl__ +0 -4
- package/src/generators/library/files/lib/src/index.ts__tmpl__ +0 -0
- package/src/generators/library/files/lib/test-setup.ts.template +0 -1
- package/src/generators/library/files/lib/tsconfig.json__tmpl__ +0 -16
- package/src/generators/library/files/lib/tsconfig.lib.json__tmpl__ +0 -9
- package/src/generators/library/lib/normalize-options.d.ts +0 -13
- package/src/generators/library/lib/normalize-options.js +0 -26
- package/src/generators/library/lib/normalize-options.js.map +0 -1
- package/src/generators/library/library.d.ts +0 -5
- package/src/generators/library/library.js +0 -101
- package/src/generators/library/library.js.map +0 -1
- package/src/generators/library/library.spec.ts +0 -397
- package/src/generators/library/schema.d.ts +0 -22
- package/src/generators/library/schema.json +0 -102
- package/src/generators/stories/schema.d.ts +0 -5
- package/src/generators/stories/schema.json +0 -42
- package/src/generators/stories/stories-app.spec.ts +0 -145
- package/src/generators/stories/stories-lib.spec.ts +0 -113
- package/src/generators/stories/stories.d.ts +0 -6
- package/src/generators/stories/stories.js +0 -63
- package/src/generators/stories/stories.js.map +0 -1
- package/src/generators/storybook-configuration/configuration.d.ts +0 -5
- package/src/generators/storybook-configuration/configuration.js +0 -60
- package/src/generators/storybook-configuration/configuration.js.map +0 -1
- package/src/generators/storybook-configuration/configuration.spec.ts +0 -146
- package/src/generators/storybook-configuration/files/app/storybook.ts.template +0 -9
- package/src/generators/storybook-configuration/files/app/toggle-storybook.tsx.template +0 -114
- package/src/generators/storybook-configuration/files/root/story-loader.js.template +0 -13
- package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.d.ts +0 -6
- package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.js +0 -26
- package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.js.map +0 -1
- package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.spec.ts +0 -161
- package/src/generators/storybook-configuration/lib/create-storybook-files.d.ts +0 -6
- package/src/generators/storybook-configuration/lib/create-storybook-files.js +0 -45
- package/src/generators/storybook-configuration/lib/create-storybook-files.js.map +0 -1
- package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.d.ts +0 -7
- package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.js +0 -30
- package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.js.map +0 -1
- package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.spec.ts +0 -65
- package/src/generators/storybook-configuration/schema.d.ts +0 -11
- package/src/generators/storybook-configuration/schema.json +0 -66
- package/src/generators/upgrade-native/lib/create-native-files.d.ts +0 -3
- package/src/generators/upgrade-native/lib/create-native-files.js +0 -15
- package/src/generators/upgrade-native/lib/create-native-files.js.map +0 -1
- package/src/generators/upgrade-native/lib/normalize-options.d.ts +0 -12
- package/src/generators/upgrade-native/lib/normalize-options.js +0 -28
- package/src/generators/upgrade-native/lib/normalize-options.js.map +0 -1
- package/src/generators/upgrade-native/schema.d.ts +0 -9
- package/src/generators/upgrade-native/schema.json +0 -41
- package/src/generators/upgrade-native/upgrade-native.d.ts +0 -9
- package/src/generators/upgrade-native/upgrade-native.js +0 -33
- package/src/generators/upgrade-native/upgrade-native.js.map +0 -1
- package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.d.ts +0 -8
- package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.js +0 -63
- package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.js.map +0 -1
- package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.spec.ts +0 -79
- package/src/migrations/update-12-5-0/update-jest-for-react-native.d.ts +0 -2
- package/src/migrations/update-12-5-0/update-jest-for-react-native.js +0 -62
- package/src/migrations/update-12-5-0/update-jest-for-react-native.js.map +0 -1
- package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.d.ts +0 -2
- package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.js +0 -22
- package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.js.map +0 -1
- package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.spec.ts +0 -48
- package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.d.ts +0 -6
- package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.js +0 -41
- package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.js.map +0 -1
- package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.spec.ts +0 -61
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.d.ts +0 -6
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js +0 -33
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js.map +0 -1
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.spec.ts +0 -192
- package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.d.ts +0 -5
- package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.js +0 -39
- package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.js.map +0 -1
- package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.spec.ts +0 -84
- package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.d.ts +0 -5
- package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.js +0 -42
- package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.js.map +0 -1
- package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.spec.ts +0 -48
- package/src/migrations/update-14-2-1/rename-blockList-metro-config.d.ts +0 -6
- package/src/migrations/update-14-2-1/rename-blockList-metro-config.js +0 -33
- package/src/migrations/update-14-2-1/rename-blockList-metro-config.js.map +0 -1
- package/src/migrations/update-14-2-1/rename-blockList-metro-config.spec.ts +0 -190
- package/src/migrations/update-14-5-5/add-exclude-sync-deps.d.ts +0 -5
- package/src/migrations/update-14-5-5/add-exclude-sync-deps.js +0 -26
- package/src/migrations/update-14-5-5/add-exclude-sync-deps.js.map +0 -1
- package/src/migrations/update-14-5-5/add-exclude-sync-deps.spec.ts +0 -39
- package/src/migrations/update-14-5-8/change-searchDir-storybook.d.ts +0 -5
- package/src/migrations/update-14-5-8/change-searchDir-storybook.js +0 -26
- package/src/migrations/update-14-5-8/change-searchDir-storybook.js.map +0 -1
- package/src/migrations/update-14-5-8/change-searchDir-storybook.spec.ts +0 -39
- package/src/migrations/update-14-6-0/remove-jest-transform.d.ts +0 -5
- package/src/migrations/update-14-6-0/remove-jest-transform.js +0 -58
- package/src/migrations/update-14-6-0/remove-jest-transform.js.map +0 -1
- package/src/migrations/update-14-6-0/remove-jest-transform.spec.ts +0 -109
- package/src/migrations/update-15-0-0/add-babel-inputs.d.ts +0 -2
- package/src/migrations/update-15-0-0/add-babel-inputs.js +0 -13
- package/src/migrations/update-15-0-0/add-babel-inputs.js.map +0 -1
- package/src/migrations/update-15-0-0/add-babel-inputs.spec.ts +0 -73
- package/src/migrations/update-15-9-1/add-build-ios-target.d.ts +0 -5
- package/src/migrations/update-15-9-1/add-build-ios-target.js +0 -34
- package/src/migrations/update-15-9-1/add-build-ios-target.js.map +0 -1
- package/src/migrations/update-15-9-1/add-build-ios-target.spec.ts +0 -36
- package/src/utils/add-jest.d.ts +0 -2
- package/src/utils/add-jest.js +0 -38
- package/src/utils/add-jest.js.map +0 -1
- package/src/utils/add-linting.d.ts +0 -12
- package/src/utils/add-linting.js +0 -41
- package/src/utils/add-linting.js.map +0 -1
- package/src/utils/add-linting.spec.ts +0 -42
- package/src/utils/chmod-android-gradle-files.d.ts +0 -3
- package/src/utils/chmod-android-gradle-files.js +0 -24
- package/src/utils/chmod-android-gradle-files.js.map +0 -1
- package/src/utils/ensure-node-modules-symlink.d.ts +0 -9
- package/src/utils/ensure-node-modules-symlink.js +0 -29
- package/src/utils/ensure-node-modules-symlink.js.map +0 -1
- package/src/utils/ensure-node-modules-symlink.spec.ts +0 -108
- package/src/utils/find-all-npm-dependencies.d.ts +0 -2
- package/src/utils/find-all-npm-dependencies.js +0 -26
- package/src/utils/find-all-npm-dependencies.js.map +0 -1
- package/src/utils/find-all-npm-dependencies.spec.ts +0 -95
- package/src/utils/format-file.d.ts +0 -1
- package/src/utils/format-file.js +0 -17
- package/src/utils/format-file.js.map +0 -1
- package/src/utils/get-cli-options.d.ts +0 -8
- package/src/utils/get-cli-options.js +0 -31
- package/src/utils/get-cli-options.js.map +0 -1
- package/src/utils/pod-install-task.d.ts +0 -8
- package/src/utils/pod-install-task.js +0 -62
- package/src/utils/pod-install-task.js.map +0 -1
- package/src/utils/symlink-task.d.ts +0 -2
- package/src/utils/symlink-task.js +0 -19
- package/src/utils/symlink-task.js.map +0 -1
- package/src/utils/testing-generators.d.ts +0 -3
- package/src/utils/testing-generators.js +0 -36
- package/src/utils/testing-generators.js.map +0 -1
- package/src/utils/versions.d.ts +0 -20
- package/src/utils/versions.js +0 -24
- package/src/utils/versions.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getResolveRequest(extensions: string[]): (_context: any, realModuleName: string, platform: string | null) => any;
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getResolveRequest = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const metroResolver = require("metro-resolver");
|
|
6
|
-
const tsconfig_paths_1 = require("tsconfig-paths");
|
|
7
|
-
const chalk = require("chalk");
|
|
8
|
-
const enhanced_resolve_1 = require("enhanced-resolve");
|
|
9
|
-
const path_1 = require("path");
|
|
10
|
-
const fs = require("fs");
|
|
11
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
12
|
-
/*
|
|
13
|
-
* Use tsconfig to resolve additional workspace libs.
|
|
14
|
-
*
|
|
15
|
-
* This resolve function requires projectRoot to be set to
|
|
16
|
-
* workspace root in order modules and assets to be registered and watched.
|
|
17
|
-
*/
|
|
18
|
-
function getResolveRequest(extensions) {
|
|
19
|
-
return function (_context, realModuleName, platform) {
|
|
20
|
-
const debug = process.env.NX_REACT_NATIVE_DEBUG === 'true';
|
|
21
|
-
if (debug)
|
|
22
|
-
console.log(chalk.cyan(`[Nx] Resolving: ${realModuleName}`));
|
|
23
|
-
const { resolveRequest } = _context, context = tslib_1.__rest(_context, ["resolveRequest"]);
|
|
24
|
-
const resolvedPath = resolveRequestFromContext(resolveRequest, _context, realModuleName, platform, debug) ||
|
|
25
|
-
defaultMetroResolver(context, realModuleName, platform, debug) ||
|
|
26
|
-
tsconfigPathsResolver(context, extensions, realModuleName, platform, debug) ||
|
|
27
|
-
pnpmResolver(extensions, context, realModuleName, debug);
|
|
28
|
-
if (resolvedPath) {
|
|
29
|
-
return resolvedPath;
|
|
30
|
-
}
|
|
31
|
-
throw new Error(`Cannot resolve ${chalk.bold(realModuleName)}`);
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
exports.getResolveRequest = getResolveRequest;
|
|
35
|
-
function resolveRequestFromContext(resolveRequest, context, realModuleName, platform, debug) {
|
|
36
|
-
try {
|
|
37
|
-
return resolveRequest(context, realModuleName, platform);
|
|
38
|
-
}
|
|
39
|
-
catch (_a) {
|
|
40
|
-
if (debug)
|
|
41
|
-
console.log(chalk.cyan(`[Nx] Unable to resolve with default resolveRequest: ${realModuleName}`));
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* This function try to resolve path using metro's default resolver
|
|
46
|
-
* @returns path if resolved, else undefined
|
|
47
|
-
*/
|
|
48
|
-
function defaultMetroResolver(context, realModuleName, platform, debug) {
|
|
49
|
-
try {
|
|
50
|
-
return metroResolver.resolve(context, realModuleName, platform);
|
|
51
|
-
}
|
|
52
|
-
catch (_a) {
|
|
53
|
-
if (debug)
|
|
54
|
-
console.log(chalk.cyan(`[Nx] Unable to resolve with default Metro resolver: ${realModuleName}`));
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* This resolver try to resolve module for pnpm.
|
|
59
|
-
* @returns path if resolved, else undefined
|
|
60
|
-
* This pnpm resolver is inspired from https://github.com/vjpr/pnpm-react-native-example/blob/main/packages/pnpm-expo-helper/util/make-resolver.js
|
|
61
|
-
*/
|
|
62
|
-
function pnpmResolver(extensions, context, realModuleName, debug) {
|
|
63
|
-
try {
|
|
64
|
-
const pnpmResolve = getPnpmResolver(extensions);
|
|
65
|
-
const lookupStartPath = (0, path_1.dirname)(context.originModulePath);
|
|
66
|
-
const filePath = pnpmResolve.resolveSync({}, lookupStartPath, realModuleName);
|
|
67
|
-
if (filePath) {
|
|
68
|
-
return { type: 'sourceFile', filePath };
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
catch (_a) {
|
|
72
|
-
if (debug)
|
|
73
|
-
console.log(chalk.cyan(`[Nx] Unable to resolve with default PNPM resolver: ${realModuleName}`));
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* This function try to resolve files that are specified in tsconfig's paths
|
|
78
|
-
* @returns path if resolved, else undefined
|
|
79
|
-
*/
|
|
80
|
-
function tsconfigPathsResolver(context, extensions, realModuleName, platform, debug) {
|
|
81
|
-
const tsConfigPathMatcher = getMatcher(debug);
|
|
82
|
-
const match = tsConfigPathMatcher(realModuleName, undefined, undefined, extensions.map((ext) => `.${ext}`));
|
|
83
|
-
if (match) {
|
|
84
|
-
return metroResolver.resolve(context, match, platform);
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
if (debug) {
|
|
88
|
-
console.log(chalk.red(`[Nx] Failed to resolve ${chalk.bold(realModuleName)}`));
|
|
89
|
-
console.log(chalk.cyan(`[Nx] The following tsconfig paths was used:\n:${chalk.bold(JSON.stringify(paths, null, 2))}`));
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
let matcher;
|
|
94
|
-
let absoluteBaseUrl;
|
|
95
|
-
let paths;
|
|
96
|
-
function getMatcher(debug) {
|
|
97
|
-
if (!matcher) {
|
|
98
|
-
const result = (0, tsconfig_paths_1.loadConfig)();
|
|
99
|
-
if (result.resultType === 'success') {
|
|
100
|
-
absoluteBaseUrl = result.absoluteBaseUrl;
|
|
101
|
-
paths = result.paths;
|
|
102
|
-
if (debug) {
|
|
103
|
-
console.log(chalk.cyan(`[Nx] Located tsconfig at ${chalk.bold(absoluteBaseUrl)}`));
|
|
104
|
-
console.log(chalk.cyan(`[Nx] Found the following paths:\n:${chalk.bold(JSON.stringify(paths, null, 2))}`));
|
|
105
|
-
}
|
|
106
|
-
matcher = (0, tsconfig_paths_1.createMatchPath)(absoluteBaseUrl, paths);
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
console.log(chalk.cyan(`[Nx] Failed to locate tsconfig}`));
|
|
110
|
-
throw new Error(`Could not load tsconfig for project`);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
return matcher;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* This function returns resolver for pnpm.
|
|
117
|
-
* It is inspired form https://github.com/vjpr/pnpm-expo-example/blob/main/packages/pnpm-expo-helper/util/make-resolver.js.
|
|
118
|
-
*/
|
|
119
|
-
let resolver;
|
|
120
|
-
function getPnpmResolver(extensions) {
|
|
121
|
-
if (!resolver) {
|
|
122
|
-
const fileSystem = new enhanced_resolve_1.CachedInputFileSystem(fs, 4000);
|
|
123
|
-
resolver = enhanced_resolve_1.ResolverFactory.createResolver({
|
|
124
|
-
fileSystem,
|
|
125
|
-
extensions: extensions.map((extension) => '.' + extension),
|
|
126
|
-
useSyncFileSystemCalls: true,
|
|
127
|
-
modules: [(0, path_1.join)(devkit_1.workspaceRoot, 'node_modules'), 'node_modules'],
|
|
128
|
-
conditionNames: ['native', 'browser', 'require', 'default'],
|
|
129
|
-
mainFields: ['react-native', 'browser', 'main'],
|
|
130
|
-
aliasFields: ['browser'],
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
return resolver;
|
|
134
|
-
}
|
|
135
|
-
//# sourceMappingURL=metro-resolver.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metro-resolver.js","sourceRoot":"","sources":["../../../../packages/react-native/plugins/metro-resolver.ts"],"names":[],"mappings":";;;;AAAA,gDAAgD;AAEhD,mDAA6D;AAC7D,+BAA+B;AAC/B,uDAA0E;AAC1E,+BAAqC;AACrC,yBAAyB;AACzB,yCAA6C;AAE7C;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,UAAoB;IACpD,OAAO,UACL,QAAa,EACb,cAAsB,EACtB,QAAuB;QAEvB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,KAAK,MAAM,CAAC;QAE3D,IAAI,KAAK;YAAE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,mBAAmB,cAAc,EAAE,CAAC,CAAC,CAAC;QAExE,MAAM,EAAE,cAAc,KAAiB,QAAQ,EAApB,OAAO,kBAAK,QAAQ,EAAzC,kBAA8B,CAAW,CAAC;QAEhD,MAAM,YAAY,GAChB,yBAAyB,CACvB,cAAc,EACd,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,KAAK,CACN;YACD,oBAAoB,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK,CAAC;YAC9D,qBAAqB,CACnB,OAAO,EACP,UAAU,EACV,cAAc,EACd,QAAQ,EACR,KAAK,CACN;YACD,YAAY,CAAC,UAAU,EAAE,OAAO,EAA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AAQ,CAAC;AAClB,CAAC"}
|
package/project.json
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "react-native",
|
|
3
|
-
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
-
"sourceRoot": "packages/react-native/src",
|
|
5
|
-
"projectType": "library",
|
|
6
|
-
"targets": {
|
|
7
|
-
"lint": {},
|
|
8
|
-
"test": {},
|
|
9
|
-
"build-base": {
|
|
10
|
-
"executor": "@nrwl/js:tsc",
|
|
11
|
-
"options": {
|
|
12
|
-
"assets": [
|
|
13
|
-
"packages/react-native/*.md",
|
|
14
|
-
{
|
|
15
|
-
"input": "packages/react-native",
|
|
16
|
-
"glob": "**/files/**/.babelrc__tmpl__",
|
|
17
|
-
"output": "/"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"input": "packages/react-native",
|
|
21
|
-
"glob": "**/files/**/.babelrc.template",
|
|
22
|
-
"output": "/"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"input": "packages/react-native/src",
|
|
26
|
-
"glob": "**/*.!(ts)",
|
|
27
|
-
"output": "/src"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"input": "packages/react-native",
|
|
31
|
-
"glob": "*.rb",
|
|
32
|
-
"output": "/"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"input": "packages/react-native",
|
|
36
|
-
"glob": "**/*.json",
|
|
37
|
-
"ignore": ["**/tsconfig*.json"],
|
|
38
|
-
"output": "/"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"input": "packages/react-native",
|
|
42
|
-
"glob": "**/*.d.ts",
|
|
43
|
-
"output": "/"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"input": "",
|
|
47
|
-
"glob": "LICENSE",
|
|
48
|
-
"output": "/"
|
|
49
|
-
}
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"build": {
|
|
54
|
-
"executor": "nx:run-commands",
|
|
55
|
-
"outputs": ["{workspaceRoot}/build/packages/react-native"],
|
|
56
|
-
"options": {
|
|
57
|
-
"command": "node ./scripts/copy-readme.js react-native"
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ExecutorContext } from '@nrwl/devkit';
|
|
2
|
-
import { ReactNativeBuildAndroidOptions } from './schema';
|
|
3
|
-
export interface ReactNativeBuildOutput {
|
|
4
|
-
success: boolean;
|
|
5
|
-
}
|
|
6
|
-
export default function buildAndroidExecutor(options: ReactNativeBuildAndroidOptions, context: ExecutorContext): AsyncGenerator<ReactNativeBuildOutput>;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const path_1 = require("path");
|
|
5
|
-
const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-symlink");
|
|
6
|
-
const child_process_1 = require("child_process");
|
|
7
|
-
const chmod_android_gradle_files_1 = require("../../utils/chmod-android-gradle-files");
|
|
8
|
-
const start_impl_1 = require("../start/start.impl");
|
|
9
|
-
const sync_deps_impl_1 = require("../sync-deps/sync-deps.impl");
|
|
10
|
-
const get_cli_options_1 = require("../../utils/get-cli-options");
|
|
11
|
-
let childProcess;
|
|
12
|
-
function buildAndroidExecutor(options, context) {
|
|
13
|
-
return tslib_1.__asyncGenerator(this, arguments, function* buildAndroidExecutor_1() {
|
|
14
|
-
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
15
|
-
(0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
|
|
16
|
-
if (options.sync) {
|
|
17
|
-
(0, sync_deps_impl_1.displayNewlyAddedDepsMessage)(context.projectName, yield tslib_1.__await((0, sync_deps_impl_1.syncDeps)(context.projectName, projectRoot, context.root, context.projectGraph)));
|
|
18
|
-
}
|
|
19
|
-
(0, chmod_android_gradle_files_1.chmodAndroidGradlewFiles)((0, path_1.join)(projectRoot, 'android'));
|
|
20
|
-
try {
|
|
21
|
-
const tasks = [runCliBuild(context.root, projectRoot, options)];
|
|
22
|
-
if (options.packager && options.mode !== 'release') {
|
|
23
|
-
tasks.push((0, start_impl_1.runCliStart)(context.root, projectRoot, {
|
|
24
|
-
port: options.port,
|
|
25
|
-
resetCache: options.resetCache,
|
|
26
|
-
interactive: options.interactive,
|
|
27
|
-
}));
|
|
28
|
-
}
|
|
29
|
-
yield tslib_1.__await(Promise.all(tasks));
|
|
30
|
-
yield yield tslib_1.__await({ success: true });
|
|
31
|
-
}
|
|
32
|
-
finally {
|
|
33
|
-
if (childProcess) {
|
|
34
|
-
childProcess.kill();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
exports.default = buildAndroidExecutor;
|
|
40
|
-
function runCliBuild(workspaceRoot, projectRoot, options) {
|
|
41
|
-
return new Promise((resolve, reject) => {
|
|
42
|
-
/**
|
|
43
|
-
* Call the react native cli with option `--no-packager`
|
|
44
|
-
* Not passing '--packager' due to cli will launch start command from the project root
|
|
45
|
-
*/
|
|
46
|
-
childProcess = (0, child_process_1.fork)((0, path_1.join)(workspaceRoot, './node_modules/react-native/cli.js'), ['run-android', ...createBuildAndroidOptions(options), '--no-packager'], {
|
|
47
|
-
cwd: (0, path_1.join)(workspaceRoot, projectRoot),
|
|
48
|
-
env: Object.assign(Object.assign({}, process.env), { RCT_METRO_PORT: options.port.toString() }),
|
|
49
|
-
});
|
|
50
|
-
// Ensure the child process is killed when the parent exits
|
|
51
|
-
process.on('exit', () => childProcess.kill());
|
|
52
|
-
process.on('SIGTERM', () => childProcess.kill());
|
|
53
|
-
childProcess.on('error', (err) => {
|
|
54
|
-
reject(err);
|
|
55
|
-
});
|
|
56
|
-
childProcess.on('exit', (code) => {
|
|
57
|
-
if (code === 0) {
|
|
58
|
-
resolve(code);
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
reject(code);
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
const nxOptions = ['sync', 'packager'];
|
|
67
|
-
const startOptions = ['port', 'resetCache'];
|
|
68
|
-
const deprecatedOptions = ['apk', 'debug', 'gradleTask'];
|
|
69
|
-
function createBuildAndroidOptions(options) {
|
|
70
|
-
return (0, get_cli_options_1.getCliOptions)(options, [
|
|
71
|
-
...nxOptions,
|
|
72
|
-
...startOptions,
|
|
73
|
-
...deprecatedOptions,
|
|
74
|
-
]);
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=build-android.impl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-android.impl.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/executors/build-android/build-android.impl.ts"],"names":[],"mappings":";;;AACA,+BAA4B;AAC5B,yFAAmF;AACnF,iDAAmD;AAEnD,uFAAkF;AAClF,oDAAkD;AAClD,gEAGqC;AACrC,iEAA4D;AAM5D,IAAI,YAA0B,CAAC;AAE/B,SAA+B,oBAAoB,CACjD,OAAuC,EACvC,OAAwB;;QAExB,MAAM,WAAW,GACf,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QACpE,IAAA,sDAAwB,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACpD,IAAI,OAAO,CAAC,IAAI,EAAE;YAChB,IAAA,6CAA4B,EAC1B,OAAO,CAAC,WAAW,EACnB,sBAAM,IAAA,yBAAQ,EACZ,OAAO,CAAC,WAAW,EACnB,WAAW,EACX,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,YAAY,CACrB,CAAA,CACF,CAAC;SACH;QAED,IAAA,qDAAwB,EAAC,IAAA,WAAI,EAAC,WAAW,EAAE,SAAS,CAAC,CAA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AC,CAAC;QAC9C,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC;QAEjD,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YAC/B,MAAM,CAAC,GAAG,CAAC,CAAC;QACd,CAAC,CAAC,CAAC;QACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;YAC/B,IAAI,IAAI,KAAK,CAAC,EAAE;gBACd,OAAO,CAAC,IAAI,CAAC,CAAC;aACf;iBAAM;gBACL,MAAM,CAAC,IAAI,CAAC,CAAC;aACd;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AACvC,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;AAC5C,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;AAEzD,SAAS,yBAAyB,CAAC,OAAuC;IACxE,OAAO,IAAA,+BAAa,EAAiC,OAAO,EAAE;QAC5D,GAAG,SAAS;QACZ,GAAG,YAAY;QACf,GAAG,iBAAiB;KACrB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { ExecutorContext, names } from '@nrwl/devkit';
|
|
2
|
-
import { join } from 'path';
|
|
3
|
-
import { ensureNodeModulesSymlink } from '../../utils/ensure-node-modules-symlink';
|
|
4
|
-
import { ChildProcess, fork } from 'child_process';
|
|
5
|
-
import { ReactNativeBuildAndroidOptions } from './schema';
|
|
6
|
-
import { chmodAndroidGradlewFiles } from '../../utils/chmod-android-gradle-files';
|
|
7
|
-
import { runCliStart } from '../start/start.impl';
|
|
8
|
-
import {
|
|
9
|
-
displayNewlyAddedDepsMessage,
|
|
10
|
-
syncDeps,
|
|
11
|
-
} from '../sync-deps/sync-deps.impl';
|
|
12
|
-
import { getCliOptions } from '../../utils/get-cli-options';
|
|
13
|
-
|
|
14
|
-
export interface ReactNativeBuildOutput {
|
|
15
|
-
success: boolean;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
let childProcess: ChildProcess;
|
|
19
|
-
|
|
20
|
-
export default async function* buildAndroidExecutor(
|
|
21
|
-
options: ReactNativeBuildAndroidOptions,
|
|
22
|
-
context: ExecutorContext
|
|
23
|
-
): AsyncGenerator<ReactNativeBuildOutput> {
|
|
24
|
-
const projectRoot =
|
|
25
|
-
context.projectsConfigurations.projects[context.projectName].root;
|
|
26
|
-
ensureNodeModulesSymlink(context.root, projectRoot);
|
|
27
|
-
if (options.sync) {
|
|
28
|
-
displayNewlyAddedDepsMessage(
|
|
29
|
-
context.projectName,
|
|
30
|
-
await syncDeps(
|
|
31
|
-
context.projectName,
|
|
32
|
-
projectRoot,
|
|
33
|
-
context.root,
|
|
34
|
-
context.projectGraph
|
|
35
|
-
)
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
chmodAndroidGradlewFiles(join(projectRoot, 'android'));
|
|
40
|
-
|
|
41
|
-
try {
|
|
42
|
-
const tasks = [runCliBuild(context.root, projectRoot, options)];
|
|
43
|
-
if (options.packager && options.mode !== 'release') {
|
|
44
|
-
tasks.push(
|
|
45
|
-
runCliStart(context.root, projectRoot, {
|
|
46
|
-
port: options.port,
|
|
47
|
-
resetCache: options.resetCache,
|
|
48
|
-
interactive: options.interactive,
|
|
49
|
-
})
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
await Promise.all(tasks);
|
|
54
|
-
yield { success: true };
|
|
55
|
-
} finally {
|
|
56
|
-
if (childProcess) {
|
|
57
|
-
childProcess.kill();
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function runCliBuild(
|
|
63
|
-
workspaceRoot: string,
|
|
64
|
-
projectRoot: string,
|
|
65
|
-
options: ReactNativeBuildAndroidOptions
|
|
66
|
-
) {
|
|
67
|
-
return new Promise((resolve, reject) => {
|
|
68
|
-
/**
|
|
69
|
-
* Call the react native cli with option `--no-packager`
|
|
70
|
-
* Not passing '--packager' due to cli will launch start command from the project root
|
|
71
|
-
*/
|
|
72
|
-
childProcess = fork(
|
|
73
|
-
join(workspaceRoot, './node_modules/react-native/cli.js'),
|
|
74
|
-
['run-android', ...createBuildAndroidOptions(options), '--no-packager'],
|
|
75
|
-
{
|
|
76
|
-
cwd: join(workspaceRoot, projectRoot),
|
|
77
|
-
env: { ...process.env, RCT_METRO_PORT: options.port.toString() },
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
|
|
81
|
-
// Ensure the child process is killed when the parent exits
|
|
82
|
-
process.on('exit', () => childProcess.kill());
|
|
83
|
-
process.on('SIGTERM', () => childProcess.kill());
|
|
84
|
-
|
|
85
|
-
childProcess.on('error', (err) => {
|
|
86
|
-
reject(err);
|
|
87
|
-
});
|
|
88
|
-
childProcess.on('exit', (code) => {
|
|
89
|
-
if (code === 0) {
|
|
90
|
-
resolve(code);
|
|
91
|
-
} else {
|
|
92
|
-
reject(code);
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
const nxOptions = ['sync', 'packager'];
|
|
99
|
-
const startOptions = ['port', 'resetCache'];
|
|
100
|
-
const deprecatedOptions = ['apk', 'debug', 'gradleTask'];
|
|
101
|
-
|
|
102
|
-
function createBuildAndroidOptions(options: ReactNativeBuildAndroidOptions) {
|
|
103
|
-
return getCliOptions<ReactNativeBuildAndroidOptions>(options, [
|
|
104
|
-
...nxOptions,
|
|
105
|
-
...startOptions,
|
|
106
|
-
...deprecatedOptions,
|
|
107
|
-
]);
|
|
108
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
4
|
-
const build_android_impl_1 = require("./build-android.impl");
|
|
5
|
-
exports.default = (0, devkit_1.convertNxExecutor)(build_android_impl_1.default);
|
|
6
|
-
//# sourceMappingURL=compat.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/executors/build-android/compat.ts"],"names":[],"mappings":";;AAAA,yCAAiD;AAEjD,6DAAwD;AAExD,kBAAe,IAAA,0BAAiB,EAAC,4BAAoB,CAAC,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// options taken from https://github.com/react-native-community/cli/blob/main/packages/cli-platform-android/src/commands/buildAndroid/index.ts
|
|
2
|
-
|
|
3
|
-
import { ReactNativeStartOptions } from '../start/schema';
|
|
4
|
-
|
|
5
|
-
export interface ReactNativeBuildAndroidOptions
|
|
6
|
-
extends ReactNativeStartOptions {
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated, use tasks instead. e.g. tasks=['bundleRelease'] for aab, and tasks=['assembleRelease'] for apk. Will be removed in nx 17.
|
|
9
|
-
*/
|
|
10
|
-
apk?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated, use mode='debug' instead. Will be removed in nx 17.
|
|
13
|
-
*/
|
|
14
|
-
debug?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated, use tasks instead instead. Will be removed in nx 17.
|
|
17
|
-
*/
|
|
18
|
-
gradleTask?: string;
|
|
19
|
-
|
|
20
|
-
// react native options
|
|
21
|
-
mode: string; // default is debug
|
|
22
|
-
activeArchOnly: boolean; // default is false
|
|
23
|
-
port: number; // default is 8081
|
|
24
|
-
tasks?: Array<string>;
|
|
25
|
-
extraParams?: Array<string>;
|
|
26
|
-
interactive?: boolean;
|
|
27
|
-
|
|
28
|
-
// nx options
|
|
29
|
-
packager: boolean; // default is true
|
|
30
|
-
sync: boolean;
|
|
31
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 2,
|
|
3
|
-
"outputCapture": "direct-nodejs",
|
|
4
|
-
"cli": "nx",
|
|
5
|
-
"$id": "NxReactNativeBuildAndroid",
|
|
6
|
-
"$schema": "http://json-schema.org/schema",
|
|
7
|
-
"title": "Release Build for Android",
|
|
8
|
-
"description": "Build target options for Android.",
|
|
9
|
-
"type": "object",
|
|
10
|
-
"presets": [
|
|
11
|
-
{
|
|
12
|
-
"name": "Build Android for current device architecture",
|
|
13
|
-
"keys": ["activeArchOnly"]
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"name": "Build Android without metro cache",
|
|
17
|
-
"keys": ["resetCache"]
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"name": "Build Android with specific tasks",
|
|
21
|
-
"keys": ["tasks"]
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"name": "Build Android with a specific mode",
|
|
25
|
-
"keys": ["mode"]
|
|
26
|
-
}
|
|
27
|
-
],
|
|
28
|
-
"properties": {
|
|
29
|
-
"apk": {
|
|
30
|
-
"type": "boolean",
|
|
31
|
-
"description": "Generate apk file(s) rather than a bundle (`.aab`).",
|
|
32
|
-
"x-deprecated": "Use `tasks` option instead, e.g. `tasks=['bundleRelease']` to generate aab, `tasks=['assembleDebug']` to generate apk. Will be removed in Nx 17."
|
|
33
|
-
},
|
|
34
|
-
"debug": {
|
|
35
|
-
"type": "boolean",
|
|
36
|
-
"description": "Generate a debug build instead of a release build.",
|
|
37
|
-
"x-deprecated": "Use `mode` option instead, e.g. `mode='debug'`. Deprecated from @react-native-community/cli. Will be removed in Nx 17."
|
|
38
|
-
},
|
|
39
|
-
"gradleTask": {
|
|
40
|
-
"type": "string",
|
|
41
|
-
"description": "Override default gradle task incase of multi build variants",
|
|
42
|
-
"x-deprecated": "Use `tasks` option instead, e.g. `tasks=['assembleDebug']`. Will be removed in Nx 17."
|
|
43
|
-
},
|
|
44
|
-
"mode": {
|
|
45
|
-
"type": "string",
|
|
46
|
-
"description": "Specify your app's build variant",
|
|
47
|
-
"default": "debug",
|
|
48
|
-
"examples": ["debug", "release"],
|
|
49
|
-
"x-priority": "important"
|
|
50
|
-
},
|
|
51
|
-
"packager": {
|
|
52
|
-
"type": "boolean",
|
|
53
|
-
"description": "Launch packager while building",
|
|
54
|
-
"default": true
|
|
55
|
-
},
|
|
56
|
-
"port": {
|
|
57
|
-
"type": "number",
|
|
58
|
-
"description": "The port where the packager server is listening on.",
|
|
59
|
-
"default": 8081
|
|
60
|
-
},
|
|
61
|
-
"tasks": {
|
|
62
|
-
"type": "array",
|
|
63
|
-
"items": {
|
|
64
|
-
"type": "string"
|
|
65
|
-
},
|
|
66
|
-
"description": "Run custom Gradle tasks. By default it's \"assembleDebug\". Will override passed mode and variant arguments.",
|
|
67
|
-
"examples": [
|
|
68
|
-
"assembleDebug",
|
|
69
|
-
"assembleRelease",
|
|
70
|
-
"bundleDebug",
|
|
71
|
-
"bundleRelease",
|
|
72
|
-
"installDebug",
|
|
73
|
-
"installRelease"
|
|
74
|
-
]
|
|
75
|
-
},
|
|
76
|
-
"activeArchOnly": {
|
|
77
|
-
"type": "boolean",
|
|
78
|
-
"description": "Build native libraries only for the current device architecture for debug builds.",
|
|
79
|
-
"default": false
|
|
80
|
-
},
|
|
81
|
-
"extraParams": {
|
|
82
|
-
"type": "string",
|
|
83
|
-
"description": "Custom params passed to gradle build command"
|
|
84
|
-
},
|
|
85
|
-
"interactive": {
|
|
86
|
-
"type": "boolean",
|
|
87
|
-
"description": "Explicitly select build type and flavour to use before running a build"
|
|
88
|
-
},
|
|
89
|
-
"sync": {
|
|
90
|
-
"type": "boolean",
|
|
91
|
-
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
|
|
92
|
-
"default": true
|
|
93
|
-
},
|
|
94
|
-
"resetCache": {
|
|
95
|
-
"type": "boolean",
|
|
96
|
-
"description": "Resets metro cache.",
|
|
97
|
-
"default": false
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
"required": [],
|
|
101
|
-
"examplesFile": "../../../docs/build-android-examples.md"
|
|
102
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ExecutorContext } from '@nrwl/devkit';
|
|
2
|
-
import { ReactNativeBuildIosOptions } from './schema';
|
|
3
|
-
export interface ReactNativeBuildIosOutput {
|
|
4
|
-
success: boolean;
|
|
5
|
-
}
|
|
6
|
-
export default function runIosExecutor(options: ReactNativeBuildIosOptions, context: ExecutorContext): AsyncGenerator<ReactNativeBuildIosOutput>;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const path_1 = require("path");
|
|
5
|
-
const child_process_1 = require("child_process");
|
|
6
|
-
const os_1 = require("os");
|
|
7
|
-
const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-symlink");
|
|
8
|
-
const sync_deps_impl_1 = require("../sync-deps/sync-deps.impl");
|
|
9
|
-
const pod_install_task_1 = require("../../utils/pod-install-task");
|
|
10
|
-
const start_impl_1 = require("../start/start.impl");
|
|
11
|
-
const get_cli_options_1 = require("../../utils/get-cli-options");
|
|
12
|
-
let childProcess;
|
|
13
|
-
function runIosExecutor(options, context) {
|
|
14
|
-
return tslib_1.__asyncGenerator(this, arguments, function* runIosExecutor_1() {
|
|
15
|
-
if ((0, os_1.platform)() !== 'darwin') {
|
|
16
|
-
throw new Error(`The run-ios build requires Mac to run`);
|
|
17
|
-
}
|
|
18
|
-
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
19
|
-
(0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
|
|
20
|
-
if (options.sync) {
|
|
21
|
-
(0, sync_deps_impl_1.displayNewlyAddedDepsMessage)(context.projectName, yield tslib_1.__await((0, sync_deps_impl_1.syncDeps)(context.projectName, projectRoot, context.root, context.projectGraph)));
|
|
22
|
-
}
|
|
23
|
-
if (options.install) {
|
|
24
|
-
yield tslib_1.__await((0, pod_install_task_1.podInstall)((0, path_1.join)(context.root, projectRoot, 'ios'), options.buildFolder));
|
|
25
|
-
}
|
|
26
|
-
try {
|
|
27
|
-
const tasks = [runCliBuildIOS(context.root, projectRoot, options)];
|
|
28
|
-
if (options.packager && options.mode !== 'Release') {
|
|
29
|
-
tasks.push((0, start_impl_1.runCliStart)(context.root, projectRoot, {
|
|
30
|
-
port: options.port,
|
|
31
|
-
resetCache: options.resetCache,
|
|
32
|
-
interactive: options.interactive,
|
|
33
|
-
}));
|
|
34
|
-
}
|
|
35
|
-
yield tslib_1.__await(Promise.all(tasks));
|
|
36
|
-
yield yield tslib_1.__await({ success: true });
|
|
37
|
-
}
|
|
38
|
-
finally {
|
|
39
|
-
if (childProcess) {
|
|
40
|
-
childProcess.kill();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
exports.default = runIosExecutor;
|
|
46
|
-
function runCliBuildIOS(workspaceRoot, projectRoot, options) {
|
|
47
|
-
return new Promise((resolve, reject) => {
|
|
48
|
-
/**
|
|
49
|
-
* Call the react native cli with option `--no-packager`
|
|
50
|
-
* Not passing '--packager' due to cli will launch start command from the project root
|
|
51
|
-
*/
|
|
52
|
-
childProcess = (0, child_process_1.fork)((0, path_1.join)(workspaceRoot, './node_modules/react-native/cli.js'), ['run-ios', ...createBuildIOSOptions(options), '--no-packager'], {
|
|
53
|
-
cwd: (0, path_1.join)(workspaceRoot, projectRoot),
|
|
54
|
-
env: Object.assign(Object.assign({}, process.env), { RCT_METRO_PORT: options.port.toString() }),
|
|
55
|
-
});
|
|
56
|
-
// Ensure the child process is killed when the parent exits
|
|
57
|
-
process.on('exit', () => childProcess.kill());
|
|
58
|
-
process.on('SIGTERM', () => childProcess.kill());
|
|
59
|
-
childProcess.on('error', (err) => {
|
|
60
|
-
reject(err);
|
|
61
|
-
});
|
|
62
|
-
childProcess.on('exit', (code) => {
|
|
63
|
-
if (code === 0) {
|
|
64
|
-
resolve(code);
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
reject(code);
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
const nxOptions = ['sync', 'install', 'packager'];
|
|
73
|
-
const startOptions = ['port', 'resetCache'];
|
|
74
|
-
function createBuildIOSOptions(options) {
|
|
75
|
-
return (0, get_cli_options_1.getCliOptions)(options, [...nxOptions, ...startOptions], ['buildFolder']);
|
|
76
|
-
}
|
|
77
|
-
//# sourceMappingURL=build-ios.impl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-ios.impl.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/executors/build-ios/build-ios.impl.ts"],"names":[],"mappings":";;;AACA,+BAA4B;AAC5B,iDAAmD;AACnD,2BAA8B;AAE9B,yFAAmF;AACnF,gEAGqC;AACrC,mEAA0D;AAE1D,oDAAkD;AAClD,iEAA4D;AAM5D,IAAI,YAA0B,CAAC;AAE/B,SAA+B,cAAc,CAC3C,OAAmC,EACnC,OAAwB;;QAExB,IAAI,IAAA,aAAQ,GAAE,KAAK,QAAQ,EAAE;YAC3B,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;SAC1D;QACD,MAAM,WAAW,GACf,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QACpE,IAAA,sDAAwB,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACpD,IAAI,OAAO,CAAC,IAAI,EAAE;YAChB,IAAA,6CAA4B,EAC1B,OAAO,CAAC,WAAW,EACnB,sBAAM,IAAA,yBAAQ,EACZ,OAAO,CAAC,WAAW,EACnB,WAAW,EACX,OAAO,CAAC,IAAI,EACZ,OAAO,CAA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