@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,118 +0,0 @@
|
|
|
1
|
-
import { ExecutorContext } from '@nrwl/devkit';
|
|
2
|
-
import { join } from 'path';
|
|
3
|
-
import { ChildProcess, fork } from 'child_process';
|
|
4
|
-
import { platform } from 'os';
|
|
5
|
-
|
|
6
|
-
import { ensureNodeModulesSymlink } from '../../utils/ensure-node-modules-symlink';
|
|
7
|
-
import {
|
|
8
|
-
displayNewlyAddedDepsMessage,
|
|
9
|
-
syncDeps,
|
|
10
|
-
} from '../sync-deps/sync-deps.impl';
|
|
11
|
-
import { podInstall } from '../../utils/pod-install-task';
|
|
12
|
-
import { ReactNativeBuildIosOptions } from './schema';
|
|
13
|
-
import { runCliStart } from '../start/start.impl';
|
|
14
|
-
import { getCliOptions } from '../../utils/get-cli-options';
|
|
15
|
-
|
|
16
|
-
export interface ReactNativeBuildIosOutput {
|
|
17
|
-
success: boolean;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
let childProcess: ChildProcess;
|
|
21
|
-
|
|
22
|
-
export default async function* runIosExecutor(
|
|
23
|
-
options: ReactNativeBuildIosOptions,
|
|
24
|
-
context: ExecutorContext
|
|
25
|
-
): AsyncGenerator<ReactNativeBuildIosOutput> {
|
|
26
|
-
if (platform() !== 'darwin') {
|
|
27
|
-
throw new Error(`The run-ios build requires Mac to run`);
|
|
28
|
-
}
|
|
29
|
-
const projectRoot =
|
|
30
|
-
context.projectsConfigurations.projects[context.projectName].root;
|
|
31
|
-
ensureNodeModulesSymlink(context.root, projectRoot);
|
|
32
|
-
if (options.sync) {
|
|
33
|
-
displayNewlyAddedDepsMessage(
|
|
34
|
-
context.projectName,
|
|
35
|
-
await syncDeps(
|
|
36
|
-
context.projectName,
|
|
37
|
-
projectRoot,
|
|
38
|
-
context.root,
|
|
39
|
-
context.projectGraph
|
|
40
|
-
)
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (options.install) {
|
|
45
|
-
await podInstall(
|
|
46
|
-
join(context.root, projectRoot, 'ios'),
|
|
47
|
-
options.buildFolder
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
try {
|
|
52
|
-
const tasks = [runCliBuildIOS(context.root, projectRoot, options)];
|
|
53
|
-
if (options.packager && options.mode !== 'Release') {
|
|
54
|
-
tasks.push(
|
|
55
|
-
runCliStart(context.root, projectRoot, {
|
|
56
|
-
port: options.port,
|
|
57
|
-
resetCache: options.resetCache,
|
|
58
|
-
interactive: options.interactive,
|
|
59
|
-
})
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
await Promise.all(tasks);
|
|
64
|
-
|
|
65
|
-
yield { success: true };
|
|
66
|
-
} finally {
|
|
67
|
-
if (childProcess) {
|
|
68
|
-
childProcess.kill();
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function runCliBuildIOS(
|
|
74
|
-
workspaceRoot: string,
|
|
75
|
-
projectRoot: string,
|
|
76
|
-
options: ReactNativeBuildIosOptions
|
|
77
|
-
) {
|
|
78
|
-
return new Promise((resolve, reject) => {
|
|
79
|
-
/**
|
|
80
|
-
* Call the react native cli with option `--no-packager`
|
|
81
|
-
* Not passing '--packager' due to cli will launch start command from the project root
|
|
82
|
-
*/
|
|
83
|
-
childProcess = fork(
|
|
84
|
-
join(workspaceRoot, './node_modules/react-native/cli.js'),
|
|
85
|
-
['run-ios', ...createBuildIOSOptions(options), '--no-packager'],
|
|
86
|
-
{
|
|
87
|
-
cwd: join(workspaceRoot, projectRoot),
|
|
88
|
-
env: { ...process.env, RCT_METRO_PORT: options.port.toString() },
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
|
|
92
|
-
// Ensure the child process is killed when the parent exits
|
|
93
|
-
process.on('exit', () => childProcess.kill());
|
|
94
|
-
process.on('SIGTERM', () => childProcess.kill());
|
|
95
|
-
|
|
96
|
-
childProcess.on('error', (err) => {
|
|
97
|
-
reject(err);
|
|
98
|
-
});
|
|
99
|
-
childProcess.on('exit', (code) => {
|
|
100
|
-
if (code === 0) {
|
|
101
|
-
resolve(code);
|
|
102
|
-
} else {
|
|
103
|
-
reject(code);
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
const nxOptions = ['sync', 'install', 'packager'];
|
|
110
|
-
const startOptions = ['port', 'resetCache'];
|
|
111
|
-
|
|
112
|
-
function createBuildIOSOptions(options: ReactNativeBuildIosOptions) {
|
|
113
|
-
return getCliOptions<ReactNativeBuildIosOptions>(
|
|
114
|
-
options,
|
|
115
|
-
[...nxOptions, ...startOptions],
|
|
116
|
-
['buildFolder']
|
|
117
|
-
);
|
|
118
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
4
|
-
const build_ios_impl_1 = require("./build-ios.impl");
|
|
5
|
-
exports.default = (0, devkit_1.convertNxExecutor)(build_ios_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-ios/compat.ts"],"names":[],"mappings":";;AAAA,yCAAiD;AAEjD,qDAAgD;AAEhD,kBAAe,IAAA,0BAAiB,EAAC,wBAAgB,CAAC,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// options from https://github.com/react-native-community/cli/blob/main/packages/cli-platform-ios/src/commands/buildIOS/index.ts
|
|
2
|
-
|
|
3
|
-
import { ReactNativeStartOptions } from '../start/schema';
|
|
4
|
-
|
|
5
|
-
export interface ReactNativeBuildIosOptions extends ReactNativeStartOptions {
|
|
6
|
-
// react native options
|
|
7
|
-
simulator?: string;
|
|
8
|
-
mode: string; // default if 'Debug'
|
|
9
|
-
scheme?: string;
|
|
10
|
-
device?: string;
|
|
11
|
-
udid?: string;
|
|
12
|
-
verbose?: boolean;
|
|
13
|
-
port: number; // default is 8081
|
|
14
|
-
xcconfig?: string;
|
|
15
|
-
buildFolder?: string;
|
|
16
|
-
extraParams?: string;
|
|
17
|
-
|
|
18
|
-
// nx options
|
|
19
|
-
packager: boolean; // default is true
|
|
20
|
-
install: boolean; // default is true
|
|
21
|
-
sync: boolean; // default is true
|
|
22
|
-
}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"version": 2,
|
|
4
|
-
"cli": "nx",
|
|
5
|
-
"title": "React Native Build iOS executor",
|
|
6
|
-
"description": "Build iOS app.",
|
|
7
|
-
"type": "object",
|
|
8
|
-
"presets": [
|
|
9
|
-
{
|
|
10
|
-
"name": "Build iOS for a simulator",
|
|
11
|
-
"keys": ["simulator"]
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"name": "Build iOS for a device",
|
|
15
|
-
"keys": ["device"]
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"name": "Build iOS for a device with udid",
|
|
19
|
-
"keys": ["udid"]
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"name": "Run `pod install` before building iOS app",
|
|
23
|
-
"keys": ["install"]
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
"properties": {
|
|
27
|
-
"simulator": {
|
|
28
|
-
"type": "string",
|
|
29
|
-
"description": "Explicitly set simulator to use. Optionally include iOS version between parenthesis at the end to match an exact version: \"iPhone 6 (10.0)\"",
|
|
30
|
-
"examples": [
|
|
31
|
-
"iPhone 14",
|
|
32
|
-
"iPhone 13",
|
|
33
|
-
"iPhone 12",
|
|
34
|
-
"iPhone 11",
|
|
35
|
-
"iPhone X"
|
|
36
|
-
],
|
|
37
|
-
"x-priority": "important"
|
|
38
|
-
},
|
|
39
|
-
"mode": {
|
|
40
|
-
"type": "string",
|
|
41
|
-
"description": "Explicitly set the scheme configuration to use",
|
|
42
|
-
"default": "Debug",
|
|
43
|
-
"examples": ["Debug", "Release"],
|
|
44
|
-
"x-priority": "important"
|
|
45
|
-
},
|
|
46
|
-
"schema": {
|
|
47
|
-
"type": "string",
|
|
48
|
-
"description": "Explicitly set Xcode scheme to use"
|
|
49
|
-
},
|
|
50
|
-
"device": {
|
|
51
|
-
"type": "string",
|
|
52
|
-
"description": "Explicitly set device to use by name. The value is not required if you have a single device connected."
|
|
53
|
-
},
|
|
54
|
-
"udid": {
|
|
55
|
-
"type": "string",
|
|
56
|
-
"description": "Explicitly set device to use by udid"
|
|
57
|
-
},
|
|
58
|
-
"verbose": {
|
|
59
|
-
"type": "boolean",
|
|
60
|
-
"description": "Do not use xcbeautify or xcpretty even if installed"
|
|
61
|
-
},
|
|
62
|
-
"port": {
|
|
63
|
-
"type": "number",
|
|
64
|
-
"description": "The port where the packager server is listening on.",
|
|
65
|
-
"default": 8081
|
|
66
|
-
},
|
|
67
|
-
"xcconfig": {
|
|
68
|
-
"type": "string",
|
|
69
|
-
"description": "Explicitly set xcconfig to use"
|
|
70
|
-
},
|
|
71
|
-
"buildFolder": {
|
|
72
|
-
"type": "string",
|
|
73
|
-
"description": "Location for iOS build artifacts. Corresponds to Xcode's \"-derivedDataPath\". Relative to ios directory",
|
|
74
|
-
"default": "./build"
|
|
75
|
-
},
|
|
76
|
-
"interactive": {
|
|
77
|
-
"type": "boolean",
|
|
78
|
-
"description": "Explicitly select which scheme and configuration to use before running a build"
|
|
79
|
-
},
|
|
80
|
-
"extraParams": {
|
|
81
|
-
"type": "string",
|
|
82
|
-
"description": "Custom params that will be passed to xcodebuild command."
|
|
83
|
-
},
|
|
84
|
-
"install": {
|
|
85
|
-
"type": "boolean",
|
|
86
|
-
"description": "Runs `pod install` for native modules before building iOS app."
|
|
87
|
-
},
|
|
88
|
-
"sync": {
|
|
89
|
-
"type": "boolean",
|
|
90
|
-
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
|
|
91
|
-
"default": true
|
|
92
|
-
},
|
|
93
|
-
"resetCache": {
|
|
94
|
-
"type": "boolean",
|
|
95
|
-
"description": "Resets metro cache.",
|
|
96
|
-
"default": false
|
|
97
|
-
},
|
|
98
|
-
"packager": {
|
|
99
|
-
"type": "boolean",
|
|
100
|
-
"description": "Launch packager while building",
|
|
101
|
-
"default": true
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
"required": [],
|
|
105
|
-
"examplesFile": "../../../docs/build-ios-examples.md"
|
|
106
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ExecutorContext } from '@nrwl/devkit';
|
|
2
|
-
import { ReactNativeBundleOptions } from './schema';
|
|
3
|
-
export interface ReactNativeBundleOutput {
|
|
4
|
-
success: boolean;
|
|
5
|
-
}
|
|
6
|
-
export default function bundleExecutor(options: ReactNativeBundleOptions, context: ExecutorContext): AsyncGenerator<ReactNativeBundleOutput>;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const fileutils_1 = require("@nrwl/workspace/src/utilities/fileutils");
|
|
5
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
6
|
-
const path_1 = require("path");
|
|
7
|
-
const child_process_1 = require("child_process");
|
|
8
|
-
const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-symlink");
|
|
9
|
-
let childProcess;
|
|
10
|
-
function bundleExecutor(options, context) {
|
|
11
|
-
return tslib_1.__asyncGenerator(this, arguments, function* bundleExecutor_1() {
|
|
12
|
-
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
13
|
-
options.bundleOutput = (0, path_1.join)(context.root, options.bundleOutput);
|
|
14
|
-
(0, fileutils_1.createDirectory)((0, path_1.dirname)(options.bundleOutput));
|
|
15
|
-
(0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
|
|
16
|
-
try {
|
|
17
|
-
yield tslib_1.__await(runCliBuild(context.root, projectRoot, options));
|
|
18
|
-
yield yield tslib_1.__await({ success: true });
|
|
19
|
-
}
|
|
20
|
-
finally {
|
|
21
|
-
if (childProcess) {
|
|
22
|
-
childProcess.kill();
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
exports.default = bundleExecutor;
|
|
28
|
-
function runCliBuild(workspaceRoot, projectRoot, options) {
|
|
29
|
-
return new Promise((resolve, reject) => {
|
|
30
|
-
const cliOptions = createBundleOptions(options);
|
|
31
|
-
childProcess = (0, child_process_1.fork)((0, path_1.join)(workspaceRoot, './node_modules/react-native/cli.js'), ['bundle', ...cliOptions], { cwd: (0, path_1.join)(workspaceRoot, projectRoot), env: process.env });
|
|
32
|
-
// Ensure the child process is killed when the parent exits
|
|
33
|
-
process.on('exit', () => childProcess.kill());
|
|
34
|
-
process.on('SIGTERM', () => childProcess.kill());
|
|
35
|
-
childProcess.on('error', (err) => {
|
|
36
|
-
reject(err);
|
|
37
|
-
});
|
|
38
|
-
childProcess.on('exit', (code) => {
|
|
39
|
-
if (code === 0) {
|
|
40
|
-
resolve(code);
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
reject(code);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
function createBundleOptions(options) {
|
|
49
|
-
return Object.keys(options).reduce((acc, _k) => {
|
|
50
|
-
const v = options[_k];
|
|
51
|
-
const k = (0, devkit_1.names)(_k).fileName;
|
|
52
|
-
if (v === undefined)
|
|
53
|
-
return acc;
|
|
54
|
-
acc.push(`--${k}`, v);
|
|
55
|
-
return acc;
|
|
56
|
-
}, []);
|
|
57
|
-
}
|
|
58
|
-
//# sourceMappingURL=bundle.impl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.impl.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/executors/bundle/bundle.impl.ts"],"names":[],"mappings":";;;AAAA,uEAA0E;AAC1E,yCAAsD;AACtD,+BAAqC;AACrC,iDAAmD;AAEnD,yFAAmF;AAQnF,IAAI,YAA0B,CAAC;AAE/B,SAA+B,cAAc,CAC3C,OAAiC,EACjC,OAAwB;;QAExB,MAAM,WAAW,GACf,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QAEpE,OAAO,CAAC,YAAY,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;QAEhE,IAAA,2BAAe,EAAC,IAAA,cAAO,EAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;QAC/C,IAAA,sDAAwB,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAEpD,IAAI;YACF,sBAAM,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,CAAA,CAAC;YACtD,4BAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA,CAAC;SACzB;gBAAS;YACR,IAAI,YAAY,EAAE;gBAChB,YAAY,CAAC,IAAI,EAAE,CAAC;aACrB;SACF;IACH,CAAC;CAAA;AApBD,iCAoBC;AAED,SAAS,WAAW,CAClB,aAAqB,EACrB,WAAmB,EACnB,OAAiC;IAEjC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,UAAU,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAC;QAChD,YAAY,GAAG,IAAA,oBAAI,EACjB,IAAA,WAAI,EAAC,aAAa,EAAE,oCAAoC,CAAC,EACzD,CAAC,QAAQ,EAAE,GAAG,UAAU,CAAC,EACzB,EAAE,GAAG,EAAE,IAAA,WAAI,EAAC,aAAa,EAAE,WAAW,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAC5D,CAAC;QAEF,2DAA2D;QAC3D,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,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,SAAS,mBAAmB,CAAC,OAAiC;IAC5D,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE;QAC7C,MAAM,CAAC,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;QACtB,MAAM,CAAC,GAAG,IAAA,cAAK,EAAC,EAAE,CAAC,CAAC,QAAQ,CAAC;QAC7B,IAAI,CAAC,KAAK,SAAS;YAAE,OAAO,GAAG,CAAC;QAChC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QACtB,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { createDirectory } from '@nrwl/workspace/src/utilities/fileutils';
|
|
2
|
-
import { names, ExecutorContext } from '@nrwl/devkit';
|
|
3
|
-
import { dirname, join } from 'path';
|
|
4
|
-
import { ChildProcess, fork } from 'child_process';
|
|
5
|
-
|
|
6
|
-
import { ensureNodeModulesSymlink } from '../../utils/ensure-node-modules-symlink';
|
|
7
|
-
|
|
8
|
-
import { ReactNativeBundleOptions } from './schema';
|
|
9
|
-
|
|
10
|
-
export interface ReactNativeBundleOutput {
|
|
11
|
-
success: boolean;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
let childProcess: ChildProcess;
|
|
15
|
-
|
|
16
|
-
export default async function* bundleExecutor(
|
|
17
|
-
options: ReactNativeBundleOptions,
|
|
18
|
-
context: ExecutorContext
|
|
19
|
-
): AsyncGenerator<ReactNativeBundleOutput> {
|
|
20
|
-
const projectRoot =
|
|
21
|
-
context.projectsConfigurations.projects[context.projectName].root;
|
|
22
|
-
|
|
23
|
-
options.bundleOutput = join(context.root, options.bundleOutput);
|
|
24
|
-
|
|
25
|
-
createDirectory(dirname(options.bundleOutput));
|
|
26
|
-
ensureNodeModulesSymlink(context.root, projectRoot);
|
|
27
|
-
|
|
28
|
-
try {
|
|
29
|
-
await runCliBuild(context.root, projectRoot, options);
|
|
30
|
-
yield { success: true };
|
|
31
|
-
} finally {
|
|
32
|
-
if (childProcess) {
|
|
33
|
-
childProcess.kill();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function runCliBuild(
|
|
39
|
-
workspaceRoot: string,
|
|
40
|
-
projectRoot: string,
|
|
41
|
-
options: ReactNativeBundleOptions
|
|
42
|
-
) {
|
|
43
|
-
return new Promise((resolve, reject) => {
|
|
44
|
-
const cliOptions = createBundleOptions(options);
|
|
45
|
-
childProcess = fork(
|
|
46
|
-
join(workspaceRoot, './node_modules/react-native/cli.js'),
|
|
47
|
-
['bundle', ...cliOptions],
|
|
48
|
-
{ cwd: join(workspaceRoot, projectRoot), env: process.env }
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
// Ensure the child process is killed when the parent exits
|
|
52
|
-
process.on('exit', () => childProcess.kill());
|
|
53
|
-
process.on('SIGTERM', () => childProcess.kill());
|
|
54
|
-
|
|
55
|
-
childProcess.on('error', (err) => {
|
|
56
|
-
reject(err);
|
|
57
|
-
});
|
|
58
|
-
childProcess.on('exit', (code) => {
|
|
59
|
-
if (code === 0) {
|
|
60
|
-
resolve(code);
|
|
61
|
-
} else {
|
|
62
|
-
reject(code);
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function createBundleOptions(options: ReactNativeBundleOptions) {
|
|
69
|
-
return Object.keys(options).reduce((acc, _k) => {
|
|
70
|
-
const v = options[_k];
|
|
71
|
-
const k = names(_k).fileName;
|
|
72
|
-
if (v === undefined) return acc;
|
|
73
|
-
acc.push(`--${k}`, v);
|
|
74
|
-
return acc;
|
|
75
|
-
}, []);
|
|
76
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
4
|
-
const bundle_impl_1 = require("./bundle.impl");
|
|
5
|
-
exports.default = (0, devkit_1.convertNxExecutor)(bundle_impl_1.default);
|
|
6
|
-
//# sourceMappingURL=compat.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/executors/bundle/compat.ts"],"names":[],"mappings":";;AAAA,yCAAiD;AAEjD,+CAA2C;AAE3C,kBAAe,IAAA,0BAAiB,EAAC,qBAAc,CAAC,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// options form https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
|
|
2
|
-
export interface ReactNativeBundleOptions {
|
|
3
|
-
entryFile: string;
|
|
4
|
-
platform: string;
|
|
5
|
-
transfrom?: string;
|
|
6
|
-
dev: boolean; // default is true
|
|
7
|
-
minify?: boolean; // default is false, if dev is false, then minify will become true
|
|
8
|
-
bundleOutput: string;
|
|
9
|
-
maxWorkers: number;
|
|
10
|
-
sourcemapOutput?: string;
|
|
11
|
-
sourcemapSourcesRoot?: string;
|
|
12
|
-
sourcemapUseAbsolutePath: boolean; // default is false
|
|
13
|
-
assetDest?: string;
|
|
14
|
-
resetCache: boolean; // default is false
|
|
15
|
-
readGlobalCache?: boolean; // default is false
|
|
16
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 2,
|
|
3
|
-
"outputCapture": "direct-nodejs",
|
|
4
|
-
"cli": "nx",
|
|
5
|
-
"$id": "NxReactNativeBundle",
|
|
6
|
-
"$schema": "http://json-schema.org/schema",
|
|
7
|
-
"title": "Offline JS Bundle for React Native",
|
|
8
|
-
"description": "JS Bundle target options.",
|
|
9
|
-
"type": "object",
|
|
10
|
-
"presets": [
|
|
11
|
-
{
|
|
12
|
-
"name": "Bundle for a specific platform",
|
|
13
|
-
"keys": ["platform"]
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"name": "Bundle a development build",
|
|
17
|
-
"keys": ["dev"]
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"name": "Bundle to a specific output path",
|
|
21
|
-
"keys": ["bundleOutput"]
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"name": "Bundle without global cache",
|
|
25
|
-
"keys": ["resetCache"]
|
|
26
|
-
}
|
|
27
|
-
],
|
|
28
|
-
"properties": {
|
|
29
|
-
"entryFile": {
|
|
30
|
-
"type": "string",
|
|
31
|
-
"description": "The entry file relative to project root.",
|
|
32
|
-
"x-completion-type": "file",
|
|
33
|
-
"x-completion-glob": "main@(.js|.ts)"
|
|
34
|
-
},
|
|
35
|
-
"platform": {
|
|
36
|
-
"enum": ["ios", "android"],
|
|
37
|
-
"alias": "p",
|
|
38
|
-
"description": "Platform to build for."
|
|
39
|
-
},
|
|
40
|
-
"transformer": {
|
|
41
|
-
"type": "string",
|
|
42
|
-
"description": "Specify a custom transformer to be used."
|
|
43
|
-
},
|
|
44
|
-
"dev": {
|
|
45
|
-
"type": "boolean",
|
|
46
|
-
"description": "Generate a development build.",
|
|
47
|
-
"default": true
|
|
48
|
-
},
|
|
49
|
-
"minify": {
|
|
50
|
-
"type": "boolean",
|
|
51
|
-
"description": "Allows overriding whether bundle is minified."
|
|
52
|
-
},
|
|
53
|
-
"bundleOutput": {
|
|
54
|
-
"type": "string",
|
|
55
|
-
"description": "The output path of the generated files.",
|
|
56
|
-
"x-completion-type": "directory"
|
|
57
|
-
},
|
|
58
|
-
"maxWorkers": {
|
|
59
|
-
"type": "number",
|
|
60
|
-
"description": "The number of workers we should parallelize the transformer on."
|
|
61
|
-
},
|
|
62
|
-
"sourcemapOutput": {
|
|
63
|
-
"type": "string",
|
|
64
|
-
"description": "File name where to store the sourcemap file for resulting bundle, ex. /tmp/groups.map."
|
|
65
|
-
},
|
|
66
|
-
"sourcemapSourcesRoot": {
|
|
67
|
-
"type": "string",
|
|
68
|
-
"description": "Path to make sourcemaps sources entries relative to, ex. /root/dir."
|
|
69
|
-
},
|
|
70
|
-
"sourcemapUseAbsolutePath": {
|
|
71
|
-
"type": "boolean",
|
|
72
|
-
"description": "Report SourceMapURL using its full path.",
|
|
73
|
-
"default": false
|
|
74
|
-
},
|
|
75
|
-
"assetsDest": {
|
|
76
|
-
"type": "string",
|
|
77
|
-
"description": "Directory name where to store assets referenced in the bundle."
|
|
78
|
-
},
|
|
79
|
-
"resetCache": {
|
|
80
|
-
"type": "boolean",
|
|
81
|
-
"description": "Removes cached files.",
|
|
82
|
-
"default": false
|
|
83
|
-
},
|
|
84
|
-
"readGlobalCache": {
|
|
85
|
-
"type": "boolean",
|
|
86
|
-
"description": "Try to fetch transformed JS code from the global cache, if configured.",
|
|
87
|
-
"default": false
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
"required": ["platform", "entryFile", "bundleOutput"],
|
|
91
|
-
"examplesFile": "../../../docs/bundle-examples.md"
|
|
92
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
4
|
-
const ensure_symlink_impl_1 = require("./ensure-symlink.impl");
|
|
5
|
-
exports.default = (0, devkit_1.convertNxExecutor)(ensure_symlink_impl_1.default);
|
|
6
|
-
//# sourceMappingURL=compat.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/executors/ensure-symlink/compat.ts"],"names":[],"mappings":";;AAAA,yCAAiD;AAEjD,+DAA0D;AAE1D,kBAAe,IAAA,0BAAiB,EAAC,6BAAqB,CAAC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-symlink");
|
|
5
|
-
function ensureSymlinkExecutor(_, context) {
|
|
6
|
-
return tslib_1.__asyncGenerator(this, arguments, function* ensureSymlinkExecutor_1() {
|
|
7
|
-
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
8
|
-
(0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
|
|
9
|
-
yield yield tslib_1.__await({ success: true });
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
exports.default = ensureSymlinkExecutor;
|
|
13
|
-
//# sourceMappingURL=ensure-symlink.impl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ensure-symlink.impl.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/executors/ensure-symlink/ensure-symlink.impl.ts"],"names":[],"mappings":";;;AACA,yFAAmF;AAMnF,SAA+B,qBAAqB,CAClD,CAAC,EACD,OAAwB;;QAExB,MAAM,WAAW,GACf,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QAEpE,IAAA,sDAAwB,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAEpD,4BAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA,CAAC;IAC1B,CAAC;CAAA;AAVD,wCAUC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ExecutorContext } from '@nrwl/devkit';
|
|
2
|
-
import { ensureNodeModulesSymlink } from '../../utils/ensure-node-modules-symlink';
|
|
3
|
-
|
|
4
|
-
export interface ReactNativeEnsureSymlinkOutput {
|
|
5
|
-
success: boolean;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export default async function* ensureSymlinkExecutor(
|
|
9
|
-
_,
|
|
10
|
-
context: ExecutorContext
|
|
11
|
-
): AsyncGenerator<ReactNativeEnsureSymlinkOutput> {
|
|
12
|
-
const projectRoot =
|
|
13
|
-
context.projectsConfigurations.projects[context.projectName].root;
|
|
14
|
-
|
|
15
|
-
ensureNodeModulesSymlink(context.root, projectRoot);
|
|
16
|
-
|
|
17
|
-
yield { success: true };
|
|
18
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 2,
|
|
3
|
-
"outputCapture": "direct-nodejs",
|
|
4
|
-
"cli": "nx",
|
|
5
|
-
"$id": "NxReactNativeEnsureSymlink",
|
|
6
|
-
"$schema": "http://json-schema.org/schema",
|
|
7
|
-
"title": "Ensure Symlink for React Native",
|
|
8
|
-
"description": "Ensure workspace node_modules is symlink under app's node_modules folder.",
|
|
9
|
-
"type": "object",
|
|
10
|
-
"properties": {}
|
|
11
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
4
|
-
const pod_install_impl_1 = require("./pod-install.impl");
|
|
5
|
-
exports.default = (0, devkit_1.convertNxExecutor)(pod_install_impl_1.default);
|
|
6
|
-
//# sourceMappingURL=compat.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/executors/pod-install/compat.ts"],"names":[],"mappings":";;AAAA,yCAAiD;AAEjD,yDAA4C;AAE5C,kBAAe,IAAA,0BAAiB,EAAC,0BAAU,CAAC,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ExecutorContext } from '@nrwl/devkit';
|
|
2
|
-
import { ReactNativePodInstallOptions } from './schema';
|
|
3
|
-
export interface ReactNativePodInstallOutput {
|
|
4
|
-
success: boolean;
|
|
5
|
-
}
|
|
6
|
-
export default function podInstall(options: ReactNativePodInstallOptions, context: ExecutorContext): AsyncGenerator<ReactNativePodInstallOutput>;
|
|
@@ -1,15 +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 pod_install_task_1 = require("../../utils/pod-install-task");
|
|
6
|
-
function podInstall(options, context) {
|
|
7
|
-
return tslib_1.__asyncGenerator(this, arguments, function* podInstall_1() {
|
|
8
|
-
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
9
|
-
const iosDirectory = (0, path_1.join)(context.root, projectRoot, 'ios');
|
|
10
|
-
yield tslib_1.__await((0, pod_install_task_1.runPodInstall)(iosDirectory, true, options.buildFolder)());
|
|
11
|
-
yield yield tslib_1.__await({ success: true });
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
exports.default = podInstall;
|
|
15
|
-
//# sourceMappingURL=pod-install.impl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pod-install.impl.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/executors/pod-install/pod-install.impl.ts"],"names":[],"mappings":";;;AAAA,+BAA4B;AAG5B,mEAA6D;AAO7D,SAA+B,UAAU,CACvC,OAAqC,EACrC,OAAwB;;QAExB,MAAM,WAAW,GACf,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QACpE,MAAM,YAAY,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;QAC5D,sBAAM,IAAA,gCAAa,EAAC,YAAY,EAAE,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,EAAE,CAAA,CAAC;QAE/D,4BAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA,CAAC;IAC1B,CAAC;CAAA;AAVD,6BAUC"}
|