@nx/react-native 0.0.0-pr-22179-271588f

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.
Files changed (276) hide show
  1. package/.eslintrc.json +48 -0
  2. package/LICENSE +22 -0
  3. package/README.md +68 -0
  4. package/executors.json +59 -0
  5. package/generators.json +58 -0
  6. package/index.d.ts +5 -0
  7. package/index.js +13 -0
  8. package/migrations.json +632 -0
  9. package/package.json +57 -0
  10. package/plugin.d.ts +1 -0
  11. package/plugin.js +6 -0
  12. package/plugins/jest/svg-mock.d.ts +0 -0
  13. package/plugins/jest/svg-mock.js +3 -0
  14. package/plugins/metro-resolver.d.ts +1 -0
  15. package/plugins/metro-resolver.js +136 -0
  16. package/plugins/plugin.d.ts +14 -0
  17. package/plugins/plugin.js +162 -0
  18. package/plugins/with-nx-metro.d.ts +8 -0
  19. package/plugins/with-nx-metro.js +31 -0
  20. package/project.json +54 -0
  21. package/src/executors/build-android/build-android.impl.d.ts +6 -0
  22. package/src/executors/build-android/build-android.impl.js +48 -0
  23. package/src/executors/build-android/build-android.impl.ts +69 -0
  24. package/src/executors/build-android/schema.d.ts +14 -0
  25. package/src/executors/build-android/schema.json +81 -0
  26. package/src/executors/build-ios/build-ios.impl.d.ts +6 -0
  27. package/src/executors/build-ios/build-ios.impl.js +55 -0
  28. package/src/executors/build-ios/build-ios.impl.ts +77 -0
  29. package/src/executors/build-ios/schema.d.ts +17 -0
  30. package/src/executors/build-ios/schema.json +91 -0
  31. package/src/executors/bundle/bundle.impl.d.ts +6 -0
  32. package/src/executors/bundle/bundle.impl.js +56 -0
  33. package/src/executors/bundle/bundle.impl.ts +77 -0
  34. package/src/executors/bundle/schema.d.ts +16 -0
  35. package/src/executors/bundle/schema.json +92 -0
  36. package/src/executors/ensure-symlink/ensure-symlink.impl.d.ts +9 -0
  37. package/src/executors/ensure-symlink/ensure-symlink.impl.js +13 -0
  38. package/src/executors/ensure-symlink/ensure-symlink.impl.ts +22 -0
  39. package/src/executors/ensure-symlink/schema.json +11 -0
  40. package/src/executors/pod-install/pod-install.impl.d.ts +6 -0
  41. package/src/executors/pod-install/pod-install.impl.js +11 -0
  42. package/src/executors/pod-install/pod-install.impl.ts +21 -0
  43. package/src/executors/pod-install/schema.d.ts +6 -0
  44. package/src/executors/pod-install/schema.json +33 -0
  45. package/src/executors/run-android/run-android.impl.d.ts +6 -0
  46. package/src/executors/run-android/run-android.impl.js +66 -0
  47. package/src/executors/run-android/run-android.impl.ts +94 -0
  48. package/src/executors/run-android/schema.d.ts +13 -0
  49. package/src/executors/run-android/schema.json +100 -0
  50. package/src/executors/run-ios/run-ios.impl.d.ts +6 -0
  51. package/src/executors/run-ios/run-ios.impl.js +65 -0
  52. package/src/executors/run-ios/run-ios.impl.ts +92 -0
  53. package/src/executors/run-ios/schema.d.ts +7 -0
  54. package/src/executors/run-ios/schema.json +96 -0
  55. package/src/executors/start/lib/is-packager-running.d.ts +1 -0
  56. package/src/executors/start/lib/is-packager-running.js +15 -0
  57. package/src/executors/start/schema.d.ts +7 -0
  58. package/src/executors/start/schema.json +28 -0
  59. package/src/executors/start/start.impl.d.ts +10 -0
  60. package/src/executors/start/start.impl.js +87 -0
  61. package/src/executors/start/start.impl.ts +111 -0
  62. package/src/executors/storybook/schema.d.ts +5 -0
  63. package/src/executors/storybook/schema.json +29 -0
  64. package/src/executors/storybook/storybook.impl.d.ts +10 -0
  65. package/src/executors/storybook/storybook.impl.js +51 -0
  66. package/src/executors/storybook/storybook.impl.ts +85 -0
  67. package/src/executors/sync-deps/schema.d.ts +5 -0
  68. package/src/executors/sync-deps/schema.json +33 -0
  69. package/src/executors/sync-deps/sync-deps.impl.d.ts +9 -0
  70. package/src/executors/sync-deps/sync-deps.impl.js +78 -0
  71. package/src/executors/sync-deps/sync-deps.impl.ts +140 -0
  72. package/src/executors/upgrade/schema.d.ts +1 -0
  73. package/src/executors/upgrade/schema.json +11 -0
  74. package/src/executors/upgrade/upgrade.impl.d.ts +13 -0
  75. package/src/executors/upgrade/upgrade.impl.js +47 -0
  76. package/src/executors/upgrade/upgrade.impl.ts +64 -0
  77. package/src/generators/application/application.d.ts +5 -0
  78. package/src/generators/application/application.js +87 -0
  79. package/src/generators/application/application.spec.ts +258 -0
  80. package/src/generators/application/files/app/.babelrc.js.template +23 -0
  81. package/src/generators/application/files/app/Gemfile.template +7 -0
  82. package/src/generators/application/files/app/android/app/build.gradle.template +119 -0
  83. package/src/generators/application/files/app/android/app/debug.keystore +0 -0
  84. package/src/generators/application/files/app/android/app/proguard-rules.pro +10 -0
  85. package/src/generators/application/files/app/android/app/src/androidTest/java/com/__lowerCaseName__/DetoxTest.java.template +30 -0
  86. package/src/generators/application/files/app/android/app/src/debug/AndroidManifest.xml.template +10 -0
  87. package/src/generators/application/files/app/android/app/src/main/AndroidManifest.xml.template +26 -0
  88. package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainActivity.kt.template +22 -0
  89. package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainApplication.kt.template +45 -0
  90. package/src/generators/application/files/app/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
  91. package/src/generators/application/files/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  92. package/src/generators/application/files/app/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  93. package/src/generators/application/files/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  94. package/src/generators/application/files/app/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  95. package/src/generators/application/files/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  96. package/src/generators/application/files/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  97. package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  98. package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  99. package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  100. package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  101. package/src/generators/application/files/app/android/app/src/main/res/values/strings.xml.template +3 -0
  102. package/src/generators/application/files/app/android/app/src/main/res/values/styles.xml +9 -0
  103. package/src/generators/application/files/app/android/app/src/main/res/xml/network_security_config.xml +7 -0
  104. package/src/generators/application/files/app/android/build.gradle.template +21 -0
  105. package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  106. package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  107. package/src/generators/application/files/app/android/gradle.properties +41 -0
  108. package/src/generators/application/files/app/android/gradlew.bat +92 -0
  109. package/src/generators/application/files/app/android/gradlew.template +249 -0
  110. package/src/generators/application/files/app/android/settings.gradle.template +4 -0
  111. package/src/generators/application/files/app/app.json.template +4 -0
  112. package/src/generators/application/files/app/ios/.xcode.env.template +12 -0
  113. package/src/generators/application/files/app/ios/Podfile.template +55 -0
  114. package/src/generators/application/files/app/ios/__className__/AppDelegate.h +6 -0
  115. package/src/generators/application/files/app/ios/__className__/AppDelegate.mm.template +31 -0
  116. package/src/generators/application/files/app/ios/__className__/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
  117. package/src/generators/application/files/app/ios/__className__/Images.xcassets/Contents.json +6 -0
  118. package/src/generators/application/files/app/ios/__className__/Info.plist.template +52 -0
  119. package/src/generators/application/files/app/ios/__className__/LaunchScreen.storyboard.template +47 -0
  120. package/src/generators/application/files/app/ios/__className__/main.m +10 -0
  121. package/src/generators/application/files/app/ios/__className__.xcodeproj/project.pbxproj.template +684 -0
  122. package/src/generators/application/files/app/ios/__className__.xcodeproj/xcshareddata/xcschemes/__className__.xcscheme.template +88 -0
  123. package/src/generators/application/files/app/ios/__className__.xcworkspace/contents.xcworkspacedata +10 -0
  124. package/src/generators/application/files/app/ios/__className__Tests/Info.plist +24 -0
  125. package/src/generators/application/files/app/ios/__className__Tests/__className__Tests.m +66 -0
  126. package/src/generators/application/files/app/metro.config.js.template +31 -0
  127. package/src/generators/application/files/app/package.json.template +14 -0
  128. package/src/generators/application/files/app/src/app/App.spec.tsx.template +9 -0
  129. package/src/generators/application/files/app/src/app/App.tsx.template +731 -0
  130. package/src/generators/application/files/app/src/main.tsx.template +4 -0
  131. package/src/generators/application/files/app/test-setup.ts.template +1 -0
  132. package/src/generators/application/files/app/tsconfig.app.json.template +10 -0
  133. package/src/generators/application/files/app/tsconfig.json.template +19 -0
  134. package/src/generators/application/lib/add-e2e.d.ts +3 -0
  135. package/src/generators/application/lib/add-e2e.js +46 -0
  136. package/src/generators/application/lib/add-project.d.ts +3 -0
  137. package/src/generators/application/lib/add-project.js +91 -0
  138. package/src/generators/application/lib/create-application-files.d.ts +3 -0
  139. package/src/generators/application/lib/create-application-files.js +24 -0
  140. package/src/generators/application/lib/normalize-options.d.ts +17 -0
  141. package/src/generators/application/lib/normalize-options.js +47 -0
  142. package/src/generators/application/lib/normalize-options.spec.ts +196 -0
  143. package/src/generators/application/schema.d.ts +23 -0
  144. package/src/generators/application/schema.json +103 -0
  145. package/src/generators/component/component.d.ts +5 -0
  146. package/src/generators/component/component.js +64 -0
  147. package/src/generators/component/component.spec.ts +127 -0
  148. package/src/generators/component/files/__fileName__.spec.tsx__tmpl__ +11 -0
  149. package/src/generators/component/files/__fileName__.tsx__tmpl__ +32 -0
  150. package/src/generators/component/lib/add-import.d.ts +3 -0
  151. package/src/generators/component/lib/add-import.js +33 -0
  152. package/src/generators/component/lib/normalize-options.d.ts +10 -0
  153. package/src/generators/component/lib/normalize-options.js +50 -0
  154. package/src/generators/component/schema.d.ts +24 -0
  155. package/src/generators/component/schema.json +85 -0
  156. package/src/generators/component-story/component-story.d.ts +8 -0
  157. package/src/generators/component-story/component-story.js +15 -0
  158. package/src/generators/component-story/schema.d.ts +6 -0
  159. package/src/generators/component-story/schema.json +42 -0
  160. package/src/generators/init/init.d.ts +6 -0
  161. package/src/generators/init/init.js +78 -0
  162. package/src/generators/init/init.spec.ts +38 -0
  163. package/src/generators/init/lib/add-git-ignore-entry.d.ts +2 -0
  164. package/src/generators/init/lib/add-git-ignore-entry.js +24 -0
  165. package/src/generators/init/lib/gitignore-entries.d.ts +1 -0
  166. package/src/generators/init/lib/gitignore-entries.js +74 -0
  167. package/src/generators/init/schema.d.ts +7 -0
  168. package/src/generators/init/schema.json +35 -0
  169. package/src/generators/library/files/lib/.babelrc.js.template +21 -0
  170. package/src/generators/library/files/lib/README.md +7 -0
  171. package/src/generators/library/files/lib/package.json.template +4 -0
  172. package/src/generators/library/files/lib/src/index.ts.template +0 -0
  173. package/src/generators/library/files/lib/test-setup.ts.template +1 -0
  174. package/src/generators/library/files/lib/tsconfig.json.template +16 -0
  175. package/src/generators/library/files/lib/tsconfig.lib.json.template +9 -0
  176. package/src/generators/library/lib/normalize-options.d.ts +12 -0
  177. package/src/generators/library/lib/normalize-options.js +33 -0
  178. package/src/generators/library/library.d.ts +5 -0
  179. package/src/generators/library/library.js +154 -0
  180. package/src/generators/library/library.spec.ts +420 -0
  181. package/src/generators/library/schema.d.ts +25 -0
  182. package/src/generators/library/schema.json +107 -0
  183. package/src/generators/stories/schema.d.ts +7 -0
  184. package/src/generators/stories/schema.json +58 -0
  185. package/src/generators/stories/stories.d.ts +8 -0
  186. package/src/generators/stories/stories.js +13 -0
  187. package/src/generators/storybook-configuration/configuration.d.ts +9 -0
  188. package/src/generators/storybook-configuration/configuration.js +26 -0
  189. package/src/generators/storybook-configuration/schema.d.ts +13 -0
  190. package/src/generators/storybook-configuration/schema.json +79 -0
  191. package/src/generators/upgrade-native/lib/create-native-files.d.ts +3 -0
  192. package/src/generators/upgrade-native/lib/create-native-files.js +14 -0
  193. package/src/generators/upgrade-native/lib/normalize-options.d.ts +12 -0
  194. package/src/generators/upgrade-native/lib/normalize-options.js +27 -0
  195. package/src/generators/upgrade-native/schema.d.ts +9 -0
  196. package/src/generators/upgrade-native/schema.json +41 -0
  197. package/src/generators/upgrade-native/upgrade-native.d.ts +10 -0
  198. package/src/generators/upgrade-native/upgrade-native.js +31 -0
  199. package/src/generators/web-configuration/files/base-vite/.babelrc.js.template +23 -0
  200. package/src/generators/web-configuration/files/base-vite/index.html__tmpl__ +15 -0
  201. package/src/generators/web-configuration/files/base-vite/public/favicon.ico +0 -0
  202. package/src/generators/web-configuration/files/base-vite/src/assets/.gitkeep +0 -0
  203. package/src/generators/web-configuration/files/base-vite/src/main-web.tsx__tmpl__ +9 -0
  204. package/src/generators/web-configuration/files/base-vite/vite.config.ts__tmpl__ +82 -0
  205. package/src/generators/web-configuration/files/base-webpack/.babelrc.js.template +23 -0
  206. package/src/generators/web-configuration/files/base-webpack/src/assets/.gitkeep +0 -0
  207. package/src/generators/web-configuration/files/base-webpack/src/favicon.ico +0 -0
  208. package/src/generators/web-configuration/files/base-webpack/src/index.html__tmpl__ +14 -0
  209. package/src/generators/web-configuration/files/base-webpack/src/main-web.tsx__tmpl__ +9 -0
  210. package/src/generators/web-configuration/files/base-webpack/webpack.config.js__tmpl__ +77 -0
  211. package/src/generators/web-configuration/lib/normalize-schema.d.ts +17 -0
  212. package/src/generators/web-configuration/lib/normalize-schema.js +16 -0
  213. package/src/generators/web-configuration/lib/webpack-targets.d.ts +7 -0
  214. package/src/generators/web-configuration/lib/webpack-targets.js +75 -0
  215. package/src/generators/web-configuration/schema.d.ts +6 -0
  216. package/src/generators/web-configuration/schema.json +42 -0
  217. package/src/generators/web-configuration/web-configuration.d.ts +12 -0
  218. package/src/generators/web-configuration/web-configuration.js +87 -0
  219. package/src/migrations/update-15-0-0/add-babel-inputs.d.ts +2 -0
  220. package/src/migrations/update-15-0-0/add-babel-inputs.js +9 -0
  221. package/src/migrations/update-15-0-0/add-babel-inputs.spec.ts +73 -0
  222. package/src/migrations/update-15-9-1/add-build-ios-target.d.ts +5 -0
  223. package/src/migrations/update-15-9-1/add-build-ios-target.js +29 -0
  224. package/src/migrations/update-15-9-1/add-build-ios-target.spec.ts +36 -0
  225. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
  226. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +9 -0
  227. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.spec.ts +37 -0
  228. package/src/migrations/update-16-1-0/upgrade-storybook-6-5.d.ts +6 -0
  229. package/src/migrations/update-16-1-0/upgrade-storybook-6-5.js +21 -0
  230. package/src/migrations/update-16-6-0/add-depends-on.d.ts +6 -0
  231. package/src/migrations/update-16-6-0/add-depends-on.js +63 -0
  232. package/src/migrations/update-16-6-0/update-metro-config.d.ts +6 -0
  233. package/src/migrations/update-16-6-0/update-metro-config.js +63 -0
  234. package/src/migrations/update-16-9-0/remove-types-react-native.d.ts +7 -0
  235. package/src/migrations/update-16-9-0/remove-types-react-native.js +13 -0
  236. package/src/migrations/update-18-0-0/add-upgrade-target.d.ts +6 -0
  237. package/src/migrations/update-18-0-0/add-upgrade-target.js +33 -0
  238. package/src/migrations/update-18-0-0/add-web-configuration.d.ts +8 -0
  239. package/src/migrations/update-18-0-0/add-web-configuration.js +33 -0
  240. package/src/migrations/update-18-0-0/add-web-configuration.spec.ts +39 -0
  241. package/src/migrations/update-18-0-0/change-storybook-targets.d.ts +5 -0
  242. package/src/migrations/update-18-0-0/change-storybook-targets.js +57 -0
  243. package/src/migrations/update-18-0-0/remove-block-list.d.ts +6 -0
  244. package/src/migrations/update-18-0-0/remove-block-list.js +28 -0
  245. package/src/migrations/update-18-0-0/remove-block-list.spec.ts +68 -0
  246. package/src/migrations/update-18-0-0/remove-metro.d.ts +14 -0
  247. package/src/migrations/update-18-0-0/remove-metro.js +29 -0
  248. package/src/migrations/update-18-0-0/remove-symlink-target.d.ts +6 -0
  249. package/src/migrations/update-18-0-0/remove-symlink-target.js +30 -0
  250. package/src/migrations/update-18-0-0/remove-symlink-target.spec.ts +40 -0
  251. package/src/utils/add-jest.d.ts +2 -0
  252. package/src/utils/add-jest.js +48 -0
  253. package/src/utils/add-linting.d.ts +13 -0
  254. package/src/utils/add-linting.js +36 -0
  255. package/src/utils/add-linting.spec.ts +40 -0
  256. package/src/utils/chmod-android-gradle-files.d.ts +3 -0
  257. package/src/utils/chmod-android-gradle-files.js +27 -0
  258. package/src/utils/ensure-dependencies.d.ts +2 -0
  259. package/src/utils/ensure-dependencies.js +30 -0
  260. package/src/utils/ensure-node-modules-symlink.d.ts +9 -0
  261. package/src/utils/ensure-node-modules-symlink.js +28 -0
  262. package/src/utils/ensure-node-modules-symlink.spec.ts +108 -0
  263. package/src/utils/find-all-npm-dependencies.d.ts +2 -0
  264. package/src/utils/find-all-npm-dependencies.js +27 -0
  265. package/src/utils/find-all-npm-dependencies.spec.ts +103 -0
  266. package/src/utils/format-file.d.ts +1 -0
  267. package/src/utils/format-file.js +16 -0
  268. package/src/utils/get-cli-options.d.ts +8 -0
  269. package/src/utils/get-cli-options.js +33 -0
  270. package/src/utils/pod-install-task.d.ts +18 -0
  271. package/src/utils/pod-install-task.js +73 -0
  272. package/src/utils/testing-generators.d.ts +3 -0
  273. package/src/utils/testing-generators.js +32 -0
  274. package/src/utils/versions.d.ts +17 -0
  275. package/src/utils/versions.js +20 -0
  276. package/typings/svg.d.ts +7 -0
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runCliStart = void 0;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const child_process_1 = require("child_process");
6
+ const path_1 = require("path");
7
+ const is_packager_running_1 = require("./lib/is-packager-running");
8
+ async function* startExecutor(options, context) {
9
+ const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
10
+ await runCliStart(context.root, projectRoot, options);
11
+ yield {
12
+ port: options.port,
13
+ success: true,
14
+ };
15
+ }
16
+ exports.default = startExecutor;
17
+ /*
18
+ * Starts the JS bundler and checks for "running" status before notifying
19
+ * that packager has started.
20
+ */
21
+ async function runCliStart(workspaceRoot, projectRoot, options) {
22
+ const result = await (0, is_packager_running_1.isPackagerRunning)(options.port);
23
+ if (result === 'running') {
24
+ devkit_1.logger.info(`JS server already running on port ${options.port}.`);
25
+ }
26
+ else if (result === 'unrecognized') {
27
+ devkit_1.logger.warn('JS server not recognized.');
28
+ }
29
+ else {
30
+ // result === 'not_running'
31
+ devkit_1.logger.info('Starting JS server...');
32
+ try {
33
+ return await startAsync(workspaceRoot, projectRoot, options);
34
+ }
35
+ catch (error) {
36
+ devkit_1.logger.error(`Failed to start the packager server. Error details: ${error.message ?? error}`);
37
+ throw error;
38
+ }
39
+ }
40
+ }
41
+ exports.runCliStart = runCliStart;
42
+ function startAsync(workspaceRoot, projectRoot, options) {
43
+ return new Promise((resolve, reject) => {
44
+ const childProcess = (0, child_process_1.fork)(require.resolve('react-native/cli.js'), ['start', ...createStartOptions(options)], {
45
+ cwd: (0, path_1.resolve)(workspaceRoot, projectRoot),
46
+ env: process.env,
47
+ stdio: 'inherit',
48
+ });
49
+ childProcess.on('error', (err) => {
50
+ reject(err);
51
+ });
52
+ childProcess.on('exit', (code) => {
53
+ if (code === 0) {
54
+ resolve(childProcess);
55
+ }
56
+ else {
57
+ reject(code);
58
+ }
59
+ });
60
+ const processExitListener = (signal) => () => {
61
+ childProcess.kill(signal);
62
+ process.exit();
63
+ };
64
+ process.once('exit', (signal) => childProcess.kill(signal));
65
+ process.once('SIGTERM', processExitListener);
66
+ process.once('SIGINT', processExitListener);
67
+ process.once('SIGQUIT', processExitListener);
68
+ });
69
+ }
70
+ function createStartOptions(options) {
71
+ return Object.keys(options).reduce((acc, k) => {
72
+ if (k === 'resetCache') {
73
+ if (options[k] === true) {
74
+ acc.push(`--reset-cache`);
75
+ }
76
+ }
77
+ else if (k === 'interactive') {
78
+ if (options[k] === false) {
79
+ acc.push(`--no-interactive`);
80
+ }
81
+ }
82
+ else {
83
+ acc.push(`--${k}`, options[k]);
84
+ }
85
+ return acc;
86
+ }, []);
87
+ }
@@ -0,0 +1,111 @@
1
+ import { ExecutorContext, logger } from '@nx/devkit';
2
+ import { ChildProcess, fork } from 'child_process';
3
+ import { resolve as pathResolve } from 'path';
4
+ import { isPackagerRunning } from './lib/is-packager-running';
5
+ import { ReactNativeStartOptions } from './schema';
6
+
7
+ export interface ReactNativeStartOutput {
8
+ port?: number;
9
+ success: boolean;
10
+ }
11
+
12
+ export default async function* startExecutor(
13
+ options: ReactNativeStartOptions,
14
+ context: ExecutorContext
15
+ ): AsyncGenerator<ReactNativeStartOutput> {
16
+ const projectRoot =
17
+ context.projectsConfigurations.projects[context.projectName].root;
18
+
19
+ await runCliStart(context.root, projectRoot, options);
20
+
21
+ yield {
22
+ port: options.port,
23
+ success: true,
24
+ };
25
+ }
26
+
27
+ /*
28
+ * Starts the JS bundler and checks for "running" status before notifying
29
+ * that packager has started.
30
+ */
31
+ export async function runCliStart(
32
+ workspaceRoot: string,
33
+ projectRoot: string,
34
+ options: ReactNativeStartOptions
35
+ ): Promise<ChildProcess> {
36
+ const result = await isPackagerRunning(options.port);
37
+ if (result === 'running') {
38
+ logger.info(`JS server already running on port ${options.port}.`);
39
+ } else if (result === 'unrecognized') {
40
+ logger.warn('JS server not recognized.');
41
+ } else {
42
+ // result === 'not_running'
43
+ logger.info('Starting JS server...');
44
+
45
+ try {
46
+ return await startAsync(workspaceRoot, projectRoot, options);
47
+ } catch (error) {
48
+ logger.error(
49
+ `Failed to start the packager server. Error details: ${
50
+ error.message ?? error
51
+ }`
52
+ );
53
+ throw error;
54
+ }
55
+ }
56
+ }
57
+
58
+ function startAsync(
59
+ workspaceRoot: string,
60
+ projectRoot: string,
61
+ options: ReactNativeStartOptions
62
+ ): Promise<ChildProcess> {
63
+ return new Promise<ChildProcess>((resolve, reject) => {
64
+ const childProcess = fork(
65
+ require.resolve('react-native/cli.js'),
66
+ ['start', ...createStartOptions(options)],
67
+ {
68
+ cwd: pathResolve(workspaceRoot, projectRoot),
69
+ env: process.env,
70
+ stdio: 'inherit',
71
+ }
72
+ );
73
+
74
+ childProcess.on('error', (err) => {
75
+ reject(err);
76
+ });
77
+ childProcess.on('exit', (code) => {
78
+ if (code === 0) {
79
+ resolve(childProcess);
80
+ } else {
81
+ reject(code);
82
+ }
83
+ });
84
+
85
+ const processExitListener = (signal?: number | NodeJS.Signals) => () => {
86
+ childProcess.kill(signal);
87
+ process.exit();
88
+ };
89
+ process.once('exit', (signal) => childProcess.kill(signal));
90
+ process.once('SIGTERM', processExitListener);
91
+ process.once('SIGINT', processExitListener);
92
+ process.once('SIGQUIT', processExitListener);
93
+ });
94
+ }
95
+
96
+ function createStartOptions(options) {
97
+ return Object.keys(options).reduce((acc, k) => {
98
+ if (k === 'resetCache') {
99
+ if (options[k] === true) {
100
+ acc.push(`--reset-cache`);
101
+ }
102
+ } else if (k === 'interactive') {
103
+ if (options[k] === false) {
104
+ acc.push(`--no-interactive`);
105
+ }
106
+ } else {
107
+ acc.push(`--${k}`, options[k]);
108
+ }
109
+ return acc;
110
+ }, []);
111
+ }
@@ -0,0 +1,5 @@
1
+ export interface ReactNativeStorybookOptions {
2
+ searchDir: string[];
3
+ outputFile: string;
4
+ pattern: string;
5
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "version": 2,
3
+ "outputCapture": "direct-nodejs",
4
+ "title": "React Native Storybook Load Stories",
5
+ "cli": "nx",
6
+ "description": "Load stories for react native.",
7
+ "type": "object",
8
+ "properties": {
9
+ "searchDir": {
10
+ "type": "array",
11
+ "items": {
12
+ "type": "string"
13
+ },
14
+ "default": [],
15
+ "description": "The directory or directories, relative to the project root, to search for files in."
16
+ },
17
+ "outputFile": {
18
+ "type": "string",
19
+ "description": "The output file that will be written. It is relative to the project directory.",
20
+ "default": "./.storybook/story-loader.ts"
21
+ },
22
+ "pattern": {
23
+ "type": "string",
24
+ "description": "The pattern of files to look at. It can be a specific file, or any valid glob. Note: if using the CLI, globs with `**/*...` must be escaped with quotes",
25
+ "default": "**/*.stories.@(js|jsx|ts|tsx|md)"
26
+ }
27
+ },
28
+ "required": ["searchDir", "outputFile", "pattern"]
29
+ }
@@ -0,0 +1,10 @@
1
+ import { ExecutorContext } from '@nx/devkit';
2
+ import { ReactNativeStorybookOptions } from './schema';
3
+ /**
4
+ * TODO (@xiongemi): remove this function in v19.
5
+ * @deprecated Going to use the default react storybook target. Use @nx/react:storybook executor instead.
6
+ */
7
+ export default function reactNativeStorybookExecutor(options: ReactNativeStorybookOptions, context: ExecutorContext): AsyncGenerator<{
8
+ success: boolean;
9
+ }>;
10
+ export declare function runCliStorybook(workspaceRoot: string, options: ReactNativeStorybookOptions): void;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runCliStorybook = void 0;
4
+ const path_1 = require("path");
5
+ const devkit_1 = require("@nx/devkit");
6
+ const fileutils_1 = require("@nx/workspace/src/utilities/fileutils");
7
+ const chalk = require("chalk");
8
+ const glob_1 = require("glob");
9
+ const sync_deps_impl_1 = require("../sync-deps/sync-deps.impl");
10
+ const fs_extra_1 = require("fs-extra");
11
+ /**
12
+ * TODO (@xiongemi): remove this function in v19.
13
+ * @deprecated Going to use the default react storybook target. Use @nx/react:storybook executor instead.
14
+ */
15
+ async function* reactNativeStorybookExecutor(options, context) {
16
+ const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
17
+ devkit_1.logger.info(`${chalk.bold.cyan('info')} To see your Storybook stories on the device, you should start your mobile app for the <platform> of your choice (typically ios or android).`);
18
+ // add storybook addons to app's package.json
19
+ const packageJsonPath = (0, path_1.join)(context.root, projectRoot, 'package.json');
20
+ const workspacePackageJsonPath = (0, path_1.join)(context.root, 'package.json');
21
+ const workspacePackageJson = (0, devkit_1.readJsonFile)(workspacePackageJsonPath);
22
+ const projectPackageJson = (0, devkit_1.readJsonFile)(packageJsonPath);
23
+ if ((0, fileutils_1.fileExists)(packageJsonPath))
24
+ (0, sync_deps_impl_1.displayNewlyAddedDepsMessage)(context.projectName, await (0, sync_deps_impl_1.syncDeps)(context.projectName, projectPackageJson, packageJsonPath, workspacePackageJson, context.projectGraph, [
25
+ `@storybook/react-native`,
26
+ '@storybook/addon-ondevice-actions',
27
+ '@storybook/addon-ondevice-backgrounds',
28
+ '@storybook/addon-ondevice-controls',
29
+ '@storybook/addon-ondevice-notes',
30
+ '@react-native-async-storage/async-storage',
31
+ 'react-native-safe-area-context',
32
+ ]));
33
+ runCliStorybook(context.root, options);
34
+ yield { success: true };
35
+ }
36
+ exports.default = reactNativeStorybookExecutor;
37
+ function runCliStorybook(workspaceRoot, options) {
38
+ const storiesFiles = options.searchDir.flatMap((dir) => (0, glob_1.sync)((0, path_1.join)(dir, options.pattern)));
39
+ if (storiesFiles.length === 0) {
40
+ devkit_1.logger.warn(`${chalk.bold.yellow('warn')} No stories found.`);
41
+ }
42
+ const newContents = `// Auto-generated file created by nx
43
+ // DO NOT EDIT.
44
+ export function loadStories() {
45
+ return [
46
+ ${storiesFiles.map((story) => `require('${story}')`).join(',\n')}
47
+ ];
48
+ }`;
49
+ (0, fs_extra_1.writeFileSync)((0, path_1.join)(workspaceRoot, options.outputFile), newContents);
50
+ }
51
+ exports.runCliStorybook = runCliStorybook;
@@ -0,0 +1,85 @@
1
+ import { join } from 'path';
2
+ import { ExecutorContext, logger, readJsonFile } from '@nx/devkit';
3
+ import { fileExists } from '@nx/workspace/src/utilities/fileutils';
4
+ import * as chalk from 'chalk';
5
+ import { sync as globSync } from 'glob';
6
+
7
+ import { ReactNativeStorybookOptions } from './schema';
8
+ import {
9
+ displayNewlyAddedDepsMessage,
10
+ syncDeps,
11
+ } from '../sync-deps/sync-deps.impl';
12
+ import { writeFileSync } from 'fs-extra';
13
+ import { PackageJson } from 'nx/src/utils/package-json';
14
+
15
+ /**
16
+ * TODO (@xiongemi): remove this function in v19.
17
+ * @deprecated Going to use the default react storybook target. Use @nx/react:storybook executor instead.
18
+ */
19
+ export default async function* reactNativeStorybookExecutor(
20
+ options: ReactNativeStorybookOptions,
21
+ context: ExecutorContext
22
+ ): AsyncGenerator<{ success: boolean }> {
23
+ const projectRoot =
24
+ context.projectsConfigurations.projects[context.projectName].root;
25
+ logger.info(
26
+ `${chalk.bold.cyan(
27
+ 'info'
28
+ )} To see your Storybook stories on the device, you should start your mobile app for the <platform> of your choice (typically ios or android).`
29
+ );
30
+
31
+ // add storybook addons to app's package.json
32
+ const packageJsonPath = join(context.root, projectRoot, 'package.json');
33
+ const workspacePackageJsonPath = join(context.root, 'package.json');
34
+
35
+ const workspacePackageJson = readJsonFile<PackageJson>(
36
+ workspacePackageJsonPath
37
+ );
38
+ const projectPackageJson = readJsonFile<PackageJson>(packageJsonPath);
39
+
40
+ if (fileExists(packageJsonPath))
41
+ displayNewlyAddedDepsMessage(
42
+ context.projectName,
43
+ await syncDeps(
44
+ context.projectName,
45
+ projectPackageJson,
46
+ packageJsonPath,
47
+ workspacePackageJson,
48
+ context.projectGraph,
49
+ [
50
+ `@storybook/react-native`,
51
+ '@storybook/addon-ondevice-actions',
52
+ '@storybook/addon-ondevice-backgrounds',
53
+ '@storybook/addon-ondevice-controls',
54
+ '@storybook/addon-ondevice-notes',
55
+ '@react-native-async-storage/async-storage',
56
+ 'react-native-safe-area-context',
57
+ ]
58
+ )
59
+ );
60
+
61
+ runCliStorybook(context.root, options);
62
+ yield { success: true };
63
+ }
64
+
65
+ export function runCliStorybook(
66
+ workspaceRoot: string,
67
+ options: ReactNativeStorybookOptions
68
+ ) {
69
+ const storiesFiles: string[] = options.searchDir.flatMap((dir) =>
70
+ globSync(join(dir, options.pattern))
71
+ );
72
+ if (storiesFiles.length === 0) {
73
+ logger.warn(`${chalk.bold.yellow('warn')} No stories found.`);
74
+ }
75
+
76
+ const newContents = `// Auto-generated file created by nx
77
+ // DO NOT EDIT.
78
+ export function loadStories() {
79
+ return [
80
+ ${storiesFiles.map((story) => `require('${story}')`).join(',\n')}
81
+ ];
82
+ }`;
83
+
84
+ writeFileSync(join(workspaceRoot, options.outputFile), newContents);
85
+ }
@@ -0,0 +1,5 @@
1
+ export interface ReactNativeSyncDepsOptions {
2
+ include: string[] | string; // default is an empty array []
3
+ exclude: string[] | string; // default is an empty array []
4
+ all: boolean; // default is false
5
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "version": 2,
3
+ "outputCapture": "direct-nodejs",
4
+ "cli": "nx",
5
+ "$id": "NxReactNativeSyncDeps",
6
+ "$schema": "https://json-schema.org/schema",
7
+ "title": "Sync Deps for React Native",
8
+ "description": "Updates `package.json` with project dependencies.",
9
+ "type": "object",
10
+ "properties": {
11
+ "include": {
12
+ "type": "array",
13
+ "items": {
14
+ "type": "string"
15
+ },
16
+ "default": [],
17
+ "description": "An array of additional npm packages to include."
18
+ },
19
+ "exclude": {
20
+ "type": "array",
21
+ "items": {
22
+ "type": "string"
23
+ },
24
+ "default": [],
25
+ "description": "An array of npm packages to exclude."
26
+ },
27
+ "all": {
28
+ "type": "boolean",
29
+ "description": "Copy all dependencies and devDependencies from the workspace root package.json.",
30
+ "default": false
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,9 @@
1
+ import { ExecutorContext, ProjectGraph } from '@nx/devkit';
2
+ import { ReactNativeSyncDepsOptions } from './schema';
3
+ import { PackageJson } from 'nx/src/utils/package-json';
4
+ export interface ReactNativeSyncDepsOutput {
5
+ success: boolean;
6
+ }
7
+ export default function syncDepsExecutor(options: ReactNativeSyncDepsOptions, context: ExecutorContext): AsyncGenerator<ReactNativeSyncDepsOutput>;
8
+ export declare function syncDeps(projectName: string, projectPackageJson: PackageJson, projectPackageJsonPath: string, workspacePackageJson: PackageJson, projectGraph?: ProjectGraph, include?: string[], exclude?: string[], all?: boolean): Promise<string[]>;
9
+ export declare function displayNewlyAddedDepsMessage(projectName: string, deps: string[]): void;
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.displayNewlyAddedDepsMessage = exports.syncDeps = void 0;
4
+ const path_1 = require("path");
5
+ const chalk = require("chalk");
6
+ const devkit_1 = require("@nx/devkit");
7
+ const find_all_npm_dependencies_1 = require("../../utils/find-all-npm-dependencies");
8
+ async function* syncDepsExecutor(options, context) {
9
+ const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
10
+ const workspacePackageJsonPath = (0, path_1.join)(context.root, 'package.json');
11
+ const projectPackageJsonPath = (0, path_1.join)(context.root, projectRoot, 'package.json');
12
+ const workspacePackageJson = (0, devkit_1.readJsonFile)(workspacePackageJsonPath);
13
+ const projectPackageJson = (0, devkit_1.readJsonFile)(projectPackageJsonPath);
14
+ displayNewlyAddedDepsMessage(context.projectName, await syncDeps(context.projectName, projectPackageJson, projectPackageJsonPath, workspacePackageJson, context.projectGraph, typeof options.include === 'string'
15
+ ? options.include.split(',')
16
+ : options.include, typeof options.exclude === 'string'
17
+ ? options.exclude.split(',')
18
+ : options.exclude, options.all));
19
+ yield { success: true };
20
+ }
21
+ exports.default = syncDepsExecutor;
22
+ async function syncDeps(projectName, projectPackageJson, projectPackageJsonPath, workspacePackageJson, projectGraph = (0, devkit_1.readCachedProjectGraph)(), include = [], exclude = [], all = false) {
23
+ let npmDeps = all
24
+ ? Object.keys(workspacePackageJson.dependencies || {})
25
+ : (0, find_all_npm_dependencies_1.findAllNpmDependencies)(projectGraph, projectName);
26
+ let npmDevdeps = all
27
+ ? Object.keys(workspacePackageJson.devDependencies || {})
28
+ : [];
29
+ const newDeps = [];
30
+ let updated = false;
31
+ if (!projectPackageJson.dependencies) {
32
+ projectPackageJson.dependencies = {};
33
+ updated = true;
34
+ }
35
+ if (include && include.length) {
36
+ npmDeps.push(...include);
37
+ }
38
+ if (exclude && exclude.length) {
39
+ npmDeps = npmDeps.filter((dep) => !exclude.includes(dep));
40
+ }
41
+ if (!projectPackageJson.devDependencies) {
42
+ projectPackageJson.devDependencies = {};
43
+ }
44
+ if (!projectPackageJson.dependencies) {
45
+ projectPackageJson.dependencies = {};
46
+ }
47
+ npmDeps.forEach((dep) => {
48
+ if (!projectPackageJson.dependencies[dep] &&
49
+ !projectPackageJson.devDependencies[dep]) {
50
+ projectPackageJson.dependencies[dep] = '*';
51
+ newDeps.push(dep);
52
+ updated = true;
53
+ }
54
+ });
55
+ npmDevdeps.forEach((dep) => {
56
+ if (!projectPackageJson.dependencies[dep] &&
57
+ !projectPackageJson.devDependencies[dep]) {
58
+ projectPackageJson.devDependencies[dep] = '*';
59
+ newDeps.push(dep);
60
+ updated = true;
61
+ }
62
+ });
63
+ if (updated) {
64
+ (0, devkit_1.writeJsonFile)(projectPackageJsonPath, projectPackageJson);
65
+ }
66
+ return newDeps;
67
+ }
68
+ exports.syncDeps = syncDeps;
69
+ function displayNewlyAddedDepsMessage(projectName, deps) {
70
+ if (deps.length > 0) {
71
+ devkit_1.logger.info(`${chalk.bold.cyan('info')} Added entries to 'package.json' for '${projectName}' (for autolink):
72
+ ${deps.map((d) => chalk.bold.cyan(`"${d}": "*"`)).join('\n ')}`);
73
+ }
74
+ else {
75
+ devkit_1.logger.info(`${chalk.bold.cyan('info')} Dependencies for '${projectName}' are up to date! No changes made.`);
76
+ }
77
+ }
78
+ exports.displayNewlyAddedDepsMessage = displayNewlyAddedDepsMessage;
@@ -0,0 +1,140 @@
1
+ import { join } from 'path';
2
+ import * as chalk from 'chalk';
3
+ import {
4
+ ExecutorContext,
5
+ ProjectGraph,
6
+ logger,
7
+ readCachedProjectGraph,
8
+ readJsonFile,
9
+ writeJsonFile,
10
+ } from '@nx/devkit';
11
+
12
+ import { ReactNativeSyncDepsOptions } from './schema';
13
+ import { findAllNpmDependencies } from '../../utils/find-all-npm-dependencies';
14
+ import { PackageJson } from 'nx/src/utils/package-json';
15
+
16
+ export interface ReactNativeSyncDepsOutput {
17
+ success: boolean;
18
+ }
19
+
20
+ export default async function* syncDepsExecutor(
21
+ options: ReactNativeSyncDepsOptions,
22
+ context: ExecutorContext
23
+ ): AsyncGenerator<ReactNativeSyncDepsOutput> {
24
+ const projectRoot =
25
+ context.projectsConfigurations.projects[context.projectName].root;
26
+
27
+ const workspacePackageJsonPath = join(context.root, 'package.json');
28
+ const projectPackageJsonPath = join(
29
+ context.root,
30
+ projectRoot,
31
+ 'package.json'
32
+ );
33
+
34
+ const workspacePackageJson = readJsonFile(workspacePackageJsonPath);
35
+ const projectPackageJson = readJsonFile(projectPackageJsonPath);
36
+ displayNewlyAddedDepsMessage(
37
+ context.projectName,
38
+ await syncDeps(
39
+ context.projectName,
40
+ projectPackageJson,
41
+ projectPackageJsonPath,
42
+ workspacePackageJson,
43
+ context.projectGraph,
44
+ typeof options.include === 'string'
45
+ ? options.include.split(',')
46
+ : options.include,
47
+ typeof options.exclude === 'string'
48
+ ? options.exclude.split(',')
49
+ : options.exclude,
50
+ options.all
51
+ )
52
+ );
53
+
54
+ yield { success: true };
55
+ }
56
+
57
+ export async function syncDeps(
58
+ projectName: string,
59
+ projectPackageJson: PackageJson,
60
+ projectPackageJsonPath: string,
61
+ workspacePackageJson: PackageJson,
62
+ projectGraph: ProjectGraph = readCachedProjectGraph(),
63
+ include: string[] = [],
64
+ exclude: string[] = [],
65
+ all: boolean = false
66
+ ): Promise<string[]> {
67
+ let npmDeps = all
68
+ ? Object.keys(workspacePackageJson.dependencies || {})
69
+ : findAllNpmDependencies(projectGraph, projectName);
70
+ let npmDevdeps = all
71
+ ? Object.keys(workspacePackageJson.devDependencies || {})
72
+ : [];
73
+
74
+ const newDeps = [];
75
+ let updated = false;
76
+
77
+ if (!projectPackageJson.dependencies) {
78
+ projectPackageJson.dependencies = {};
79
+ updated = true;
80
+ }
81
+
82
+ if (include && include.length) {
83
+ npmDeps.push(...include);
84
+ }
85
+ if (exclude && exclude.length) {
86
+ npmDeps = npmDeps.filter((dep) => !exclude.includes(dep));
87
+ }
88
+
89
+ if (!projectPackageJson.devDependencies) {
90
+ projectPackageJson.devDependencies = {};
91
+ }
92
+ if (!projectPackageJson.dependencies) {
93
+ projectPackageJson.dependencies = {};
94
+ }
95
+
96
+ npmDeps.forEach((dep) => {
97
+ if (
98
+ !projectPackageJson.dependencies[dep] &&
99
+ !projectPackageJson.devDependencies[dep]
100
+ ) {
101
+ projectPackageJson.dependencies[dep] = '*';
102
+ newDeps.push(dep);
103
+ updated = true;
104
+ }
105
+ });
106
+ npmDevdeps.forEach((dep) => {
107
+ if (
108
+ !projectPackageJson.dependencies[dep] &&
109
+ !projectPackageJson.devDependencies[dep]
110
+ ) {
111
+ projectPackageJson.devDependencies[dep] = '*';
112
+ newDeps.push(dep);
113
+ updated = true;
114
+ }
115
+ });
116
+
117
+ if (updated) {
118
+ writeJsonFile(projectPackageJsonPath, projectPackageJson);
119
+ }
120
+
121
+ return newDeps;
122
+ }
123
+
124
+ export function displayNewlyAddedDepsMessage(
125
+ projectName: string,
126
+ deps: string[]
127
+ ) {
128
+ if (deps.length > 0) {
129
+ logger.info(`${chalk.bold.cyan(
130
+ 'info'
131
+ )} Added entries to 'package.json' for '${projectName}' (for autolink):
132
+ ${deps.map((d) => chalk.bold.cyan(`"${d}": "*"`)).join('\n ')}`);
133
+ } else {
134
+ logger.info(
135
+ `${chalk.bold.cyan(
136
+ 'info'
137
+ )} Dependencies for '${projectName}' are up to date! No changes made.`
138
+ );
139
+ }
140
+ }
@@ -0,0 +1 @@
1
+ export interface UpgradeExecutorSchema {}
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "version": 2,
4
+ "cli": "nx",
5
+ "$id": "NxReactNativeUpgrade",
6
+ "title": "React Native Upgrade Executor",
7
+ "description": "Upgrade React Native code for project.",
8
+ "type": "object",
9
+ "properties": {},
10
+ "required": []
11
+ }
@@ -0,0 +1,13 @@
1
+ /// <reference types="node" />
2
+ import { ExecutorContext } from '@nx/devkit';
3
+ import { ChildProcess } from 'child_process';
4
+ import { UpgradeExecutorSchema } from './schema';
5
+ export interface ReactNativeUpgradeOutput {
6
+ success: boolean;
7
+ }
8
+ /**
9
+ * This executor is equivalent to `npx react-native upgrade`.
10
+ * https://github.com/react-native-community/cli/blob/main/packages/cli/src/commands/upgrade/upgrade.ts
11
+ */
12
+ export default function upgradeExecutor(options: UpgradeExecutorSchema, context: ExecutorContext): AsyncGenerator<ReactNativeUpgradeOutput>;
13
+ export declare function runCliUpgrade(workspaceRoot: string, projectRoot: string): Promise<ChildProcess>;