@expo/cli 0.22.25 → 0.22.26

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 (722) hide show
  1. package/build/bin/cli +91 -93
  2. package/build/bin/cli.map +1 -1
  3. package/build/metro-require/require.js +52 -53
  4. package/build/src/api/endpoint.js +2 -6
  5. package/build/src/api/endpoint.js.map +1 -1
  6. package/build/src/api/getExpoGoIntermediateCertificate.js +3 -5
  7. package/build/src/api/getExpoGoIntermediateCertificate.js.map +1 -1
  8. package/build/src/api/getExpoSchema.js +12 -16
  9. package/build/src/api/getExpoSchema.js.map +1 -1
  10. package/build/src/api/getNativeModuleVersions.js +4 -6
  11. package/build/src/api/getNativeModuleVersions.js.map +1 -1
  12. package/build/src/api/getProjectDevelopmentCertificate.js +3 -5
  13. package/build/src/api/getProjectDevelopmentCertificate.js.map +1 -1
  14. package/build/src/api/getVersions.js +5 -7
  15. package/build/src/api/getVersions.js.map +1 -1
  16. package/build/src/api/graphql/client.js +26 -32
  17. package/build/src/api/graphql/client.js.map +1 -1
  18. package/build/src/api/graphql/queries/AppQuery.js +4 -6
  19. package/build/src/api/graphql/queries/AppQuery.js.map +1 -1
  20. package/build/src/api/graphql/queries/UserQuery.js +3 -5
  21. package/build/src/api/graphql/queries/UserQuery.js.map +1 -1
  22. package/build/src/api/graphql/types/App.js +1 -3
  23. package/build/src/api/graphql/types/App.js.map +1 -1
  24. package/build/src/api/rest/cache/FileSystemResponseCache.js +8 -10
  25. package/build/src/api/rest/cache/FileSystemResponseCache.js.map +1 -1
  26. package/build/src/api/rest/cache/ResponseCache.js +12 -20
  27. package/build/src/api/rest/cache/ResponseCache.js.map +1 -1
  28. package/build/src/api/rest/cache/wrapFetchWithCache.js +11 -13
  29. package/build/src/api/rest/cache/wrapFetchWithCache.js.map +1 -1
  30. package/build/src/api/rest/client.js +35 -53
  31. package/build/src/api/rest/client.js.map +1 -1
  32. package/build/src/api/rest/client.types.js.map +1 -1
  33. package/build/src/api/rest/wrapFetchWithBaseUrl.js +3 -5
  34. package/build/src/api/rest/wrapFetchWithBaseUrl.js.map +1 -1
  35. package/build/src/api/rest/wrapFetchWithOffline.js +3 -5
  36. package/build/src/api/rest/wrapFetchWithOffline.js.map +1 -1
  37. package/build/src/api/rest/wrapFetchWithProgress.js +7 -11
  38. package/build/src/api/rest/wrapFetchWithProgress.js.map +1 -1
  39. package/build/src/api/rest/wrapFetchWithProxy.js +3 -5
  40. package/build/src/api/rest/wrapFetchWithProxy.js.map +1 -1
  41. package/build/src/api/rest/wrapFetchWithUserAgent.js +6 -8
  42. package/build/src/api/rest/wrapFetchWithUserAgent.js.map +1 -1
  43. package/build/src/api/settings.js +5 -7
  44. package/build/src/api/settings.js.map +1 -1
  45. package/build/src/api/updateDevelopmentSession.js +17 -23
  46. package/build/src/api/updateDevelopmentSession.js.map +1 -1
  47. package/build/src/api/user/UserSettings.js +21 -39
  48. package/build/src/api/user/UserSettings.js.map +1 -1
  49. package/build/src/api/user/actions.js +21 -27
  50. package/build/src/api/user/actions.js.map +1 -1
  51. package/build/src/api/user/expoSsoLauncher.js +26 -30
  52. package/build/src/api/user/expoSsoLauncher.js.map +1 -1
  53. package/build/src/api/user/otp.js +29 -35
  54. package/build/src/api/user/otp.js.map +1 -1
  55. package/build/src/api/user/user.js +30 -44
  56. package/build/src/api/user/user.js.map +1 -1
  57. package/build/src/config/configAsync.js +23 -29
  58. package/build/src/config/configAsync.js.map +1 -1
  59. package/build/src/config/index.js +21 -25
  60. package/build/src/config/index.js.map +1 -1
  61. package/build/src/customize/customizeAsync.js +6 -8
  62. package/build/src/customize/customizeAsync.js.map +1 -1
  63. package/build/src/customize/generate.js +16 -20
  64. package/build/src/customize/generate.js.map +1 -1
  65. package/build/src/customize/index.js +12 -14
  66. package/build/src/customize/index.js.map +1 -1
  67. package/build/src/customize/resolveOptions.js +2 -4
  68. package/build/src/customize/resolveOptions.js.map +1 -1
  69. package/build/src/customize/templates.js +54 -58
  70. package/build/src/customize/templates.js.map +1 -1
  71. package/build/src/customize/typescript.js +7 -11
  72. package/build/src/customize/typescript.js.map +1 -1
  73. package/build/src/export/createMetadataJson.js +9 -11
  74. package/build/src/export/createMetadataJson.js.map +1 -1
  75. package/build/src/export/embed/exportEager.js +6 -8
  76. package/build/src/export/embed/exportEager.js.map +1 -1
  77. package/build/src/export/embed/exportEmbedAsync.js +61 -71
  78. package/build/src/export/embed/exportEmbedAsync.js.map +1 -1
  79. package/build/src/export/embed/exportServer.js +55 -57
  80. package/build/src/export/embed/exportServer.js.map +1 -1
  81. package/build/src/export/embed/index.js +40 -44
  82. package/build/src/export/embed/index.js.map +1 -1
  83. package/build/src/export/embed/resolveOptions.js +36 -44
  84. package/build/src/export/embed/resolveOptions.js.map +1 -1
  85. package/build/src/export/embed/xcodeCompilerLogger.js +27 -39
  86. package/build/src/export/embed/xcodeCompilerLogger.js.map +1 -1
  87. package/build/src/export/exportApp.js +63 -67
  88. package/build/src/export/exportApp.js.map +1 -1
  89. package/build/src/export/exportAssets.js +27 -35
  90. package/build/src/export/exportAssets.js.map +1 -1
  91. package/build/src/export/exportAsync.js +9 -13
  92. package/build/src/export/exportAsync.js.map +1 -1
  93. package/build/src/export/exportDomComponents.js +45 -53
  94. package/build/src/export/exportDomComponents.js.map +1 -1
  95. package/build/src/export/exportHermes.js +63 -85
  96. package/build/src/export/exportHermes.js.map +1 -1
  97. package/build/src/export/exportStaticAsync.js +62 -72
  98. package/build/src/export/exportStaticAsync.js.map +1 -1
  99. package/build/src/export/favicon.js +27 -33
  100. package/build/src/export/favicon.js.map +1 -1
  101. package/build/src/export/getPublicExpoManifest.js +5 -7
  102. package/build/src/export/getPublicExpoManifest.js.map +1 -1
  103. package/build/src/export/getResolvedLocales.js +9 -11
  104. package/build/src/export/getResolvedLocales.js.map +1 -1
  105. package/build/src/export/html.js +6 -10
  106. package/build/src/export/html.js.map +1 -1
  107. package/build/src/export/index.js +28 -32
  108. package/build/src/export/index.js.map +1 -1
  109. package/build/src/export/metroAssetLocalPath.js +30 -36
  110. package/build/src/export/metroAssetLocalPath.js.map +1 -1
  111. package/build/src/export/persistMetroAssets.js +34 -42
  112. package/build/src/export/persistMetroAssets.js.map +1 -1
  113. package/build/src/export/publicFolder.js +6 -10
  114. package/build/src/export/publicFolder.js.map +1 -1
  115. package/build/src/export/resolveOptions.js +24 -28
  116. package/build/src/export/resolveOptions.js.map +1 -1
  117. package/build/src/export/saveAssets.js +46 -50
  118. package/build/src/export/saveAssets.js.map +1 -1
  119. package/build/src/export/web/exportWebAsync.js +11 -13
  120. package/build/src/export/web/exportWebAsync.js.map +1 -1
  121. package/build/src/export/web/index.js +15 -19
  122. package/build/src/export/web/index.js.map +1 -1
  123. package/build/src/export/web/resolveOptions.js +3 -5
  124. package/build/src/export/web/resolveOptions.js.map +1 -1
  125. package/build/src/export/writeContents.js +2 -4
  126. package/build/src/export/writeContents.js.map +1 -1
  127. package/build/src/graphql/generated.js +274 -400
  128. package/build/src/graphql/generated.js.map +1 -1
  129. package/build/src/install/applyPlugins.js +7 -11
  130. package/build/src/install/applyPlugins.js.map +1 -1
  131. package/build/src/install/checkPackages.js +22 -26
  132. package/build/src/install/checkPackages.js.map +1 -1
  133. package/build/src/install/fixPackages.js +12 -16
  134. package/build/src/install/fixPackages.js.map +1 -1
  135. package/build/src/install/index.js +16 -18
  136. package/build/src/install/index.js.map +1 -1
  137. package/build/src/install/installAsync.js +26 -32
  138. package/build/src/install/installAsync.js.map +1 -1
  139. package/build/src/install/installExpoPackage.js +18 -22
  140. package/build/src/install/installExpoPackage.js.map +1 -1
  141. package/build/src/install/resolveOptions.js +19 -21
  142. package/build/src/install/resolveOptions.js.map +1 -1
  143. package/build/src/install/utils/autoAddConfigPlugins.js +14 -18
  144. package/build/src/install/utils/autoAddConfigPlugins.js.map +1 -1
  145. package/build/src/install/utils/checkPackagesCompatibility.js +11 -13
  146. package/build/src/install/utils/checkPackagesCompatibility.js.map +1 -1
  147. package/build/src/lint/ESlintPrerequisite.js +44 -50
  148. package/build/src/lint/ESlintPrerequisite.js.map +1 -1
  149. package/build/src/lint/index.js +8 -12
  150. package/build/src/lint/index.js.map +1 -1
  151. package/build/src/lint/lintAsync.js +8 -10
  152. package/build/src/lint/lintAsync.js.map +1 -1
  153. package/build/src/log.js +16 -36
  154. package/build/src/log.js.map +1 -1
  155. package/build/src/login/index.js +20 -24
  156. package/build/src/login/index.js.map +1 -1
  157. package/build/src/logout/index.js +7 -11
  158. package/build/src/logout/index.js.map +1 -1
  159. package/build/src/prebuild/clearNativeFolder.js +26 -38
  160. package/build/src/prebuild/clearNativeFolder.js.map +1 -1
  161. package/build/src/prebuild/configureProjectAsync.js +14 -18
  162. package/build/src/prebuild/configureProjectAsync.js.map +1 -1
  163. package/build/src/prebuild/copyTemplateFiles.js +13 -17
  164. package/build/src/prebuild/copyTemplateFiles.js.map +1 -1
  165. package/build/src/prebuild/ensureConfigAsync.js +4 -6
  166. package/build/src/prebuild/ensureConfigAsync.js.map +1 -1
  167. package/build/src/prebuild/index.js +32 -36
  168. package/build/src/prebuild/index.js.map +1 -1
  169. package/build/src/prebuild/prebuildAsync.js +25 -29
  170. package/build/src/prebuild/prebuildAsync.js.map +1 -1
  171. package/build/src/prebuild/renameTemplateAppName.js +40 -46
  172. package/build/src/prebuild/renameTemplateAppName.js.map +1 -1
  173. package/build/src/prebuild/resolveOptions.js +52 -66
  174. package/build/src/prebuild/resolveOptions.js.map +1 -1
  175. package/build/src/prebuild/resolveTemplate.js +32 -36
  176. package/build/src/prebuild/resolveTemplate.js.map +1 -1
  177. package/build/src/prebuild/updateFromTemplate.js +13 -19
  178. package/build/src/prebuild/updateFromTemplate.js.map +1 -1
  179. package/build/src/prebuild/updatePackageJson.js +39 -53
  180. package/build/src/prebuild/updatePackageJson.js.map +1 -1
  181. package/build/src/prebuild/validateTemplatePlatforms.js +8 -12
  182. package/build/src/prebuild/validateTemplatePlatforms.js.map +1 -1
  183. package/build/src/register/index.js +7 -11
  184. package/build/src/register/index.js.map +1 -1
  185. package/build/src/register/registerAsync.js +3 -5
  186. package/build/src/register/registerAsync.js.map +1 -1
  187. package/build/src/run/android/index.js +32 -36
  188. package/build/src/run/android/index.js.map +1 -1
  189. package/build/src/run/android/resolveDevice.js +8 -10
  190. package/build/src/run/android/resolveDevice.js.map +1 -1
  191. package/build/src/run/android/resolveGradlePropsAsync.js +16 -18
  192. package/build/src/run/android/resolveGradlePropsAsync.js.map +1 -1
  193. package/build/src/run/android/resolveInstallApkName.js +15 -17
  194. package/build/src/run/android/resolveInstallApkName.js.map +1 -1
  195. package/build/src/run/android/resolveLaunchProps.js +10 -12
  196. package/build/src/run/android/resolveLaunchProps.js.map +1 -1
  197. package/build/src/run/android/resolveOptions.js +2 -4
  198. package/build/src/run/android/resolveOptions.js.map +1 -1
  199. package/build/src/run/android/runAndroidAsync.js +21 -23
  200. package/build/src/run/android/runAndroidAsync.js.map +1 -1
  201. package/build/src/run/ensureNativeProject.js +5 -7
  202. package/build/src/run/ensureNativeProject.js.map +1 -1
  203. package/build/src/run/hints.js +7 -13
  204. package/build/src/run/hints.js.map +1 -1
  205. package/build/src/run/index.js +23 -27
  206. package/build/src/run/index.js.map +1 -1
  207. package/build/src/run/ios/XcodeBuild.js +56 -74
  208. package/build/src/run/ios/XcodeBuild.js.map +1 -1
  209. package/build/src/run/ios/XcodeBuild.types.js.map +1 -1
  210. package/build/src/run/ios/appleDevice/AppleDevice.js +63 -69
  211. package/build/src/run/ios/appleDevice/AppleDevice.js.map +1 -1
  212. package/build/src/run/ios/appleDevice/ClientManager.js +26 -29
  213. package/build/src/run/ios/appleDevice/ClientManager.js.map +1 -1
  214. package/build/src/run/ios/appleDevice/client/AFCClient.js +25 -28
  215. package/build/src/run/ios/appleDevice/client/AFCClient.js.map +1 -1
  216. package/build/src/run/ios/appleDevice/client/DebugserverClient.js +26 -29
  217. package/build/src/run/ios/appleDevice/client/DebugserverClient.js.map +1 -1
  218. package/build/src/run/ios/appleDevice/client/InstallationProxyClient.js +21 -22
  219. package/build/src/run/ios/appleDevice/client/InstallationProxyClient.js.map +1 -1
  220. package/build/src/run/ios/appleDevice/client/LockdowndClient.js +29 -32
  221. package/build/src/run/ios/appleDevice/client/LockdowndClient.js.map +1 -1
  222. package/build/src/run/ios/appleDevice/client/MobileImageMounterClient.js +24 -28
  223. package/build/src/run/ios/appleDevice/client/MobileImageMounterClient.js.map +1 -1
  224. package/build/src/run/ios/appleDevice/client/ServiceClient.js +4 -7
  225. package/build/src/run/ios/appleDevice/client/ServiceClient.js.map +1 -1
  226. package/build/src/run/ios/appleDevice/client/UsbmuxdClient.js +27 -28
  227. package/build/src/run/ios/appleDevice/client/UsbmuxdClient.js.map +1 -1
  228. package/build/src/run/ios/appleDevice/installOnDeviceAsync.js +17 -23
  229. package/build/src/run/ios/appleDevice/installOnDeviceAsync.js.map +1 -1
  230. package/build/src/run/ios/appleDevice/protocol/AFCProtocol.js +132 -146
  231. package/build/src/run/ios/appleDevice/protocol/AFCProtocol.js.map +1 -1
  232. package/build/src/run/ios/appleDevice/protocol/AbstractProtocol.js +21 -29
  233. package/build/src/run/ios/appleDevice/protocol/AbstractProtocol.js.map +1 -1
  234. package/build/src/run/ios/appleDevice/protocol/GDBProtocol.js +21 -29
  235. package/build/src/run/ios/appleDevice/protocol/GDBProtocol.js.map +1 -1
  236. package/build/src/run/ios/appleDevice/protocol/LockdownProtocol.js +22 -34
  237. package/build/src/run/ios/appleDevice/protocol/LockdownProtocol.js.map +1 -1
  238. package/build/src/run/ios/appleDevice/protocol/UsbmuxProtocol.js +17 -27
  239. package/build/src/run/ios/appleDevice/protocol/UsbmuxProtocol.js.map +1 -1
  240. package/build/src/run/ios/codeSigning/Security.js +39 -53
  241. package/build/src/run/ios/codeSigning/Security.js.map +1 -1
  242. package/build/src/run/ios/codeSigning/configureCodeSigning.js +9 -13
  243. package/build/src/run/ios/codeSigning/configureCodeSigning.js.map +1 -1
  244. package/build/src/run/ios/codeSigning/resolveCertificateSigningIdentity.js +19 -27
  245. package/build/src/run/ios/codeSigning/resolveCertificateSigningIdentity.js.map +1 -1
  246. package/build/src/run/ios/codeSigning/settings.js +5 -9
  247. package/build/src/run/ios/codeSigning/settings.js.map +1 -1
  248. package/build/src/run/ios/codeSigning/simulatorCodeSigning.js +12 -14
  249. package/build/src/run/ios/codeSigning/simulatorCodeSigning.js.map +1 -1
  250. package/build/src/run/ios/codeSigning/xcodeCodeSigning.js +21 -27
  251. package/build/src/run/ios/codeSigning/xcodeCodeSigning.js.map +1 -1
  252. package/build/src/run/ios/index.js +36 -40
  253. package/build/src/run/ios/index.js.map +1 -1
  254. package/build/src/run/ios/launchApp.js +17 -23
  255. package/build/src/run/ios/launchApp.js.map +1 -1
  256. package/build/src/run/ios/options/appleDestinations.js +36 -38
  257. package/build/src/run/ios/options/appleDestinations.js.map +1 -1
  258. package/build/src/run/ios/options/promptDevice.js +16 -20
  259. package/build/src/run/ios/options/promptDevice.js.map +1 -1
  260. package/build/src/run/ios/options/resolveDevice.js +24 -30
  261. package/build/src/run/ios/options/resolveDevice.js.map +1 -1
  262. package/build/src/run/ios/options/resolveNativeScheme.js +23 -31
  263. package/build/src/run/ios/options/resolveNativeScheme.js.map +1 -1
  264. package/build/src/run/ios/options/resolveOptions.js +5 -7
  265. package/build/src/run/ios/options/resolveOptions.js.map +1 -1
  266. package/build/src/run/ios/options/resolveXcodeProject.js +5 -7
  267. package/build/src/run/ios/options/resolveXcodeProject.js.map +1 -1
  268. package/build/src/run/ios/runIosAsync.js +44 -48
  269. package/build/src/run/ios/runIosAsync.js.map +1 -1
  270. package/build/src/run/ios/validateExternalBinary.js +22 -24
  271. package/build/src/run/ios/validateExternalBinary.js.map +1 -1
  272. package/build/src/run/resolveBundlerProps.js +2 -4
  273. package/build/src/run/resolveBundlerProps.js.map +1 -1
  274. package/build/src/run/startBundler.js +12 -16
  275. package/build/src/run/startBundler.js.map +1 -1
  276. package/build/src/serve/index.js +16 -20
  277. package/build/src/serve/index.js.map +1 -1
  278. package/build/src/serve/serveAsync.js +32 -36
  279. package/build/src/serve/serveAsync.js.map +1 -1
  280. package/build/src/start/detectDevClient.js +9 -13
  281. package/build/src/start/detectDevClient.js.map +1 -1
  282. package/build/src/start/doctor/Prerequisite.js +7 -12
  283. package/build/src/start/doctor/Prerequisite.js.map +1 -1
  284. package/build/src/start/doctor/SecurityBinPrerequisite.js +11 -13
  285. package/build/src/start/doctor/SecurityBinPrerequisite.js.map +1 -1
  286. package/build/src/start/doctor/apple/SimulatorAppPrerequisite.js +19 -23
  287. package/build/src/start/doctor/apple/SimulatorAppPrerequisite.js.map +1 -1
  288. package/build/src/start/doctor/apple/XcodeDeveloperDiskImagePrerequisite.js +19 -23
  289. package/build/src/start/doctor/apple/XcodeDeveloperDiskImagePrerequisite.js.map +1 -1
  290. package/build/src/start/doctor/apple/XcodePrerequisite.js +45 -51
  291. package/build/src/start/doctor/apple/XcodePrerequisite.js.map +1 -1
  292. package/build/src/start/doctor/apple/XcrunPrerequisite.js +16 -18
  293. package/build/src/start/doctor/apple/XcrunPrerequisite.js.map +1 -1
  294. package/build/src/start/doctor/dependencies/bundledNativeModules.js +19 -23
  295. package/build/src/start/doctor/dependencies/bundledNativeModules.js.map +1 -1
  296. package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js +25 -31
  297. package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js.map +1 -1
  298. package/build/src/start/doctor/dependencies/getMissingPackages.js +17 -25
  299. package/build/src/start/doctor/dependencies/getMissingPackages.js.map +1 -1
  300. package/build/src/start/doctor/dependencies/getVersionedPackages.js +32 -40
  301. package/build/src/start/doctor/dependencies/getVersionedPackages.js.map +1 -1
  302. package/build/src/start/doctor/dependencies/resolvePackages.js +26 -32
  303. package/build/src/start/doctor/dependencies/resolvePackages.js.map +1 -1
  304. package/build/src/start/doctor/dependencies/validateDependenciesVersions.js +31 -41
  305. package/build/src/start/doctor/dependencies/validateDependenciesVersions.js.map +1 -1
  306. package/build/src/start/doctor/ngrok/ExternalModule.js +29 -34
  307. package/build/src/start/doctor/ngrok/ExternalModule.js.map +1 -1
  308. package/build/src/start/doctor/ngrok/NgrokResolver.js +8 -12
  309. package/build/src/start/doctor/ngrok/NgrokResolver.js.map +1 -1
  310. package/build/src/start/doctor/typescript/TypeScriptProjectPrerequisite.js +28 -32
  311. package/build/src/start/doctor/typescript/TypeScriptProjectPrerequisite.js.map +1 -1
  312. package/build/src/start/doctor/typescript/updateTSConfig.js +17 -23
  313. package/build/src/start/doctor/typescript/updateTSConfig.js.map +1 -1
  314. package/build/src/start/doctor/web/WebSupportProjectPrerequisite.js +27 -33
  315. package/build/src/start/doctor/web/WebSupportProjectPrerequisite.js.map +1 -1
  316. package/build/src/start/index.js +42 -46
  317. package/build/src/start/index.js.map +1 -1
  318. package/build/src/start/interface/KeyPressHandler.js +14 -18
  319. package/build/src/start/interface/KeyPressHandler.js.map +1 -1
  320. package/build/src/start/interface/commandsTable.js +80 -94
  321. package/build/src/start/interface/commandsTable.js.map +1 -1
  322. package/build/src/start/interface/interactiveActions.js +40 -44
  323. package/build/src/start/interface/interactiveActions.js.map +1 -1
  324. package/build/src/start/interface/startInterface.js +61 -65
  325. package/build/src/start/interface/startInterface.js.map +1 -1
  326. package/build/src/start/platforms/AppIdResolver.js +4 -6
  327. package/build/src/start/platforms/AppIdResolver.js.map +1 -1
  328. package/build/src/start/platforms/DeviceManager.js +6 -10
  329. package/build/src/start/platforms/DeviceManager.js.map +1 -1
  330. package/build/src/start/platforms/ExpoGoInstaller.js +20 -25
  331. package/build/src/start/platforms/ExpoGoInstaller.js.map +1 -1
  332. package/build/src/start/platforms/PlatformManager.js +15 -17
  333. package/build/src/start/platforms/PlatformManager.js.map +1 -1
  334. package/build/src/start/platforms/android/ADBServer.js +35 -39
  335. package/build/src/start/platforms/android/ADBServer.js.map +1 -1
  336. package/build/src/start/platforms/android/AndroidAppIdResolver.js +16 -18
  337. package/build/src/start/platforms/android/AndroidAppIdResolver.js.map +1 -1
  338. package/build/src/start/platforms/android/AndroidDeviceManager.js +20 -24
  339. package/build/src/start/platforms/android/AndroidDeviceManager.js.map +1 -1
  340. package/build/src/start/platforms/android/AndroidPlatformManager.js +17 -17
  341. package/build/src/start/platforms/android/AndroidPlatformManager.js.map +1 -1
  342. package/build/src/start/platforms/android/AndroidSdk.js +9 -11
  343. package/build/src/start/platforms/android/AndroidSdk.js.map +1 -1
  344. package/build/src/start/platforms/android/activateWindow.js +22 -26
  345. package/build/src/start/platforms/android/activateWindow.js.map +1 -1
  346. package/build/src/start/platforms/android/adb.js +83 -121
  347. package/build/src/start/platforms/android/adb.js.map +1 -1
  348. package/build/src/start/platforms/android/adbReverse.js +12 -20
  349. package/build/src/start/platforms/android/adbReverse.js.map +1 -1
  350. package/build/src/start/platforms/android/emulator.js +26 -36
  351. package/build/src/start/platforms/android/emulator.js.map +1 -1
  352. package/build/src/start/platforms/android/getDevices.js +5 -7
  353. package/build/src/start/platforms/android/getDevices.js.map +1 -1
  354. package/build/src/start/platforms/android/gradle.js +28 -36
  355. package/build/src/start/platforms/android/gradle.js.map +1 -1
  356. package/build/src/start/platforms/android/promptAndroidDevice.js +15 -19
  357. package/build/src/start/platforms/android/promptAndroidDevice.js.map +1 -1
  358. package/build/src/start/platforms/ios/AppleAppIdResolver.js +19 -21
  359. package/build/src/start/platforms/ios/AppleAppIdResolver.js.map +1 -1
  360. package/build/src/start/platforms/ios/AppleDeviceManager.js +31 -37
  361. package/build/src/start/platforms/ios/AppleDeviceManager.js.map +1 -1
  362. package/build/src/start/platforms/ios/ApplePlatformManager.js +12 -12
  363. package/build/src/start/platforms/ios/ApplePlatformManager.js.map +1 -1
  364. package/build/src/start/platforms/ios/assertSystemRequirements.js +7 -9
  365. package/build/src/start/platforms/ios/assertSystemRequirements.js.map +1 -1
  366. package/build/src/start/platforms/ios/devicectl.js +73 -87
  367. package/build/src/start/platforms/ios/devicectl.js.map +1 -1
  368. package/build/src/start/platforms/ios/ensureSimulatorAppRunning.js +18 -22
  369. package/build/src/start/platforms/ios/ensureSimulatorAppRunning.js.map +1 -1
  370. package/build/src/start/platforms/ios/getBestSimulator.js +19 -29
  371. package/build/src/start/platforms/ios/getBestSimulator.js.map +1 -1
  372. package/build/src/start/platforms/ios/promptAppleDevice.js +10 -14
  373. package/build/src/start/platforms/ios/promptAppleDevice.js.map +1 -1
  374. package/build/src/start/platforms/ios/simctl.js +74 -102
  375. package/build/src/start/platforms/ios/simctl.js.map +1 -1
  376. package/build/src/start/platforms/ios/simctlLogging.js +52 -57
  377. package/build/src/start/platforms/ios/simctlLogging.js.map +1 -1
  378. package/build/src/start/platforms/ios/xcrun.js +18 -22
  379. package/build/src/start/platforms/ios/xcrun.js.map +1 -1
  380. package/build/src/start/project/devices.js +9 -19
  381. package/build/src/start/project/devices.js.map +1 -1
  382. package/build/src/start/project/dotExpo.js +11 -15
  383. package/build/src/start/project/dotExpo.js.map +1 -1
  384. package/build/src/start/project/settings.js +2 -4
  385. package/build/src/start/project/settings.js.map +1 -1
  386. package/build/src/start/resolveOptions.js +40 -48
  387. package/build/src/start/resolveOptions.js.map +1 -1
  388. package/build/src/start/server/AsyncNgrok.js +51 -55
  389. package/build/src/start/server/AsyncNgrok.js.map +1 -1
  390. package/build/src/start/server/AsyncWsTunnel.js +36 -40
  391. package/build/src/start/server/AsyncWsTunnel.js.map +1 -1
  392. package/build/src/start/server/BundlerDevServer.js +79 -81
  393. package/build/src/start/server/BundlerDevServer.js.map +1 -1
  394. package/build/src/start/server/DevServerManager.js +38 -42
  395. package/build/src/start/server/DevServerManager.js.map +1 -1
  396. package/build/src/start/server/DevToolsPluginManager.js +14 -18
  397. package/build/src/start/server/DevToolsPluginManager.js.map +1 -1
  398. package/build/src/start/server/DevelopmentSession.js +14 -18
  399. package/build/src/start/server/DevelopmentSession.js.map +1 -1
  400. package/build/src/start/server/ReactDevToolsProxy.js +10 -16
  401. package/build/src/start/server/ReactDevToolsProxy.js.map +1 -1
  402. package/build/src/start/server/UrlCreator.js +33 -36
  403. package/build/src/start/server/UrlCreator.js.map +1 -1
  404. package/build/src/start/server/getStaticRenderFunctions.js +21 -29
  405. package/build/src/start/server/getStaticRenderFunctions.js.map +1 -1
  406. package/build/src/start/server/metro/DevToolsPluginWebsocketEndpoint.js +4 -6
  407. package/build/src/start/server/metro/DevToolsPluginWebsocketEndpoint.js.map +1 -1
  408. package/build/src/start/server/metro/MetroBundlerDevServer.js +271 -269
  409. package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
  410. package/build/src/start/server/metro/MetroTerminalReporter.js +56 -63
  411. package/build/src/start/server/metro/MetroTerminalReporter.js.map +1 -1
  412. package/build/src/start/server/metro/TerminalReporter.js +33 -39
  413. package/build/src/start/server/metro/TerminalReporter.js.map +1 -1
  414. package/build/src/start/server/metro/TerminalReporter.types.js.map +1 -1
  415. package/build/src/start/server/metro/createExpoMetroResolver.js +40 -46
  416. package/build/src/start/server/metro/createExpoMetroResolver.js.map +1 -1
  417. package/build/src/start/server/metro/createJResolver.js +28 -32
  418. package/build/src/start/server/metro/createJResolver.js.map +1 -1
  419. package/build/src/start/server/metro/createServerComponentsMiddleware.js +92 -96
  420. package/build/src/start/server/metro/createServerComponentsMiddleware.js.map +1 -1
  421. package/build/src/start/server/metro/createServerRouteMiddleware.js +30 -32
  422. package/build/src/start/server/metro/createServerRouteMiddleware.js.map +1 -1
  423. package/build/src/start/server/metro/debugging/AtlasPrerequisite.js +11 -13
  424. package/build/src/start/server/metro/debugging/AtlasPrerequisite.js.map +1 -1
  425. package/build/src/start/server/metro/debugging/MessageHandler.js +1 -3
  426. package/build/src/start/server/metro/debugging/MessageHandler.js.map +1 -1
  427. package/build/src/start/server/metro/debugging/attachAtlas.js +22 -26
  428. package/build/src/start/server/metro/debugging/attachAtlas.js.map +1 -1
  429. package/build/src/start/server/metro/debugging/createDebugMiddleware.js +17 -19
  430. package/build/src/start/server/metro/debugging/createDebugMiddleware.js.map +1 -1
  431. package/build/src/start/server/metro/debugging/createHandlersFactory.js +31 -25
  432. package/build/src/start/server/metro/debugging/createHandlersFactory.js.map +1 -1
  433. package/build/src/start/server/metro/debugging/getDebuggerType.js +4 -6
  434. package/build/src/start/server/metro/debugging/getDebuggerType.js.map +1 -1
  435. package/build/src/start/server/metro/debugging/messageHandlers/NetworkResponse.js +8 -14
  436. package/build/src/start/server/metro/debugging/messageHandlers/NetworkResponse.js.map +1 -1
  437. package/build/src/start/server/metro/debugging/messageHandlers/VscodeDebuggerGetPossibleBreakpoints.js +5 -7
  438. package/build/src/start/server/metro/debugging/messageHandlers/VscodeDebuggerGetPossibleBreakpoints.js.map +1 -1
  439. package/build/src/start/server/metro/debugging/messageHandlers/VscodeDebuggerSetBreakpointByUrl.js +6 -8
  440. package/build/src/start/server/metro/debugging/messageHandlers/VscodeDebuggerSetBreakpointByUrl.js.map +1 -1
  441. package/build/src/start/server/metro/debugging/messageHandlers/VscodeRuntimeCallFunctionOn.js +5 -7
  442. package/build/src/start/server/metro/debugging/messageHandlers/VscodeRuntimeCallFunctionOn.js.map +1 -1
  443. package/build/src/start/server/metro/debugging/messageHandlers/VscodeRuntimeEvaluate.js +12 -14
  444. package/build/src/start/server/metro/debugging/messageHandlers/VscodeRuntimeEvaluate.js.map +1 -1
  445. package/build/src/start/server/metro/debugging/messageHandlers/VscodeRuntimeGetProperties.js +10 -14
  446. package/build/src/start/server/metro/debugging/messageHandlers/VscodeRuntimeGetProperties.js.map +1 -1
  447. package/build/src/start/server/metro/debugging/pageIsSupported.js +4 -6
  448. package/build/src/start/server/metro/debugging/pageIsSupported.js.map +1 -1
  449. package/build/src/start/server/metro/debugging/types.js.map +1 -1
  450. package/build/src/start/server/metro/dev-server/createEventSocket.js +16 -18
  451. package/build/src/start/server/metro/dev-server/createEventSocket.js.map +1 -1
  452. package/build/src/start/server/metro/dev-server/createMessageSocket.js +21 -23
  453. package/build/src/start/server/metro/dev-server/createMessageSocket.js.map +1 -1
  454. package/build/src/start/server/metro/dev-server/createMetroMiddleware.js +21 -23
  455. package/build/src/start/server/metro/dev-server/createMetroMiddleware.js.map +1 -1
  456. package/build/src/start/server/metro/dev-server/utils/createSocketBroadcaster.js +2 -4
  457. package/build/src/start/server/metro/dev-server/utils/createSocketBroadcaster.js.map +1 -1
  458. package/build/src/start/server/metro/dev-server/utils/createSocketMap.js +2 -4
  459. package/build/src/start/server/metro/dev-server/utils/createSocketMap.js.map +1 -1
  460. package/build/src/start/server/metro/dev-server/utils/socketMessages.js +4 -8
  461. package/build/src/start/server/metro/dev-server/utils/socketMessages.js.map +1 -1
  462. package/build/src/start/server/metro/externals.js +25 -33
  463. package/build/src/start/server/metro/externals.js.map +1 -1
  464. package/build/src/start/server/metro/fetchRouterManifest.js +12 -16
  465. package/build/src/start/server/metro/fetchRouterManifest.js.map +1 -1
  466. package/build/src/start/server/metro/formatFileCandidates.js +9 -11
  467. package/build/src/start/server/metro/formatFileCandidates.js.map +1 -1
  468. package/build/src/start/server/metro/getCssModulesFromBundler.js +18 -22
  469. package/build/src/start/server/metro/getCssModulesFromBundler.js.map +1 -1
  470. package/build/src/start/server/metro/instantiateMetro.js +79 -85
  471. package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
  472. package/build/src/start/server/metro/log-box/LogBoxLog.js +36 -40
  473. package/build/src/start/server/metro/log-box/LogBoxLog.js.map +1 -1
  474. package/build/src/start/server/metro/log-box/LogBoxSymbolication.js +14 -20
  475. package/build/src/start/server/metro/log-box/LogBoxSymbolication.js.map +1 -1
  476. package/build/src/start/server/metro/log-box/formatProjectFilePath.js +6 -10
  477. package/build/src/start/server/metro/log-box/formatProjectFilePath.js.map +1 -1
  478. package/build/src/start/server/metro/metroErrorInterface.js +78 -88
  479. package/build/src/start/server/metro/metroErrorInterface.js.map +1 -1
  480. package/build/src/start/server/metro/metroErrors.js +4 -8
  481. package/build/src/start/server/metro/metroErrors.js.map +1 -1
  482. package/build/src/start/server/metro/metroPrivateServer.js +7 -9
  483. package/build/src/start/server/metro/metroPrivateServer.js.map +1 -1
  484. package/build/src/start/server/metro/metroVirtualModules.js +8 -10
  485. package/build/src/start/server/metro/metroVirtualModules.js.map +1 -1
  486. package/build/src/start/server/metro/metroWatchTypeScriptFiles.js +22 -24
  487. package/build/src/start/server/metro/metroWatchTypeScriptFiles.js.map +1 -1
  488. package/build/src/start/server/metro/router.js +32 -48
  489. package/build/src/start/server/metro/router.js.map +1 -1
  490. package/build/src/start/server/metro/runServer-fork.js +22 -24
  491. package/build/src/start/server/metro/runServer-fork.js.map +1 -1
  492. package/build/src/start/server/metro/serializeHtml.js +22 -24
  493. package/build/src/start/server/metro/serializeHtml.js.map +1 -1
  494. package/build/src/start/server/metro/symbolicate.js.map +1 -1
  495. package/build/src/start/server/metro/waitForMetroToObserveTypeScriptFile.js +29 -35
  496. package/build/src/start/server/metro/waitForMetroToObserveTypeScriptFile.js.map +1 -1
  497. package/build/src/start/server/metro/withMetroMultiPlatform.js +139 -149
  498. package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -1
  499. package/build/src/start/server/metro/withMetroResolvers.js +39 -49
  500. package/build/src/start/server/metro/withMetroResolvers.js.map +1 -1
  501. package/build/src/start/server/middleware/ContextModuleSourceMapsMiddleware.js +6 -8
  502. package/build/src/start/server/middleware/ContextModuleSourceMapsMiddleware.js.map +1 -1
  503. package/build/src/start/server/middleware/CorsMiddleware.js +15 -17
  504. package/build/src/start/server/middleware/CorsMiddleware.js.map +1 -1
  505. package/build/src/start/server/middleware/CreateFileMiddleware.js +31 -32
  506. package/build/src/start/server/middleware/CreateFileMiddleware.js.map +1 -1
  507. package/build/src/start/server/middleware/DevToolsPluginMiddleware.js +19 -22
  508. package/build/src/start/server/middleware/DevToolsPluginMiddleware.js.map +1 -1
  509. package/build/src/start/server/middleware/DomComponentsMiddleware.js +27 -33
  510. package/build/src/start/server/middleware/DomComponentsMiddleware.js.map +1 -1
  511. package/build/src/start/server/middleware/ExpoGoManifestHandlerMiddleware.js +60 -64
  512. package/build/src/start/server/middleware/ExpoGoManifestHandlerMiddleware.js.map +1 -1
  513. package/build/src/start/server/middleware/ExpoMiddleware.js +9 -15
  514. package/build/src/start/server/middleware/ExpoMiddleware.js.map +1 -1
  515. package/build/src/start/server/middleware/FaviconMiddleware.js +14 -15
  516. package/build/src/start/server/middleware/FaviconMiddleware.js.map +1 -1
  517. package/build/src/start/server/middleware/HistoryFallbackMiddleware.js +2 -4
  518. package/build/src/start/server/middleware/HistoryFallbackMiddleware.js.map +1 -1
  519. package/build/src/start/server/middleware/InterstitialPageMiddleware.js +31 -34
  520. package/build/src/start/server/middleware/InterstitialPageMiddleware.js.map +1 -1
  521. package/build/src/start/server/middleware/ManifestMiddleware.js +56 -64
  522. package/build/src/start/server/middleware/ManifestMiddleware.js.map +1 -1
  523. package/build/src/start/server/middleware/ReactDevToolsPageMiddleware.js +19 -23
  524. package/build/src/start/server/middleware/ReactDevToolsPageMiddleware.js.map +1 -1
  525. package/build/src/start/server/middleware/RuntimeRedirectMiddleware.js +19 -20
  526. package/build/src/start/server/middleware/RuntimeRedirectMiddleware.js.map +1 -1
  527. package/build/src/start/server/middleware/ServeStaticMiddleware.js +9 -11
  528. package/build/src/start/server/middleware/ServeStaticMiddleware.js.map +1 -1
  529. package/build/src/start/server/middleware/createBuiltinAPIRequestHandler.js +11 -17
  530. package/build/src/start/server/middleware/createBuiltinAPIRequestHandler.js.map +1 -1
  531. package/build/src/start/server/middleware/inspector/CdpClient.js +10 -12
  532. package/build/src/start/server/middleware/inspector/CdpClient.js.map +1 -1
  533. package/build/src/start/server/middleware/inspector/JsInspector.js +27 -35
  534. package/build/src/start/server/middleware/inspector/JsInspector.js.map +1 -1
  535. package/build/src/start/server/middleware/inspector/createJsInspectorMiddleware.js +19 -21
  536. package/build/src/start/server/middleware/inspector/createJsInspectorMiddleware.js.map +1 -1
  537. package/build/src/start/server/middleware/inspector/middlwareMutations.js +2 -6
  538. package/build/src/start/server/middleware/inspector/middlwareMutations.js.map +1 -1
  539. package/build/src/start/server/middleware/metroOptions.js +96 -120
  540. package/build/src/start/server/middleware/metroOptions.js.map +1 -1
  541. package/build/src/start/server/middleware/mutations.js +3 -7
  542. package/build/src/start/server/middleware/mutations.js.map +1 -1
  543. package/build/src/start/server/middleware/resolveAssets.js +18 -26
  544. package/build/src/start/server/middleware/resolveAssets.js.map +1 -1
  545. package/build/src/start/server/middleware/resolvePlatform.js +15 -23
  546. package/build/src/start/server/middleware/resolvePlatform.js.map +1 -1
  547. package/build/src/start/server/middleware/resolveRuntimeVersionWithExpoUpdatesAsync.js +9 -11
  548. package/build/src/start/server/middleware/resolveRuntimeVersionWithExpoUpdatesAsync.js.map +1 -1
  549. package/build/src/start/server/middleware/server.types.js.map +1 -1
  550. package/build/src/start/server/openPlatforms.js +8 -10
  551. package/build/src/start/server/openPlatforms.js.map +1 -1
  552. package/build/src/start/server/platformBundlers.js +11 -13
  553. package/build/src/start/server/platformBundlers.js.map +1 -1
  554. package/build/src/start/server/serverLogLikeMetro.js +50 -58
  555. package/build/src/start/server/serverLogLikeMetro.js.map +1 -1
  556. package/build/src/start/server/type-generation/expo-env.js +7 -11
  557. package/build/src/start/server/type-generation/expo-env.js.map +1 -1
  558. package/build/src/start/server/type-generation/routes.js +54 -76
  559. package/build/src/start/server/type-generation/routes.js.map +1 -1
  560. package/build/src/start/server/type-generation/startTypescriptTypeGeneration.js +19 -21
  561. package/build/src/start/server/type-generation/startTypescriptTypeGeneration.js.map +1 -1
  562. package/build/src/start/server/type-generation/tsconfig.js +28 -36
  563. package/build/src/start/server/type-generation/tsconfig.js.map +1 -1
  564. package/build/src/start/server/webTemplate.js +24 -28
  565. package/build/src/start/server/webTemplate.js.map +1 -1
  566. package/build/src/start/server/webpack/WebpackBundlerDevServer.js +46 -52
  567. package/build/src/start/server/webpack/WebpackBundlerDevServer.js.map +1 -1
  568. package/build/src/start/server/webpack/compile.js +11 -15
  569. package/build/src/start/server/webpack/compile.js.map +1 -1
  570. package/build/src/start/server/webpack/formatWebpackMessages.js +26 -28
  571. package/build/src/start/server/webpack/formatWebpackMessages.js.map +1 -1
  572. package/build/src/start/server/webpack/resolveFromProject.js +12 -18
  573. package/build/src/start/server/webpack/resolveFromProject.js.map +1 -1
  574. package/build/src/start/server/webpack/tls.js +12 -18
  575. package/build/src/start/server/webpack/tls.js.map +1 -1
  576. package/build/src/start/startAsync.js +27 -31
  577. package/build/src/start/startAsync.js.map +1 -1
  578. package/build/src/utils/FileNotifier.js +17 -20
  579. package/build/src/utils/FileNotifier.js.map +1 -1
  580. package/build/src/utils/ansi.js +5 -7
  581. package/build/src/utils/ansi.js.map +1 -1
  582. package/build/src/utils/args.js +14 -24
  583. package/build/src/utils/args.js.map +1 -1
  584. package/build/src/utils/array.js +6 -18
  585. package/build/src/utils/array.js.map +1 -1
  586. package/build/src/utils/cocoapods.js +46 -54
  587. package/build/src/utils/cocoapods.js.map +1 -1
  588. package/build/src/utils/codesigning.js +68 -78
  589. package/build/src/utils/codesigning.js.map +1 -1
  590. package/build/src/utils/createFileTransform.js +12 -16
  591. package/build/src/utils/createFileTransform.js.map +1 -1
  592. package/build/src/utils/createTempPath.js +13 -17
  593. package/build/src/utils/createTempPath.js.map +1 -1
  594. package/build/src/utils/delay.js +6 -12
  595. package/build/src/utils/delay.js.map +1 -1
  596. package/build/src/utils/dir.js +28 -46
  597. package/build/src/utils/dir.js.map +1 -1
  598. package/build/src/utils/downloadAppAsync.js +8 -10
  599. package/build/src/utils/downloadAppAsync.js.map +1 -1
  600. package/build/src/utils/downloadExpoGoAsync.js +21 -25
  601. package/build/src/utils/downloadExpoGoAsync.js.map +1 -1
  602. package/build/src/utils/editor.js +35 -41
  603. package/build/src/utils/editor.js.map +1 -1
  604. package/build/src/utils/env.js +59 -63
  605. package/build/src/utils/env.js.map +1 -1
  606. package/build/src/utils/errors.js +30 -37
  607. package/build/src/utils/errors.js.map +1 -1
  608. package/build/src/utils/exit.js +31 -35
  609. package/build/src/utils/exit.js.map +1 -1
  610. package/build/src/utils/expoUpdatesCli.js +22 -32
  611. package/build/src/utils/expoUpdatesCli.js.map +1 -1
  612. package/build/src/utils/fetch.js +4 -8
  613. package/build/src/utils/fetch.js.map +1 -1
  614. package/build/src/utils/filePath.js +6 -10
  615. package/build/src/utils/filePath.js.map +1 -1
  616. package/build/src/utils/findUp.js +9 -13
  617. package/build/src/utils/findUp.js.map +1 -1
  618. package/build/src/utils/fn.js +2 -6
  619. package/build/src/utils/fn.js.map +1 -1
  620. package/build/src/utils/getOrPromptApplicationId.js +26 -32
  621. package/build/src/utils/getOrPromptApplicationId.js.map +1 -1
  622. package/build/src/utils/getRunningProcess.js +21 -29
  623. package/build/src/utils/getRunningProcess.js.map +1 -1
  624. package/build/src/utils/git.js +20 -26
  625. package/build/src/utils/git.js.map +1 -1
  626. package/build/src/utils/glob.js +4 -8
  627. package/build/src/utils/glob.js.map +1 -1
  628. package/build/src/utils/interactive.js +1 -3
  629. package/build/src/utils/interactive.js.map +1 -1
  630. package/build/src/utils/ip.js +19 -21
  631. package/build/src/utils/ip.js.map +1 -1
  632. package/build/src/utils/isModuleSymlinked.js +9 -11
  633. package/build/src/utils/isModuleSymlinked.js.map +1 -1
  634. package/build/src/utils/jsonSchemaDeref.js +18 -20
  635. package/build/src/utils/jsonSchemaDeref.js.map +1 -1
  636. package/build/src/utils/link.js +13 -17
  637. package/build/src/utils/link.js.map +1 -1
  638. package/build/src/utils/mergeGitIgnorePaths.js +28 -46
  639. package/build/src/utils/mergeGitIgnorePaths.js.map +1 -1
  640. package/build/src/utils/modifyConfigAsync.js +10 -16
  641. package/build/src/utils/modifyConfigAsync.js.map +1 -1
  642. package/build/src/utils/modifyConfigPlugins.js +6 -10
  643. package/build/src/utils/modifyConfigPlugins.js.map +1 -1
  644. package/build/src/utils/nodeEnv.js +6 -12
  645. package/build/src/utils/nodeEnv.js.map +1 -1
  646. package/build/src/utils/nodeModules.js +8 -10
  647. package/build/src/utils/nodeModules.js.map +1 -1
  648. package/build/src/utils/npm.js +36 -50
  649. package/build/src/utils/npm.js.map +1 -1
  650. package/build/src/utils/obj.js +5 -11
  651. package/build/src/utils/obj.js.map +1 -1
  652. package/build/src/utils/open.js +8 -10
  653. package/build/src/utils/open.js.map +1 -1
  654. package/build/src/utils/ora.js +7 -13
  655. package/build/src/utils/ora.js.map +1 -1
  656. package/build/src/utils/plist.js +15 -21
  657. package/build/src/utils/plist.js.map +1 -1
  658. package/build/src/utils/port.js +33 -43
  659. package/build/src/utils/port.js.map +1 -1
  660. package/build/src/utils/profile.js +7 -11
  661. package/build/src/utils/profile.js.map +1 -1
  662. package/build/src/utils/progress.js +5 -11
  663. package/build/src/utils/progress.js.map +1 -1
  664. package/build/src/utils/prompts.js +29 -47
  665. package/build/src/utils/prompts.js.map +1 -1
  666. package/build/src/utils/resolveArgs.js +24 -36
  667. package/build/src/utils/resolveArgs.js.map +1 -1
  668. package/build/src/utils/scheme.js +32 -40
  669. package/build/src/utils/scheme.js.map +1 -1
  670. package/build/src/utils/stream.js +3 -5
  671. package/build/src/utils/stream.js.map +1 -1
  672. package/build/src/utils/strings.js +4 -6
  673. package/build/src/utils/strings.js.map +1 -1
  674. package/build/src/utils/tar.js +15 -19
  675. package/build/src/utils/tar.js.map +1 -1
  676. package/build/src/utils/telemetry/Telemetry.js +27 -29
  677. package/build/src/utils/telemetry/Telemetry.js.map +1 -1
  678. package/build/src/utils/telemetry/clients/FetchClient.js +13 -15
  679. package/build/src/utils/telemetry/clients/FetchClient.js.map +1 -1
  680. package/build/src/utils/telemetry/clients/FetchDetachedClient.js +22 -26
  681. package/build/src/utils/telemetry/clients/FetchDetachedClient.js.map +1 -1
  682. package/build/src/utils/telemetry/clients/RudderClient.js +8 -10
  683. package/build/src/utils/telemetry/clients/RudderClient.js.map +1 -1
  684. package/build/src/utils/telemetry/clients/RudderDetachedClient.js +22 -26
  685. package/build/src/utils/telemetry/clients/RudderDetachedClient.js.map +1 -1
  686. package/build/src/utils/telemetry/clients/flushFetchDetached.js +10 -10
  687. package/build/src/utils/telemetry/clients/flushFetchDetached.js.map +1 -1
  688. package/build/src/utils/telemetry/clients/flushRudderDetached.js +10 -10
  689. package/build/src/utils/telemetry/clients/flushRudderDetached.js.map +1 -1
  690. package/build/src/utils/telemetry/events.js +2 -4
  691. package/build/src/utils/telemetry/events.js.map +1 -1
  692. package/build/src/utils/telemetry/flushDetached.js.map +1 -1
  693. package/build/src/utils/telemetry/index.js +29 -25
  694. package/build/src/utils/telemetry/index.js.map +1 -1
  695. package/build/src/utils/telemetry/types.js.map +1 -1
  696. package/build/src/utils/telemetry/utils/constants.js +4 -8
  697. package/build/src/utils/telemetry/utils/constants.js.map +1 -1
  698. package/build/src/utils/telemetry/utils/context.js +14 -18
  699. package/build/src/utils/telemetry/utils/context.js.map +1 -1
  700. package/build/src/utils/template.js +4 -6
  701. package/build/src/utils/template.js.map +1 -1
  702. package/build/src/utils/terminal.js +2 -4
  703. package/build/src/utils/terminal.js.map +1 -1
  704. package/build/src/utils/tsconfig/evaluateTsConfig.js +17 -21
  705. package/build/src/utils/tsconfig/evaluateTsConfig.js.map +1 -1
  706. package/build/src/utils/tsconfig/loadTsConfigPaths.js +14 -18
  707. package/build/src/utils/tsconfig/loadTsConfigPaths.js.map +1 -1
  708. package/build/src/utils/tsconfig/matchTsConfigPathAlias.js +5 -7
  709. package/build/src/utils/tsconfig/matchTsConfigPathAlias.js.map +1 -1
  710. package/build/src/utils/tsconfig/resolveWithTsConfigPaths.js +12 -14
  711. package/build/src/utils/tsconfig/resolveWithTsConfigPaths.js.map +1 -1
  712. package/build/src/utils/url.js +13 -23
  713. package/build/src/utils/url.js.map +1 -1
  714. package/build/src/utils/validateApplicationId.js +86 -108
  715. package/build/src/utils/validateApplicationId.js.map +1 -1
  716. package/build/src/utils/variadic.js +16 -22
  717. package/build/src/utils/variadic.js.map +1 -1
  718. package/build/src/whoami/index.js +7 -11
  719. package/build/src/whoami/index.js.map +1 -1
  720. package/build/src/whoami/whoamiAsync.js +7 -11
  721. package/build/src/whoami/whoamiAsync.js.map +1 -1
  722. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/run/ios/options/resolveNativeScheme.ts"],"sourcesContent":["import { IOSConfig } from '@expo/config-plugins';\nimport chalk from 'chalk';\nimport path from 'path';\n\nimport * as Log from '../../../log';\nimport { CommandError } from '../../../utils/errors';\nimport { profile } from '../../../utils/profile';\nimport { selectAsync } from '../../../utils/prompts';\nimport { Options, ProjectInfo, XcodeConfiguration } from '../XcodeBuild.types';\n\nconst debug = require('debug')('expo:run:ios:options:resolveNativeScheme') as typeof console.log;\n\ntype NativeSchemeProps = {\n name: string;\n osType?: string;\n};\n\nexport async function resolveNativeSchemePropsAsync(\n projectRoot: string,\n options: Pick<Options, 'scheme' | 'configuration'>,\n xcodeProject: ProjectInfo\n): Promise<NativeSchemeProps> {\n return (\n (await promptOrQueryNativeSchemeAsync(projectRoot, options)) ??\n getDefaultNativeScheme(projectRoot, options, xcodeProject)\n );\n}\n\n/** Resolve the native iOS build `scheme` for a given `configuration`. If the `scheme` isn't provided then the user will be prompted to select one. */\nexport async function promptOrQueryNativeSchemeAsync(\n projectRoot: string,\n { scheme, configuration }: { scheme?: string | boolean; configuration?: XcodeConfiguration }\n): Promise<NativeSchemeProps | null> {\n const schemes = IOSConfig.BuildScheme.getRunnableSchemesFromXcodeproj(projectRoot, {\n configuration,\n });\n\n if (!schemes.length) {\n throw new CommandError('IOS_MALFORMED', 'No native iOS build schemes found');\n }\n\n if (scheme === true) {\n if (schemes.length === 1) {\n Log.log(`Auto selecting only available scheme: ${schemes[0].name}`);\n return schemes[0];\n }\n const resolvedSchemeName = await selectAsync(\n 'Select a scheme',\n schemes.map((value) => {\n const isApp =\n value.type === IOSConfig.Target.TargetType.APPLICATION && value.osType === 'iOS';\n return {\n value: value.name,\n title: isApp ? chalk.bold(value.name) + chalk.gray(' (app)') : value.name,\n };\n }),\n {\n nonInteractiveHelp: `--scheme: argument must be provided with a string in non-interactive mode. Valid choices are: ${schemes.join(\n ', '\n )}`,\n }\n );\n return schemes.find(({ name }) => resolvedSchemeName === name) ?? null;\n }\n // Attempt to match the schemes up so we can open the correct simulator\n return scheme ? schemes.find(({ name }) => name === scheme) || { name: scheme } : null;\n}\n\nexport function getDefaultNativeScheme(\n projectRoot: string,\n options: Pick<Options, 'configuration'>,\n xcodeProject: Pick<ProjectInfo, 'name'>\n): NativeSchemeProps {\n // If the resolution failed then we should just use the first runnable scheme that\n // matches the provided configuration.\n const resolvedSchemes = profile(IOSConfig.BuildScheme.getRunnableSchemesFromXcodeproj)(\n projectRoot,\n {\n configuration: options.configuration,\n }\n );\n\n // If there are multiple schemes, then the default should be the application.\n if (resolvedSchemes.length > 1) {\n const scheme =\n resolvedSchemes.find(({ type }) => type === IOSConfig.Target.TargetType.APPLICATION) ??\n resolvedSchemes[0];\n debug(`Using default scheme: ${scheme.name}`);\n return scheme;\n }\n\n // If we couldn't find the scheme, then we'll guess at it,\n // this is needed for cases where the native code hasn't been generated yet.\n if (resolvedSchemes[0]) {\n return resolvedSchemes[0];\n }\n return {\n name: path.basename(xcodeProject.name, path.extname(xcodeProject.name)),\n };\n}\n"],"names":["getDefaultNativeScheme","promptOrQueryNativeSchemeAsync","resolveNativeSchemePropsAsync","debug","require","projectRoot","options","xcodeProject","scheme","configuration","schemes","IOSConfig","BuildScheme","getRunnableSchemesFromXcodeproj","length","CommandError","Log","log","name","resolvedSchemeName","selectAsync","map","value","isApp","type","Target","TargetType","APPLICATION","osType","title","chalk","bold","gray","nonInteractiveHelp","join","find","resolvedSchemes","profile","path","basename","extname"],"mappings":";;;;;;;;;;;IAoEgBA,sBAAsB;eAAtBA;;IAvCMC,8BAA8B;eAA9BA;;IAZAC,6BAA6B;eAA7BA;;;;yBAjBI;;;;;;;gEACR;;;;;;;gEACD;;;;;;6DAEI;wBACQ;yBACL;yBACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAG5B,MAAMC,QAAQC,QAAQ,SAAS;AAOxB,eAAeF,8BACpBG,WAAmB,EACnBC,OA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C,kFAAkF;IAClF,sCAAsC;IACtC,MAAM6B,kBAAkBC,IAAAA,gBAAO,EAAC1B,0BAAS,CAACC,WAAW,CAACC,+BAA+B,EACnFR,aACA;QACEI,eAAeH,QAAQG,aAAa;IACtC;IAGF,6EAA6E;IAC7E,IAAI2B,gBAAgBtB,MAAM,GAAG,GAAG;QAC9B,MAAMN,SACJ4B,gBAAgBD,IAAI,CAAC,CAAC,EAAEX,IAAI,EAAE,GAAKA,SAASb,0BAAS,CAACc,MAAM,CAACC,UAAU,CAACC,WAAW,KACnFS,eAAe,CAAC,EAAE;QACpBjC,MAAM,CAAC,sBAAsB,EAAEK,OAAOU,IAAI,EAAE;QAC5C,OAAOV;IACT;IAEA,0DAA0D;IAC1D,4EAA4E;IAC5E,IAAI4B,eAAe,CAAC,EAAE,EAAE;QACtB,OAAOA,eAAe,CAAC,EAAE;IAC3B;IACA,OAAO;QACLlB,MAAMoB,eAAI,CAACC,QAAQ,CAAChC,aAAaW,IAAI,EAAEoB,eAAI,CAACE,OAAO,CAACjC,aAAaW,IAAI;IACvE;AACF"}
1
+ {"version":3,"sources":["../../../../../src/run/ios/options/resolveNativeScheme.ts"],"sourcesContent":["import { IOSConfig } from '@expo/config-plugins';\nimport chalk from 'chalk';\nimport path from 'path';\n\nimport * as Log from '../../../log';\nimport { CommandError } from '../../../utils/errors';\nimport { profile } from '../../../utils/profile';\nimport { selectAsync } from '../../../utils/prompts';\nimport { Options, ProjectInfo, XcodeConfiguration } from '../XcodeBuild.types';\n\nconst debug = require('debug')('expo:run:ios:options:resolveNativeScheme') as typeof console.log;\n\ntype NativeSchemeProps = {\n name: string;\n osType?: string;\n};\n\nexport async function resolveNativeSchemePropsAsync(\n projectRoot: string,\n options: Pick<Options, 'scheme' | 'configuration'>,\n xcodeProject: ProjectInfo\n): Promise<NativeSchemeProps> {\n return (\n (await promptOrQueryNativeSchemeAsync(projectRoot, options)) ??\n getDefaultNativeScheme(projectRoot, options, xcodeProject)\n );\n}\n\n/** Resolve the native iOS build `scheme` for a given `configuration`. If the `scheme` isn't provided then the user will be prompted to select one. */\nexport async function promptOrQueryNativeSchemeAsync(\n projectRoot: string,\n { scheme, configuration }: { scheme?: string | boolean; configuration?: XcodeConfiguration }\n): Promise<NativeSchemeProps | null> {\n const schemes = IOSConfig.BuildScheme.getRunnableSchemesFromXcodeproj(projectRoot, {\n configuration,\n });\n\n if (!schemes.length) {\n throw new CommandError('IOS_MALFORMED', 'No native iOS build schemes found');\n }\n\n if (scheme === true) {\n if (schemes.length === 1) {\n Log.log(`Auto selecting only available scheme: ${schemes[0].name}`);\n return schemes[0];\n }\n const resolvedSchemeName = await selectAsync(\n 'Select a scheme',\n schemes.map((value) => {\n const isApp =\n value.type === IOSConfig.Target.TargetType.APPLICATION && value.osType === 'iOS';\n return {\n value: value.name,\n title: isApp ? chalk.bold(value.name) + chalk.gray(' (app)') : value.name,\n };\n }),\n {\n nonInteractiveHelp: `--scheme: argument must be provided with a string in non-interactive mode. Valid choices are: ${schemes.join(\n ', '\n )}`,\n }\n );\n return schemes.find(({ name }) => resolvedSchemeName === name) ?? null;\n }\n // Attempt to match the schemes up so we can open the correct simulator\n return scheme ? schemes.find(({ name }) => name === scheme) || { name: scheme } : null;\n}\n\nexport function getDefaultNativeScheme(\n projectRoot: string,\n options: Pick<Options, 'configuration'>,\n xcodeProject: Pick<ProjectInfo, 'name'>\n): NativeSchemeProps {\n // If the resolution failed then we should just use the first runnable scheme that\n // matches the provided configuration.\n const resolvedSchemes = profile(IOSConfig.BuildScheme.getRunnableSchemesFromXcodeproj)(\n projectRoot,\n {\n configuration: options.configuration,\n }\n );\n\n // If there are multiple schemes, then the default should be the application.\n if (resolvedSchemes.length > 1) {\n const scheme =\n resolvedSchemes.find(({ type }) => type === IOSConfig.Target.TargetType.APPLICATION) ??\n resolvedSchemes[0];\n debug(`Using default scheme: ${scheme.name}`);\n return scheme;\n }\n\n // If we couldn't find the scheme, then we'll guess at it,\n // this is needed for cases where the native code hasn't been generated yet.\n if (resolvedSchemes[0]) {\n return resolvedSchemes[0];\n }\n return {\n name: path.basename(xcodeProject.name, path.extname(xcodeProject.name)),\n };\n}\n"],"names":["resolveNativeSchemePropsAsync","promptOrQueryNativeSchemeAsync","getDefaultNativeScheme","debug","require","projectRoot","options","xcodeProject","scheme","configuration","schemes","IOSConfig","BuildScheme","getRunnableSchemesFromXcodeproj","length","CommandError","Log","log","name","resolvedSchemeName","selectAsync","map","value","isApp","type","Target","TargetType","APPLICATION","osType","title","chalk","bold","gray","nonInteractiveHelp","join","find","resolvedSchemes","profile","path","basename","extname"],"mappings":"AAAA;;;;;;;;;;;IAiBsBA,6BAA6B,MAA7BA,6BAA6B;IAY7BC,8BAA8B,MAA9BA,8BAA8B;IAuCpCC,sBAAsB,MAAtBA,sBAAsB;;;yBApEZ,sBAAsB;;;;;;;8DAC9B,OAAO;;;;;;;8DACR,MAAM;;;;;;2DAEF,cAAc;wBACN,uBAAuB;yBAC5B,wBAAwB;yBACpB,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGpD,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,0CAA0C,CAAC,AAAsB,AAAC;AAO1F,eAAeJ,6BAA6B,CACjDK,WAAmB,EACnBC,OAAkD,EAClDC,YAAyB,EACG;IAC5B,OACE,AAAC,MAAMN,8BAA8B,CAACI,WAAW,EAAEC,OAAO,CAAC,IAC3DJ,sBAAsB,CAACG,WAAW,EAAEC,OAAO,EAAEC,YAAY,CAAC,CAC1D;AACJ,CAAC;AAGM,eAAeN,8BAA8B,CAClDI,WAAmB,EACnB,EAAEG,MAAM,CAAA,EAAEC,aAAa,CAAA,EAAqE,EACzD;IACnC,MAAMC,OAAO,GAAGC,cAAS,EAAA,UAAA,CAACC,WAAW,CAACC,+BAA+B,CAACR,WAAW,EAAE;QACjFI,aAAa;KACd,CAAC,AAAC;IAEH,IAAI,CAACC,OAAO,CAACI,MAAM,EAAE;QAC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MAAM,CAAC,IAAI;QAAEU,IAAI,EAAEV,MAAM;KAAE,GAAG,IAAI,CAAC;AACzF,CAAC;AAEM,SAASN,sBAAsB,CACpCG,WAAmB,EACnBC,OAAuC,EACvCC,YAAuC,EACpB;IACnB,kFAAkF;IAClF,sCAAsC;IACtC,MAAM6B,eAAe,GAAGC,IAAAA,QAAO,QAAA,EAAC1B,cAAS,EAAA,UAAA,CAACC,WAAW,CAACC,+BAA+B,CAAC,CACpFR,WAAW,EACX;QACEI,aAAa,EAAEH,OAAO,CAACG,aAAa;KACrC,CACF,AAAC;IAEF,6EAA6E;IAC7E,IAAI2B,eAAe,CAACtB,MAAM,GAAG,CAAC,EAAE;QAC9B,MAAMN,MAAM,GACV4B,eAAe,CAACD,IAAI,CAAC,CAAC,EAAEX,IAAI,CAAA,EAAE,GAAKA,IAAI,KAAKb,cAAS,EAAA,UAAA,CAACc,MAAM,CAACC,UAAU,CAACC,WAAW,CAAC,IACpFS,eAAe,CAAC,CAAC,CAAC,AAAC;QACrBjC,KAAK,CAAC,CAAC,sBAAsB,EAAEK,MAAM,CAACU,IAAI,CAAC,CAAC,CAAC,CAAC;QAC9C,OAAOV,MAAM,CAAC;IAChB,CAAC;IAED,0DAA0D;IAC1D,4EAA4E;IAC5E,IAAI4B,eAAe,CAAC,CAAC,CAAC,EAAE;QACtB,OAAOA,eAAe,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO;QACLlB,IAAI,EAAEoB,KAAI,EAAA,QAAA,CAACC,QAAQ,CAAChC,YAAY,CAACW,IAAI,EAAEoB,KAAI,EAAA,QAAA,CAACE,OAAO,CAACjC,YAAY,CAACW,IAAI,CAAC,CAAC;KACxE,CAAC;AACJ,CAAC"}
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "resolveOptionsAsync", {
6
6
  enumerable: true,
7
- get: function() {
8
- return resolveOptionsAsync;
9
- }
7
+ get: ()=>resolveOptionsAsync
10
8
  });
11
9
  const _resolveDevice = require("./resolveDevice");
12
10
  const _resolveNativeScheme = require("./resolveNativeScheme");
@@ -19,9 +17,9 @@ async function resolveOptionsAsync(projectRoot, options) {
19
17
  const bundlerProps = await (0, _resolveBundlerProps.resolveBundlerPropsAsync)(projectRoot, options);
20
18
  // Resolve the scheme before the device so we can filter devices based on
21
19
  // whichever scheme is selected (i.e. don't present TV devices if the scheme cannot be run on a TV).
22
- const { osType, name: scheme } = await (0, _resolveNativeScheme.resolveNativeSchemePropsAsync)(projectRoot, options, xcodeProject);
20
+ const { osType , name: scheme } = await (0, _resolveNativeScheme.resolveNativeSchemePropsAsync)(projectRoot, options, xcodeProject);
23
21
  // Use the configuration or `Debug` if none is provided.
24
- const configuration = options.configuration || 'Debug';
22
+ const configuration = options.configuration || "Debug";
25
23
  // Resolve the device based on the provided device id or prompt
26
24
  // from a list of devices (connected or simulated) that are filtered by the scheme.
27
25
  const device = await (0, _profile.profile)(_resolveDevice.resolveDeviceAsync)(options.device, {
@@ -36,10 +34,10 @@ async function resolveOptionsAsync(projectRoot, options) {
36
34
  // The cache is reset in `../node_modules/react-native/scripts/react-native-xcode.sh` when the
37
35
  // project is running in Debug and built onto a physical device. It seems that this is done because
38
36
  // the script is run from Xcode and unaware of the CLI instance.
39
- const shouldSkipInitialBundling = configuration === 'Debug' && !isSimulator;
37
+ const shouldSkipInitialBundling = configuration === "Debug" && !isSimulator;
40
38
  return {
41
39
  ...bundlerProps,
42
- shouldStartBundler: options.configuration === 'Debug' || bundlerProps.shouldStartBundler,
40
+ shouldStartBundler: options.configuration === "Debug" || bundlerProps.shouldStartBundler,
43
41
  projectRoot,
44
42
  isSimulator,
45
43
  xcodeProject,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/run/ios/options/resolveOptions.ts"],"sourcesContent":["import { isSimulatorDevice, resolveDeviceAsync } from './resolveDevice';\nimport { resolveNativeSchemePropsAsync } from './resolveNativeScheme';\nimport { resolveXcodeProject } from './resolveXcodeProject';\nimport { isOSType } from '../../../start/platforms/ios/simctl';\nimport { profile } from '../../../utils/profile';\nimport { resolveBundlerPropsAsync } from '../../resolveBundlerProps';\nimport { BuildProps, Options } from '../XcodeBuild.types';\n\n/** Resolve arguments for the `run:ios` command. */\nexport async function resolveOptionsAsync(\n projectRoot: string,\n options: Options\n): Promise<BuildProps> {\n const xcodeProject = resolveXcodeProject(projectRoot);\n\n const bundlerProps = await resolveBundlerPropsAsync(projectRoot, options);\n\n // Resolve the scheme before the device so we can filter devices based on\n // whichever scheme is selected (i.e. don't present TV devices if the scheme cannot be run on a TV).\n const { osType, name: scheme } = await resolveNativeSchemePropsAsync(\n projectRoot,\n options,\n xcodeProject\n );\n\n // Use the configuration or `Debug` if none is provided.\n const configuration = options.configuration || 'Debug';\n\n // Resolve the device based on the provided device id or prompt\n // from a list of devices (connected or simulated) that are filtered by the scheme.\n const device = await profile(resolveDeviceAsync)(options.device, {\n // It's unclear if there's any value to asserting that we haven't hardcoded the os type in the CLI.\n osType: isOSType(osType) ? osType : undefined,\n xcodeProject,\n scheme,\n configuration,\n });\n\n const isSimulator = isSimulatorDevice(device);\n\n // This optimization skips resetting the Metro cache needlessly.\n // The cache is reset in `../node_modules/react-native/scripts/react-native-xcode.sh` when the\n // project is running in Debug and built onto a physical device. It seems that this is done because\n // the script is run from Xcode and unaware of the CLI instance.\n const shouldSkipInitialBundling = configuration === 'Debug' && !isSimulator;\n\n return {\n ...bundlerProps,\n shouldStartBundler: options.configuration === 'Debug' || bundlerProps.shouldStartBundler,\n projectRoot,\n isSimulator,\n xcodeProject,\n device,\n configuration,\n shouldSkipInitialBundling,\n buildCache: options.buildCache !== false,\n scheme,\n };\n}\n"],"names":["resolveOptionsAsync","projectRoot","options","xcodeProject","resolveXcodeProject","bundlerProps","resolveBundlerPropsAsync","osType","name","scheme","resolveNativeSchemePropsAsync","configuration","device","profile","resolveDeviceAsync","isOSType","undefined","isSimulator","isSimulatorDevice","shouldSkipInitialBundling","shouldStartBundler","buildCache"],"mappings":";;;;+BASsBA;;;eAAAA;;;+BATgC;qCACR;qCACV;wBACX;yBACD;qCACiB;AAIlC,eAAeA,oBACpBC,WAAmB,EACnBC,OAAgB;IAEhB,MAAMC,eAAeC,IAAAA,wCAAmB,EAACH;IAEzC,MAAMI,eAAe,MAAMC,IAAAA,6CAAwB,EAACL,aAAaC;IAEjE,yEAAyE;IACzE,oGAAoG;IACpG,MAAM,EAAEK,MAAM,EAAEC,MAAMC,MAAM,EAAE,GAAG,MAAMC,IAAAA,kDAA6B,EAClET,aACAC,SACAC;IAGF,wDAAwD;IACxD,MAAMQ,gBAAgBT,QAAQS,aAAa,IAAI;IAE/C,+DAA+D;IAC/D,mFAAmF;IACnF,MAAMC,SAAS,MAAMC,IAAAA,gBAAO,EAACC,iCAAkB,EAAEZ,QAAQU,MAAM,EAAE;QAC/D,mGAAmG;QACnGL,QAAQQ,IAAAA,gBAAQ,EAACR,UAAUA,SAASS;QACpCb;QACAM;QACAE;IACF;IAEA,MAAMM,cAAcC,IAAAA,gCAAiB,EAACN;IAEtC,gEAAgE;IAChE,8FAA8F;IAC9F,mGAAmG;IACnG,gEAAgE;IAChE,MAAMO,4BAA4BR,kBAAkB,WAAW,CAACM;IAEhE,OAAO;QACL,GAAGZ,YAAY;QACfe,oBAAoBlB,QAAQS,aAAa,KAAK,WAAWN,aAAae,kBAAkB;QACxFnB;QACAgB;QACAd;QACAS;QACAD;QACAQ;QACAE,YAAYnB,QAAQmB,UAAU,KAAK;QACnCZ;IACF;AACF"}
1
+ {"version":3,"sources":["../../../../../src/run/ios/options/resolveOptions.ts"],"sourcesContent":["import { isSimulatorDevice, resolveDeviceAsync } from './resolveDevice';\nimport { resolveNativeSchemePropsAsync } from './resolveNativeScheme';\nimport { resolveXcodeProject } from './resolveXcodeProject';\nimport { isOSType } from '../../../start/platforms/ios/simctl';\nimport { profile } from '../../../utils/profile';\nimport { resolveBundlerPropsAsync } from '../../resolveBundlerProps';\nimport { BuildProps, Options } from '../XcodeBuild.types';\n\n/** Resolve arguments for the `run:ios` command. */\nexport async function resolveOptionsAsync(\n projectRoot: string,\n options: Options\n): Promise<BuildProps> {\n const xcodeProject = resolveXcodeProject(projectRoot);\n\n const bundlerProps = await resolveBundlerPropsAsync(projectRoot, options);\n\n // Resolve the scheme before the device so we can filter devices based on\n // whichever scheme is selected (i.e. don't present TV devices if the scheme cannot be run on a TV).\n const { osType, name: scheme } = await resolveNativeSchemePropsAsync(\n projectRoot,\n options,\n xcodeProject\n );\n\n // Use the configuration or `Debug` if none is provided.\n const configuration = options.configuration || 'Debug';\n\n // Resolve the device based on the provided device id or prompt\n // from a list of devices (connected or simulated) that are filtered by the scheme.\n const device = await profile(resolveDeviceAsync)(options.device, {\n // It's unclear if there's any value to asserting that we haven't hardcoded the os type in the CLI.\n osType: isOSType(osType) ? osType : undefined,\n xcodeProject,\n scheme,\n configuration,\n });\n\n const isSimulator = isSimulatorDevice(device);\n\n // This optimization skips resetting the Metro cache needlessly.\n // The cache is reset in `../node_modules/react-native/scripts/react-native-xcode.sh` when the\n // project is running in Debug and built onto a physical device. It seems that this is done because\n // the script is run from Xcode and unaware of the CLI instance.\n const shouldSkipInitialBundling = configuration === 'Debug' && !isSimulator;\n\n return {\n ...bundlerProps,\n shouldStartBundler: options.configuration === 'Debug' || bundlerProps.shouldStartBundler,\n projectRoot,\n isSimulator,\n xcodeProject,\n device,\n configuration,\n shouldSkipInitialBundling,\n buildCache: options.buildCache !== false,\n scheme,\n };\n}\n"],"names":["resolveOptionsAsync","projectRoot","options","xcodeProject","resolveXcodeProject","bundlerProps","resolveBundlerPropsAsync","osType","name","scheme","resolveNativeSchemePropsAsync","configuration","device","profile","resolveDeviceAsync","isOSType","undefined","isSimulator","isSimulatorDevice","shouldSkipInitialBundling","shouldStartBundler","buildCache"],"mappings":"AAAA;;;;+BASsBA,qBAAmB;;aAAnBA,mBAAmB;;+BATa,iBAAiB;qCACzB,uBAAuB;qCACjC,uBAAuB;wBAClC,qC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nB,OAAO,CAACmB,UAAU,KAAK,KAAK;QACxCZ,MAAM;KACP,CAAC;AACJ,CAAC"}
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "resolveXcodeProject", {
6
6
  enumerable: true,
7
- get: function() {
8
- return resolveXcodeProject;
9
- }
7
+ get: ()=>resolveXcodeProject
10
8
  });
11
9
  function _glob() {
12
10
  const data = require("glob");
@@ -17,7 +15,7 @@ function _glob() {
17
15
  }
18
16
  const _errors = require("../../../utils/errors");
19
17
  const ignoredPaths = [
20
- '**/@(Carthage|Pods|vendor|node_modules)/**'
18
+ "**/@(Carthage|Pods|vendor|node_modules)/**"
21
19
  ];
22
20
  function findXcodeProjectPaths(projectRoot, extension) {
23
21
  return (0, _glob().sync)(`ios/*.${extension}`, {
@@ -27,7 +25,7 @@ function findXcodeProjectPaths(projectRoot, extension) {
27
25
  });
28
26
  }
29
27
  function resolveXcodeProject(projectRoot) {
30
- let paths = findXcodeProjectPaths(projectRoot, 'xcworkspace');
28
+ let paths = findXcodeProjectPaths(projectRoot, "xcworkspace");
31
29
  if (paths.length) {
32
30
  return {
33
31
  // Use full path instead of relative project root so that warnings and errors contain full paths as well, this helps with filtering.
@@ -37,14 +35,14 @@ function resolveXcodeProject(projectRoot) {
37
35
  isWorkspace: true
38
36
  };
39
37
  }
40
- paths = findXcodeProjectPaths(projectRoot, 'xcodeproj');
38
+ paths = findXcodeProjectPaths(projectRoot, "xcodeproj");
41
39
  if (paths.length) {
42
40
  return {
43
41
  name: paths[0],
44
42
  isWorkspace: false
45
43
  };
46
44
  }
47
- throw new _errors.CommandError('IOS_MALFORMED', `Xcode project not found in project: ${projectRoot}. You can generate a project with \`npx expo prebuild\``);
45
+ throw new _errors.CommandError("IOS_MALFORMED", `Xcode project not found in project: ${projectRoot}. You can generate a project with \`npx expo prebuild\``);
48
46
  }
49
47
 
50
48
  //# sourceMappingURL=resolveXcodeProject.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/run/ios/options/resolveXcodeProject.ts"],"sourcesContent":["import { sync as globSync } from 'glob';\n\nimport { CommandError } from '../../../utils/errors';\nimport { ProjectInfo } from '../XcodeBuild.types';\n\nconst ignoredPaths = ['**/@(Carthage|Pods|vendor|node_modules)/**'];\n\nfunction findXcodeProjectPaths(\n projectRoot: string,\n extension: 'xcworkspace' | 'xcodeproj'\n): string[] {\n return globSync(`ios/*.${extension}`, {\n absolute: true,\n cwd: projectRoot,\n ignore: ignoredPaths,\n });\n}\n\n/** Return the path and type of Xcode project in the given folder. */\nexport function resolveXcodeProject(projectRoot: string): ProjectInfo {\n let paths = findXcodeProjectPaths(projectRoot, 'xcworkspace');\n if (paths.length) {\n return {\n // Use full path instead of relative project root so that warnings and errors contain full paths as well, this helps with filtering.\n // Also helps keep things consistent in monorepos.\n name: paths[0],\n // name: path.relative(projectRoot, paths[0]),\n isWorkspace: true,\n };\n }\n paths = findXcodeProjectPaths(projectRoot, 'xcodeproj');\n if (paths.length) {\n return { name: paths[0], isWorkspace: false };\n }\n throw new CommandError(\n 'IOS_MALFORMED',\n `Xcode project not found in project: ${projectRoot}. You can generate a project with \\`npx expo prebuild\\``\n );\n}\n"],"names":["resolveXcodeProject","ignoredPaths","findXcodeProjectPaths","projectRoot","extension","globSync","absolute","cwd","ignore","paths","length","name","isWorkspace","CommandError"],"mappings":";;;;+BAmBgBA;;;eAAAA;;;;yBAnBiB;;;;;;wBAEJ;AAG7B,MAAMC,eAAe;IAAC;CAA6C;AAEnE,SAASC,sBACPC,WAAmB,EACnBC,SAAsC;IAEtC,OAAOC,IAAAA,YAAQ,EAAC,CAAC,MAAM,EAAED,WAAW,EAAE;QACpCE,UAAU;QACVC,KAAKJ;QACLK,QAAQP;IACV;AACF;AAGO,SAASD,oBAAoBG,WAAmB;IACrD,IAAIM,QAAQP,sBAAsBC,aAAa;IAC/C,IAAIM,MAAMC,MAAM,EAAE;QAChB,OAAO;YACL,oIAAoI;YACpI,kDAAkD;YAClDC,MAAMF,KAAK,CAAC,EAAE;YACd,8CAA8C;YAC9CG,aAAa;QACf;IACF;IACAH,QAAQP,sBAAsBC,aAAa;IAC3C,IAAIM,MAAMC,MAAM,EAAE;QAChB,OAAO;YAAEC,MAAMF,KAAK,CAAC,EAAE;YAAEG,aAAa;QAAM;IAC9C;IACA,MAAM,IAAIC,oBAAY,CACpB,iBACA,CAAC,oCAAoC,EAAEV,YAAY,uDAAuD,CAAC;AAE/G"}
1
+ {"version":3,"sources":["../../../../../src/run/ios/options/resolveXcodeProject.ts"],"sourcesContent":["import { sync as globSync } from 'glob';\n\nimport { CommandError } from '../../../utils/errors';\nimport { ProjectInfo } from '../XcodeBuild.types';\n\nconst ignoredPaths = ['**/@(Carthage|Pods|vendor|node_modules)/**'];\n\nfunction findXcodeProjectPaths(\n projectRoot: string,\n extension: 'xcworkspace' | 'xcodeproj'\n): string[] {\n return globSync(`ios/*.${extension}`, {\n absolute: true,\n cwd: projectRoot,\n ignore: ignoredPaths,\n });\n}\n\n/** Return the path and type of Xcode project in the given folder. */\nexport function resolveXcodeProject(projectRoot: string): ProjectInfo {\n let paths = findXcodeProjectPaths(projectRoot, 'xcworkspace');\n if (paths.length) {\n return {\n // Use full path instead of relative project root so that warnings and errors contain full paths as well, this helps with filtering.\n // Also helps keep things consistent in monorepos.\n name: paths[0],\n // name: path.relative(projectRoot, paths[0]),\n isWorkspace: true,\n };\n }\n paths = findXcodeProjectPaths(projectRoot, 'xcodeproj');\n if (paths.length) {\n return { name: paths[0], isWorkspace: false };\n }\n throw new CommandError(\n 'IOS_MALFORMED',\n `Xcode project not found in project: ${projectRoot}. You can generate a project with \\`npx expo prebuild\\``\n );\n}\n"],"names":["resolveXcodeProject","ignoredPaths","findXcodeProjectPaths","projectRoot","extension","globSync","absolute","cwd","ignore","paths","length","name","isWorkspace","CommandError"],"mappings":"AAAA;;;;+BAmBgBA,qBAAmB;;aAAnBA,mBAAmB;;;yBAnBF,MAAM;;;;;;wBAEV,uBAAuB;AAGpD,MAAMC,YAAY,GAAG;IAAC,4CAA4C;CAAC,AAAC;AAEpE,SAASC,qBAAqB,CAC5BC,WAAmB,EACnBC,SAAsC,EAC5B;IACV,OAAOC,IAAAA,KAAQ,EAAA,KAAA,EAAC,CAAC,MAAM,EAAED,SAAS,CAAC,CAAC,EAAE;QACpCE,QAAQ,EAAE,IAAI;QACdC,GAAG,EAAEJ,WAAW;QAChBK,MAAM,EAAEP,YAAY;KACrB,CAAC,CAAC;AACL,CAAC;AAGM,SAASD,mBAAmB,CAACG,WAAmB,EAAe;IACpE,IAAIM,KAAK,GAAGP,qBAAqB,CAACC,WAAW,EAAE,aAAa,CAAC,AAAC;IAC9D,IAAIM,KAAK,CAACC,MAAM,EAAE;QAChB,OAAO;YACL,oIAAoI;YACpI,kDAAkD;YAClDC,IAAI,EAAEF,KAAK,CAAC,CAAC,CAAC;YACd,8CAA8C;YAC9CG,WAAW,EAAE,IAAI;SAClB,CAAC;IACJ,CAAC;IACDH,KAAK,GAAGP,qBAAqB,CAACC,WAAW,EAAE,WAAW,CAAC,CAAC;IACxD,IAAIM,KAAK,CAACC,MAAM,EAAE;QAChB,OAAO;YAAEC,IAAI,EAAEF,KAAK,CAAC,CAAC,CAAC;YAAEG,WAAW,EAAE,KAAK;SAAE,CAAC;IAChD,CAAC;IACD,MAAM,IAAIC,OAAY,aAAA,CACpB,eAAe,EACf,CAAC,oCAAoC,EAAEV,WAAW,CAAC,uDAAuD,CAAC,CAC5G,CAAC;AACJ,CAAC"}
@@ -4,40 +4,38 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "runIosAsync", {
6
6
  enumerable: true,
7
- get: function() {
8
- return runIosAsync;
9
- }
7
+ get: ()=>runIosAsync
10
8
  });
11
- function _spawnasync() {
12
- const data = /*#__PURE__*/ _interop_require_default(require("@expo/spawn-async"));
13
- _spawnasync = function() {
9
+ function _spawnAsync() {
10
+ const data = /*#__PURE__*/ _interopRequireDefault(require("@expo/spawn-async"));
11
+ _spawnAsync = function() {
14
12
  return data;
15
13
  };
16
14
  return data;
17
15
  }
18
16
  function _chalk() {
19
- const data = /*#__PURE__*/ _interop_require_default(require("chalk"));
17
+ const data = /*#__PURE__*/ _interopRequireDefault(require("chalk"));
20
18
  _chalk = function() {
21
19
  return data;
22
20
  };
23
21
  return data;
24
22
  }
25
23
  function _fs() {
26
- const data = /*#__PURE__*/ _interop_require_default(require("fs"));
24
+ const data = /*#__PURE__*/ _interopRequireDefault(require("fs"));
27
25
  _fs = function() {
28
26
  return data;
29
27
  };
30
28
  return data;
31
29
  }
32
30
  function _path() {
33
- const data = /*#__PURE__*/ _interop_require_default(require("path"));
31
+ const data = /*#__PURE__*/ _interopRequireDefault(require("path"));
34
32
  _path = function() {
35
33
  return data;
36
34
  };
37
35
  return data;
38
36
  }
39
- const _log = /*#__PURE__*/ _interop_require_wildcard(require("../../log"));
40
- const _AppleAppIdResolver = require("../../start/platforms/ios/AppleAppIdResolver");
37
+ const _log = /*#__PURE__*/ _interopRequireWildcard(require("../../log"));
38
+ const _appleAppIdResolver = require("../../start/platforms/ios/AppleAppIdResolver");
41
39
  const _cocoapods = require("../../utils/cocoapods");
42
40
  const _nodeEnv = require("../../utils/nodeEnv");
43
41
  const _port = require("../../utils/port");
@@ -46,14 +44,14 @@ const _scheme = require("../../utils/scheme");
46
44
  const _ensureNativeProject = require("../ensureNativeProject");
47
45
  const _hints = require("../hints");
48
46
  const _startBundler = require("../startBundler");
49
- const _XcodeBuild = /*#__PURE__*/ _interop_require_wildcard(require("./XcodeBuild"));
47
+ const _xcodeBuild = /*#__PURE__*/ _interopRequireWildcard(require("./XcodeBuild"));
50
48
  const _launchApp = require("./launchApp");
51
49
  const _resolveOptions = require("./options/resolveOptions");
52
50
  const _validateExternalBinary = require("./validateExternalBinary");
53
51
  const _exportEager = require("../../export/embed/exportEager");
54
52
  const _simctl = require("../../start/platforms/ios/simctl");
55
53
  const _errors = require("../../utils/errors");
56
- function _interop_require_default(obj) {
54
+ function _interopRequireDefault(obj) {
57
55
  return obj && obj.__esModule ? obj : {
58
56
  default: obj
59
57
  };
@@ -66,7 +64,7 @@ function _getRequireWildcardCache(nodeInterop) {
66
64
  return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
67
65
  })(nodeInterop);
68
66
  }
69
- function _interop_require_wildcard(obj, nodeInterop) {
67
+ function _interopRequireWildcard(obj, nodeInterop) {
70
68
  if (!nodeInterop && obj && obj.__esModule) {
71
69
  return obj;
72
70
  }
@@ -79,9 +77,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
79
77
  if (cache && cache.has(obj)) {
80
78
  return cache.get(obj);
81
79
  }
82
- var newObj = {
83
- __proto__: null
84
- };
80
+ var newObj = {};
85
81
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
86
82
  for(var key in obj){
87
83
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -99,15 +95,15 @@ function _interop_require_wildcard(obj, nodeInterop) {
99
95
  }
100
96
  return newObj;
101
97
  }
102
- const debug = require('debug')('expo:run:ios');
98
+ const debug = require("debug")("expo:run:ios");
103
99
  async function runIosAsync(projectRoot, options) {
104
- var _this;
105
- (0, _nodeEnv.setNodeEnv)(options.configuration === 'Release' ? 'production' : 'development');
106
- require('@expo/env').load(projectRoot);
100
+ var ref;
101
+ (0, _nodeEnv.setNodeEnv)(options.configuration === "Release" ? "production" : "development");
102
+ require("@expo/env").load(projectRoot);
107
103
  assertPlatform();
108
104
  const install = !!options.install;
109
105
  if (await (0, _ensureNativeProject.ensureNativeProjectAsync)(projectRoot, {
110
- platform: 'ios',
106
+ platform: "ios",
111
107
  install
112
108
  }) && install) {
113
109
  await (0, _cocoapods.maybePromptToSyncPodsAsync)(projectRoot);
@@ -120,9 +116,9 @@ async function runIosAsync(projectRoot, options) {
120
116
  let binaryPath;
121
117
  if (!options.binary) {
122
118
  if (!props.isSimulator) {
123
- throw new Error('Re-bundling on physical devices requires the --binary flag.');
119
+ throw new Error("Re-bundling on physical devices requires the --binary flag.");
124
120
  }
125
- const appId = await new _AppleAppIdResolver.AppleAppIdResolver(projectRoot).getAppIdAsync();
121
+ const appId = await new _appleAppIdResolver.AppleAppIdResolver(projectRoot).getAppIdAsync();
126
122
  const possibleBinaryPath = await (0, _simctl.getContainerPathAsync)(props.device, {
127
123
  appId
128
124
  });
@@ -130,71 +126,71 @@ async function runIosAsync(projectRoot, options) {
130
126
  throw new _errors.CommandError(`Cannot rebundle because no --binary was provided and no existing binary was found on the device for ID: ${appId}.`);
131
127
  }
132
128
  binaryPath = possibleBinaryPath;
133
- _log.log('Re-using existing binary path:', binaryPath);
129
+ _log.log("Re-using existing binary path:", binaryPath);
134
130
  // Set the binary path to the existing binary path.
135
131
  options.binary = binaryPath;
136
132
  }
137
- _log.log('Rebundling the Expo config file');
133
+ _log.log("Rebundling the Expo config file");
138
134
  // Re-bundle the config file the same way the app was originally bundled.
139
- await (0, _spawnasync().default)('node', [
140
- _path().default.join(require.resolve('expo-constants/package.json'), '../scripts/getAppConfig.js'),
135
+ await (0, _spawnAsync().default)("node", [
136
+ _path().default.join(require.resolve("expo-constants/package.json"), "../scripts/getAppConfig.js"),
141
137
  projectRoot,
142
- _path().default.join(options.binary, 'EXConstants.bundle')
138
+ _path().default.join(options.binary, "EXConstants.bundle"),
143
139
  ]);
144
140
  // Re-bundle the app.
145
- const possibleBundleOutput = _path().default.join(options.binary, 'main.jsbundle');
141
+ const possibleBundleOutput = _path().default.join(options.binary, "main.jsbundle");
146
142
  if (_fs().default.existsSync(possibleBundleOutput)) {
147
- _log.log('Rebundling the app...');
143
+ _log.log("Rebundling the app...");
148
144
  await (0, _exportEager.exportEagerAsync)(projectRoot, {
149
145
  resetCache: false,
150
146
  dev: false,
151
- platform: 'ios',
152
- assetsDest: _path().default.join(options.binary, 'assets'),
147
+ platform: "ios",
148
+ assetsDest: _path().default.join(options.binary, "assets"),
153
149
  bundleOutput: possibleBundleOutput
154
150
  });
155
151
  } else {
156
- _log.warn('Bundle output not found at expected location:', possibleBundleOutput);
152
+ _log.warn("Bundle output not found at expected location:", possibleBundleOutput);
157
153
  }
158
154
  }
159
- let binaryPath;
155
+ let binaryPath1;
160
156
  if (options.binary) {
161
- binaryPath = await (0, _validateExternalBinary.getValidBinaryPathAsync)(options.binary, props);
162
- _log.log('Using custom binary path:', binaryPath);
157
+ binaryPath1 = await (0, _validateExternalBinary.getValidBinaryPathAsync)(options.binary, props);
158
+ _log.log("Using custom binary path:", binaryPath1);
163
159
  } else {
164
160
  let eagerBundleOptions;
165
- if (options.configuration === 'Release') {
161
+ if (options.configuration === "Release") {
166
162
  eagerBundleOptions = JSON.stringify(await (0, _exportEager.exportEagerAsync)(projectRoot, {
167
163
  dev: false,
168
- platform: 'ios'
164
+ platform: "ios"
169
165
  }));
170
166
  }
171
167
  // Spawn the `xcodebuild` process to create the app binary.
172
- const buildOutput = await _XcodeBuild.buildAsync({
168
+ const buildOutput = await _xcodeBuild.buildAsync({
173
169
  ...props,
174
170
  eagerBundleOptions
175
171
  });
176
172
  // Find the path to the built app binary, this will be used to install the binary
177
173
  // on a device.
178
- binaryPath = await (0, _profile.profile)(_XcodeBuild.getAppBinaryPath)(buildOutput);
174
+ binaryPath1 = await (0, _profile.profile)(_xcodeBuild.getAppBinaryPath)(buildOutput);
179
175
  }
180
- debug('Binary path:', binaryPath);
176
+ debug("Binary path:", binaryPath1);
181
177
  // Ensure the port hasn't become busy during the build.
182
178
  if (props.shouldStartBundler && !await (0, _port.ensurePortAvailabilityAsync)(projectRoot, props)) {
183
179
  props.shouldStartBundler = false;
184
180
  }
185
- const launchInfo = await (0, _launchApp.getLaunchInfoForBinaryAsync)(binaryPath);
181
+ const launchInfo = await (0, _launchApp.getLaunchInfoForBinaryAsync)(binaryPath1);
186
182
  const isCustomBinary = !!options.binary;
187
183
  // Always close the app before launching on a simulator. Otherwise certain cached resources like the splashscreen will not be available.
188
184
  if (props.isSimulator) {
189
185
  try {
190
186
  await (0, _simctl.simctlAsync)([
191
- 'terminate',
187
+ "terminate",
192
188
  props.device.udid,
193
189
  launchInfo.bundleId
194
190
  ]);
195
191
  } catch (error) {
196
192
  // If we failed it's likely that the app was not running to begin with and we will get an `invalid device` error
197
- debug('Failed to terminate app (possibly because it was not running):', error);
193
+ debug("Failed to terminate app (possibly because it was not running):", error);
198
194
  }
199
195
  }
200
196
  // Start the dev server which creates all of the required info for
@@ -203,10 +199,10 @@ async function runIosAsync(projectRoot, options) {
203
199
  port: props.port,
204
200
  headless: !props.shouldStartBundler,
205
201
  // If a scheme is specified then use that instead of the package name.
206
- scheme: isCustomBinary ? launchInfo.schemes[0] : (_this = await (0, _scheme.getSchemesForIosAsync)(projectRoot)) == null ? void 0 : _this[0]
202
+ scheme: isCustomBinary ? launchInfo.schemes[0] : (ref = await (0, _scheme.getSchemesForIosAsync)(projectRoot)) == null ? void 0 : ref[0]
207
203
  });
208
204
  // Install and launch the app binary on a device.
209
- await (0, _launchApp.launchAppAsync)(binaryPath, manager, {
205
+ await (0, _launchApp.launchAppAsync)(binaryPath1, manager, {
210
206
  isSimulator: props.isSimulator,
211
207
  device: props.device,
212
208
  shouldStartBundler: props.shouldStartBundler
@@ -219,7 +215,7 @@ async function runIosAsync(projectRoot, options) {
219
215
  }
220
216
  }
221
217
  function assertPlatform() {
222
- if (process.platform !== 'darwin') {
218
+ if (process.platform !== "darwin") {
223
219
  _log.exit((0, _chalk().default)`iOS apps can only be built on macOS devices. Use {cyan eas build -p ios} to build in the cloud.`);
224
220
  }
225
221
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/run/ios/runIosAsync.ts"],"sourcesContent":["import spawnAsync from '@expo/spawn-async';\nimport chalk from 'chalk';\nimport fs from 'fs';\nimport path from 'path';\n\nimport * as Log from '../../log';\nimport { AppleAppIdResolver } from '../../start/platforms/ios/AppleAppIdResolver';\nimport { maybePromptToSyncPodsAsync } from '../../utils/cocoapods';\nimport { setNodeEnv } from '../../utils/nodeEnv';\nimport { ensurePortAvailabilityAsync } from '../../utils/port';\nimport { profile } from '../../utils/profile';\nimport { getSchemesForIosAsync } from '../../utils/scheme';\nimport { ensureNativeProjectAsync } from '../ensureNativeProject';\nimport { logProjectLogsLocation } from '../hints';\nimport { startBundlerAsync } from '../startBundler';\nimport * as XcodeBuild from './XcodeBuild';\nimport { Options } from './XcodeBuild.types';\nimport { getLaunchInfoForBinaryAsync, launchAppAsync } from './launchApp';\nimport { resolveOptionsAsync } from './options/resolveOptions';\nimport { getValidBinaryPathAsync } from './validateExternalBinary';\nimport { exportEagerAsync } from '../../export/embed/exportEager';\nimport { getContainerPathAsync, simctlAsync } from '../../start/platforms/ios/simctl';\nimport { CommandError } from '../../utils/errors';\n\nconst debug = require('debug')('expo:run:ios');\n\nexport async function runIosAsync(projectRoot: string, options: Options) {\n setNodeEnv(options.configuration === 'Release' ? 'production' : 'development');\n require('@expo/env').load(projectRoot);\n\n assertPlatform();\n\n const install = !!options.install;\n\n if ((await ensureNativeProjectAsync(projectRoot, { platform: 'ios', install })) && install) {\n await maybePromptToSyncPodsAsync(projectRoot);\n }\n\n // Resolve the CLI arguments into useable options.\n const props = await profile(resolveOptionsAsync)(projectRoot, options);\n\n if (options.rebundle) {\n Log.warn(`The --unstable-rebundle flag is experimental and may not work as expected.`);\n // Get the existing binary path to re-bundle the app.\n\n let binaryPath: string;\n if (!options.binary) {\n if (!props.isSimulator) {\n throw new Error('Re-bundling on physical devices requires the --binary flag.');\n }\n const appId = await new AppleAppIdResolver(projectRoot).getAppIdAsync();\n const possibleBinaryPath = await getContainerPathAsync(props.device, {\n appId,\n });\n if (!possibleBinaryPath) {\n throw new CommandError(\n `Cannot rebundle because no --binary was provided and no existing binary was found on the device for ID: ${appId}.`\n );\n }\n binaryPath = possibleBinaryPath;\n Log.log('Re-using existing binary path:', binaryPath);\n // Set the binary path to the existing binary path.\n options.binary = binaryPath;\n }\n\n Log.log('Rebundling the Expo config file');\n // Re-bundle the config file the same way the app was originally bundled.\n await spawnAsync('node', [\n path.join(require.resolve('expo-constants/package.json'), '../scripts/getAppConfig.js'),\n projectRoot,\n path.join(options.binary, 'EXConstants.bundle'),\n ]);\n // Re-bundle the app.\n\n const possibleBundleOutput = path.join(options.binary, 'main.jsbundle');\n\n if (fs.existsSync(possibleBundleOutput)) {\n Log.log('Rebundling the app...');\n await exportEagerAsync(projectRoot, {\n resetCache: false,\n dev: false,\n platform: 'ios',\n assetsDest: path.join(options.binary, 'assets'),\n bundleOutput: possibleBundleOutput,\n });\n } else {\n Log.warn('Bundle output not found at expected location:', possibleBundleOutput);\n }\n }\n\n let binaryPath: string;\n if (options.binary) {\n binaryPath = await getValidBinaryPathAsync(options.binary, props);\n Log.log('Using custom binary path:', binaryPath);\n } else {\n let eagerBundleOptions: string | undefined;\n\n if (options.configuration === 'Release') {\n eagerBundleOptions = JSON.stringify(\n await exportEagerAsync(projectRoot, {\n dev: false,\n platform: 'ios',\n })\n );\n }\n\n // Spawn the `xcodebuild` process to create the app binary.\n const buildOutput = await XcodeBuild.buildAsync({\n ...props,\n eagerBundleOptions,\n });\n\n // Find the path to the built app binary, this will be used to install the binary\n // on a device.\n binaryPath = await profile(XcodeBuild.getAppBinaryPath)(buildOutput);\n }\n debug('Binary path:', binaryPath);\n\n // Ensure the port hasn't become busy during the build.\n if (props.shouldStartBundler && !(await ensurePortAvailabilityAsync(projectRoot, props))) {\n props.shouldStartBundler = false;\n }\n\n const launchInfo = await getLaunchInfoForBinaryAsync(binaryPath);\n const isCustomBinary = !!options.binary;\n\n // Always close the app before launching on a simulator. Otherwise certain cached resources like the splashscreen will not be available.\n if (props.isSimulator) {\n try {\n await simctlAsync(['terminate', props.device.udid, launchInfo.bundleId]);\n } catch (error) {\n // If we failed it's likely that the app was not running to begin with and we will get an `invalid device` error\n debug('Failed to terminate app (possibly because it was not running):', error);\n }\n }\n\n // Start the dev server which creates all of the required info for\n // launching the app on a simulator.\n const manager = await startBundlerAsync(projectRoot, {\n port: props.port,\n headless: !props.shouldStartBundler,\n // If a scheme is specified then use that instead of the package name.\n\n scheme: isCustomBinary\n ? // If launching a custom binary, use the schemes in the Info.plist.\n launchInfo.schemes[0]\n : // If a scheme is specified then use that instead of the package name.\n (await getSchemesForIosAsync(projectRoot))?.[0],\n });\n\n // Install and launch the app binary on a device.\n await launchAppAsync(\n binaryPath,\n manager,\n {\n isSimulator: props.isSimulator,\n device: props.device,\n shouldStartBundler: props.shouldStartBundler,\n },\n launchInfo.bundleId\n );\n\n // Log the location of the JS logs for the device.\n if (props.shouldStartBundler) {\n logProjectLogsLocation();\n } else {\n await manager.stopAsync();\n }\n}\n\nfunction assertPlatform() {\n if (process.platform !== 'darwin') {\n Log.exit(\n chalk`iOS apps can only be built on macOS devices. Use {cyan eas build -p ios} to build in the cloud.`\n );\n }\n}\n"],"names":["runIosAsync","debug","require","projectRoot","options","setNodeEnv","configuration","load","assertPlatform","install","ensureNativeProjectAsync","platform","maybePromptToSyncPodsAsync","props","profile","resolveOptionsAsync","rebundle","Log","warn","binaryPath","binary","isSimulator","Error","appId","AppleAppIdResolver","getAppIdAsync","possibleBinaryPath","getContainerPathAsync","device","CommandError","log","spawnAsync","path","join","resolve","possibleBundleOutput","fs","existsSync","exportEagerAsync","resetCache","dev","assetsDest","bundleOutput","getValidBinaryPathAsync","eagerBundleOptions","JSON","stringify","buildOutput","XcodeBuild","buildAsync","getAppBinaryPath","shouldStartBundler","ensurePortAvailabilityAsync","launchInfo","getLaunchInfoForBinaryAsync","isCustomBinary","simctlAsync","udid","bundleId","error","manager","startBundlerAsync","port","headless","scheme","schemes","getSchemesForIosAsync","launchAppAsync","logProjectLogsLocation","stopAsync","process","exit","chalk"],"mappings":";;;;+BA0BsBA;;;eAAAA;;;;gEA1BC;;;;;;;gEACL;;;;;;;gEACH;;;;;;;gEACE;;;;;;6DAEI;oCACc;2BACQ;yBAChB;sBACiB;yBACpB;wBACc;qCACG;uBACF;8BACL;oEACN;2BAEgC;gCACxB;wCACI;6BACP;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AAC,CAACnD,QAAQgB,MAAM;IAEvC,wIAAwI;IACxI,IAAIP,MAAMQ,WAAW,EAAE;QACrB,IAAI;YACF,MAAMmC,IAAAA,mBAAW,EAAC;gBAAC;gBAAa3C,MAAMe,MAAM,CAAC6B,IAAI;gBAAEJ,WAAWK,QAAQ;aAAC;QACzE,EAAE,OAAOC,OAAO;YACd,gHAAgH;YAChH1D,MAAM,kEAAkE0D;QAC1E;IACF;IAEA,kEAAkE;IAClE,oCAAoC;IACpC,MAAMC,UAAU,MAAMC,IAAAA,+BAAiB,EAAC1D,aAAa;QACnD2D,MAAMjD,MAAMiD,IAAI;QAChBC,UAAU,CAAClD,MAAMsC,kBAAkB;QACnC,sEAAsE;QAEtEa,QAAQT,iBAEJF,WAAWY,OAAO,CAAC,EAAE,IAEpB,QAAA,MAAMC,IAAAA,6BAAqB,EAAC/D,iCAA7B,AAAC,KAA2C,CAAC,EAAE;IACrD;IAEA,iDAAiD;IACjD,MAAMgE,IAAAA,yBAAc,EAClBhD,YACAyC,SACA;QACEvC,aAAaR,MAAMQ,WAAW;QAC9BO,QAAQf,MAAMe,MAAM;QACpBuB,oBAAoBtC,MAAMsC,kBAAkB;IAC9C,GACAE,WAAWK,QAAQ;IAGrB,kDAAkD;IAClD,IAAI7C,MAAMsC,kBAAkB,EAAE;QAC5BiB,IAAAA,6BAAsB;IACxB,OAAO;QACL,MAAMR,QAAQS,SAAS;IACzB;AACF;AAEA,SAAS7D;IACP,IAAI8D,QAAQ3D,QAAQ,KAAK,UAAU;QACjCM,KAAIsD,IAAI,CACNC,IAAAA,gBAAK,CAAA,CAAC,+FAA+F,CAAC;IAE1G;AACF"}
1
+ {"version":3,"sources":["../../../../src/run/ios/runIosAsync.ts"],"sourcesContent":["import spawnAsync from '@expo/spawn-async';\nimport chalk from 'chalk';\nimport fs from 'fs';\nimport path from 'path';\n\nimport * as Log from '../../log';\nimport { AppleAppIdResolver } from '../../start/platforms/ios/AppleAppIdResolver';\nimport { maybePromptToSyncPodsAsync } from '../../utils/cocoapods';\nimport { setNodeEnv } from '../../utils/nodeEnv';\nimport { ensurePortAvailabilityAsync } from '../../utils/port';\nimport { profile } from '../../utils/profile';\nimport { getSchemesForIosAsync } from '../../utils/scheme';\nimport { ensureNativeProjectAsync } from '../ensureNativeProject';\nimport { logProjectLogsLocation } from '../hints';\nimport { startBundlerAsync } from '../startBundler';\nimport * as XcodeBuild from './XcodeBuild';\nimport { Options } from './XcodeBuild.types';\nimport { getLaunchInfoForBinaryAsync, launchAppAsync } from './launchApp';\nimport { resolveOptionsAsync } from './options/resolveOptions';\nimport { getValidBinaryPathAsync } from './validateExternalBinary';\nimport { exportEagerAsync } from '../../export/embed/exportEager';\nimport { getContainerPathAsync, simctlAsync } from '../../start/platforms/ios/simctl';\nimport { CommandError } from '../../utils/errors';\n\nconst debug = require('debug')('expo:run:ios');\n\nexport async function runIosAsync(projectRoot: string, options: Options) {\n setNodeEnv(options.configuration === 'Release' ? 'production' : 'development');\n require('@expo/env').load(projectRoot);\n\n assertPlatform();\n\n const install = !!options.install;\n\n if ((await ensureNativeProjectAsync(projectRoot, { platform: 'ios', install })) && install) {\n await maybePromptToSyncPodsAsync(projectRoot);\n }\n\n // Resolve the CLI arguments into useable options.\n const props = await profile(resolveOptionsAsync)(projectRoot, options);\n\n if (options.rebundle) {\n Log.warn(`The --unstable-rebundle flag is experimental and may not work as expected.`);\n // Get the existing binary path to re-bundle the app.\n\n let binaryPath: string;\n if (!options.binary) {\n if (!props.isSimulator) {\n throw new Error('Re-bundling on physical devices requires the --binary flag.');\n }\n const appId = await new AppleAppIdResolver(projectRoot).getAppIdAsync();\n const possibleBinaryPath = await getContainerPathAsync(props.device, {\n appId,\n });\n if (!possibleBinaryPath) {\n throw new CommandError(\n `Cannot rebundle because no --binary was provided and no existing binary was found on the device for ID: ${appId}.`\n );\n }\n binaryPath = possibleBinaryPath;\n Log.log('Re-using existing binary path:', binaryPath);\n // Set the binary path to the existing binary path.\n options.binary = binaryPath;\n }\n\n Log.log('Rebundling the Expo config file');\n // Re-bundle the config file the same way the app was originally bundled.\n await spawnAsync('node', [\n path.join(require.resolve('expo-constants/package.json'), '../scripts/getAppConfig.js'),\n projectRoot,\n path.join(options.binary, 'EXConstants.bundle'),\n ]);\n // Re-bundle the app.\n\n const possibleBundleOutput = path.join(options.binary, 'main.jsbundle');\n\n if (fs.existsSync(possibleBundleOutput)) {\n Log.log('Rebundling the app...');\n await exportEagerAsync(projectRoot, {\n resetCache: false,\n dev: false,\n platform: 'ios',\n assetsDest: path.join(options.binary, 'assets'),\n bundleOutput: possibleBundleOutput,\n });\n } else {\n Log.warn('Bundle output not found at expected location:', possibleBundleOutput);\n }\n }\n\n let binaryPath: string;\n if (options.binary) {\n binaryPath = await getValidBinaryPathAsync(options.binary, props);\n Log.log('Using custom binary path:', binaryPath);\n } else {\n let eagerBundleOptions: string | undefined;\n\n if (options.configuration === 'Release') {\n eagerBundleOptions = JSON.stringify(\n await exportEagerAsync(projectRoot, {\n dev: false,\n platform: 'ios',\n })\n );\n }\n\n // Spawn the `xcodebuild` process to create the app binary.\n const buildOutput = await XcodeBuild.buildAsync({\n ...props,\n eagerBundleOptions,\n });\n\n // Find the path to the built app binary, this will be used to install the binary\n // on a device.\n binaryPath = await profile(XcodeBuild.getAppBinaryPath)(buildOutput);\n }\n debug('Binary path:', binaryPath);\n\n // Ensure the port hasn't become busy during the build.\n if (props.shouldStartBundler && !(await ensurePortAvailabilityAsync(projectRoot, props))) {\n props.shouldStartBundler = false;\n }\n\n const launchInfo = await getLaunchInfoForBinaryAsync(binaryPath);\n const isCustomBinary = !!options.binary;\n\n // Always close the app before launching on a simulator. Otherwise certain cached resources like the splashscreen will not be available.\n if (props.isSimulator) {\n try {\n await simctlAsync(['terminate', props.device.udid, launchInfo.bundleId]);\n } catch (error) {\n // If we failed it's likely that the app was not running to begin with and we will get an `invalid device` error\n debug('Failed to terminate app (possibly because it was not running):', error);\n }\n }\n\n // Start the dev server which creates all of the required info for\n // launching the app on a simulator.\n const manager = await startBundlerAsync(projectRoot, {\n port: props.port,\n headless: !props.shouldStartBundler,\n // If a scheme is specified then use that instead of the package name.\n\n scheme: isCustomBinary\n ? // If launching a custom binary, use the schemes in the Info.plist.\n launchInfo.schemes[0]\n : // If a scheme is specified then use that instead of the package name.\n (await getSchemesForIosAsync(projectRoot))?.[0],\n });\n\n // Install and launch the app binary on a device.\n await launchAppAsync(\n binaryPath,\n manager,\n {\n isSimulator: props.isSimulator,\n device: props.device,\n shouldStartBundler: props.shouldStartBundler,\n },\n launchInfo.bundleId\n );\n\n // Log the location of the JS logs for the device.\n if (props.shouldStartBundler) {\n logProjectLogsLocation();\n } else {\n await manager.stopAsync();\n }\n}\n\nfunction assertPlatform() {\n if (process.platform !== 'darwin') {\n Log.exit(\n chalk`iOS apps can only be built on macOS devices. Use {cyan eas build -p ios} to build in the cloud.`\n );\n }\n}\n"],"names":["runIosAsync","debug","require","projectRoot","options","setNodeEnv","configuration","load","assertPlatform","install","ensureNativeProjectAsync","platform","maybePromptToSyncPodsAsync","props","profile","resolveOptionsAsync","rebundle","Log","warn","binaryPath","binary","isSimulator","Error","appId","AppleAppIdResolver","getAppIdAsync","possibleBinaryPath","getContainerPathAsync","device","CommandError","log","spawnAsync","path","join","resolve","possibleBundleOutput","fs","existsSync","exportEagerAsync","resetCache","dev","assetsDest","bundleOutput","getValidBinaryPathAsync","eagerBundleOptions","JSON","stringify","buildOutput","XcodeBuild","buildAsync","getAppBinaryPath","shouldStartBundler","ensurePortAvailabilityAsync","launchInfo","getLaunchInfoForBinaryAsync","isCustomBinary","simctlAsync","udid","bundleId","error","manager","startBundlerAsync","port","headless","scheme","schemes","getSchemesForIosAsync","launchAppAsync","logProjectLogsLocation","stopAsync","process","exit","chalk"],"mappings":"AAAA;;;;+BA0BsBA,aAAW;;aAAXA,WAAW;;;8DA1BV,mBAAmB;;;;;;;8DACxB,OAAO;;;;;;;8DACV,IAAI;;;;;;;8DACF,MAAM;;;;;;2DAEF,WAA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AAM,EAAEf,KAAK,CAACe,MAAM;QACpBuB,kBAAkB,EAAEtC,KAAK,CAACsC,kBAAkB;KAC7C,EACDE,UAAU,CAACK,QAAQ,CACpB,CAAC;IAEF,kDAAkD;IAClD,IAAI7C,KAAK,CAACsC,kBAAkB,EAAE;QAC5BiB,IAAAA,MAAsB,uBAAA,GAAE,CAAC;IAC3B,OAAO;QACL,MAAMR,OAAO,CAACS,SAAS,EAAE,CAAC;IAC5B,CAAC;AACH,CAAC;AAED,SAAS7D,cAAc,GAAG;IACxB,IAAI8D,OAAO,CAAC3D,QAAQ,KAAK,QAAQ,EAAE;QACjCM,IAAG,CAACsD,IAAI,CACNC,IAAAA,MAAK,EAAA,QAAA,CAAA,CAAC,+FAA+F,CAAC,CACvG,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -4,19 +4,17 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "getValidBinaryPathAsync", {
6
6
  enumerable: true,
7
- get: function() {
8
- return getValidBinaryPathAsync;
9
- }
7
+ get: ()=>getValidBinaryPathAsync
10
8
  });
11
- function _spawnasync() {
12
- const data = /*#__PURE__*/ _interop_require_default(require("@expo/spawn-async"));
13
- _spawnasync = function() {
9
+ function _spawnAsync() {
10
+ const data = /*#__PURE__*/ _interopRequireDefault(require("@expo/spawn-async"));
11
+ _spawnAsync = function() {
14
12
  return data;
15
13
  };
16
14
  return data;
17
15
  }
18
16
  function _fs() {
19
- const data = /*#__PURE__*/ _interop_require_default(require("fs"));
17
+ const data = /*#__PURE__*/ _interopRequireDefault(require("fs"));
20
18
  _fs = function() {
21
19
  return data;
22
20
  };
@@ -30,7 +28,7 @@ function _glob() {
30
28
  return data;
31
29
  }
32
30
  function _path() {
33
- const data = /*#__PURE__*/ _interop_require_default(require("path"));
31
+ const data = /*#__PURE__*/ _interopRequireDefault(require("path"));
34
32
  _path = function() {
35
33
  return data;
36
34
  };
@@ -39,21 +37,21 @@ function _path() {
39
37
  const _createTempPath = require("../../utils/createTempPath");
40
38
  const _errors = require("../../utils/errors");
41
39
  const _plist = require("../../utils/plist");
42
- function _interop_require_default(obj) {
40
+ function _interopRequireDefault(obj) {
43
41
  return obj && obj.__esModule ? obj : {
44
42
  default: obj
45
43
  };
46
44
  }
47
- const debug = require('debug')('expo:run:ios:binary');
45
+ const debug = require("debug")("expo:run:ios:binary");
48
46
  async function getValidBinaryPathAsync(input, props) {
49
47
  const resolved = _path().default.resolve(input);
50
48
  if (!_fs().default.existsSync(resolved)) {
51
49
  throw new _errors.CommandError(`The path to the iOS binary does not exist: ${resolved}`);
52
50
  }
53
51
  // If the file is an ipa then move it to a temp directory and extract the app binary.
54
- if (resolved.endsWith('.ipa')) {
52
+ if (resolved.endsWith(".ipa")) {
55
53
  const outputPath = (0, _createTempPath.createTempDirectoryPath)();
56
- debug('Extracting IPA:', resolved, outputPath);
54
+ debug("Extracting IPA:", resolved, outputPath);
57
55
  const appDir = await extractIpaAsync(resolved, outputPath);
58
56
  if (props.isSimulator) {
59
57
  assertProvisionedForSimulator(appDir);
@@ -73,40 +71,40 @@ async function extractIpaAsync(ipaPath, outputPath) {
73
71
  }
74
72
  // Use the unzip command to extract the IPA file
75
73
  try {
76
- await (0, _spawnasync().default)('unzip', [
77
- '-o',
74
+ await (0, _spawnAsync().default)("unzip", [
75
+ "-o",
78
76
  ipaPath,
79
- '-d',
77
+ "-d",
80
78
  outputPath
81
79
  ]);
82
80
  } catch (error) {
83
81
  throw new Error(`Error extracting IPA: ${error.message}`);
84
82
  }
85
- const appBinPaths = await (0, _glob().glob)('Payload/*.app', {
83
+ const appBinPaths = await (0, _glob().glob)("Payload/*.app", {
86
84
  cwd: outputPath,
87
85
  absolute: true,
88
86
  maxDepth: 2
89
87
  });
90
88
  if (appBinPaths.length === 0) {
91
- throw new Error('No .app directory found in the IPA');
89
+ throw new Error("No .app directory found in the IPA");
92
90
  }
93
91
  return appBinPaths[0];
94
92
  }
95
93
  async function assertProvisionedForSimulator(appPath) {
96
- const provisionPath = _path().default.join(appPath, 'embedded.mobileprovision');
94
+ const provisionPath = _path().default.join(appPath, "embedded.mobileprovision");
97
95
  if (!_fs().default.existsSync(provisionPath)) {
98
96
  // This can often result in false positives.
99
- debug('No embedded.mobileprovision file found. Likely provisioned for simulator.');
97
+ debug("No embedded.mobileprovision file found. Likely provisioned for simulator.");
100
98
  return;
101
99
  }
102
- const provisionData = _fs().default.readFileSync(provisionPath, 'utf8');
103
- const start = provisionData.indexOf('<?xml');
104
- const end = provisionData.indexOf('</plist>') + 8;
100
+ const provisionData = _fs().default.readFileSync(provisionPath, "utf8");
101
+ const start = provisionData.indexOf("<?xml");
102
+ const end = provisionData.indexOf("</plist>") + 8;
105
103
  const plistData = provisionData.substring(start, end);
106
104
  const parsedData = await (0, _plist.parsePlistAsync)(plistData);
107
- const platforms = parsedData['ProvisionsAllDevices'];
105
+ const platforms = parsedData["ProvisionsAllDevices"];
108
106
  if (platforms) {
109
- throw new _errors.CommandError('The app binary is provisioned for devices, and cannot be run on simulators.');
107
+ throw new _errors.CommandError("The app binary is provisioned for devices, and cannot be run on simulators.");
110
108
  }
111
109
  }
112
110
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/run/ios/validateExternalBinary.ts"],"sourcesContent":["import spawnAsync from '@expo/spawn-async';\nimport fs from 'fs';\nimport { glob as globAsync } from 'glob';\nimport path from 'path';\n\nimport { createTempDirectoryPath } from '../../utils/createTempPath';\nimport { CommandError } from '../../utils/errors';\nimport { parsePlistAsync } from '../../utils/plist';\n\nconst debug = require('debug')('expo:run:ios:binary');\n\nexport async function getValidBinaryPathAsync(input: string, props: { isSimulator: boolean }) {\n const resolved = path.resolve(input);\n\n if (!fs.existsSync(resolved)) {\n throw new CommandError(`The path to the iOS binary does not exist: ${resolved}`);\n }\n\n // If the file is an ipa then move it to a temp directory and extract the app binary.\n if (resolved.endsWith('.ipa')) {\n const outputPath = createTempDirectoryPath();\n debug('Extracting IPA:', resolved, outputPath);\n const appDir = await extractIpaAsync(resolved, outputPath);\n\n if (props.isSimulator) {\n assertProvisionedForSimulator(appDir);\n } else {\n // TODO: Assert provisioned for devices in the future (this is difficult).\n }\n return appDir;\n }\n return resolved;\n}\n\nasync function extractIpaAsync(ipaPath: string, outputPath: string): Promise<string> {\n // Create the output directory if it does not exist\n if (!fs.existsSync(outputPath)) {\n fs.mkdirSync(outputPath, { recursive: true });\n }\n\n // Use the unzip command to extract the IPA file\n try {\n await spawnAsync('unzip', ['-o', ipaPath, '-d', outputPath]);\n } catch (error: any) {\n throw new Error(`Error extracting IPA: ${error.message}`);\n }\n\n const appBinPaths = await globAsync('Payload/*.app', {\n cwd: outputPath,\n absolute: true,\n maxDepth: 2,\n });\n\n if (appBinPaths.length === 0) {\n throw new Error('No .app directory found in the IPA');\n }\n\n return appBinPaths[0];\n}\n\nasync function assertProvisionedForSimulator(appPath: string) {\n const provisionPath = path.join(appPath, 'embedded.mobileprovision');\n\n if (!fs.existsSync(provisionPath)) {\n // This can often result in false positives.\n debug('No embedded.mobileprovision file found. Likely provisioned for simulator.');\n return;\n }\n\n const provisionData = fs.readFileSync(provisionPath, 'utf8');\n const start = provisionData.indexOf('<?xml');\n const end = provisionData.indexOf('</plist>') + 8;\n const plistData = provisionData.substring(start, end);\n const parsedData = await parsePlistAsync(plistData);\n\n const platforms = parsedData['ProvisionsAllDevices'];\n if (platforms) {\n throw new CommandError(\n 'The app binary is provisioned for devices, and cannot be run on simulators.'\n );\n }\n}\n"],"names":["getValidBinaryPathAsync","debug","require","input","props","resolved","path","resolve","fs","existsSync","CommandError","endsWith","outputPath","createTempDirectoryPath","appDir","extractIpaAsync","isSimulator","assertProvisionedForSimulator","ipaPath","mkdirSync","recursive","spawnAsync","error","Error","message","appBinPaths","globAsync","cwd","absolute","maxDepth","length","appPath","provisionPath","join","provisionData","readFileSync","start","indexOf","end","plistData","substring","parsedData","parsePlistAsync","platforms"],"mappings":";;;;+BAWsBA;;;eAAAA;;;;gEAXC;;;;;;;gEACR;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B,IAAI,CAACF,SAAS;IAEzC,IAAI,CAACvB,aAAE,CAACC,UAAU,CAACuB,gBAAgB;QACjC,4CAA4C;QAC5C/B,MAAM;QACN;IACF;IAEA,MAAMiC,gBAAgB1B,aAAE,CAAC2B,YAAY,CAACH,eAAe;IACrD,MAAMI,QAAQF,cAAcG,OAAO,CAAC;IACpC,MAAMC,MAAMJ,cAAcG,OAAO,CAAC,cAAc;IAChD,MAAME,YAAYL,cAAcM,SAAS,CAACJ,OAAOE;IACjD,MAAMG,aAAa,MAAMC,IAAAA,sBAAe,EAACH;IAEzC,MAAMI,YAAYF,UAAU,CAAC,uBAAuB;IACpD,IAAIE,WAAW;QACb,MAAM,IAAIjC,oBAAY,CACpB;IAEJ;AACF"}
1
+ {"version":3,"sources":["../../../../src/run/ios/validateExternalBinary.ts"],"sourcesContent":["import spawnAsync from '@expo/spawn-async';\nimport fs from 'fs';\nimport { glob as globAsync } from 'glob';\nimport path from 'path';\n\nimport { createTempDirectoryPath } from '../../utils/createTempPath';\nimport { CommandError } from '../../utils/errors';\nimport { parsePlistAsync } from '../../utils/plist';\n\nconst debug = require('debug')('expo:run:ios:binary');\n\nexport async function getValidBinaryPathAsync(input: string, props: { isSimulator: boolean }) {\n const resolved = path.resolve(input);\n\n if (!fs.existsSync(resolved)) {\n throw new CommandError(`The path to the iOS binary does not exist: ${resolved}`);\n }\n\n // If the file is an ipa then move it to a temp directory and extract the app binary.\n if (resolved.endsWith('.ipa')) {\n const outputPath = createTempDirectoryPath();\n debug('Extracting IPA:', resolved, outputPath);\n const appDir = await extractIpaAsync(resolved, outputPath);\n\n if (props.isSimulator) {\n assertProvisionedForSimulator(appDir);\n } else {\n // TODO: Assert provisioned for devices in the future (this is difficult).\n }\n return appDir;\n }\n return resolved;\n}\n\nasync function extractIpaAsync(ipaPath: string, outputPath: string): Promise<string> {\n // Create the output directory if it does not exist\n if (!fs.existsSync(outputPath)) {\n fs.mkdirSync(outputPath, { recursive: true });\n }\n\n // Use the unzip command to extract the IPA file\n try {\n await spawnAsync('unzip', ['-o', ipaPath, '-d', outputPath]);\n } catch (error: any) {\n throw new Error(`Error extracting IPA: ${error.message}`);\n }\n\n const appBinPaths = await globAsync('Payload/*.app', {\n cwd: outputPath,\n absolute: true,\n maxDepth: 2,\n });\n\n if (appBinPaths.length === 0) {\n throw new Error('No .app directory found in the IPA');\n }\n\n return appBinPaths[0];\n}\n\nasync function assertProvisionedForSimulator(appPath: string) {\n const provisionPath = path.join(appPath, 'embedded.mobileprovision');\n\n if (!fs.existsSync(provisionPath)) {\n // This can often result in false positives.\n debug('No embedded.mobileprovision file found. Likely provisioned for simulator.');\n return;\n }\n\n const provisionData = fs.readFileSync(provisionPath, 'utf8');\n const start = provisionData.indexOf('<?xml');\n const end = provisionData.indexOf('</plist>') + 8;\n const plistData = provisionData.substring(start, end);\n const parsedData = await parsePlistAsync(plistData);\n\n const platforms = parsedData['ProvisionsAllDevices'];\n if (platforms) {\n throw new CommandError(\n 'The app binary is provisioned for devices, and cannot be run on simulators.'\n );\n }\n}\n"],"names":["getValidBinaryPathAsync","debug","require","input","props","resolved","path","resolve","fs","existsSync","CommandError","endsWith","outputPath","createTempDirectoryPath","appDir","extractIpaAsync","isSimulator","assertProvisionedForSimulator","ipaPath","mkdirSync","recursive","spawnAsync","error","Error","message","appBinPaths","globAsync","cwd","absolute","maxDepth","length","appPath","provisionPath","join","provisionData","readFileSync","start","indexOf","end","plistData","substring","parsedData","parsePlistAsync","platforms"],"mappings":"AAAA;;;;+BAWsBA,yBAAuB;;aAAvBA,uBAAuB;;;8DAXtB,mBAAmB;;;;;;;8DAC3B,IAAI;;;;;;;yBACe,MAAM;;;;;;;8DACvB,MAAM;;;;;;gCAEiB,4BAA4B;wBACvC,oBAAoB;uBACjB,mBAAmB;;;;;;AAEnD,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,qBAAqB,CAAC,AAAC;AAE/C,eAAeF,uBAAuB,CAACG,KAAa,EAAEC,KAA+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