@expo/cli 0.13.2 → 0.15.0

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 (203) hide show
  1. package/build/bin/cli +30 -27
  2. package/build/bin/cli.map +1 -1
  3. package/build/src/api/getVersions.js.map +1 -1
  4. package/build/src/api/rest/cache/response.js.map +1 -1
  5. package/build/src/api/rest/client.js +2 -2
  6. package/build/src/api/rest/client.js.map +1 -1
  7. package/build/src/config/configAsync.js +1 -1
  8. package/build/src/config/configAsync.js.map +1 -1
  9. package/build/src/config/index.js +2 -2
  10. package/build/src/config/index.js.map +1 -1
  11. package/build/src/customize/generate.js +1 -1
  12. package/build/src/customize/generate.js.map +1 -1
  13. package/build/src/customize/typescript.js +6 -4
  14. package/build/src/customize/typescript.js.map +1 -1
  15. package/build/src/export/createMetadataJson.js +3 -2
  16. package/build/src/export/createMetadataJson.js.map +1 -1
  17. package/build/src/export/embed/exportEmbedAsync.js +44 -17
  18. package/build/src/export/embed/exportEmbedAsync.js.map +1 -1
  19. package/build/src/export/embed/index.js +4 -4
  20. package/build/src/export/embed/index.js.map +1 -1
  21. package/build/src/export/embed/resolveOptions.js +3 -3
  22. package/build/src/export/embed/resolveOptions.js.map +1 -1
  23. package/build/src/export/exportApp.js +74 -83
  24. package/build/src/export/exportApp.js.map +1 -1
  25. package/build/src/export/exportAssets.js +81 -21
  26. package/build/src/export/exportAssets.js.map +1 -1
  27. package/build/src/export/exportHermes.js +24 -14
  28. package/build/src/export/exportHermes.js.map +1 -1
  29. package/build/src/export/exportStaticAsync.js +109 -58
  30. package/build/src/export/exportStaticAsync.js.map +1 -1
  31. package/build/src/export/favicon.js +2 -2
  32. package/build/src/export/favicon.js.map +1 -1
  33. package/build/src/export/fork-bundleAsync.js +56 -23
  34. package/build/src/export/fork-bundleAsync.js.map +1 -1
  35. package/build/src/export/index.js +11 -9
  36. package/build/src/export/index.js.map +1 -1
  37. package/build/src/export/metroAssetLocalPath.js +101 -0
  38. package/build/src/export/metroAssetLocalPath.js.map +1 -0
  39. package/build/src/export/persistMetroAssets.js +94 -21
  40. package/build/src/export/persistMetroAssets.js.map +1 -1
  41. package/build/src/export/resolveOptions.js +1 -1
  42. package/build/src/export/resolveOptions.js.map +1 -1
  43. package/build/src/export/saveAssets.js +9 -48
  44. package/build/src/export/saveAssets.js.map +1 -1
  45. package/build/src/export/web/exportWebAsync.js +1 -1
  46. package/build/src/export/web/exportWebAsync.js.map +1 -1
  47. package/build/src/export/web/index.js +2 -2
  48. package/build/src/export/web/index.js.map +1 -1
  49. package/build/src/export/writeContents.js +6 -3
  50. package/build/src/export/writeContents.js.map +1 -1
  51. package/build/src/install/applyPlugins.js +52 -0
  52. package/build/src/install/applyPlugins.js.map +1 -0
  53. package/build/src/install/checkPackages.js +2 -2
  54. package/build/src/install/checkPackages.js.map +1 -1
  55. package/build/src/install/fixPackages.js +84 -0
  56. package/build/src/install/fixPackages.js.map +1 -0
  57. package/build/src/install/installAsync.js +32 -61
  58. package/build/src/install/installAsync.js.map +1 -1
  59. package/build/src/install/installExpoPackage.js +79 -0
  60. package/build/src/install/installExpoPackage.js.map +1 -0
  61. package/build/src/login/index.js +1 -1
  62. package/build/src/login/index.js.map +1 -1
  63. package/build/src/logout/index.js +1 -1
  64. package/build/src/logout/index.js.map +1 -1
  65. package/build/src/prebuild/clearNativeFolder.js +1 -1
  66. package/build/src/prebuild/clearNativeFolder.js.map +1 -1
  67. package/build/src/prebuild/configureProjectAsync.js +3 -3
  68. package/build/src/prebuild/configureProjectAsync.js.map +1 -1
  69. package/build/src/prebuild/copyTemplateFiles.js +21 -30
  70. package/build/src/prebuild/copyTemplateFiles.js.map +1 -1
  71. package/build/src/prebuild/index.js +3 -3
  72. package/build/src/prebuild/index.js.map +1 -1
  73. package/build/src/prebuild/prebuildAsync.js +39 -17
  74. package/build/src/prebuild/prebuildAsync.js.map +1 -1
  75. package/build/src/prebuild/resolveOptions.js +2 -2
  76. package/build/src/prebuild/resolveOptions.js.map +1 -1
  77. package/build/src/prebuild/updateFromTemplate.js +6 -6
  78. package/build/src/prebuild/updateFromTemplate.js.map +1 -1
  79. package/build/src/prebuild/updatePackageJson.js +49 -36
  80. package/build/src/prebuild/updatePackageJson.js.map +1 -1
  81. package/build/src/prebuild/validateTemplatePlatforms.js +2 -2
  82. package/build/src/prebuild/validateTemplatePlatforms.js.map +1 -1
  83. package/build/src/register/index.js +1 -1
  84. package/build/src/register/index.js.map +1 -1
  85. package/build/src/run/android/index.js +2 -2
  86. package/build/src/run/android/index.js.map +1 -1
  87. package/build/src/run/ios/appleDevice/AppleDevice.js +35 -2
  88. package/build/src/run/ios/appleDevice/AppleDevice.js.map +1 -1
  89. package/build/src/run/ios/index.js +2 -2
  90. package/build/src/run/ios/index.js.map +1 -1
  91. package/build/src/start/doctor/dependencies/getVersionedPackages.js +12 -4
  92. package/build/src/start/doctor/dependencies/getVersionedPackages.js.map +1 -1
  93. package/build/src/start/doctor/dependencies/validateDependenciesVersions.js +20 -3
  94. package/build/src/start/doctor/dependencies/validateDependenciesVersions.js.map +1 -1
  95. package/build/src/start/index.js +3 -3
  96. package/build/src/start/index.js.map +1 -1
  97. package/build/src/start/interface/interactiveActions.js +30 -11
  98. package/build/src/start/interface/interactiveActions.js.map +1 -1
  99. package/build/src/start/server/BundlerDevServer.js +14 -10
  100. package/build/src/start/server/BundlerDevServer.js.map +1 -1
  101. package/build/src/start/server/DevServerManager.js +6 -1
  102. package/build/src/start/server/DevServerManager.js.map +1 -1
  103. package/build/src/start/server/DevToolsPluginManager.js +63 -0
  104. package/build/src/start/server/DevToolsPluginManager.js.map +1 -0
  105. package/build/src/start/server/getStaticRenderFunctions.js +21 -20
  106. package/build/src/start/server/getStaticRenderFunctions.js.map +1 -1
  107. package/build/src/start/server/metro/MetroBundlerDevServer.js +67 -64
  108. package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
  109. package/build/src/start/server/metro/bundleApiRoutes.js +4 -19
  110. package/build/src/start/server/metro/bundleApiRoutes.js.map +1 -1
  111. package/build/src/start/server/metro/createExpoMetroResolver.js +187 -0
  112. package/build/src/start/server/metro/createExpoMetroResolver.js.map +1 -0
  113. package/build/src/start/server/metro/createJResolver.js +149 -0
  114. package/build/src/start/server/metro/createJResolver.js.map +1 -0
  115. package/build/src/start/server/metro/createServerRouteMiddleware.js +13 -1
  116. package/build/src/start/server/metro/createServerRouteMiddleware.js.map +1 -1
  117. package/build/src/start/server/metro/externals.js +25 -3
  118. package/build/src/start/server/metro/externals.js.map +1 -1
  119. package/build/src/start/server/metro/fetchRouterManifest.js.map +1 -1
  120. package/build/src/start/server/metro/formatFileCandidates.js +72 -0
  121. package/build/src/start/server/metro/formatFileCandidates.js.map +1 -0
  122. package/build/src/start/server/metro/inspector-proxy/device.js +3 -1
  123. package/build/src/start/server/metro/inspector-proxy/device.js.map +1 -1
  124. package/build/src/start/server/metro/inspector-proxy/handlers/VscodeDebuggerGetPossibleBreakpoints.js +3 -4
  125. package/build/src/start/server/metro/inspector-proxy/handlers/VscodeDebuggerGetPossibleBreakpoints.js.map +1 -1
  126. package/build/src/start/server/metro/inspector-proxy/handlers/VscodeRuntimeCallFunctionOn.js +24 -0
  127. package/build/src/start/server/metro/inspector-proxy/handlers/VscodeRuntimeCallFunctionOn.js.map +1 -0
  128. package/build/src/start/server/metro/inspector-proxy/handlers/utils.js +11 -0
  129. package/build/src/start/server/metro/inspector-proxy/handlers/utils.js.map +1 -0
  130. package/build/src/start/server/metro/inspector-proxy/index.js +10 -7
  131. package/build/src/start/server/metro/inspector-proxy/index.js.map +1 -1
  132. package/build/src/start/server/metro/instantiateMetro.js +37 -16
  133. package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
  134. package/build/src/start/server/metro/metroErrorInterface.js +3 -2
  135. package/build/src/start/server/metro/metroErrorInterface.js.map +1 -1
  136. package/build/src/start/server/metro/router.js +6 -3
  137. package/build/src/start/server/metro/router.js.map +1 -1
  138. package/build/src/start/server/metro/runServer-fork.js +19 -10
  139. package/build/src/start/server/metro/runServer-fork.js.map +1 -1
  140. package/build/src/start/server/metro/serializeHtml.js +43 -0
  141. package/build/src/start/server/metro/serializeHtml.js.map +1 -0
  142. package/build/src/start/server/metro/waitForMetroToObserveTypeScriptFile.js +1 -2
  143. package/build/src/start/server/metro/waitForMetroToObserveTypeScriptFile.js.map +1 -1
  144. package/build/src/start/server/metro/withMetroMultiPlatform.js +268 -191
  145. package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -1
  146. package/build/src/start/server/metro/withMetroResolvers.js +114 -40
  147. package/build/src/start/server/metro/withMetroResolvers.js.map +1 -1
  148. package/build/src/start/server/middleware/DevToolsPluginMiddleware.js +61 -0
  149. package/build/src/start/server/middleware/DevToolsPluginMiddleware.js.map +1 -0
  150. package/build/src/start/server/middleware/ExpoMiddleware.js +2 -2
  151. package/build/src/start/server/middleware/ExpoMiddleware.js.map +1 -1
  152. package/build/src/start/server/middleware/ManifestMiddleware.js +45 -68
  153. package/build/src/start/server/middleware/ManifestMiddleware.js.map +1 -1
  154. package/build/src/start/server/middleware/inspector/JsInspector.js +1 -1
  155. package/build/src/start/server/middleware/inspector/JsInspector.js.map +1 -1
  156. package/build/src/start/server/middleware/inspector/LaunchBrowser.js +30 -26
  157. package/build/src/start/server/middleware/inspector/LaunchBrowser.js.map +1 -1
  158. package/build/src/start/server/middleware/inspector/LaunchBrowser.types.js +7 -7
  159. package/build/src/start/server/middleware/inspector/LaunchBrowser.types.js.map +1 -1
  160. package/build/src/start/server/middleware/inspector/LaunchBrowserImplLinux.js +5 -2
  161. package/build/src/start/server/middleware/inspector/LaunchBrowserImplLinux.js.map +1 -1
  162. package/build/src/start/server/middleware/inspector/LaunchBrowserImplMacOS.js +3 -2
  163. package/build/src/start/server/middleware/inspector/LaunchBrowserImplMacOS.js.map +1 -1
  164. package/build/src/start/server/middleware/inspector/LaunchBrowserImplWindows.js +8 -7
  165. package/build/src/start/server/middleware/inspector/LaunchBrowserImplWindows.js.map +1 -1
  166. package/build/src/start/server/middleware/metroOptions.js +123 -0
  167. package/build/src/start/server/middleware/metroOptions.js.map +1 -0
  168. package/build/src/start/server/middleware/resolveAssets.js.map +1 -1
  169. package/build/src/start/server/type-generation/__typetests__/fixtures/basic.js.map +1 -1
  170. package/build/src/start/server/type-generation/expo-env.js +1 -1
  171. package/build/src/start/server/type-generation/expo-env.js.map +1 -1
  172. package/build/src/start/server/type-generation/routes.js +1 -0
  173. package/build/src/start/server/type-generation/routes.js.map +1 -1
  174. package/build/src/utils/analytics/getMetroDebugProperties.js +1 -2
  175. package/build/src/utils/analytics/getMetroDebugProperties.js.map +1 -1
  176. package/build/src/utils/analytics/getMetroProperties.js +1 -2
  177. package/build/src/utils/analytics/getMetroProperties.js.map +1 -1
  178. package/build/src/utils/analytics/rudderstackClient.js +2 -2
  179. package/build/src/utils/args.js +4 -2
  180. package/build/src/utils/args.js.map +1 -1
  181. package/build/src/utils/cocoapods.js +2 -1
  182. package/build/src/utils/cocoapods.js.map +1 -1
  183. package/build/src/utils/dir.js +18 -8
  184. package/build/src/utils/dir.js.map +1 -1
  185. package/build/src/utils/env.js +6 -0
  186. package/build/src/utils/env.js.map +1 -1
  187. package/build/src/utils/getOrPromptApplicationId.js +2 -4
  188. package/build/src/utils/getOrPromptApplicationId.js.map +1 -1
  189. package/build/src/utils/prompts.js +1 -28
  190. package/build/src/utils/prompts.js.map +1 -1
  191. package/build/src/whoami/index.js +1 -1
  192. package/build/src/whoami/index.js.map +1 -1
  193. package/package.json +16 -16
  194. package/static/shims/react-native-web/dist/cjs/exports/AppRegistry/AppContainer.js +13 -0
  195. package/static/shims/react-native-web/dist/cjs/exports/BackHandler/index.js +10 -0
  196. package/static/shims/react-native-web/dist/exports/AppRegistry/AppContainer.js +12 -0
  197. package/static/shims/react-native-web/dist/exports/BackHandler/index.js +7 -0
  198. package/build/src/export/createBundles.js +0 -37
  199. package/build/src/export/createBundles.js.map +0 -1
  200. package/build/src/start/server/metro/resolveFromProject.js +0 -90
  201. package/build/src/start/server/metro/resolveFromProject.js.map +0 -1
  202. package/build/src/start/server/middleware/resolveEntryPoint.js +0 -42
  203. package/build/src/start/server/middleware/resolveEntryPoint.js.map +0 -1
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ exports.installExpoPackageAsync = installExpoPackageAsync;
6
+ var _spawnAsync = _interopRequireDefault(require("@expo/spawn-async"));
7
+ var _chalk = _interopRequireDefault(require("chalk"));
8
+ var Log = _interopRequireWildcard(require("../log"));
9
+ var _getRunningProcess = require("../utils/getRunningProcess");
10
+ function _interopRequireDefault(obj) {
11
+ return obj && obj.__esModule ? obj : {
12
+ default: obj
13
+ };
14
+ }
15
+ function _interopRequireWildcard(obj) {
16
+ if (obj && obj.__esModule) {
17
+ return obj;
18
+ } else {
19
+ var newObj = {};
20
+ if (obj != null) {
21
+ for(var key in obj){
22
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
23
+ var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
24
+ if (desc.get || desc.set) {
25
+ Object.defineProperty(newObj, key, desc);
26
+ } else {
27
+ newObj[key] = obj[key];
28
+ }
29
+ }
30
+ }
31
+ }
32
+ newObj.default = obj;
33
+ return newObj;
34
+ }
35
+ }
36
+ async function installExpoPackageAsync(projectRoot, { packageManager , packageManagerArguments , expoPackageToInstall , followUpCommandArgs }) {
37
+ // Check if there's potentially a dev server running in the current folder and warn about it
38
+ // (not guaranteed to be Expo CLI, and the CLI isn't always running on 8081, but it's a good guess)
39
+ const isExpoMaybeRunningForProject = !!await (0, _getRunningProcess).getRunningProcess(8081);
40
+ if (isExpoMaybeRunningForProject) {
41
+ Log.warn("The Expo CLI appears to be running this project in another terminal window. Close and restart any Expo CLI instances after the installation to complete the update.");
42
+ }
43
+ // Safe to use current process to upgrade Expo package- doesn't affect current process
44
+ try {
45
+ await packageManager.addAsync([
46
+ ...packageManagerArguments,
47
+ expoPackageToInstall
48
+ ]);
49
+ } catch (error) {
50
+ Log.error(_chalk.default`Cannot install the latest Expo package. Install {bold expo@latest} with ${packageManager.name} and then run {bold npx expo install} again.`);
51
+ throw error;
52
+ }
53
+ Log.log(_chalk.default`\u203A Running {bold npx expo install} under the updated expo version`);
54
+ let commandSegments = [
55
+ "expo",
56
+ "install",
57
+ ...followUpCommandArgs
58
+ ];
59
+ if (packageManagerArguments.length) {
60
+ commandSegments = [
61
+ ...commandSegments,
62
+ "--",
63
+ ...packageManagerArguments
64
+ ];
65
+ }
66
+ Log.log("> " + commandSegments.join(" "));
67
+ // Spawn a new process to install the rest of the packages, as only then will the latest Expo package be used
68
+ if (followUpCommandArgs.length) {
69
+ await (0, _spawnAsync).default("npx", commandSegments, {
70
+ stdio: "inherit",
71
+ cwd: projectRoot,
72
+ env: {
73
+ ...process.env
74
+ }
75
+ });
76
+ }
77
+ }
78
+
79
+ //# sourceMappingURL=installExpoPackage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/install/installExpoPackage.ts"],"sourcesContent":["import * as PackageManager from '@expo/package-manager';\nimport spawnAsync from '@expo/spawn-async';\nimport chalk from 'chalk';\n\nimport * as Log from '../log';\nimport { getRunningProcess } from '../utils/getRunningProcess';\n\n/**\n * Given a list of incompatible packages, installs the correct versions of the packages with the package manager used for the project.\n * This exits immediately after spawning the install command, since the command shouldn't remain running while it is being updated.\n */\nexport async function installExpoPackageAsync(\n projectRoot: string,\n {\n packageManager,\n packageManagerArguments,\n expoPackageToInstall,\n followUpCommandArgs,\n }: {\n /** Package manager to use when installing the versioned packages. */\n packageManager: PackageManager.NodePackageManager;\n /**\n * Extra parameters to pass to the `packageManager` when installing versioned packages.\n * @example ['--no-save']\n */\n packageManagerArguments: string[];\n expoPackageToInstall: string;\n followUpCommandArgs: string[];\n }\n) {\n // Check if there's potentially a dev server running in the current folder and warn about it\n // (not guaranteed to be Expo CLI, and the CLI isn't always running on 8081, but it's a good guess)\n const isExpoMaybeRunningForProject = !!(await getRunningProcess(8081));\n\n if (isExpoMaybeRunningForProject) {\n Log.warn(\n 'The Expo CLI appears to be running this project in another terminal window. Close and restart any Expo CLI instances after the installation to complete the update.'\n );\n }\n\n // Safe to use current process to upgrade Expo package- doesn't affect current process\n try {\n await packageManager.addAsync([...packageManagerArguments, expoPackageToInstall]);\n } catch (error) {\n Log.error(\n chalk`Cannot install the latest Expo package. Install {bold expo@latest} with ${packageManager.name} and then run {bold npx expo install} again.`\n );\n throw error;\n }\n\n Log.log(chalk`\\u203A Running {bold npx expo install} under the updated expo version`);\n\n let commandSegments = ['expo', 'install', ...followUpCommandArgs];\n if (packageManagerArguments.length) {\n commandSegments = [...commandSegments, '--', ...packageManagerArguments];\n }\n\n Log.log('> ' + commandSegments.join(' '));\n\n // Spawn a new process to install the rest of the packages, as only then will the latest Expo package be used\n if (followUpCommandArgs.length) {\n await spawnAsync('npx', commandSegments, {\n stdio: 'inherit',\n cwd: projectRoot,\n env: { ...process.env },\n });\n }\n}\n"],"names":["installExpoPackageAsync","Log","projectRoot","packageManager","packageManagerArguments","expoPackageToInstall","followUpCommandArgs","isExpoMaybeRunningForProject","getRunningProcess","warn","addAsync","error","chalk","name","log","commandSegments","length","join","spawnAsync","stdio","cwd","env","process"],"mappings":"AAAA;;;;QAWsBA,uBAAuB,GAAvBA,uBAAuB;AAVtB,IAAA,WAAmB,kCAAnB,mBAAmB,EAAA;AACxB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAEbC,IAAAA,GAAG,mCAAM,QAAQ,EAAd;AACmB,IAAA,kBAA4B,WAA5B,4BAA4B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMvD,eAAeD,uBAAuB,CAC3CE,WAAmB,EACnB,EACEC,cAAc,CAAA,EACdC,uBAAuB,CAAA,EACvBC,oBAAoB,CAAA,EACpBC,mBAAmB,CAAA,EAWpB,EACD;IACA,4FAA4F;IAC5F,mGAAmG;IACnG,MAAMC,4BAA4B,GAAG,CAAC,CAAE,MAAMC,CAAAA,GAAAA,kBAAiB,AAAM,CAAA,kBAAN,CAAC,IAAI,CAAC,AAAC,AAAC;IAEvE,IAAID,4BAA4B,EAAE;QAChCN,GAAG,CAACQ,IAAI,CACN,qKAAqK,CACtK,CAAC;KACH;IAED,sFAAsF;IACtF,IAAI;QACF,MAAMN,cAAc,CAACO,QAAQ,CAAC;eAAIN,uBAAuB;YAAEC,oBAAoB;SAAC,CAAC,CAAC;KACnF,CAAC,OAAOM,KAAK,EAAE;QACdV,GAAG,CAACU,KAAK,CACPC,MAAK,QAAA,CAAC,wEAAwE,EAAET,cAAc,CAACU,IAAI,CAAC,4CAA4C,CAAC,CAClJ,CAAC;QACF,MAAMF,KAAK,CAAC;KACb;IAEDV,GAAG,CAACa,GAAG,CAACF,MAAK,QAAA,CAAC,qEAAqE,CAAC,CAAC,CAAC;IAEtF,IAAIG,eAAe,GAAG;QAAC,MAAM;QAAE,SAAS;WAAKT,mBAAmB;KAAC,AAAC;IAClE,IAAIF,uBAAuB,CAACY,MAAM,EAAE;QAClCD,eAAe,GAAG;eAAIA,eAAe;YAAE,IAAI;eAAKX,uBAAuB;SAAC,CAAC;KAC1E;IAEDH,GAAG,CAACa,GAAG,CAAC,IAAI,GAAGC,eAAe,CAACE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAE1C,6GAA6G;IAC7G,IAAIX,mBAAmB,CAACU,MAAM,EAAE;QAC9B,MAAME,CAAAA,GAAAA,WAAU,AAId,CAAA,QAJc,CAAC,KAAK,EAAEH,eAAe,EAAE;YACvCI,KAAK,EAAE,SAAS;YAChBC,GAAG,EAAElB,WAAW;YAChBmB,GAAG,EAAE;gBAAE,GAAGC,OAAO,CAACD,GAAG;aAAE;SACxB,CAAC,CAAC;KACJ;CACF"}
@@ -52,7 +52,7 @@ const expoLogin = async (argv)=>{
52
52
  ].join("\n"));
53
53
  }
54
54
  const { showLoginPromptAsync } = await Promise.resolve().then(function() {
55
- return _interopRequireWildcard(require("../api/user/actions"));
55
+ return _interopRequireWildcard(require("../api/user/actions.js"));
56
56
  });
57
57
  return showLoginPromptAsync({
58
58
  // Parsed options
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/login/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { Command } from '../../bin/cli';\nimport { assertArgs, printHelp } from '../utils/args';\nimport { logCmdError } from '../utils/errors';\n\nexport const expoLogin: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--username': String,\n '--password': String,\n '--otp': String,\n '--sso': Boolean,\n // Aliases\n '-h': '--help',\n '-u': '--username',\n '-p': '--password',\n '-s': '--sso',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Log in to an Expo account`,\n `npx expo login`,\n [\n `-u, --username <string> Username`,\n `-p, --password <string> Password`,\n `--otp <string> One-time password from your 2FA device`,\n // hiding from help until SSO is public\n // `-s, --sso Log in with SSO`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n const { showLoginPromptAsync } = await import('../api/user/actions');\n return showLoginPromptAsync({\n // Parsed options\n username: args['--username'],\n password: args['--password'],\n otp: args['--otp'],\n sso: !!args['--sso'],\n }).catch(logCmdError);\n};\n"],"names":["expoLogin","argv","args","assertArgs","Boolean","String","printHelp","join","showLoginPromptAsync","username","password","otp","sso","catch","logCmdError"],"mappings":"AAAA;;;;;;AAEsC,IAAA,KAAe,WAAf,eAAe,CAAA;AACzB,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;;;;;;;;;;;;;;;;;;;;;;AAEtC,MAAMA,SAAS,GAAY,OAAOC,IAAI,GAAK;IAChD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AAetB,CAAA,WAfsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,YAAY,EAAEC,MAAM;QACpB,YAAY,EAAEA,MAAM;QACpB,OAAO,EAAEA,MAAM;QACf,OAAO,EAAED,OAAO;QAChB,UAAU;QACV,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,OAAO;KACd,EACDH,IAAI,CACL,AAAC;IAEF,IAAIC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBI,CAAAA,GAAAA,KAAS,AAWR,CAAA,UAXQ,CACP,CAAC,yBAAyB,CAAC,EAC3B,CAAC,cAAc,CAAC,EAChB;YACE,CAAC,iCAAiC,CAAC;YACnC,CAAC,iCAAiC,CAAC;YACnC,CAAC,+DAA+D,CAAC;YACjE,uCAAuC;YACvC,8CAA8C;YAC9C,CAAC,mCAAmC,CAAC;SACtC,CAACC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;KACH;IAED,MAAM,EAAEC,oBAAoB,CAAA,EAAE,GAAG,MAAM;+CAAO,qBAAqB;MAAC,AAAC;IACrE,OAAOA,oBAAoB,CAAC;QAC1B,iBAAiB;QACjBC,QAAQ,EAAEP,IAAI,CAAC,YAAY,CAAC;QAC5BQ,QAAQ,EAAER,IAAI,CAAC,YAAY,CAAC;QAC5BS,GAAG,EAAET,IAAI,CAAC,OAAO,CAAC;QAClBU,GAAG,EAAE,CAAC,CAACV,IAAI,CAAC,OAAO,CAAC;KACrB,CAAC,CAACW,KAAK,CAACC,OAAW,YAAA,CAAC,CAAC;CACvB,AAAC;QAzCWd,SAAS,GAATA,SAAS"}
1
+ {"version":3,"sources":["../../../src/login/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { Command } from '../../bin/cli';\nimport { assertArgs, printHelp } from '../utils/args';\nimport { logCmdError } from '../utils/errors';\n\nexport const expoLogin: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--username': String,\n '--password': String,\n '--otp': String,\n '--sso': Boolean,\n // Aliases\n '-h': '--help',\n '-u': '--username',\n '-p': '--password',\n '-s': '--sso',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Log in to an Expo account`,\n `npx expo login`,\n [\n `-u, --username <string> Username`,\n `-p, --password <string> Password`,\n `--otp <string> One-time password from your 2FA device`,\n // hiding from help until SSO is public\n // `-s, --sso Log in with SSO`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n const { showLoginPromptAsync } = await import('../api/user/actions.js');\n return showLoginPromptAsync({\n // Parsed options\n username: args['--username'],\n password: args['--password'],\n otp: args['--otp'],\n sso: !!args['--sso'],\n }).catch(logCmdError);\n};\n"],"names":["expoLogin","argv","args","assertArgs","Boolean","String","printHelp","join","showLoginPromptAsync","username","password","otp","sso","catch","logCmdError"],"mappings":"AAAA;;;;;;AAEsC,IAAA,KAAe,WAAf,eAAe,CAAA;AACzB,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;;;;;;;;;;;;;;;;;;;;;;AAEtC,MAAMA,SAAS,GAAY,OAAOC,IAAI,GAAK;IAChD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AAetB,CAAA,WAfsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,YAAY,EAAEC,MAAM;QACpB,YAAY,EAAEA,MAAM;QACpB,OAAO,EAAEA,MAAM;QACf,OAAO,EAAED,OAAO;QAChB,UAAU;QACV,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,OAAO;KACd,EACDH,IAAI,CACL,AAAC;IAEF,IAAIC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBI,CAAAA,GAAAA,KAAS,AAWR,CAAA,UAXQ,CACP,CAAC,yBAAyB,CAAC,EAC3B,CAAC,cAAc,CAAC,EAChB;YACE,CAAC,iCAAiC,CAAC;YACnC,CAAC,iCAAiC,CAAC;YACnC,CAAC,+DAA+D,CAAC;YACjE,uCAAuC;YACvC,8CAA8C;YAC9C,CAAC,mCAAmC,CAAC;SACtC,CAACC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;KACH;IAED,MAAM,EAAEC,oBAAoB,CAAA,EAAE,GAAG,MAAM;+CAAO,wBAAwB;MAAC,AAAC;IACxE,OAAOA,oBAAoB,CAAC;QAC1B,iBAAiB;QACjBC,QAAQ,EAAEP,IAAI,CAAC,YAAY,CAAC;QAC5BQ,QAAQ,EAAER,IAAI,CAAC,YAAY,CAAC;QAC5BS,GAAG,EAAET,IAAI,CAAC,OAAO,CAAC;QAClBU,GAAG,EAAE,CAAC,CAACV,IAAI,CAAC,OAAO,CAAC;KACrB,CAAC,CAACW,KAAK,CAACC,OAAW,YAAA,CAAC,CAAC;CACvB,AAAC;QAzCWd,SAAS,GAATA,SAAS"}
@@ -39,7 +39,7 @@ const expoLogout = async (argv)=>{
39
39
  `-h, --help Usage info`);
40
40
  }
41
41
  const { logoutAsync } = await Promise.resolve().then(function() {
42
- return _interopRequireWildcard(require("../api/user/user"));
42
+ return _interopRequireWildcard(require("../api/user/user.js"));
43
43
  });
44
44
  return logoutAsync().catch(_errors.logCmdError);
45
45
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/logout/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { Command } from '../../bin/cli';\nimport { assertArgs, printHelp } from '../utils/args';\nimport { logCmdError } from '../utils/errors';\n\nexport const expoLogout: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n // Aliases\n '-h': '--help',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Log out of an Expo account`,\n `npx expo logout`,\n // options\n `-h, --help Usage info`\n );\n }\n\n const { logoutAsync } = await import('../api/user/user');\n return logoutAsync().catch(logCmdError);\n};\n"],"names":["expoLogout","argv","args","assertArgs","Boolean","printHelp","logoutAsync","catch","logCmdError"],"mappings":"AAAA;;;;;;AAGsC,IAAA,KAAe,WAAf,eAAe,CAAA;AACzB,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;;;;;;;;;;;;;;;;;;;;;;AAEtC,MAAMA,UAAU,GAAY,OAAOC,IAAI,GAAK;IACjD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AAQtB,CAAA,WARsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,UAAU;QACV,IAAI,EAAE,QAAQ;KACf,EACDH,IAAI,CACL,AAAC;IAEF,IAAIC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBG,CAAAA,GAAAA,KAAS,AAKR,CAAA,UALQ,CACP,CAAC,0BAA0B,CAAC,EAC5B,CAAC,eAAe,CAAC,EACjB,UAAU;QACV,CAAC,wBAAwB,CAAC,CAC3B,CAAC;KACH;IAED,MAAM,EAAEC,WAAW,CAAA,EAAE,GAAG,MAAM;+CAAO,kBAAkB;MAAC,AAAC;IACzD,OAAOA,WAAW,EAAE,CAACC,KAAK,CAACC,OAAW,YAAA,CAAC,CAAC;CACzC,AAAC;QAtBWR,UAAU,GAAVA,UAAU"}
1
+ {"version":3,"sources":["../../../src/logout/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { Command } from '../../bin/cli';\nimport { assertArgs, printHelp } from '../utils/args';\nimport { logCmdError } from '../utils/errors';\n\nexport const expoLogout: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n // Aliases\n '-h': '--help',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Log out of an Expo account`,\n `npx expo logout`,\n // options\n `-h, --help Usage info`\n );\n }\n\n const { logoutAsync } = await import('../api/user/user.js');\n return logoutAsync().catch(logCmdError);\n};\n"],"names":["expoLogout","argv","args","assertArgs","Boolean","printHelp","logoutAsync","catch","logCmdError"],"mappings":"AAAA;;;;;;AAGsC,IAAA,KAAe,WAAf,eAAe,CAAA;AACzB,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;;;;;;;;;;;;;;;;;;;;;;AAEtC,MAAMA,UAAU,GAAY,OAAOC,IAAI,GAAK;IACjD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AAQtB,CAAA,WARsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,UAAU;QACV,IAAI,EAAE,QAAQ;KACf,EACDH,IAAI,CACL,AAAC;IAEF,IAAIC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBG,CAAAA,GAAAA,KAAS,AAKR,CAAA,UALQ,CACP,CAAC,0BAA0B,CAAC,EAC5B,CAAC,eAAe,CAAC,EACjB,UAAU;QACV,CAAC,wBAAwB,CAAC,CAC3B,CAAC;KACH;IAED,MAAM,EAAEC,WAAW,CAAA,EAAE,GAAG,MAAM;+CAAO,qBAAqB;MAAC,AAAC;IAC5D,OAAOA,WAAW,EAAE,CAACC,KAAK,CAACC,OAAW,YAAA,CAAC,CAAC;CACzC,AAAC;QAtBWR,UAAU,GAAVA,UAAU"}
@@ -124,7 +124,7 @@ async function promptToClearMalformedNativeProjectsAsync(projectRoot, checkPlatf
124
124
  // Prompt which platforms to reset.
125
125
  const message = platforms.length > 1 ? `The ${displayPlatforms[0]} and ${displayPlatforms[1]} projects are malformed` : `The ${displayPlatforms[0]} project is malformed`;
126
126
  if (// If the process is non-interactive, default to clearing the malformed native project.
127
- // This would only happen on re-running eject.
127
+ // This would only happen on re-running prebuild.
128
128
  !(0, _interactive).isInteractive() || // Prompt to clear the native folders.
129
129
  (await (0, _prompts).confirmAsync({
130
130
  message: `${message}, would you like to clear the project files and reinitialize them?`,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/prebuild/clearNativeFolder.ts"],"sourcesContent":["import { AndroidConfig, IOSConfig, ModPlatform } from '@expo/config-plugins';\nimport chalk from 'chalk';\nimport fs from 'fs';\nimport path from 'path';\n\nimport * as Log from '../log';\nimport { directoryExistsAsync } from '../utils/dir';\nimport { isInteractive } from '../utils/interactive';\nimport { logNewSection } from '../utils/ora';\nimport { confirmAsync } from '../utils/prompts';\n\ntype ArbitraryPlatform = ModPlatform | string;\n\n/** Delete the input native folders and print a loading step. */\nexport async function clearNativeFolder(projectRoot: string, folders: string[]) {\n const step = logNewSection(`Clearing ${folders.join(', ')}`);\n try {\n await Promise.all(\n folders.map((folderName) =>\n fs.promises.rm(path.join(projectRoot, folderName), {\n recursive: true,\n force: true,\n })\n )\n );\n step.succeed(`Cleared ${folders.join(', ')} code`);\n } catch (error: any) {\n step.fail(`Failed to delete ${folders.join(', ')} code: ${error.message}`);\n throw error;\n }\n}\n\n/**\n * Returns `true` if a certain subset of required Android project files are intact.\n *\n * This isn't perfect but it serves the purpose of indicating that the user should\n * be warned to nuke the project files, most commonly when git is cleared and the root folder\n * remains in memory.\n */\nexport async function hasRequiredAndroidFilesAsync(projectRoot: string): Promise<boolean> {\n try {\n await Promise.all([\n AndroidConfig.Paths.getAppBuildGradleAsync(projectRoot),\n AndroidConfig.Paths.getProjectBuildGradleAsync(projectRoot),\n AndroidConfig.Paths.getAndroidManifestAsync(projectRoot),\n AndroidConfig.Paths.getMainApplicationAsync(projectRoot),\n ]);\n return true;\n } catch {\n return false;\n }\n}\n\n/** Returns `true` if a certain subset of required iOS project files are intact. */\nexport async function hasRequiredIOSFilesAsync(projectRoot: string) {\n try {\n // If any of the following required files are missing, then the project is malformed.\n await Promise.all([\n IOSConfig.Paths.getAllXcodeProjectPaths(projectRoot),\n IOSConfig.Paths.getAllPBXProjectPaths(projectRoot),\n ]);\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Filter out platforms that do not have an existing platform folder.\n * If the user wants to validate that neither of ['ios', 'android'] are malformed then we should\n * first check that both `ios` and `android` folders exist.\n *\n * This optimization prevents us from prompting to clear a \"malformed\" project that doesn't exist yet.\n */\nasync function filterPlatformsThatDoNotExistAsync(\n projectRoot: string,\n platforms: ArbitraryPlatform[]\n): Promise<ArbitraryPlatform[]> {\n const valid = await Promise.all(\n platforms.map(async (platform) => {\n if (await directoryExistsAsync(path.join(projectRoot, platform))) {\n return platform;\n }\n return null;\n })\n );\n return valid.filter(Boolean) as ArbitraryPlatform[];\n}\n\n/** Get a list of native platforms that have existing directories which contain malformed projects. */\nexport async function getMalformedNativeProjectsAsync(\n projectRoot: string,\n platforms: ArbitraryPlatform[]\n): Promise<ArbitraryPlatform[]> {\n const VERIFIERS: Record<ArbitraryPlatform, (root: string) => Promise<boolean>> = {\n android: hasRequiredAndroidFilesAsync,\n ios: hasRequiredIOSFilesAsync,\n };\n\n const checkablePlatforms = platforms.filter((platform) => platform in VERIFIERS);\n const checkPlatforms = await filterPlatformsThatDoNotExistAsync(projectRoot, checkablePlatforms);\n return (\n await Promise.all(\n checkPlatforms.map(async (platform) => {\n if (!VERIFIERS[platform]) {\n return false;\n }\n if (await VERIFIERS[platform](projectRoot)) {\n return false;\n }\n return platform;\n })\n )\n ).filter(Boolean) as ArbitraryPlatform[];\n}\n\nexport async function promptToClearMalformedNativeProjectsAsync(\n projectRoot: string,\n checkPlatforms: ArbitraryPlatform[]\n) {\n const platforms = await getMalformedNativeProjectsAsync(projectRoot, checkPlatforms);\n\n if (!platforms.length) {\n return;\n }\n\n const displayPlatforms = platforms.map((platform) => chalk.cyan(platform));\n // Prompt which platforms to reset.\n const message =\n platforms.length > 1\n ? `The ${displayPlatforms[0]} and ${displayPlatforms[1]} projects are malformed`\n : `The ${displayPlatforms[0]} project is malformed`;\n\n if (\n // If the process is non-interactive, default to clearing the malformed native project.\n // This would only happen on re-running eject.\n !isInteractive() ||\n // Prompt to clear the native folders.\n (await confirmAsync({\n message: `${message}, would you like to clear the project files and reinitialize them?`,\n initial: true,\n }))\n ) {\n if (!isInteractive()) {\n Log.warn(`${message}, project files will be cleared and reinitialized.`);\n }\n await clearNativeFolder(projectRoot, platforms);\n } else {\n // Warn the user that the process may fail.\n Log.warn('Continuing with malformed native projects');\n }\n}\n"],"names":["clearNativeFolder","hasRequiredAndroidFilesAsync","hasRequiredIOSFilesAsync","getMalformedNativeProjectsAsync","promptToClearMalformedNativeProjectsAsync","Log","projectRoot","folders","step","logNewSection","join","Promise","all","map","folderName","fs","promises","rm","path","recursive","force","succeed","error","fail","message","AndroidConfig","Paths","getAppBuildGradleAsync","getProjectBuildGradleAsync","getAndroidManifestAsync","getMainApplicationAsync","IOSConfig","getAllXcodeProjectPaths","getAllPBXProjectPaths","filterPlatformsThatDoNotExistAsync","platforms","valid","platform","directoryExistsAsync","filter","Boolean","VERIFIERS","android","ios","checkablePlatforms","checkPlatforms","length","displayPlatforms","chalk","cyan","isInteractive","confirmAsync","initial","warn"],"mappings":"AAAA;;;;QAcsBA,iBAAiB,GAAjBA,iBAAiB;QAyBjBC,4BAA4B,GAA5BA,4BAA4B;QAe5BC,wBAAwB,GAAxBA,wBAAwB;QAoCxBC,+BAA+B,GAA/BA,+BAA+B;QA0B/BC,yCAAyC,GAAzCA,yCAAyC;AApHT,IAAA,cAAsB,WAAtB,sBAAsB,CAAA;AAC1D,IAAA,MAAO,kCAAP,OAAO,EAAA;AACV,IAAA,GAAI,kCAAJ,IAAI,EAAA;AACF,IAAA,KAAM,kCAAN,MAAM,EAAA;AAEXC,IAAAA,GAAG,mCAAM,QAAQ,EAAd;AACsB,IAAA,IAAc,WAAd,cAAc,CAAA;AACrB,IAAA,YAAsB,WAAtB,sBAAsB,CAAA;AACtB,IAAA,IAAc,WAAd,cAAc,CAAA;AACf,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKxC,eAAeL,iBAAiB,CAACM,WAAmB,EAAEC,OAAiB,EAAE;IAC9E,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,IAAa,AAAkC,CAAA,cAAlC,CAAC,CAAC,SAAS,EAAEF,OAAO,CAACG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,AAAC;IAC7D,IAAI;QACF,MAAMC,OAAO,CAACC,GAAG,CACfL,OAAO,CAACM,GAAG,CAAC,CAACC,UAAU,GACrBC,GAAE,QAAA,CAACC,QAAQ,CAACC,EAAE,CAACC,KAAI,QAAA,CAACR,IAAI,CAACJ,WAAW,EAAEQ,UAAU,CAAC,EAAE;gBACjDK,SAAS,EAAE,IAAI;gBACfC,K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EAAEuC,cAAc,CAAC,AAAC;IAErF,IAAI,CAACV,SAAS,CAACW,MAAM,EAAE;QACrB,OAAO;KACR;IAED,MAAMC,gBAAgB,GAAGZ,SAAS,CAACtB,GAAG,CAAC,CAACwB,QAAQ,GAAKW,MAAK,QAAA,CAACC,IAAI,CAACZ,QAAQ,CAAC;IAAA,CAAC,AAAC;IAC3E,mCAAmC;IACnC,MAAMb,OAAO,GACXW,SAAS,CAACW,MAAM,GAAG,CAAC,GAChB,CAAC,IAAI,EAAEC,gBAAgB,CAAC,CAAC,CAAC,CAAC,KAAK,EAAEA,gBAAgB,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,GAC9E,CAAC,IAAI,EAAEA,gBAAgB,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC,AAAC;IAExD,IACE,uFAAuF;IACvF,8CAA8C;IAC9C,CAACG,CAAAA,GAAAA,YAAa,AAAE,CAAA,cAAF,EAAE,IAChB,sCAAsC;IACtC,CAAC,MAAMC,CAAAA,GAAAA,QAAY,AAGjB,CAAA,aAHiB,CAAC;QAClB3B,OAAO,EAAE,CAAC,EAAEA,OAAO,CAAC,kEAAkE,CAAC;QACvF4B,OAAO,EAAE,IAAI;KACd,CAAC,CAAC,EACH;QACA,IAAI,CAACF,CAAAA,GAAAA,YAAa,AAAE,CAAA,cAAF,EAAE,EAAE;YACpB7C,GAAG,CAACgD,IAAI,CAAC,CAAC,EAAE7B,OAAO,CAAC,kDAAkD,CAAC,CAAC,CAAC;SAC1E;QACD,MAAMxB,iBAAiB,CAACM,WAAW,EAAE6B,SAAS,CAAC,CAAC;KACjD,MAAM;QACL,2CAA2C;QAC3C9B,GAAG,CAACgD,IAAI,CAAC,2CAA2C,CAAC,CAAC;KACvD;CACF"}
1
+ {"version":3,"sources":["../../../src/prebuild/clearNativeFolder.ts"],"sourcesContent":["import { AndroidConfig, IOSConfig, ModPlatform } from '@expo/config-plugins';\nimport chalk from 'chalk';\nimport fs from 'fs';\nimport path from 'path';\n\nimport * as Log from '../log';\nimport { directoryExistsAsync } from '../utils/dir';\nimport { isInteractive } from '../utils/interactive';\nimport { logNewSection } from '../utils/ora';\nimport { confirmAsync } from '../utils/prompts';\n\ntype ArbitraryPlatform = ModPlatform | string;\n\n/** Delete the input native folders and print a loading step. */\nexport async function clearNativeFolder(projectRoot: string, folders: string[]) {\n const step = logNewSection(`Clearing ${folders.join(', ')}`);\n try {\n await Promise.all(\n folders.map((folderName) =>\n fs.promises.rm(path.join(projectRoot, folderName), {\n recursive: true,\n force: true,\n })\n )\n );\n step.succeed(`Cleared ${folders.join(', ')} code`);\n } catch (error: any) {\n step.fail(`Failed to delete ${folders.join(', ')} code: ${error.message}`);\n throw error;\n }\n}\n\n/**\n * Returns `true` if a certain subset of required Android project files are intact.\n *\n * This isn't perfect but it serves the purpose of indicating that the user should\n * be warned to nuke the project files, most commonly when git is cleared and the root folder\n * remains in memory.\n */\nexport async function hasRequiredAndroidFilesAsync(projectRoot: string): Promise<boolean> {\n try {\n await Promise.all([\n AndroidConfig.Paths.getAppBuildGradleAsync(projectRoot),\n AndroidConfig.Paths.getProjectBuildGradleAsync(projectRoot),\n AndroidConfig.Paths.getAndroidManifestAsync(projectRoot),\n AndroidConfig.Paths.getMainApplicationAsync(projectRoot),\n ]);\n return true;\n } catch {\n return false;\n }\n}\n\n/** Returns `true` if a certain subset of required iOS project files are intact. */\nexport async function hasRequiredIOSFilesAsync(projectRoot: string) {\n try {\n // If any of the following required files are missing, then the project is malformed.\n await Promise.all([\n IOSConfig.Paths.getAllXcodeProjectPaths(projectRoot),\n IOSConfig.Paths.getAllPBXProjectPaths(projectRoot),\n ]);\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Filter out platforms that do not have an existing platform folder.\n * If the user wants to validate that neither of ['ios', 'android'] are malformed then we should\n * first check that both `ios` and `android` folders exist.\n *\n * This optimization prevents us from prompting to clear a \"malformed\" project that doesn't exist yet.\n */\nasync function filterPlatformsThatDoNotExistAsync(\n projectRoot: string,\n platforms: ArbitraryPlatform[]\n): Promise<ArbitraryPlatform[]> {\n const valid = await Promise.all(\n platforms.map(async (platform) => {\n if (await directoryExistsAsync(path.join(projectRoot, platform))) {\n return platform;\n }\n return null;\n })\n );\n return valid.filter(Boolean) as ArbitraryPlatform[];\n}\n\n/** Get a list of native platforms that have existing directories which contain malformed projects. */\nexport async function getMalformedNativeProjectsAsync(\n projectRoot: string,\n platforms: ArbitraryPlatform[]\n): Promise<ArbitraryPlatform[]> {\n const VERIFIERS: Record<ArbitraryPlatform, (root: string) => Promise<boolean>> = {\n android: hasRequiredAndroidFilesAsync,\n ios: hasRequiredIOSFilesAsync,\n };\n\n const checkablePlatforms = platforms.filter((platform) => platform in VERIFIERS);\n const checkPlatforms = await filterPlatformsThatDoNotExistAsync(projectRoot, checkablePlatforms);\n return (\n await Promise.all(\n checkPlatforms.map(async (platform) => {\n if (!VERIFIERS[platform]) {\n return false;\n }\n if (await VERIFIERS[platform](projectRoot)) {\n return false;\n }\n return platform;\n })\n )\n ).filter(Boolean) as ArbitraryPlatform[];\n}\n\nexport async function promptToClearMalformedNativeProjectsAsync(\n projectRoot: string,\n checkPlatforms: ArbitraryPlatform[]\n) {\n const platforms = await getMalformedNativeProjectsAsync(projectRoot, checkPlatforms);\n\n if (!platforms.length) {\n return;\n }\n\n const displayPlatforms = platforms.map((platform) => chalk.cyan(platform));\n // Prompt which platforms to reset.\n const message =\n platforms.length > 1\n ? `The ${displayPlatforms[0]} and ${displayPlatforms[1]} projects are malformed`\n : `The ${displayPlatforms[0]} project is malformed`;\n\n if (\n // If the process is non-interactive, default to clearing the malformed native project.\n // This would only happen on re-running prebuild.\n !isInteractive() ||\n // Prompt to clear the native folders.\n (await confirmAsync({\n message: `${message}, would you like to clear the project files and reinitialize them?`,\n initial: true,\n }))\n ) {\n if (!isInteractive()) {\n Log.warn(`${message}, project files will be cleared and reinitialized.`);\n }\n await clearNativeFolder(projectRoot, platforms);\n } else {\n // Warn the user that the process may fail.\n Log.warn('Continuing with malformed native projects');\n }\n}\n"],"names":["clearNativeFolder","hasRequiredAndroidFilesAsync","hasRequiredIOSFilesAsync","getMalformedNativeProjectsAsync","promptToClearMalformedNativeProjectsAsync","Log","projectRoot","folders","step","logNewSection","join","Promise","all","map","folderName","fs","promises","rm","path","recursive","force","succeed","error","fail","message","AndroidConfig","Paths","getAppBuildGradleAsync","getProjectBuildGradleAsync","getAndroidManifestAsync","getMainApplicationAsync","IOSConfig","getAllXcodeProjectPaths","getAllPBXProjectPaths","filterPlatformsThatDoNotExistAsync","platforms","valid","platform","directoryExistsAsync","filter","Boolean","VERIFIERS","android","ios","checkablePlatforms","checkPlatforms","length","displayPlatforms","chalk","cyan","isInteractive","confirmAsync","initial","warn"],"mappings":"AAAA;;;;QAcsBA,iBAAiB,GAAjBA,iBAAiB;QAyBjBC,4BAA4B,GAA5BA,4BAA4B;QAe5BC,wBAAwB,GAAxBA,wBAAwB;QAoCxBC,+BAA+B,GAA/BA,+BAA+B;QA0B/BC,yCAAyC,GAAzCA,yCAAyC;AApHT,IAAA,cAAsB,WAAtB,sBAAsB,CAAA;AAC1D,IAAA,MAAO,kCAAP,OAAO,EAAA;AACV,IAAA,GAAI,kCAAJ,IAAI,EAAA;AACF,IAAA,KAAM,kCAAN,MAAM,EAAA;AAEXC,IAAAA,GAAG,mCAAM,QAAQ,EAAd;AACsB,IAAA,IAAc,WAAd,cAAc,CAAA;AACrB,IAAA,YAAsB,WAAtB,sBAAsB,CAAA;AACtB,IAAA,IAAc,WAAd,cAAc,CAAA;AACf,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKxC,eAAeL,iBAAiB,CAACM,WAAmB,EAAEC,OAAiB,EAAE;IAC9E,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,IAAa,AAAkC,CAAA,cAAlC,CAAC,CAAC,SAAS,EAAEF,OAAO,CAACG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,AAAC;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,MAAM;QACL,2CAA2C;QAC3C9B,GAAG,CAACgD,IAAI,CAAC,2CAA2C,CAAC,CAAC;KACvD;CACF"}
@@ -30,16 +30,16 @@ function _interopRequireWildcard(obj) {
30
30
  return newObj;
31
31
  }
32
32
  }
33
- async function configureProjectAsync(projectRoot, { platforms }) {
33
+ async function configureProjectAsync(projectRoot, { platforms , exp }) {
34
34
  let bundleIdentifier;
35
35
  if (platforms.includes("ios")) {
36
36
  // Check bundle ID before reading the config because it may mutate the config if the user is prompted to define it.
37
- bundleIdentifier = await (0, _getOrPromptApplicationId).getOrPromptForBundleIdentifier(projectRoot);
37
+ bundleIdentifier = await (0, _getOrPromptApplicationId).getOrPromptForBundleIdentifier(projectRoot, exp);
38
38
  }
39
39
  let packageName;
40
40
  if (platforms.includes("android")) {
41
41
  // Check package before reading the config because it may mutate the config if the user is prompted to define it.
42
- packageName = await (0, _getOrPromptApplicationId).getOrPromptForPackage(projectRoot);
42
+ packageName = await (0, _getOrPromptApplicationId).getOrPromptForPackage(projectRoot, exp);
43
43
  }
44
44
  let { exp: config } = await (0, _prebuildConfig).getPrebuildConfigAsync(projectRoot, {
45
45
  platforms,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/prebuild/configureProjectAsync.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config';\nimport { compileModsAsync, ModPlatform } from '@expo/config-plugins';\nimport { getPrebuildConfigAsync } from '@expo/prebuild-config';\n\nimport { logConfig } from '../config/configAsync';\nimport * as Log from '../log';\nimport { env } from '../utils/env';\nimport {\n getOrPromptForBundleIdentifier,\n getOrPromptForPackage,\n} from '../utils/getOrPromptApplicationId';\n\nexport async function configureProjectAsync(\n projectRoot: string,\n {\n platforms,\n }: {\n platforms: ModPlatform[];\n }\n): Promise<ExpoConfig> {\n let bundleIdentifier: string | undefined;\n if (platforms.includes('ios')) {\n // Check bundle ID before reading the config because it may mutate the config if the user is prompted to define it.\n bundleIdentifier = await getOrPromptForBundleIdentifier(projectRoot);\n }\n let packageName: string | undefined;\n if (platforms.includes('android')) {\n // Check package before reading the config because it may mutate the config if the user is prompted to define it.\n packageName = await getOrPromptForPackage(projectRoot);\n }\n\n let { exp: config } = await getPrebuildConfigAsync(projectRoot, {\n platforms,\n packageName,\n bundleIdentifier,\n });\n\n // compile all plugins and mods\n config = await compileModsAsync(config, {\n projectRoot,\n platforms,\n assertMissingModProviders: false,\n });\n\n if (env.EXPO_DEBUG) {\n Log.log();\n Log.log('Evaluated config:');\n logConfig(config);\n Log.log();\n }\n\n return config;\n}\n"],"names":["configureProjectAsync","Log","projectRoot","platforms","bundleIdentifier","includes","getOrPromptForBundleIdentifier","packageName","getOrPromptForPackage","exp","config","getPrebuildConfigAsync","compileModsAsync","assertMissingModProviders","env","EXPO_DEBUG","log","logConfig"],"mappings":"AAAA;;;;QAYsBA,qBAAqB,GAArBA,qBAAqB;AAXG,IAAA,cAAsB,WAAtB,sBAAsB,CAAA;AAC7B,IAAA,eAAuB,WAAvB,uBAAuB,CAAA;AAEpC,IAAA,YAAuB,WAAvB,uBAAuB,CAAA;AACrCC,IAAAA,GAAG,mCAAM,QAAQ,EAAd;AACK,IAAA,IAAc,WAAd,cAAc,CAAA;AAI3B,IAAA,yBAAmC,WAAnC,mCAAmC,CAAA;;;;;;;;;;;;;;;;;;;;;;AAEnC,eAAeD,qBAAqB,CACzCE,WAAmB,EACnB,EACEC,SAAS,CAAA,EAGV,EACoB;IACrB,IAAIC,gBAAgB,AAAoB,AAAC;IACzC,IAAID,SAAS,CAACE,QAAQ,CAAC,KAAK,CAAC,EAAE;QAC7B,mHAAmH;QACnHD,gBAAgB,GAAG,MAAME,CAAAA,GAAAA,yBAA8B,AAAa,CAAA,+BAAb,CAACJ,WAAW,CAAC,CAAC;KACtE;IACD,IAAIK,WAAW,AAAoB,AAAC;IACpC,IAAIJ,SAAS,CAACE,QAAQ,CAAC,SAAS,CAAC,EAAE;QACjC,iHAAiH;QACjHE,WAAW,GAAG,MAAMC,CAAAA,GAAAA,yBAAqB,AAAa,CAAA,sBAAb,CAACN,WAAW,CAAC,CAAC;KACxD;IAED,IAAI,EAAEO,GAAG,EAAEC,MAAM,CAAA,EAAE,GAAG,MAAMC,CAAAA,GAAAA,eAAsB,AAIhD,CAAA,uBAJgD,CAACT,WAAW,EAAE;QAC9DC,SAAS;QACTI,WAAW;QACXH,gBAAgB;KACjB,CAAC,AAAC;IAEH,+BAA+B;IAC/BM,MAAM,GAAG,MAAME,CAAAA,GAAAA,cAAgB,AAI7B,CAAA,iBAJ6B,CAACF,MAAM,EAAE;QACtCR,WAAW;QACXC,SAAS;QACTU,yBAAyB,EAAE,KAAK;KACjC,CAAC,CAAC;IAEH,IAAIC,IAAG,IAAA,CAACC,UAAU,EAAE;QAClBd,GAAG,CAACe,GAAG,EAAE,CAAC;QACVf,GAAG,CAACe,GAAG,CAAC,mBAAmB,CAAC,CAAC;QAC7BC,CAAAA,GAAAA,YAAS,AAAQ,CAAA,UAAR,CAACP,MAAM,CAAC,CAAC;QAClBT,GAAG,CAACe,GAAG,EAAE,CAAC;KACX;IAED,OAAON,MAAM,CAAC;CACf"}
1
+ {"version":3,"sources":["../../../src/prebuild/configureProjectAsync.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config';\nimport { compileModsAsync, ModPlatform } from '@expo/config-plugins';\nimport { getPrebuildConfigAsync } from '@expo/prebuild-config';\n\nimport { logConfig } from '../config/configAsync';\nimport * as Log from '../log';\nimport { env } from '../utils/env';\nimport {\n getOrPromptForBundleIdentifier,\n getOrPromptForPackage,\n} from '../utils/getOrPromptApplicationId';\n\nexport async function configureProjectAsync(\n projectRoot: string,\n {\n platforms,\n exp,\n }: {\n platforms: ModPlatform[];\n exp?: ExpoConfig;\n }\n): Promise<ExpoConfig> {\n let bundleIdentifier: string | undefined;\n if (platforms.includes('ios')) {\n // Check bundle ID before reading the config because it may mutate the config if the user is prompted to define it.\n bundleIdentifier = await getOrPromptForBundleIdentifier(projectRoot, exp);\n }\n let packageName: string | undefined;\n if (platforms.includes('android')) {\n // Check package before reading the config because it may mutate the config if the user is prompted to define it.\n packageName = await getOrPromptForPackage(projectRoot, exp);\n }\n\n let { exp: config } = await getPrebuildConfigAsync(projectRoot, {\n platforms,\n packageName,\n bundleIdentifier,\n });\n\n // compile all plugins and mods\n config = await compileModsAsync(config, {\n projectRoot,\n platforms,\n assertMissingModProviders: false,\n });\n\n if (env.EXPO_DEBUG) {\n Log.log();\n Log.log('Evaluated config:');\n logConfig(config);\n Log.log();\n }\n\n return config;\n}\n"],"names":["configureProjectAsync","Log","projectRoot","platforms","exp","bundleIdentifier","includes","getOrPromptForBundleIdentifier","packageName","getOrPromptForPackage","config","getPrebuildConfigAsync","compileModsAsync","assertMissingModProviders","env","EXPO_DEBUG","log","logConfig"],"mappings":"AAAA;;;;QAYsBA,qBAAqB,GAArBA,qBAAqB;AAXG,IAAA,cAAsB,WAAtB,sBAAsB,CAAA;AAC7B,IAAA,eAAuB,WAAvB,uBAAuB,CAAA;AAEpC,IAAA,YAAuB,WAAvB,uBAAuB,CAAA;AACrCC,IAAAA,GAAG,mCAAM,QAAQ,EAAd;AACK,IAAA,IAAc,WAAd,cAAc,CAAA;AAI3B,IAAA,yBAAmC,WAAnC,mCAAmC,CAAA;;;;;;;;;;;;;;;;;;;;;;AAEnC,eAAeD,qBAAqB,CACzCE,WAAmB,EACnB,EACEC,SAAS,CAAA,EACTC,GAAG,CAAA,EAIJ,EACoB;IACrB,IAAIC,gBAAgB,AAAoB,AAAC;IACzC,IAAIF,SAAS,CAACG,QAAQ,CAAC,KAAK,CAAC,EAAE;QAC7B,mHAAmH;QACnHD,gBAAgB,GAAG,MAAME,CAAAA,GAAAA,yBAA8B,AAAkB,CAAA,+BAAlB,CAACL,WAAW,EAAEE,GAAG,CAAC,CAAC;KAC3E;IACD,IAAII,WAAW,AAAoB,AAAC;IACpC,IAAIL,SAAS,CAACG,QAAQ,CAAC,SAAS,CAAC,EAAE;QACjC,iHAAiH;QACjHE,WAAW,GAAG,MAAMC,CAAAA,GAAAA,yBAAqB,AAAkB,CAAA,sBAAlB,CAACP,WAAW,EAAEE,GAAG,CAAC,CAAC;KAC7D;IAED,IAAI,EAAEA,GAAG,EAAEM,MAAM,CAAA,EAAE,GAAG,MAAMC,CAAAA,GAAAA,eAAsB,AAIhD,CAAA,uBAJgD,CAACT,WAAW,EAAE;QAC9DC,SAAS;QACTK,WAAW;QACXH,gBAAgB;KACjB,CAAC,AAAC;IAEH,+BAA+B;IAC/BK,MAAM,GAAG,MAAME,CAAAA,GAAAA,cAAgB,AAI7B,CAAA,iBAJ6B,CAACF,MAAM,EAAE;QACtCR,WAAW;QACXC,SAAS;QACTU,yBAAyB,EAAE,KAAK;KACjC,CAAC,CAAC;IAEH,IAAIC,IAAG,IAAA,CAACC,UAAU,EAAE;QAClBd,GAAG,CAACe,GAAG,EAAE,CAAC;QACVf,GAAG,CAACe,GAAG,CAAC,mBAAmB,CAAC,CAAC;QAC7BC,CAAAA,GAAAA,YAAS,AAAQ,CAAA,UAAR,CAACP,MAAM,CAAC,CAAC;QAClBT,GAAG,CAACe,GAAG,EAAE,CAAC;KACX;IAED,OAAON,MAAM,CAAC;CACf"}
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
5
  exports.createCopyFilesSuccessMessage = createCopyFilesSuccessMessage;
6
- exports.copyTemplateFilesAsync = copyTemplateFilesAsync;
6
+ exports.copyTemplateFiles = copyTemplateFiles;
7
7
  var _chalk = _interopRequireDefault(require("chalk"));
8
8
  var _fs = _interopRequireDefault(require("fs"));
9
9
  var _path = _interopRequireDefault(require("path"));
@@ -25,51 +25,42 @@ const debug = require("debug")("expo:prebuild:copyTemplateFiles");
25
25
  , true);
26
26
  }
27
27
  function createCopyFilesSuccessMessage(platforms, { skippedPaths , gitignore }) {
28
- let message = `Created native project${platforms.length > 1 ? "s" : ""}`;
28
+ const pluralized = platforms.length > 1 ? "directories" : "directory";
29
+ let message = `Created native ${pluralized}`;
29
30
  if (skippedPaths.length) {
30
- message += _chalk.default.dim(` | ${skippedPaths.map((path)=>_chalk.default.bold(`/${path}`)
31
- ).join(", ")} already created`);
31
+ message += _chalk.default.dim(` | reusing ${skippedPaths.map((path)=>_chalk.default.bold(`/${path}`)
32
+ ).join(", ")}`);
32
33
  }
33
34
  if (!gitignore) {
34
- message += _chalk.default.dim(` | gitignore skipped`);
35
+ // Add no additional message...
35
36
  } else if (!gitignore.didMerge) {
36
- message += _chalk.default.dim(` | gitignore already synced`);
37
+ message += _chalk.default.dim(` | reusing gitignore`);
37
38
  } else if (gitignore.didMerge && gitignore.didClear) {
38
- message += _chalk.default.dim(` | synced gitignore`);
39
+ // This is legacy and for non-standard templates. The Expo template adds gitignores to the platform folders.
40
+ message += _chalk.default.dim(` | updated gitignore`);
39
41
  }
40
42
  return message;
41
43
  }
42
- async function copyTemplateFilesAsync(projectRoot, { templateDirectory , platforms }) {
43
- const copyResults = await copyPathsFromTemplateAsync(projectRoot, {
44
- templateDirectory,
45
- copyFilePaths: platforms
46
- });
47
- const hasPlatformSpecificGitIgnores = hasAllPlatformSpecificGitIgnores(templateDirectory, platforms);
48
- debug(`All platforms have an internal gitignore: ${hasPlatformSpecificGitIgnores}`);
49
- // TODO: Remove gitignore modifications -- maybe move to `npx expo-doctor`
50
- const gitignore = hasPlatformSpecificGitIgnores ? null : (0, _mergeGitIgnorePaths).mergeGitIgnorePaths(_path.default.join(projectRoot, ".gitignore"), _path.default.join(templateDirectory, ".gitignore"));
51
- return {
52
- ...copyResults,
53
- gitignore
54
- };
55
- }
56
- async function copyPathsFromTemplateAsync(/** File path to the project. */ projectRoot, { templateDirectory , copyFilePaths }) {
44
+ function copyTemplateFiles(projectRoot, { templateDirectory , platforms }) {
57
45
  const copiedPaths = [];
58
46
  const skippedPaths = [];
59
- for (const copyFilePath of copyFilePaths){
47
+ platforms.forEach((copyFilePath)=>{
60
48
  const projectPath = _path.default.join(projectRoot, copyFilePath);
61
- if (!await (0, _dir).directoryExistsAsync(projectPath)) {
49
+ if (_fs.default.existsSync(projectPath)) {
50
+ skippedPaths.push(copyFilePath);
51
+ } else {
62
52
  copiedPaths.push(copyFilePath);
63
53
  (0, _dir).copySync(_path.default.join(templateDirectory, copyFilePath), projectPath);
64
- } else {
65
- skippedPaths.push(copyFilePath);
66
54
  }
67
- }
68
- debug(`Copied files:`, copiedPaths);
69
- debug(`Skipped files:`, copiedPaths);
55
+ });
56
+ const hasPlatformSpecificGitIgnores = hasAllPlatformSpecificGitIgnores(templateDirectory, platforms);
57
+ debug(`All platforms have an internal gitignore: ${hasPlatformSpecificGitIgnores}`);
58
+ // TODO: Remove gitignore modifications -- maybe move to `npx expo-doctor`
59
+ const gitignore = hasPlatformSpecificGitIgnores ? null : (0, _mergeGitIgnorePaths).mergeGitIgnorePaths(_path.default.join(projectRoot, ".gitignore"), _path.default.join(templateDirectory, ".gitignore"));
70
60
  return {
71
61
  copiedPaths,
72
- skippedPaths
62
+ skippedPaths,
63
+ gitignore
73
64
  };
74
65
  }
75
66
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/prebuild/copyTemplateFiles.ts"],"sourcesContent":["import { ModPlatform } from '@expo/config-plugins';\nimport { MergeResults } from '@expo/config-plugins/build/utils/generateCode';\nimport chalk from 'chalk';\nimport fs from 'fs';\nimport path from 'path';\n\nimport { copySync, directoryExistsAsync } from '../utils/dir';\nimport { mergeGitIgnorePaths } from '../utils/mergeGitIgnorePaths';\n\nconst debug = require('debug')('expo:prebuild:copyTemplateFiles') as typeof console.log;\n\ntype CopyFilesResults = {\n /** Merge results for the root `.gitignore` file */\n gitignore: MergeResults | null;\n /** List of file paths that were copied from the template into the project. */\n copiedPaths: string[];\n /** List of file paths that were skipped due to a number of factors. */\n skippedPaths: string[];\n};\n\n/**\n * Return true if the given platforms all have an internal `.gitignore` file.\n *\n * @param projectRoot\n * @param platforms\n */\nfunction hasAllPlatformSpecificGitIgnores(projectRoot: string, platforms: ModPlatform[]): boolean {\n return platforms.reduce<boolean>(\n (p, platform) => p && fs.existsSync(path.join(projectRoot, platform, '.gitignore')),\n true\n );\n}\n\n/** Create a custom log message based on the copy file results. */\nexport function createCopyFilesSuccessMessage(\n platforms: ModPlatform[],\n { skippedPaths, gitignore }: CopyFilesResults\n): string {\n let message = `Created native project${platforms.length > 1 ? 's' : ''}`;\n\n if (skippedPaths.length) {\n message += chalk.dim(\n ` | ${skippedPaths.map((path) => chalk.bold(`/${path}`)).join(', ')} already created`\n );\n }\n if (!gitignore) {\n message += chalk.dim(` | gitignore skipped`);\n } else if (!gitignore.didMerge) {\n message += chalk.dim(` | gitignore already synced`);\n } else if (gitignore.didMerge && gitignore.didClear) {\n message += chalk.dim(` | synced gitignore`);\n }\n return message;\n}\n\n/** Copy template files into the project and possibly merge the `.gitignore` files. */\nexport async function copyTemplateFilesAsync(\n projectRoot: string,\n {\n templateDirectory,\n platforms,\n }: {\n /** File path to the template directory. */\n templateDirectory: string;\n /** List of platforms to copy against. */\n platforms: ModPlatform[];\n }\n): Promise<CopyFilesResults> {\n const copyResults = await copyPathsFromTemplateAsync(projectRoot, {\n templateDirectory,\n copyFilePaths: platforms,\n });\n\n const hasPlatformSpecificGitIgnores = hasAllPlatformSpecificGitIgnores(\n templateDirectory,\n platforms\n );\n debug(`All platforms have an internal gitignore: ${hasPlatformSpecificGitIgnores}`);\n\n // TODO: Remove gitignore modifications -- maybe move to `npx expo-doctor`\n const gitignore = hasPlatformSpecificGitIgnores\n ? null\n : mergeGitIgnorePaths(\n path.join(projectRoot, '.gitignore'),\n path.join(templateDirectory, '.gitignore')\n );\n\n return { ...copyResults, gitignore };\n}\n\nasync function copyPathsFromTemplateAsync(\n /** File path to the project. */\n projectRoot: string,\n {\n templateDirectory,\n copyFilePaths,\n }: {\n /** File path to the template project. */\n templateDirectory: string;\n /** List of relative paths to copy from the template to the project. */\n copyFilePaths: string[];\n }\n): Promise<Pick<CopyFilesResults, 'copiedPaths' | 'skippedPaths'>> {\n const copiedPaths = [];\n const skippedPaths = [];\n for (const copyFilePath of copyFilePaths) {\n const projectPath = path.join(projectRoot, copyFilePath);\n if (!(await directoryExistsAsync(projectPath))) {\n copiedPaths.push(copyFilePath);\n copySync(path.join(templateDirectory, copyFilePath), projectPath);\n } else {\n skippedPaths.push(copyFilePath);\n }\n }\n debug(`Copied files:`, copiedPaths);\n debug(`Skipped files:`, copiedPaths);\n return { copiedPaths, skippedPaths };\n}\n"],"names":["createCopyFilesSuccessMessage","copyTemplateFilesAsync","debug","require","hasAllPlatformSpecificGitIgnores","projectRoot","platforms","reduce","p","platform","fs","existsSync","path","join","skippedPaths","gitignore","message","length","chalk","dim","map","bold","didMerge","didClear","templateDirectory","copyResults","copyPathsFromTemplateAsync","copyFilePaths","hasPlatformSpecificGitIgnores","mergeGitIgnorePaths","copiedPaths","copyFilePath","projectPath","directoryExistsAsync","push","copySync"],"mappings":"AAAA;;;;QAkCgBA,6BAA6B,GAA7BA,6BAA6B;QAsBvBC,sBAAsB,GAAtBA,sBAAsB;AAtD1B,IAAA,MAAO,kCAAP,OAAO,EAAA;AACV,IAAA,GAAI,kCAAJ,IAAI,EAAA;AACF,IAAA,KAAM,kCAAN,MAAM,EAAA;AAEwB,IAAA,IAAc,WAAd,cAAc,CAAA;AACzB,IAAA,oBAA8B,WAA9B,8BAA8B,CAAA;;;;;;AAElE,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,iCAAiC,CAAC,AAAsB,AAAC;AAWxF;;;;;GAKG,CACH,SAASC,gCAAgC,CAACC,WAAmB,EAAEC,SAAwB,EAAW;IAChG,OAAOA,SAAS,CAACC,MAAM,CACrB,CAACC,CAAC,EAAEC,QAAQ,GAAKD,CAAC,IAAIE,GAAE,QAAA,CAACC,UAAU,CAACC,KAAI,QAAA,CAACC,IAAI,CAACR,WAAW,EAAEI,QAAQ,EAAE,YAAY,CAAC,CAAC;IAAA,EACnF,IAAI,CACL,CAAC;CACH;AAGM,SAAST,6BAA6B,CAC3CM,SAAwB,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Y;KAAE,CAAC;CACtC"}
1
+ {"version":3,"sources":["../../../src/prebuild/copyTemplateFiles.ts"],"sourcesContent":["import { ModPlatform } from '@expo/config-plugins';\nimport { MergeResults } from '@expo/config-plugins/build/utils/generateCode';\nimport chalk from 'chalk';\nimport fs from 'fs';\nimport path from 'path';\n\nimport { copySync } from '../utils/dir';\nimport { mergeGitIgnorePaths } from '../utils/mergeGitIgnorePaths';\n\nconst debug = require('debug')('expo:prebuild:copyTemplateFiles') as typeof console.log;\n\ntype CopyFilesResults = {\n /** Merge results for the root `.gitignore` file */\n gitignore: MergeResults | null;\n /** List of file paths that were copied from the template into the project. */\n copiedPaths: string[];\n /** List of file paths that were skipped due to a number of factors. */\n skippedPaths: string[];\n};\n\n/**\n * Return true if the given platforms all have an internal `.gitignore` file.\n *\n * @param projectRoot\n * @param platforms\n */\nfunction hasAllPlatformSpecificGitIgnores(projectRoot: string, platforms: ModPlatform[]): boolean {\n return platforms.reduce<boolean>(\n (p, platform) => p && fs.existsSync(path.join(projectRoot, platform, '.gitignore')),\n true\n );\n}\n\n/** Create a custom log message based on the copy file results. */\nexport function createCopyFilesSuccessMessage(\n platforms: ModPlatform[],\n { skippedPaths, gitignore }: CopyFilesResults\n): string {\n const pluralized = platforms.length > 1 ? 'directories' : 'directory';\n let message = `Created native ${pluralized}`;\n\n if (skippedPaths.length) {\n message += chalk.dim(\n ` | reusing ${skippedPaths.map((path) => chalk.bold(`/${path}`)).join(', ')}`\n );\n }\n if (!gitignore) {\n // Add no additional message...\n } else if (!gitignore.didMerge) {\n message += chalk.dim(` | reusing gitignore`);\n } else if (gitignore.didMerge && gitignore.didClear) {\n // This is legacy and for non-standard templates. The Expo template adds gitignores to the platform folders.\n message += chalk.dim(` | updated gitignore`);\n }\n return message;\n}\n\n/** Copy template files into the project and possibly merge the `.gitignore` files. */\nexport function copyTemplateFiles(\n projectRoot: string,\n {\n templateDirectory,\n platforms,\n }: {\n /** File path to the template directory. */\n templateDirectory: string;\n /** List of platforms to copy against. */\n platforms: ModPlatform[];\n }\n): CopyFilesResults {\n const copiedPaths: string[] = [];\n const skippedPaths: string[] = [];\n\n platforms.forEach((copyFilePath) => {\n const projectPath = path.join(projectRoot, copyFilePath);\n if (fs.existsSync(projectPath)) {\n skippedPaths.push(copyFilePath);\n } else {\n copiedPaths.push(copyFilePath);\n copySync(path.join(templateDirectory, copyFilePath), projectPath);\n }\n });\n\n const hasPlatformSpecificGitIgnores = hasAllPlatformSpecificGitIgnores(\n templateDirectory,\n platforms\n );\n debug(`All platforms have an internal gitignore: ${hasPlatformSpecificGitIgnores}`);\n\n // TODO: Remove gitignore modifications -- maybe move to `npx expo-doctor`\n const gitignore = hasPlatformSpecificGitIgnores\n ? null\n : mergeGitIgnorePaths(\n path.join(projectRoot, '.gitignore'),\n path.join(templateDirectory, '.gitignore')\n );\n\n return { copiedPaths, skippedPaths, gitignore };\n}\n"],"names":["createCopyFilesSuccessMessage","copyTemplateFiles","debug","require","hasAllPlatformSpecificGitIgnores","projectRoot","platforms","reduce","p","platform","fs","existsSync","path","join","skippedPaths","gitignore","pluralized","length","message","chalk","dim","map","bold","didMerge","didClear","templateDirectory","copiedPaths","forEach","copyFilePath","projectPath","push","copySync","hasPlatformSpecificGitIgnores","mergeGitIgnorePaths"],"mappings":"AAAA;;;;QAkCgBA,6BAA6B,GAA7BA,6BAA6B;QAwB7BC,iBAAiB,GAAjBA,iBAAiB;AAxDf,IAAA,MAAO,kCAAP,OAAO,EAAA;AACV,IAAA,GAAI,kCAAJ,IAAI,EAAA;AACF,IAAA,KAAM,kCAAN,MAAM,EAAA;AAEE,IAAA,IAAc,WAAd,cAAc,CAAA;AACH,IAAA,oBAA8B,WAA9B,8BAA8B,CAAA;;;;;;AAElE,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,iCAAiC,CAAC,AAAsB,AAAC;AAWxF;;;;;GAKG,CACH,SAASC,gCAAgC,CAACC,WAAmB,EAAEC,SAAwB,EAAW;IAChG,OA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EAMV,EACiB;IAClB,MAAMoB,WAAW,GAAa,EAAE,AAAC;IACjC,MAAMZ,YAAY,GAAa,EAAE,AAAC;IAElCR,SAAS,CAACqB,OAAO,CAAC,CAACC,YAAY,GAAK;QAClC,MAAMC,WAAW,GAAGjB,KAAI,QAAA,CAACC,IAAI,CAACR,WAAW,EAAEuB,YAAY,CAAC,AAAC;QACzD,IAAIlB,GAAE,QAAA,CAACC,UAAU,CAACkB,WAAW,CAAC,EAAE;YAC9Bf,YAAY,CAACgB,IAAI,CAACF,YAAY,CAAC,CAAC;SACjC,MAAM;YACLF,WAAW,CAACI,IAAI,CAACF,YAAY,CAAC,CAAC;YAC/BG,CAAAA,GAAAA,IAAQ,AAAyD,CAAA,SAAzD,CAACnB,KAAI,QAAA,CAACC,IAAI,CAACY,iBAAiB,EAAEG,YAAY,CAAC,EAAEC,WAAW,CAAC,CAAC;SACnE;KACF,CAAC,CAAC;IAEH,MAAMG,6BAA6B,GAAG5B,gCAAgC,CACpEqB,iBAAiB,EACjBnB,SAAS,CACV,AAAC;IACFJ,KAAK,CAAC,CAAC,0CAA0C,EAAE8B,6BAA6B,CAAC,CAAC,CAAC,CAAC;IAEpF,0EAA0E;IAC1E,MAAMjB,SAAS,GAAGiB,6BAA6B,GAC3C,IAAI,GACJC,CAAAA,GAAAA,oBAAmB,AAGlB,CAAA,oBAHkB,CACjBrB,KAAI,QAAA,CAACC,IAAI,CAACR,WAAW,EAAE,YAAY,CAAC,EACpCO,KAAI,QAAA,CAACC,IAAI,CAACY,iBAAiB,EAAE,YAAY,CAAC,CAC3C,AAAC;IAEN,OAAO;QAAEC,WAAW;QAAEZ,YAAY;QAAEC,SAAS;KAAE,CAAC;CACjD"}
@@ -71,13 +71,13 @@ const expoPrebuild = async (argv)=>{
71
71
  { resolvePlatformOption , resolvePackageManagerOptions , resolveSkipDependencyUpdate }, // ../utils/errors
72
72
  { logCmdError }, ] = await Promise.all([
73
73
  Promise.resolve().then(function() {
74
- return _interopRequireWildcard(require("./prebuildAsync"));
74
+ return _interopRequireWildcard(require("./prebuildAsync.js"));
75
75
  }),
76
76
  Promise.resolve().then(function() {
77
- return _interopRequireWildcard(require("./resolveOptions"));
77
+ return _interopRequireWildcard(require("./resolveOptions.js"));
78
78
  }),
79
79
  Promise.resolve().then(function() {
80
- return _interopRequireWildcard(require("../utils/errors"));
80
+ return _interopRequireWildcard(require("../utils/errors.js"));
81
81
  }),
82
82
  ]);
83
83
  return (()=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/prebuild/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport chalk from 'chalk';\n\nimport { Command } from '../../bin/cli';\nimport { assertArgs, getProjectRoot, printHelp } from '../utils/args';\n\nexport const expoPrebuild: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--clean': Boolean,\n '--npm': Boolean,\n '--pnpm': Boolean,\n '--yarn': Boolean,\n '--bun': Boolean,\n '--no-install': Boolean,\n '--template': String,\n '--platform': String,\n '--skip-dependency-update': String,\n // Aliases\n '-h': '--help',\n '-p': '--platform',\n '-t': '--type',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Create native iOS and Android project files for building natively`,\n chalk`npx expo prebuild {dim <dir>}`,\n [\n chalk`<dir> Directory of the Expo project. {dim Default: Current working directory}`,\n `--no-install Skip installing npm packages and CocoaPods`,\n `--clean Delete the native folders and regenerate them before applying changes`,\n chalk`--npm Use npm to install dependencies. {dim Default when package-lock.json exists}`,\n chalk`--yarn Use Yarn to install dependencies. {dim Default when yarn.lock exists}`,\n chalk`--bun Use bun to install dependencies. {dim Default when bun.lockb exists}`,\n chalk`--pnpm Use pnpm to install dependencies. {dim Default when pnpm-lock.yaml exists}`,\n `--template <template> Project template to clone from. File path pointing to a local tar file or a github repo`,\n chalk`-p, --platform <all|android|ios> Platforms to sync: ios, android, all. {dim Default: all}`,\n `--skip-dependency-update <dependencies> Preserves versions of listed packages in package.json (comma separated list)`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n // Load modules after the help prompt so `npx expo prebuild -h` shows as fast as possible.\n const [\n // ./prebuildAsync\n { prebuildAsync },\n // ./resolveOptions\n { resolvePlatformOption, resolvePackageManagerOptions, resolveSkipDependencyUpdate },\n // ../utils/errors\n { logCmdError },\n ] = await Promise.all([\n import('./prebuildAsync'),\n import('./resolveOptions'),\n import('../utils/errors'),\n ]);\n\n return (() => {\n return prebuildAsync(getProjectRoot(args), {\n // Parsed options\n clean: args['--clean'],\n\n packageManager: resolvePackageManagerOptions(args),\n install: !args['--no-install'],\n platforms: resolvePlatformOption(args['--platform']),\n // TODO: Parse\n skipDependencyUpdate: resolveSkipDependencyUpdate(args['--skip-dependency-update']),\n template: args['--template'],\n });\n })().catch(logCmdError);\n};\n"],"names":["expoPrebuild","argv","args","assertArgs","Boolean","String","printHelp","chalk","join","prebuildAsync","resolvePlatformOption","resolvePackageManagerOptions","resolveSkipDependencyUpdate","logCmdError","Promise","all","getProjectRoot","clean","packageManager","install","platforms","skipDependencyUpdate","template","catch"],"mappings":"AAAA;;;;;;AACkB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAG6B,IAAA,KAAe,WAAf,eAAe,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE9D,MAAMA,YAAY,GAAY,OAAOC,IAAI,GAAK;IACnD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AAmBtB,CAAA,WAnBsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,SAAS,EAAEA,OAAO;QAClB,OAAO,EAAEA,OAAO;QAChB,QAAQ,EAAEA,OAAO;QACjB,QAAQ,EAAEA,OAAO;QACjB,OAAO,EAAEA,OAAO;QAChB,cAAc,EAAEA,OAAO;QACvB,YAAY,EAAEC,MAAM;QACpB,YAAY,EAAEA,MAAM;QACpB,0BAA0B,EAAEA,MAAM;QAClC,UAAU;QACV,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,YAAY;QAClB,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CAACjB,IAAI,CAAC,cAAc,CAAC;YAC9BkB,SAAS,EAAEV,qBAAqB,CAACR,IAAI,CAAC,YAAY,CAAC,CAAC;YACpD,cAAc;YACdmB,oBAAoB,EAAET,2BAA2B,CAACV,IAAI,CAAC,0BAA0B,CAAC,CAAC;YACnFoB,QAAQ,EAAEpB,IAAI,CAAC,YAAY,CAAC;SAC7B,CAAC,CAAC;KACJ,CAAC,EAAE,CAACqB,KAAK,CAACV,WAAW,CAAC,CAAC;CACzB,AAAC;QArEWb,YAAY,GAAZA,YAAY"}
1
+ {"version":3,"sources":["../../../src/prebuild/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport chalk from 'chalk';\n\nimport { Command } from '../../bin/cli';\nimport { assertArgs, getProjectRoot, printHelp } from '../utils/args';\n\nexport const expoPrebuild: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--clean': Boolean,\n '--npm': Boolean,\n '--pnpm': Boolean,\n '--yarn': Boolean,\n '--bun': Boolean,\n '--no-install': Boolean,\n '--template': String,\n '--platform': String,\n '--skip-dependency-update': String,\n // Aliases\n '-h': '--help',\n '-p': '--platform',\n '-t': '--type',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Create native iOS and Android project files for building natively`,\n chalk`npx expo prebuild {dim <dir>}`,\n [\n chalk`<dir> Directory of the Expo project. {dim Default: Current working directory}`,\n `--no-install Skip installing npm packages and CocoaPods`,\n `--clean Delete the native folders and regenerate them before applying changes`,\n chalk`--npm Use npm to install dependencies. {dim Default when package-lock.json exists}`,\n chalk`--yarn Use Yarn to install dependencies. {dim Default when yarn.lock exists}`,\n chalk`--bun Use bun to install dependencies. {dim Default when bun.lockb exists}`,\n chalk`--pnpm Use pnpm to install dependencies. {dim Default when pnpm-lock.yaml exists}`,\n `--template <template> Project template to clone from. File path pointing to a local tar file or a github repo`,\n chalk`-p, --platform <all|android|ios> Platforms to sync: ios, android, all. {dim Default: all}`,\n `--skip-dependency-update <dependencies> Preserves versions of listed packages in package.json (comma separated list)`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n // Load modules after the help prompt so `npx expo prebuild -h` shows as fast as possible.\n const [\n // ./prebuildAsync\n { prebuildAsync },\n // ./resolveOptions\n { resolvePlatformOption, resolvePackageManagerOptions, resolveSkipDependencyUpdate },\n // ../utils/errors\n { logCmdError },\n ] = await Promise.all([\n import('./prebuildAsync.js'),\n import('./resolveOptions.js'),\n import('../utils/errors.js'),\n ]);\n\n return (() => {\n return prebuildAsync(getProjectRoot(args), {\n // Parsed options\n clean: args['--clean'],\n\n packageManager: resolvePackageManagerOptions(args),\n install: !args['--no-install'],\n platforms: resolvePlatformOption(args['--platform']),\n // TODO: Parse\n skipDependencyUpdate: resolveSkipDependencyUpdate(args['--skip-dependency-update']),\n template: args['--template'],\n });\n })().catch(logCmdError);\n};\n"],"names":["expoPrebuild","argv","args","assertArgs","Boolean","String","printHelp","chalk","join","prebuildAsync","resolvePlatformOption","resolvePackageManagerOptions","resolveSkipDependencyUpdate","logCmdError","Promise","all","getProjectRoot","clean","packageManager","install","platforms","skipDependencyUpdate","template","catch"],"mappings":"AAAA;;;;;;AACkB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAG6B,IAAA,KAAe,WAAf,eAAe,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE9D,MAAMA,YAAY,GAAY,OAAOC,IAAI,GAAK;IACnD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AAmBtB,CAAA,WAnBsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,SAAS,EAAEA,OAAO;QAClB,OAAO,EAAEA,OAAO;QAChB,QAAQ,EAAEA,OAAO;QACjB,QAAQ,EAAEA,OAAO;QACjB,OAAO,EAAEA,OAAO;QAChB,cAAc,EAAEA,OAAO;QACvB,YAAY,EAAEC,MAAM;QACpB,YAAY,EAAEA,MAAM;QACpB,0BAA0B,EAAEA,MAAM;QAClC,UAAU;QACV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EP,4BAA4B,CAACT,IAAI,CAAC;YAClDiB,OAAO,EAAE,CAACjB,IAAI,CAAC,cAAc,CAAC;YAC9BkB,SAAS,EAAEV,qBAAqB,CAACR,IAAI,CAAC,YAAY,CAAC,CAAC;YACpD,cAAc;YACdmB,oBAAoB,EAAET,2BAA2B,CAACV,IAAI,CAAC,0BAA0B,CAAC,CAAC;YACnFoB,QAAQ,EAAEpB,IAAI,CAAC,YAAY,CAAC;SAC7B,CAAC,CAAC;KACJ,CAAC,EAAE,CAACqB,KAAK,CAACV,WAAW,CAAC,CAAC;CACzB,AAAC;QArEWb,YAAY,GAAZA,YAAY"}
@@ -3,17 +3,25 @@ Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
5
  exports.prebuildAsync = prebuildAsync;
6
+ var _chalk = _interopRequireDefault(require("chalk"));
6
7
  var _clearNativeFolder = require("./clearNativeFolder");
7
8
  var _configureProjectAsync = require("./configureProjectAsync");
8
9
  var _ensureConfigAsync = require("./ensureConfigAsync");
9
10
  var _resolveOptions = require("./resolveOptions");
10
11
  var _updateFromTemplate = require("./updateFromTemplate");
11
12
  var _installAsync = require("../install/installAsync");
13
+ var _log = require("../log");
12
14
  var _env = require("../utils/env");
13
15
  var _nodeEnv = require("../utils/nodeEnv");
14
16
  var _nodeModules = require("../utils/nodeModules");
15
17
  var _ora = require("../utils/ora");
16
18
  var _profile = require("../utils/profile");
19
+ var _prompts = require("../utils/prompts");
20
+ function _interopRequireDefault(obj) {
21
+ return obj && obj.__esModule ? obj : {
22
+ default: obj
23
+ };
24
+ }
17
25
  function _interopRequireWildcard(obj) {
18
26
  if (obj && obj.__esModule) {
19
27
  return obj;
@@ -41,7 +49,7 @@ async function prebuildAsync(projectRoot, options) {
41
49
  require("@expo/env").load(projectRoot);
42
50
  if (options.clean) {
43
51
  const { maybeBailOnGitStatusAsync } = await Promise.resolve().then(function() {
44
- return _interopRequireWildcard(require("../utils/git"));
52
+ return _interopRequireWildcard(require("../utils/git.js"));
45
53
  });
46
54
  // Clean the project folders...
47
55
  if (await maybeBailOnGitStatusAsync()) {
@@ -62,7 +70,7 @@ async function prebuildAsync(projectRoot, options) {
62
70
  platforms: options.platforms
63
71
  });
64
72
  // Create native projects from template.
65
- const { hasNewProjectFiles , needsPodInstall , hasNewDependencies } = await (0, _updateFromTemplate).updateFromTemplateAsync(projectRoot, {
73
+ const { hasNewProjectFiles , needsPodInstall , changedDependencies } = await (0, _updateFromTemplate).updateFromTemplateAsync(projectRoot, {
66
74
  exp,
67
75
  pkg,
68
76
  template: options.template != null ? (0, _resolveOptions).resolveTemplateOption(options.template) : undefined,
@@ -71,27 +79,41 @@ async function prebuildAsync(projectRoot, options) {
71
79
  });
72
80
  // Install node modules
73
81
  if (options.install) {
74
- var ref, ref1, ref2, ref3, ref4;
75
- if (hasNewDependencies && ((ref = options.packageManager) == null ? void 0 : ref.npm)) {
76
- await (0, _nodeModules).clearNodeModulesAsync(projectRoot);
82
+ if (changedDependencies.length) {
83
+ var ref;
84
+ if ((ref = options.packageManager) == null ? void 0 : ref.npm) {
85
+ await (0, _nodeModules).clearNodeModulesAsync(projectRoot);
86
+ }
87
+ _log.Log.log(_chalk.default.gray(_chalk.default`Dependencies in the {bold package.json} changed:`));
88
+ _log.Log.log(_chalk.default.gray(" " + changedDependencies.join(", ")));
89
+ // Installing dependencies is a legacy feature from the unversioned
90
+ // command. We know opt to not change dependencies unless a template
91
+ // indicates a new dependency is required, or if the core dependencies are wrong.
92
+ if (await (0, _prompts).confirmAsync({
93
+ message: `Install the updated dependencies?`,
94
+ initial: true
95
+ })) {
96
+ var ref1, ref2, ref3, ref4;
97
+ await (0, _installAsync).installAsync([], {
98
+ npm: !!((ref1 = options.packageManager) == null ? void 0 : ref1.npm),
99
+ yarn: !!((ref2 = options.packageManager) == null ? void 0 : ref2.yarn),
100
+ pnpm: !!((ref3 = options.packageManager) == null ? void 0 : ref3.pnpm),
101
+ bun: !!((ref4 = options.packageManager) == null ? void 0 : ref4.bun),
102
+ silent: !(_env.env.EXPO_DEBUG || _env.env.CI)
103
+ });
104
+ }
77
105
  }
78
- await (0, _installAsync).installAsync([], {
79
- npm: !!((ref1 = options.packageManager) == null ? void 0 : ref1.npm),
80
- yarn: !!((ref2 = options.packageManager) == null ? void 0 : ref2.yarn),
81
- pnpm: !!((ref3 = options.packageManager) == null ? void 0 : ref3.pnpm),
82
- bun: !!((ref4 = options.packageManager) == null ? void 0 : ref4.bun),
83
- silent: !(_env.env.EXPO_DEBUG || _env.env.CI)
84
- });
85
106
  }
86
107
  // Apply Expo config to native projects
87
- const configSyncingStep = (0, _ora).logNewSection("Config syncing");
108
+ const configSyncingStep = (0, _ora).logNewSection("Running prebuild");
88
109
  try {
89
110
  await (0, _profile).profile(_configureProjectAsync.configureProjectAsync)(projectRoot, {
90
- platforms: options.platforms
111
+ platforms: options.platforms,
112
+ exp
91
113
  });
92
- configSyncingStep.succeed("Config synced");
114
+ configSyncingStep.succeed("Finished prebuild");
93
115
  } catch (error) {
94
- configSyncingStep.fail("Config sync failed");
116
+ configSyncingStep.fail("Prebuild failed");
95
117
  throw error;
96
118
  }
97
119
  // Install CocoaPods
@@ -99,7 +121,7 @@ async function prebuildAsync(projectRoot, options) {
99
121
  // err towards running pod install less because it's slow and users can easily run npx pod-install afterwards.
100
122
  if (options.platforms.includes("ios") && options.install && needsPodInstall) {
101
123
  const { installCocoaPodsAsync } = await Promise.resolve().then(function() {
102
- return _interopRequireWildcard(require("../utils/cocoapods"));
124
+ return _interopRequireWildcard(require("../utils/cocoapods.js"));
103
125
  });
104
126
  podsInstalled = await installCocoaPodsAsync(projectRoot);
105
127
  } else {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/prebuild/prebuildAsync.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config';\nimport { ModPlatform } from '@expo/config-plugins';\n\nimport { clearNativeFolder, promptToClearMalformedNativeProjectsAsync } from './clearNativeFolder';\nimport { configureProjectAsync } from './configureProjectAsync';\nimport { ensureConfigAsync } from './ensureConfigAsync';\nimport { assertPlatforms, ensureValidPlatforms, resolveTemplateOption } from './resolveOptions';\nimport { updateFromTemplateAsync } from './updateFromTemplate';\nimport { installAsync } from '../install/installAsync';\nimport { env } from '../utils/env';\nimport { setNodeEnv } from '../utils/nodeEnv';\nimport { clearNodeModulesAsync } from '../utils/nodeModules';\nimport { logNewSection } from '../utils/ora';\nimport { profile } from '../utils/profile';\n\nconst debug = require('debug')('expo:prebuild') as typeof console.log;\n\nexport type PrebuildResults = {\n /** Expo config. */\n exp: ExpoConfig;\n /** Indicates if the process created new files. */\n hasNewProjectFiles: boolean;\n /** The platforms that were prebuilt. */\n platforms: ModPlatform[];\n /** Indicates if pod install was run. */\n podInstall: boolean;\n /** Indicates if node modules were installed. */\n nodeInstall: boolean;\n};\n\n/**\n * Entry point into the prebuild process, delegates to other helpers to perform various steps.\n *\n * 0. Attempt to clean the project folders.\n * 1. Create native projects (ios, android).\n * 2. Install node modules.\n * 3. Apply config to native projects.\n * 4. Install CocoaPods.\n */\nexport async function prebuildAsync(\n projectRoot: string,\n options: {\n /** Should install node modules and cocoapods. */\n install?: boolean;\n /** List of platforms to prebuild. */\n platforms: ModPlatform[];\n /** Should delete the native folders before attempting to prebuild. */\n clean?: boolean;\n /** URL or file path to the prebuild template. */\n template?: string;\n /** Name of the node package manager to install with. */\n packageManager?: {\n npm?: boolean;\n yarn?: boolean;\n pnpm?: boolean;\n bun?: boolean;\n };\n /** List of node modules to skip updating. */\n skipDependencyUpdate?: string[];\n }\n): Promise<PrebuildResults | null> {\n setNodeEnv('development');\n require('@expo/env').load(projectRoot);\n\n if (options.clean) {\n const { maybeBailOnGitStatusAsync } = await import('../utils/git');\n // Clean the project folders...\n if (await maybeBailOnGitStatusAsync()) {\n return null;\n }\n // Clear the native folders before syncing\n await clearNativeFolder(projectRoot, options.platforms);\n } else {\n // Check if the existing project folders are malformed.\n await promptToClearMalformedNativeProjectsAsync(projectRoot, options.platforms);\n }\n\n // Warn if the project is attempting to prebuild an unsupported platform (iOS on Windows).\n options.platforms = ensureValidPlatforms(options.platforms);\n // Assert if no platforms are left over after filtering.\n assertPlatforms(options.platforms);\n\n // Get the Expo config, create it if missing.\n const { exp, pkg } = await ensureConfigAsync(projectRoot, { platforms: options.platforms });\n\n // Create native projects from template.\n const { hasNewProjectFiles, needsPodInstall, hasNewDependencies } = await updateFromTemplateAsync(\n projectRoot,\n {\n exp,\n pkg,\n template: options.template != null ? resolveTemplateOption(options.template) : undefined,\n platforms: options.platforms,\n skipDependencyUpdate: options.skipDependencyUpdate,\n }\n );\n\n // Install node modules\n if (options.install) {\n if (hasNewDependencies && options.packageManager?.npm) {\n await clearNodeModulesAsync(projectRoot);\n }\n\n await installAsync([], {\n npm: !!options.packageManager?.npm,\n yarn: !!options.packageManager?.yarn,\n pnpm: !!options.packageManager?.pnpm,\n bun: !!options.packageManager?.bun,\n silent: !(env.EXPO_DEBUG || env.CI),\n });\n }\n\n // Apply Expo config to native projects\n const configSyncingStep = logNewSection('Config syncing');\n try {\n await profile(configureProjectAsync)(projectRoot, {\n platforms: options.platforms,\n });\n configSyncingStep.succeed('Config synced');\n } catch (error) {\n configSyncingStep.fail('Config sync failed');\n throw error;\n }\n\n // Install CocoaPods\n let podsInstalled: boolean = false;\n // err towards running pod install less because it's slow and users can easily run npx pod-install afterwards.\n if (options.platforms.includes('ios') && options.install && needsPodInstall) {\n const { installCocoaPodsAsync } = await import('../utils/cocoapods');\n\n podsInstalled = await installCocoaPodsAsync(projectRoot);\n } else {\n debug('Skipped pod install');\n }\n\n return {\n nodeInstall: !!options.install,\n podInstall: !podsInstalled,\n platforms: options.platforms,\n hasNewProjectFiles,\n exp,\n };\n}\n"],"names":["prebuildAsync","debug","require","projectRoot","options","setNodeEnv","load","clean","maybeBailOnGitStatusAsync","clearNativeFolder","platforms","promptToClearMalformedNativeProjectsAsync","ensureValidPlatforms","assertPlatforms","exp","pkg","ensureConfigAsync","hasNewProjectFiles","needsPodInstall","hasNewDependencies","updateFromTemplateAsync","template","resolveTemplateOption","undefined","skipDependencyUpdate","install","packageManager","npm","clearNodeModulesAsync","installAsync","yarn","pnpm","bun","silent","env","EXPO_DEBUG","CI","configSyncingStep","logNewSection","profile","configureProjectAsync","succeed","error","fail","podsInstalled","includes","installCocoaPodsAsync","nodeInstall","podInstall"],"mappings":"AAAA;;;;QAuCsBA,aAAa,GAAbA,aAAa;AApC0C,IAAA,kBAAqB,WAArB,qBAAqB,CAAA;AAC5D,IAAA,sBAAyB,WAAzB,yBAAyB,CAAA;AAC7B,IAAA,kBAAqB,WAArB,qBAAqB,CAAA;AACsB,IAAA,eAAkB,WAAlB,kBAAkB,CAAA;AACvD,IAAA,mBAAsB,WAAtB,sBAAsB,CAAA;AACjC,IAAA,aAAyB,WAAzB,yBAAyB,CAAA;AAClC,IAAA,IAAc,WAAd,cAAc,CAAA;AACP,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;AACP,IAAA,YAAsB,WAAtB,sBAAsB,CAAA;AAC9B,IAAA,IAAc,WAAd,cAAc,CAAA;AACpB,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;;;;;;;;;;;;;;;;;;;;;;AAE1C,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,AAAsB,AAAC;AAwB/D,eAAeF,aAAa,CACjCG,WAAmB,EACnBC,OAkBC,EACgC;IACjCC,CAAAA,GAAAA,QAAU,AAAe,CAAA,WAAf,CAAC,aAAa,CAAC,CAAC;IAC1BH,OAAO,CAAC,WAAW,CAAC,CAACI,IAAI,CAACH,WAAW,CAAC,CAAC;IAEvC,IAAIC,OAAO,CAACG,KAAK,EAAE;QACjB,MAAM,EAAEC,yBAAyB,CAAA,EAAE,GAAG,MAAM;mDAAO,cAAc;UAAC,AAAC;QACnE,+BAA+B;QAC/B,IAAI,MAAMA,yBAAyB,EAAE,EAAE;YACrC,OAAO,IAAI,CAAC;SACb;QACD,0CAA0C;QAC1C,MAAMC,CAAAA,GAAA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AAW,EAAE;YAChDO,SAAS,EAAEN,OAAO,CAACM,SAAS;SAC7B,CAAC,CAAC;QACH2B,iBAAiB,CAACI,OAAO,CAAC,eAAe,CAAC,CAAC;KAC5C,CAAC,OAAOC,KAAK,EAAE;QACdL,iBAAiB,CAACM,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAC7C,MAAMD,KAAK,CAAC;KACb;IAED,oBAAoB;IACpB,IAAIE,aAAa,GAAY,KAAK,AAAC;IACnC,8GAA8G;IAC9G,IAAIxC,OAAO,CAACM,SAAS,CAACmC,QAAQ,CAAC,KAAK,CAAC,IAAIzC,OAAO,CAACqB,OAAO,IAAIP,eAAe,EAAE;QAC3E,MAAM,EAAE4B,qBAAqB,CAAA,EAAE,GAAG,MAAM;mDAAO,oBAAoB;UAAC,AAAC;QAErEF,aAAa,GAAG,MAAME,qBAAqB,CAAC3C,WAAW,CAAC,CAAC;KAC1D,MAAM;QACLF,KAAK,CAAC,qBAAqB,CAAC,CAAC;KAC9B;IAED,OAAO;QACL8C,WAAW,EAAE,CAAC,CAAC3C,OAAO,CAACqB,OAAO;QAC9BuB,UAAU,EAAE,CAACJ,aAAa;QAC1BlC,SAAS,EAAEN,OAAO,CAACM,SAAS;QAC5BO,kBAAkB;QAClBH,GAAG;KACJ,CAAC;CACH"}
1
+ {"version":3,"sources":["../../../src/prebuild/prebuildAsync.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config';\nimport { ModPlatform } from '@expo/config-plugins';\nimport chalk from 'chalk';\n\nimport { clearNativeFolder, promptToClearMalformedNativeProjectsAsync } from './clearNativeFolder';\nimport { configureProjectAsync } from './configureProjectAsync';\nimport { ensureConfigAsync } from './ensureConfigAsync';\nimport { assertPlatforms, ensureValidPlatforms, resolveTemplateOption } from './resolveOptions';\nimport { updateFromTemplateAsync } from './updateFromTemplate';\nimport { installAsync } from '../install/installAsync';\nimport { Log } from '../log';\nimport { env } from '../utils/env';\nimport { setNodeEnv } from '../utils/nodeEnv';\nimport { clearNodeModulesAsync } from '../utils/nodeModules';\nimport { logNewSection } from '../utils/ora';\nimport { profile } from '../utils/profile';\nimport { confirmAsync } from '../utils/prompts';\n\nconst debug = require('debug')('expo:prebuild') as typeof console.log;\n\nexport type PrebuildResults = {\n /** Expo config. */\n exp: ExpoConfig;\n /** Indicates if the process created new files. */\n hasNewProjectFiles: boolean;\n /** The platforms that were prebuilt. */\n platforms: ModPlatform[];\n /** Indicates if pod install was run. */\n podInstall: boolean;\n /** Indicates if node modules were installed. */\n nodeInstall: boolean;\n};\n\n/**\n * Entry point into the prebuild process, delegates to other helpers to perform various steps.\n *\n * 0. Attempt to clean the project folders.\n * 1. Create native projects (ios, android).\n * 2. Install node modules.\n * 3. Apply config to native projects.\n * 4. Install CocoaPods.\n */\nexport async function prebuildAsync(\n projectRoot: string,\n options: {\n /** Should install node modules and cocoapods. */\n install?: boolean;\n /** List of platforms to prebuild. */\n platforms: ModPlatform[];\n /** Should delete the native folders before attempting to prebuild. */\n clean?: boolean;\n /** URL or file path to the prebuild template. */\n template?: string;\n /** Name of the node package manager to install with. */\n packageManager?: {\n npm?: boolean;\n yarn?: boolean;\n pnpm?: boolean;\n bun?: boolean;\n };\n /** List of node modules to skip updating. */\n skipDependencyUpdate?: string[];\n }\n): Promise<PrebuildResults | null> {\n setNodeEnv('development');\n require('@expo/env').load(projectRoot);\n\n if (options.clean) {\n const { maybeBailOnGitStatusAsync } = await import('../utils/git.js');\n // Clean the project folders...\n if (await maybeBailOnGitStatusAsync()) {\n return null;\n }\n // Clear the native folders before syncing\n await clearNativeFolder(projectRoot, options.platforms);\n } else {\n // Check if the existing project folders are malformed.\n await promptToClearMalformedNativeProjectsAsync(projectRoot, options.platforms);\n }\n\n // Warn if the project is attempting to prebuild an unsupported platform (iOS on Windows).\n options.platforms = ensureValidPlatforms(options.platforms);\n // Assert if no platforms are left over after filtering.\n assertPlatforms(options.platforms);\n\n // Get the Expo config, create it if missing.\n const { exp, pkg } = await ensureConfigAsync(projectRoot, { platforms: options.platforms });\n\n // Create native projects from template.\n const { hasNewProjectFiles, needsPodInstall, changedDependencies } =\n await updateFromTemplateAsync(projectRoot, {\n exp,\n pkg,\n template: options.template != null ? resolveTemplateOption(options.template) : undefined,\n platforms: options.platforms,\n skipDependencyUpdate: options.skipDependencyUpdate,\n });\n\n // Install node modules\n if (options.install) {\n if (changedDependencies.length) {\n if (options.packageManager?.npm) {\n await clearNodeModulesAsync(projectRoot);\n }\n\n Log.log(chalk.gray(chalk`Dependencies in the {bold package.json} changed:`));\n Log.log(chalk.gray(' ' + changedDependencies.join(', ')));\n\n // Installing dependencies is a legacy feature from the unversioned\n // command. We know opt to not change dependencies unless a template\n // indicates a new dependency is required, or if the core dependencies are wrong.\n if (\n await confirmAsync({\n message: `Install the updated dependencies?`,\n initial: true,\n })\n ) {\n await installAsync([], {\n npm: !!options.packageManager?.npm,\n yarn: !!options.packageManager?.yarn,\n pnpm: !!options.packageManager?.pnpm,\n bun: !!options.packageManager?.bun,\n silent: !(env.EXPO_DEBUG || env.CI),\n });\n }\n }\n }\n\n // Apply Expo config to native projects\n const configSyncingStep = logNewSection('Running prebuild');\n try {\n await profile(configureProjectAsync)(projectRoot, {\n platforms: options.platforms,\n exp,\n });\n configSyncingStep.succeed('Finished prebuild');\n } catch (error) {\n configSyncingStep.fail('Prebuild failed');\n throw error;\n }\n\n // Install CocoaPods\n let podsInstalled: boolean = false;\n // err towards running pod install less because it's slow and users can easily run npx pod-install afterwards.\n if (options.platforms.includes('ios') && options.install && needsPodInstall) {\n const { installCocoaPodsAsync } = await import('../utils/cocoapods.js');\n\n podsInstalled = await installCocoaPodsAsync(projectRoot);\n } else {\n debug('Skipped pod install');\n }\n\n return {\n nodeInstall: !!options.install,\n podInstall: !podsInstalled,\n platforms: options.platforms,\n hasNewProjectFiles,\n exp,\n };\n}\n"],"names":["prebuildAsync","debug","require","projectRoot","options","setNodeEnv","load","clean","maybeBailOnGitStatusAsync","clearNativeFolder","platforms","promptToClearMalformedNativeProjectsAsync","ensureValidPlatforms","assertPlatforms","exp","pkg","ensureConfigAsync","hasNewProjectFiles","needsPodInstall","changedDependencies","updateFromTemplateAsync","template","resolveTemplateOption","undefined","skipDependencyUpdate","install","length","packageManager","npm","clearNodeModulesAsync","Log","log","chalk","gray","join","confirmAsync","message","initial","installAsync","yarn","pnpm","bun","silent","env","EXPO_DEBUG","CI","configSyncingStep","logNewSection","profile","configureProjectAsync","succeed","error","fail","podsInstalled","includes","installCocoaPodsAsync","nodeInstall","podInstall"],"mappings":"AAAA;;;;QA0CsBA,aAAa,GAAbA,aAAa;AAxCjB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAEoD,IAAA,kBAAqB,WAArB,qBAAqB,CAAA;AAC5D,IAAA,sBAAyB,WAAzB,yBAAyB,CAAA;AAC7B,IAAA,kBAAqB,WAArB,qBAAqB,CAAA;AACsB,IAAA,eAAkB,WAAlB,kBAAkB,CAAA;AACvD,IAAA,mBAAsB,WAAtB,sBAAsB,CAAA;AACjC,IAAA,aAAyB,WAAzB,yBAAyB,CAAA;AAClC,IAAA,IAAQ,WAAR,QAAQ,CAAA;AACR,IAAA,IAAc,WAAd,cAAc,CAAA;AACP,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;AACP,IAAA,YAAsB,WAAtB,sBAAsB,CAAA;AAC9B,IAAA,IAAc,WAAd,cAAc,CAAA;AACpB,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;AACb,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE/C,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,AAAsB,AAAC;AAwB/D,eAAeF,aAAa,CACjCG,WAAmB,EACnBC,OAkBC,EACgC;IACjCC,CAAAA,GAAAA,QAAU,AAAe,CAAA,WAAf,CAAC,aAAa,CAAC,CAAC;IAC1BH,OAAO,CAAC,WAAW,CAAC,CAACI,IAAI,CAACH,WAAW,CAAC,CAAC;IA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AC,AAAC;QAExEF,aAAa,GAAG,MAAME,qBAAqB,CAACpD,WAAW,CAAC,CAAC;KAC1D,MAAM;QACLF,KAAK,CAAC,qBAAqB,CAAC,CAAC;KAC9B;IAED,OAAO;QACLuD,WAAW,EAAE,CAAC,CAACpD,OAAO,CAACqB,OAAO;QAC9BgC,UAAU,EAAE,CAACJ,aAAa;QAC1B3C,SAAS,EAAEN,OAAO,CAACM,SAAS;QAC5BO,kBAAkB;QAClBH,GAAG;KACJ,CAAC;CACH"}
@@ -98,9 +98,9 @@ function resolvePlatformOption(platform = "all", { loose } = {}) {
98
98
  }
99
99
  }
100
100
  function ensureValidPlatforms(platforms) {
101
- // Skip ejecting for iOS on Windows
101
+ // Skip prebuild for iOS on Windows
102
102
  if (process.platform === "win32" && platforms.includes("ios")) {
103
- Log.warn(_chalk.default`⚠️ Skipping generating the iOS native project files. Run {bold expo eject} again from macOS or Linux to generate the iOS project.\n`);
103
+ Log.warn(_chalk.default`⚠️ Skipping generating the iOS native project files. Run {bold npx expo prebuild} again from macOS or Linux to generate the iOS project.\n`);
104
104
  return platforms.filter((platform)=>platform !== "ios"
105
105
  );
106
106
  }