@depup/expo__cli 55.0.23-depup.0 → 57.0.9-depup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (594) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +13 -15
  3. package/build/bin/cli +4 -4
  4. package/build/bin/cli.map +1 -1
  5. package/build/src/api/endpoint.js +4 -4
  6. package/build/src/api/endpoint.js.map +1 -1
  7. package/build/src/api/getExpoSchema.js +3 -3
  8. package/build/src/api/getExpoSchema.js.map +1 -1
  9. package/build/src/api/graphql/client.js +26 -14
  10. package/build/src/api/graphql/client.js.map +1 -1
  11. package/build/src/api/graphql/mutations/TunnelMutation.js +31 -0
  12. package/build/src/api/graphql/mutations/TunnelMutation.js.map +1 -0
  13. package/build/src/api/rest/cache/FileSystemResponseCache.js.map +1 -1
  14. package/build/src/api/rest/cache/ResponseCache.js +5 -5
  15. package/build/src/api/rest/cache/ResponseCache.js.map +1 -1
  16. package/build/src/api/rest/client.js +35 -20
  17. package/build/src/api/rest/client.js.map +1 -1
  18. package/build/src/api/rest/wrapFetchWithBaseUrl.js.map +1 -1
  19. package/build/src/api/rest/wrapFetchWithOffline.js.map +1 -1
  20. package/build/src/api/rest/wrapFetchWithProgress.js.map +1 -1
  21. package/build/src/api/rest/wrapFetchWithUserAgent.js.map +1 -1
  22. package/build/src/api/updateDevelopmentSession.js +6 -5
  23. package/build/src/api/updateDevelopmentSession.js.map +1 -1
  24. package/build/src/api/user/UserSettings.js +28 -15
  25. package/build/src/api/user/UserSettings.js.map +1 -1
  26. package/build/src/api/user/actions.js +10 -3
  27. package/build/src/api/user/actions.js.map +1 -1
  28. package/build/src/api/user/expoSsoLauncher.js +76 -24
  29. package/build/src/api/user/expoSsoLauncher.js.map +1 -1
  30. package/build/src/api/user/otp.js +4 -4
  31. package/build/src/api/user/otp.js.map +1 -1
  32. package/build/src/api/user/user.js +19 -7
  33. package/build/src/api/user/user.js.map +1 -1
  34. package/build/src/config/configAsync.js +3 -3
  35. package/build/src/config/configAsync.js.map +1 -1
  36. package/build/src/config/index.js.map +1 -1
  37. package/build/src/customize/customizeAsync.js.map +1 -1
  38. package/build/src/customize/generate.js +7 -4
  39. package/build/src/customize/generate.js.map +1 -1
  40. package/build/src/customize/index.js.map +1 -1
  41. package/build/src/customize/templates.js +4 -6
  42. package/build/src/customize/templates.js.map +1 -1
  43. package/build/src/customize/typescript.js.map +1 -1
  44. package/build/src/events/index.js +19 -15
  45. package/build/src/events/index.js.map +1 -1
  46. package/build/src/events/stream.js +94 -24
  47. package/build/src/events/stream.js.map +1 -1
  48. package/build/src/expoUpdatesExports.js +4 -4
  49. package/build/src/expoUpdatesExports.js.map +1 -1
  50. package/build/src/export/createMetadataJson.js +2 -1
  51. package/build/src/export/createMetadataJson.js.map +1 -1
  52. package/build/src/export/embed/exportEmbedAsync.js +45 -20
  53. package/build/src/export/embed/exportEmbedAsync.js.map +1 -1
  54. package/build/src/export/embed/exportServer.js +1 -1
  55. package/build/src/export/embed/exportServer.js.map +1 -1
  56. package/build/src/export/embed/index.js.map +1 -1
  57. package/build/src/export/embed/resolveOptions.js +7 -6
  58. package/build/src/export/embed/resolveOptions.js.map +1 -1
  59. package/build/src/export/embed/xcodeCompilerLogger.js +7 -7
  60. package/build/src/export/embed/xcodeCompilerLogger.js.map +1 -1
  61. package/build/src/export/exportApp.js +32 -28
  62. package/build/src/export/exportApp.js.map +1 -1
  63. package/build/src/export/exportAssets.js +5 -5
  64. package/build/src/export/exportAssets.js.map +1 -1
  65. package/build/src/export/exportAsync.js.map +1 -1
  66. package/build/src/export/exportDomComponents.js +5 -5
  67. package/build/src/export/exportDomComponents.js.map +1 -1
  68. package/build/src/export/exportHermes.js +23 -13
  69. package/build/src/export/exportHermes.js.map +1 -1
  70. package/build/src/export/exportStaticAsync.js +30 -21
  71. package/build/src/export/exportStaticAsync.js.map +1 -1
  72. package/build/src/export/favicon.js +26 -34
  73. package/build/src/export/favicon.js.map +1 -1
  74. package/build/src/export/getPublicExpoManifest.js.map +1 -1
  75. package/build/src/export/getResolvedLocales.js.map +1 -1
  76. package/build/src/export/html.js +3 -3
  77. package/build/src/export/html.js.map +1 -1
  78. package/build/src/export/index.js +2 -0
  79. package/build/src/export/index.js.map +1 -1
  80. package/build/src/export/metroAssetLocalPath.js +4 -4
  81. package/build/src/export/metroAssetLocalPath.js.map +1 -1
  82. package/build/src/export/persistMetroAssets.js +6 -6
  83. package/build/src/export/persistMetroAssets.js.map +1 -1
  84. package/build/src/export/publicFolder.js +16 -4
  85. package/build/src/export/publicFolder.js.map +1 -1
  86. package/build/src/export/resolveOptions.js +12 -13
  87. package/build/src/export/resolveOptions.js.map +1 -1
  88. package/build/src/export/saveAssets.js +3 -3
  89. package/build/src/export/saveAssets.js.map +1 -1
  90. package/build/src/export/static.js +6 -0
  91. package/build/src/export/static.js.map +1 -0
  92. package/build/src/export/web/exportWebAsync.js.map +1 -1
  93. package/build/src/export/web/index.js.map +1 -1
  94. package/build/src/export/writeContents.js.map +1 -1
  95. package/build/src/install/checkPackages.js +1 -28
  96. package/build/src/install/checkPackages.js.map +1 -1
  97. package/build/src/install/fixPackages.js.map +1 -1
  98. package/build/src/install/index.js.map +1 -1
  99. package/build/src/install/installAsync.js +3 -3
  100. package/build/src/install/installAsync.js.map +1 -1
  101. package/build/src/install/installExpoPackage.js.map +1 -1
  102. package/build/src/install/resolveOptions.js.map +1 -1
  103. package/build/src/install/utils/autoAddConfigPlugins.js +3 -3
  104. package/build/src/install/utils/autoAddConfigPlugins.js.map +1 -1
  105. package/build/src/install/utils/checkPackagesCompatibility.js +32 -16
  106. package/build/src/install/utils/checkPackagesCompatibility.js.map +1 -1
  107. package/build/src/lint/ESlintPrerequisite.js.map +1 -1
  108. package/build/src/log.js +32 -14
  109. package/build/src/log.js.map +1 -1
  110. package/build/src/login/index.js +25 -5
  111. package/build/src/login/index.js.map +1 -1
  112. package/build/src/logout/index.js.map +1 -1
  113. package/build/src/prebuild/clearNativeFolder.js +49 -14
  114. package/build/src/prebuild/clearNativeFolder.js.map +1 -1
  115. package/build/src/prebuild/configureProjectAsync.js.map +1 -1
  116. package/build/src/prebuild/copyTemplateFiles.js +3 -3
  117. package/build/src/prebuild/copyTemplateFiles.js.map +1 -1
  118. package/build/src/prebuild/ensureConfigAsync.js.map +1 -1
  119. package/build/src/prebuild/index.js +3 -2
  120. package/build/src/prebuild/index.js.map +1 -1
  121. package/build/src/prebuild/prebuildAsync.js +31 -6
  122. package/build/src/prebuild/prebuildAsync.js.map +1 -1
  123. package/build/src/prebuild/renameTemplateAppName.js +8 -5
  124. package/build/src/prebuild/renameTemplateAppName.js.map +1 -1
  125. package/build/src/prebuild/resolveOptions.js +7 -7
  126. package/build/src/prebuild/resolveOptions.js.map +1 -1
  127. package/build/src/prebuild/resolveTemplate.js +10 -5
  128. package/build/src/prebuild/resolveTemplate.js.map +1 -1
  129. package/build/src/prebuild/updateFromTemplate.js +3 -3
  130. package/build/src/prebuild/updateFromTemplate.js.map +1 -1
  131. package/build/src/prebuild/updatePackageJson.js +7 -7
  132. package/build/src/prebuild/updatePackageJson.js.map +1 -1
  133. package/build/src/prebuild/validateTemplatePlatforms.js.map +1 -1
  134. package/build/src/register/index.js.map +1 -1
  135. package/build/src/run/android/index.js.map +1 -1
  136. package/build/src/run/android/resolveGradlePropsAsync.js +3 -4
  137. package/build/src/run/android/resolveGradlePropsAsync.js.map +1 -1
  138. package/build/src/run/android/resolveInstallApkName.js +48 -1
  139. package/build/src/run/android/resolveInstallApkName.js.map +1 -1
  140. package/build/src/run/android/resolveLaunchProps.js +4 -1
  141. package/build/src/run/android/resolveLaunchProps.js.map +1 -1
  142. package/build/src/run/android/resolveOptions.js.map +1 -1
  143. package/build/src/run/android/runAndroidAsync.js.map +1 -1
  144. package/build/src/run/ensureNativeProject.js.map +1 -1
  145. package/build/src/run/hints.js +4 -4
  146. package/build/src/run/hints.js.map +1 -1
  147. package/build/src/run/index.js.map +1 -1
  148. package/build/src/run/ios/XcodeBuild.js +163 -23
  149. package/build/src/run/ios/XcodeBuild.js.map +1 -1
  150. package/build/src/run/ios/appleDevice/AppleDevice.js +6 -5
  151. package/build/src/run/ios/appleDevice/AppleDevice.js.map +1 -1
  152. package/build/src/run/ios/appleDevice/ClientManager.js.map +1 -1
  153. package/build/src/run/ios/appleDevice/client/AFCClient.js +10 -16
  154. package/build/src/run/ios/appleDevice/client/AFCClient.js.map +1 -1
  155. package/build/src/run/ios/appleDevice/client/DebugserverClient.js +1 -1
  156. package/build/src/run/ios/appleDevice/client/DebugserverClient.js.map +1 -1
  157. package/build/src/run/ios/appleDevice/client/InstallationProxyClient.js +2 -1
  158. package/build/src/run/ios/appleDevice/client/InstallationProxyClient.js.map +1 -1
  159. package/build/src/run/ios/appleDevice/client/LockdowndClient.js +1 -1
  160. package/build/src/run/ios/appleDevice/client/LockdowndClient.js.map +1 -1
  161. package/build/src/run/ios/appleDevice/client/MobileImageMounterClient.js.map +1 -1
  162. package/build/src/run/ios/appleDevice/client/ServiceClient.js +3 -3
  163. package/build/src/run/ios/appleDevice/client/ServiceClient.js.map +1 -1
  164. package/build/src/run/ios/appleDevice/client/UsbmuxdClient.js.map +1 -1
  165. package/build/src/run/ios/appleDevice/installOnDeviceAsync.js +3 -3
  166. package/build/src/run/ios/appleDevice/installOnDeviceAsync.js.map +1 -1
  167. package/build/src/run/ios/appleDevice/protocol/AFCProtocol.js +16 -13
  168. package/build/src/run/ios/appleDevice/protocol/AFCProtocol.js.map +1 -1
  169. package/build/src/run/ios/appleDevice/protocol/AbstractProtocol.js +6 -6
  170. package/build/src/run/ios/appleDevice/protocol/AbstractProtocol.js.map +1 -1
  171. package/build/src/run/ios/appleDevice/protocol/GDBProtocol.js +5 -5
  172. package/build/src/run/ios/appleDevice/protocol/GDBProtocol.js.map +1 -1
  173. package/build/src/run/ios/appleDevice/protocol/LockdownProtocol.js +7 -7
  174. package/build/src/run/ios/appleDevice/protocol/LockdownProtocol.js.map +1 -1
  175. package/build/src/run/ios/appleDevice/protocol/UsbmuxProtocol.js +5 -5
  176. package/build/src/run/ios/appleDevice/protocol/UsbmuxProtocol.js.map +1 -1
  177. package/build/src/run/ios/codeSigning/Security.js +8 -8
  178. package/build/src/run/ios/codeSigning/Security.js.map +1 -1
  179. package/build/src/run/ios/codeSigning/configureCodeSigning.js +5 -3
  180. package/build/src/run/ios/codeSigning/configureCodeSigning.js.map +1 -1
  181. package/build/src/run/ios/codeSigning/resolveCertificateSigningIdentity.js +7 -5
  182. package/build/src/run/ios/codeSigning/resolveCertificateSigningIdentity.js.map +1 -1
  183. package/build/src/run/ios/codeSigning/settings.js +3 -3
  184. package/build/src/run/ios/codeSigning/settings.js.map +1 -1
  185. package/build/src/run/ios/codeSigning/xcodeCodeSigning.js +4 -4
  186. package/build/src/run/ios/codeSigning/xcodeCodeSigning.js.map +1 -1
  187. package/build/src/run/ios/index.js +8 -1
  188. package/build/src/run/ios/index.js.map +1 -1
  189. package/build/src/run/ios/launchApp.js +3 -3
  190. package/build/src/run/ios/launchApp.js.map +1 -1
  191. package/build/src/run/ios/options/appleDestinations.js.map +1 -1
  192. package/build/src/run/ios/options/promptDevice.js +3 -3
  193. package/build/src/run/ios/options/promptDevice.js.map +1 -1
  194. package/build/src/run/ios/options/resolveDevice.js +8 -3
  195. package/build/src/run/ios/options/resolveDevice.js.map +1 -1
  196. package/build/src/run/ios/options/resolveNativeScheme.js +4 -4
  197. package/build/src/run/ios/options/resolveNativeScheme.js.map +1 -1
  198. package/build/src/run/ios/options/resolveOptions.js +9 -4
  199. package/build/src/run/ios/options/resolveOptions.js.map +1 -1
  200. package/build/src/run/ios/options/resolveXcodeProject.js.map +1 -1
  201. package/build/src/run/ios/runIosAsync.js +39 -0
  202. package/build/src/run/ios/runIosAsync.js.map +1 -1
  203. package/build/src/run/ios/validateExternalBinary.js.map +1 -1
  204. package/build/src/run/startBundler.js +4 -0
  205. package/build/src/run/startBundler.js.map +1 -1
  206. package/build/src/serve/index.js +4 -1
  207. package/build/src/serve/index.js.map +1 -1
  208. package/build/src/serve/serveAsync.js +23 -11
  209. package/build/src/serve/serveAsync.js.map +1 -1
  210. package/build/src/serve/static.js +69 -0
  211. package/build/src/serve/static.js.map +1 -0
  212. package/build/src/start/checkDependenciesOnStart.js +131 -0
  213. package/build/src/start/checkDependenciesOnStart.js.map +1 -0
  214. package/build/src/start/detectDevClient.js +3 -3
  215. package/build/src/start/detectDevClient.js.map +1 -1
  216. package/build/src/start/doctor/Prerequisite.js +4 -4
  217. package/build/src/start/doctor/Prerequisite.js.map +1 -1
  218. package/build/src/start/doctor/apple/SimulatorAppPrerequisite.js +53 -91
  219. package/build/src/start/doctor/apple/SimulatorAppPrerequisite.js.map +1 -1
  220. package/build/src/start/doctor/apple/XcodePrerequisite.js +3 -3
  221. package/build/src/start/doctor/apple/XcodePrerequisite.js.map +1 -1
  222. package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js +3 -3
  223. package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js.map +1 -1
  224. package/build/src/start/doctor/dependencies/getMissingPackages.js +5 -5
  225. package/build/src/start/doctor/dependencies/getMissingPackages.js.map +1 -1
  226. package/build/src/start/doctor/dependencies/getVersionedPackages.js +5 -5
  227. package/build/src/start/doctor/dependencies/getVersionedPackages.js.map +1 -1
  228. package/build/src/start/doctor/dependencies/reactNativeTv.js +149 -0
  229. package/build/src/start/doctor/dependencies/reactNativeTv.js.map +1 -0
  230. package/build/src/start/doctor/dependencies/resolvePackages.js +4 -4
  231. package/build/src/start/doctor/dependencies/resolvePackages.js.map +1 -1
  232. package/build/src/start/doctor/dependencies/validateDependenciesVersions.js +33 -8
  233. package/build/src/start/doctor/dependencies/validateDependenciesVersions.js.map +1 -1
  234. package/build/src/start/doctor/ngrok/ExternalModule.js +3 -3
  235. package/build/src/start/doctor/ngrok/ExternalModule.js.map +1 -1
  236. package/build/src/start/doctor/ngrok/NgrokResolver.js +3 -3
  237. package/build/src/start/doctor/ngrok/NgrokResolver.js.map +1 -1
  238. package/build/src/start/doctor/typescript/TypeScriptProjectPrerequisite.js.map +1 -1
  239. package/build/src/start/doctor/typescript/updateTSConfig.js +3 -3
  240. package/build/src/start/doctor/typescript/updateTSConfig.js.map +1 -1
  241. package/build/src/start/doctor/web/WebSupportProjectPrerequisite.js +5 -12
  242. package/build/src/start/doctor/web/WebSupportProjectPrerequisite.js.map +1 -1
  243. package/build/src/start/index.js +2 -0
  244. package/build/src/start/index.js.map +1 -1
  245. package/build/src/start/interface/KeyPressHandler.js.map +1 -1
  246. package/build/src/start/interface/cliExtensionMenuItemHandler.js.map +1 -1
  247. package/build/src/start/interface/commandsTable.js +6 -6
  248. package/build/src/start/interface/commandsTable.js.map +1 -1
  249. package/build/src/start/interface/createDevToolsMenuItems.js.map +1 -1
  250. package/build/src/start/interface/interactiveActions.js +49 -6
  251. package/build/src/start/interface/interactiveActions.js.map +1 -1
  252. package/build/src/start/interface/startInterface.js +13 -4
  253. package/build/src/start/interface/startInterface.js.map +1 -1
  254. package/build/src/start/platforms/AppIdResolver.js +4 -0
  255. package/build/src/start/platforms/AppIdResolver.js.map +1 -1
  256. package/build/src/start/platforms/DeviceManager.js.map +1 -1
  257. package/build/src/start/platforms/ExpoGoInstaller.js +13 -4
  258. package/build/src/start/platforms/ExpoGoInstaller.js.map +1 -1
  259. package/build/src/start/platforms/PlatformManager.js.map +1 -1
  260. package/build/src/start/platforms/android/AndroidAppIdResolver.js.map +1 -1
  261. package/build/src/start/platforms/android/AndroidDeviceManager.js.map +1 -1
  262. package/build/src/start/platforms/android/AndroidPlatformManager.js.map +1 -1
  263. package/build/src/start/platforms/android/activateWindow.js.map +1 -1
  264. package/build/src/start/platforms/android/adb.js +36 -34
  265. package/build/src/start/platforms/android/adb.js.map +1 -1
  266. package/build/src/start/platforms/android/adbReverse.js +4 -4
  267. package/build/src/start/platforms/android/adbReverse.js.map +1 -1
  268. package/build/src/start/platforms/android/emulator.js +5 -5
  269. package/build/src/start/platforms/android/emulator.js.map +1 -1
  270. package/build/src/start/platforms/android/getDevices.js.map +1 -1
  271. package/build/src/start/platforms/android/gradle.js +5 -5
  272. package/build/src/start/platforms/android/gradle.js.map +1 -1
  273. package/build/src/start/platforms/android/promptAndroidDevice.js +3 -3
  274. package/build/src/start/platforms/android/promptAndroidDevice.js.map +1 -1
  275. package/build/src/start/platforms/ios/AppleAppIdResolver.js.map +1 -1
  276. package/build/src/start/platforms/ios/AppleDeviceManager.js +20 -6
  277. package/build/src/start/platforms/ios/AppleDeviceManager.js.map +1 -1
  278. package/build/src/start/platforms/ios/ApplePlatformManager.js +11 -0
  279. package/build/src/start/platforms/ios/ApplePlatformManager.js.map +1 -1
  280. package/build/src/start/platforms/ios/devicectl.js +7 -7
  281. package/build/src/start/platforms/ios/devicectl.js.map +1 -1
  282. package/build/src/start/platforms/ios/ensureSimulatorAppRunning.js +26 -11
  283. package/build/src/start/platforms/ios/ensureSimulatorAppRunning.js.map +1 -1
  284. package/build/src/start/platforms/ios/getBestSimulator.js +5 -5
  285. package/build/src/start/platforms/ios/getBestSimulator.js.map +1 -1
  286. package/build/src/start/platforms/ios/promptAppleDevice.js +5 -4
  287. package/build/src/start/platforms/ios/promptAppleDevice.js.map +1 -1
  288. package/build/src/start/platforms/ios/simctl.js +25 -19
  289. package/build/src/start/platforms/ios/simctl.js.map +1 -1
  290. package/build/src/start/platforms/ios/simctlLogging.js +3 -3
  291. package/build/src/start/platforms/ios/simctlLogging.js.map +1 -1
  292. package/build/src/start/platforms/ios/xcrun.js +3 -3
  293. package/build/src/start/platforms/ios/xcrun.js.map +1 -1
  294. package/build/src/start/project/devices.js +6 -6
  295. package/build/src/start/project/devices.js.map +1 -1
  296. package/build/src/start/project/dotExpo.js +4 -3
  297. package/build/src/start/project/dotExpo.js.map +1 -1
  298. package/build/src/start/resolveOptions.js +7 -7
  299. package/build/src/start/resolveOptions.js.map +1 -1
  300. package/build/src/start/server/AsyncNgrok.js +1 -1
  301. package/build/src/start/server/AsyncNgrok.js.map +1 -1
  302. package/build/src/start/server/AsyncWsTunnel.js +120 -35
  303. package/build/src/start/server/AsyncWsTunnel.js.map +1 -1
  304. package/build/src/start/server/Bonjour.js +8 -3
  305. package/build/src/start/server/Bonjour.js.map +1 -1
  306. package/build/src/start/server/BundlerDevServer.js +23 -9
  307. package/build/src/start/server/BundlerDevServer.js.map +1 -1
  308. package/build/src/start/server/DevServerManager.js.map +1 -1
  309. package/build/src/start/server/DevToolsPlugin.js +63 -3
  310. package/build/src/start/server/DevToolsPlugin.js.map +1 -1
  311. package/build/src/start/server/DevToolsPlugin.schema.js +8 -3
  312. package/build/src/start/server/DevToolsPlugin.schema.js.map +1 -1
  313. package/build/src/start/server/DevToolsPluginCliExtensionExecutor.js +58 -23
  314. package/build/src/start/server/DevToolsPluginCliExtensionExecutor.js.map +1 -1
  315. package/build/src/start/server/DevToolsPluginCliExtensionResults.js +29 -0
  316. package/build/src/start/server/DevToolsPluginCliExtensionResults.js.map +1 -1
  317. package/build/src/start/server/DevToolsPluginManager.js +20 -6
  318. package/build/src/start/server/DevToolsPluginManager.js.map +1 -1
  319. package/build/src/start/server/DevToolsPluginServerHelpers.js +83 -0
  320. package/build/src/start/server/DevToolsPluginServerHelpers.js.map +1 -0
  321. package/build/src/start/server/DevelopmentSession.js +41 -24
  322. package/build/src/start/server/DevelopmentSession.js.map +1 -1
  323. package/build/src/start/server/MCP.js +10 -3
  324. package/build/src/start/server/MCP.js.map +1 -1
  325. package/build/src/start/server/MCPDevToolsPluginCLIExtensions.js +15 -5
  326. package/build/src/start/server/MCPDevToolsPluginCLIExtensions.js.map +1 -1
  327. package/build/src/start/server/UrlCreator.js +14 -1
  328. package/build/src/start/server/UrlCreator.js.map +1 -1
  329. package/build/src/start/server/createMCPDevToolsExtensionSchema.js +18 -4
  330. package/build/src/start/server/createMCPDevToolsExtensionSchema.js.map +1 -1
  331. package/build/src/start/server/getStaticRenderFunctions.js +13 -24
  332. package/build/src/start/server/getStaticRenderFunctions.js.map +1 -1
  333. package/build/src/start/server/metro/MetroBundlerDevServer.js +239 -108
  334. package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
  335. package/build/src/start/server/metro/MetroTerminalReporter.js +67 -16
  336. package/build/src/start/server/metro/MetroTerminalReporter.js.map +1 -1
  337. package/build/src/start/server/metro/TerminalReporter.js +22 -4
  338. package/build/src/start/server/metro/TerminalReporter.js.map +1 -1
  339. package/build/src/start/server/metro/createExpoAutolinkingResolver.js +25 -12
  340. package/build/src/start/server/metro/createExpoAutolinkingResolver.js.map +1 -1
  341. package/build/src/start/server/metro/createExpoFallbackResolver.js.map +1 -1
  342. package/build/src/start/server/metro/createFileMap-fork.js +196 -0
  343. package/build/src/start/server/metro/createFileMap-fork.js.map +1 -0
  344. package/build/src/start/server/metro/createServerComponentsMiddleware.js +22 -22
  345. package/build/src/start/server/metro/createServerComponentsMiddleware.js.map +1 -1
  346. package/build/src/start/server/metro/createServerRouteMiddleware.js.map +1 -1
  347. package/build/src/start/server/metro/createTypescriptResolver.js +410 -0
  348. package/build/src/start/server/metro/createTypescriptResolver.js.map +1 -0
  349. package/build/src/start/server/metro/debugging/MessageHandler.js.map +1 -1
  350. package/build/src/start/server/metro/debugging/attachAtlas.js +3 -3
  351. package/build/src/start/server/metro/debugging/attachAtlas.js.map +1 -1
  352. package/build/src/start/server/metro/debugging/createDebugMiddleware.js +6 -5
  353. package/build/src/start/server/metro/debugging/createDebugMiddleware.js.map +1 -1
  354. package/build/src/start/server/metro/debugging/createHandlersFactory.js.map +1 -1
  355. package/build/src/start/server/metro/debugging/messageHandlers/NetworkResponse.js +20 -4
  356. package/build/src/start/server/metro/debugging/messageHandlers/NetworkResponse.js.map +1 -1
  357. package/build/src/start/server/metro/debugging/pageIsSupported.js.map +1 -1
  358. package/build/src/start/server/metro/dev-server/compression.js.map +1 -1
  359. package/build/src/start/server/metro/dev-server/createMessageSocket.js +13 -2
  360. package/build/src/start/server/metro/dev-server/createMessageSocket.js.map +1 -1
  361. package/build/src/start/server/metro/dev-server/createMetroMiddleware.js +9 -2
  362. package/build/src/start/server/metro/dev-server/createMetroMiddleware.js.map +1 -1
  363. package/build/src/start/server/metro/dev-server/utils/socketMessages.js +3 -3
  364. package/build/src/start/server/metro/dev-server/utils/socketMessages.js.map +1 -1
  365. package/build/src/start/server/metro/errors/FailedToResolveNativeOnlyModuleError.js.map +1 -1
  366. package/build/src/start/server/metro/externals.js +4 -4
  367. package/build/src/start/server/metro/externals.js.map +1 -1
  368. package/build/src/start/server/metro/fetchRouterManifest.js +3 -3
  369. package/build/src/start/server/metro/fetchRouterManifest.js.map +1 -1
  370. package/build/src/start/server/metro/getCssModulesFromBundler.js +3 -3
  371. package/build/src/start/server/metro/getCssModulesFromBundler.js.map +1 -1
  372. package/build/src/start/server/metro/instantiateMetro.js +141 -57
  373. package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
  374. package/build/src/start/server/metro/log-box/LogBoxLog.js.map +1 -1
  375. package/build/src/start/server/metro/log-box/LogBoxSymbolication.js +4 -4
  376. package/build/src/start/server/metro/log-box/LogBoxSymbolication.js.map +1 -1
  377. package/build/src/start/server/metro/log-box/formatProjectFilePath.js +3 -3
  378. package/build/src/start/server/metro/log-box/formatProjectFilePath.js.map +1 -1
  379. package/build/src/start/server/metro/metroErrorInterface.js +16 -13
  380. package/build/src/start/server/metro/metroErrorInterface.js.map +1 -1
  381. package/build/src/start/server/metro/metroErrors.js +3 -3
  382. package/build/src/start/server/metro/metroErrors.js.map +1 -1
  383. package/build/src/start/server/metro/metroWatchTypeScriptFiles.js +48 -16
  384. package/build/src/start/server/metro/metroWatchTypeScriptFiles.js.map +1 -1
  385. package/build/src/start/server/metro/resolveLoader.js +3 -3
  386. package/build/src/start/server/metro/resolveLoader.js.map +1 -1
  387. package/build/src/start/server/metro/router.js +23 -14
  388. package/build/src/start/server/metro/router.js.map +1 -1
  389. package/build/src/start/server/metro/runServer-fork.js +13 -10
  390. package/build/src/start/server/metro/runServer-fork.js.map +1 -1
  391. package/build/src/start/server/metro/serializeHtml.js +29 -13
  392. package/build/src/start/server/metro/serializeHtml.js.map +1 -1
  393. package/build/src/start/server/metro/waitForMetroToObserveTypeScriptFile.js +36 -34
  394. package/build/src/start/server/metro/waitForMetroToObserveTypeScriptFile.js.map +1 -1
  395. package/build/src/start/server/metro/withMetroErrorReportingResolver.js +53 -30
  396. package/build/src/start/server/metro/withMetroErrorReportingResolver.js.map +1 -1
  397. package/build/src/start/server/metro/withMetroMultiPlatform.js +187 -126
  398. package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -1
  399. package/build/src/start/server/metro/withMetroResolvers.js +4 -4
  400. package/build/src/start/server/metro/withMetroResolvers.js.map +1 -1
  401. package/build/src/start/server/middleware/ContextModuleSourceMapsMiddleware.js.map +1 -1
  402. package/build/src/start/server/middleware/CorsMiddleware.js +3 -3
  403. package/build/src/start/server/middleware/CorsMiddleware.js.map +1 -1
  404. package/build/src/start/server/middleware/CreateFileMiddleware.js.map +1 -1
  405. package/build/src/start/server/middleware/DevToolsPluginMiddleware.js +60 -9
  406. package/build/src/start/server/middleware/DevToolsPluginMiddleware.js.map +1 -1
  407. package/build/src/start/server/middleware/DomComponentsMiddleware.js +16 -12
  408. package/build/src/start/server/middleware/DomComponentsMiddleware.js.map +1 -1
  409. package/build/src/start/server/middleware/ExpoGoManifestHandlerMiddleware.js +6 -4
  410. package/build/src/start/server/middleware/ExpoGoManifestHandlerMiddleware.js.map +1 -1
  411. package/build/src/start/server/middleware/ExpoMiddleware.js +3 -3
  412. package/build/src/start/server/middleware/ExpoMiddleware.js.map +1 -1
  413. package/build/src/start/server/middleware/FaviconMiddleware.js.map +1 -1
  414. package/build/src/start/server/middleware/HistoryFallbackMiddleware.js.map +1 -1
  415. package/build/src/start/server/middleware/InterstitialPageMiddleware.js +13 -8
  416. package/build/src/start/server/middleware/InterstitialPageMiddleware.js.map +1 -1
  417. package/build/src/start/server/middleware/ManifestMiddleware.js +15 -6
  418. package/build/src/start/server/middleware/ManifestMiddleware.js.map +1 -1
  419. package/build/src/start/server/middleware/OpenMiddleware.js +150 -0
  420. package/build/src/start/server/middleware/OpenMiddleware.js.map +1 -0
  421. package/build/src/start/server/middleware/RuntimeRedirectMiddleware.js +13 -4
  422. package/build/src/start/server/middleware/RuntimeRedirectMiddleware.js.map +1 -1
  423. package/build/src/start/server/middleware/ServeStaticMiddleware.js +2 -9
  424. package/build/src/start/server/middleware/ServeStaticMiddleware.js.map +1 -1
  425. package/build/src/start/server/middleware/domPolyfills.js +60 -0
  426. package/build/src/start/server/middleware/domPolyfills.js.map +1 -0
  427. package/build/src/start/server/middleware/inspector/JsInspector.js +6 -31
  428. package/build/src/start/server/middleware/inspector/JsInspector.js.map +1 -1
  429. package/build/src/start/server/middleware/inspector/createJsInspectorMiddleware.js +14 -24
  430. package/build/src/start/server/middleware/inspector/createJsInspectorMiddleware.js.map +1 -1
  431. package/build/src/start/server/middleware/inspector/middlwareMutations.js +3 -3
  432. package/build/src/start/server/middleware/inspector/middlwareMutations.js.map +1 -1
  433. package/build/src/start/server/middleware/metroOptions.js +15 -14
  434. package/build/src/start/server/middleware/metroOptions.js.map +1 -1
  435. package/build/src/start/server/middleware/mutations.js +3 -3
  436. package/build/src/start/server/middleware/mutations.js.map +1 -1
  437. package/build/src/start/server/middleware/openHandlers.js +157 -0
  438. package/build/src/start/server/middleware/openHandlers.js.map +1 -0
  439. package/build/src/start/server/middleware/resolveAssets.js +4 -4
  440. package/build/src/start/server/middleware/resolveAssets.js.map +1 -1
  441. package/build/src/start/server/middleware/resolvePlatform.js +9 -7
  442. package/build/src/start/server/middleware/resolvePlatform.js.map +1 -1
  443. package/build/src/start/server/middleware/resolveRuntimeVersionWithExpoUpdatesAsync.js.map +1 -1
  444. package/build/src/start/server/openPlatforms.js.map +1 -1
  445. package/build/src/start/server/platformBundlers.js +3 -1
  446. package/build/src/start/server/platformBundlers.js.map +1 -1
  447. package/build/src/start/server/serverLogLikeMetro.js +13 -36
  448. package/build/src/start/server/serverLogLikeMetro.js.map +1 -1
  449. package/build/src/start/server/type-generation/expo-env.js +3 -3
  450. package/build/src/start/server/type-generation/expo-env.js.map +1 -1
  451. package/build/src/start/server/type-generation/routes.js +14 -55
  452. package/build/src/start/server/type-generation/routes.js.map +1 -1
  453. package/build/src/start/server/type-generation/startTypescriptTypeGeneration.js.map +1 -1
  454. package/build/src/start/server/type-generation/tsconfig.js +5 -5
  455. package/build/src/start/server/type-generation/tsconfig.js.map +1 -1
  456. package/build/src/start/server/webTemplate.js +12 -10
  457. package/build/src/start/server/webTemplate.js.map +1 -1
  458. package/build/src/start/server/webpack/WebpackBundlerDevServer.js +3 -3
  459. package/build/src/start/server/webpack/WebpackBundlerDevServer.js.map +1 -1
  460. package/build/src/start/server/webpack/formatWebpackMessages.js.map +1 -1
  461. package/build/src/start/server/webpack/resolveFromProject.js +4 -4
  462. package/build/src/start/server/webpack/resolveFromProject.js.map +1 -1
  463. package/build/src/start/server/webpack/tls.js +3 -3
  464. package/build/src/start/server/webpack/tls.js.map +1 -1
  465. package/build/src/start/startAsync.js +21 -11
  466. package/build/src/start/startAsync.js.map +1 -1
  467. package/build/src/types.d.ts +2 -0
  468. package/build/src/utils/FileNotifier.js +1 -1
  469. package/build/src/utils/FileNotifier.js.map +1 -1
  470. package/build/src/utils/args.js +5 -5
  471. package/build/src/utils/args.js.map +1 -1
  472. package/build/src/utils/array.js +8 -8
  473. package/build/src/utils/array.js.map +1 -1
  474. package/build/src/utils/build-cache-providers/helpers.js +4 -4
  475. package/build/src/utils/build-cache-providers/helpers.js.map +1 -1
  476. package/build/src/utils/build-cache-providers/index.js +5 -5
  477. package/build/src/utils/build-cache-providers/index.js.map +1 -1
  478. package/build/src/utils/cocoapods.js +5 -5
  479. package/build/src/utils/cocoapods.js.map +1 -1
  480. package/build/src/utils/codesigning.js +12 -6
  481. package/build/src/utils/codesigning.js.map +1 -1
  482. package/build/src/utils/composeMetroIgnorePatterns.js +69 -0
  483. package/build/src/utils/composeMetroIgnorePatterns.js.map +1 -0
  484. package/build/src/utils/createTempPath.js +3 -3
  485. package/build/src/utils/createTempPath.js.map +1 -1
  486. package/build/src/utils/delay.js +4 -4
  487. package/build/src/utils/delay.js.map +1 -1
  488. package/build/src/utils/dir.js +21 -11
  489. package/build/src/utils/dir.js.map +1 -1
  490. package/build/src/utils/downloadAppAsync.js.map +1 -1
  491. package/build/src/utils/downloadExpoGoAsync.js +4 -4
  492. package/build/src/utils/downloadExpoGoAsync.js.map +1 -1
  493. package/build/src/utils/editor.js +4 -4
  494. package/build/src/utils/editor.js.map +1 -1
  495. package/build/src/utils/env.js +39 -13
  496. package/build/src/utils/env.js.map +1 -1
  497. package/build/src/utils/errors.js +6 -6
  498. package/build/src/utils/errors.js.map +1 -1
  499. package/build/src/utils/exit.js +15 -19
  500. package/build/src/utils/exit.js.map +1 -1
  501. package/build/src/utils/expoUpdatesCli.js +5 -5
  502. package/build/src/utils/expoUpdatesCli.js.map +1 -1
  503. package/build/src/utils/fetch.js +4 -4
  504. package/build/src/utils/fetch.js.map +1 -1
  505. package/build/src/utils/findUp.js +3 -3
  506. package/build/src/utils/findUp.js.map +1 -1
  507. package/build/src/utils/fn.js +3 -3
  508. package/build/src/utils/fn.js.map +1 -1
  509. package/build/src/utils/freeport.js +3 -3
  510. package/build/src/utils/freeport.js.map +1 -1
  511. package/build/src/utils/getOrPromptApplicationId.js +3 -5
  512. package/build/src/utils/getOrPromptApplicationId.js.map +1 -1
  513. package/build/src/utils/getRunningProcess.js +5 -5
  514. package/build/src/utils/getRunningProcess.js.map +1 -1
  515. package/build/src/utils/git.js +3 -3
  516. package/build/src/utils/git.js.map +1 -1
  517. package/build/src/utils/glob.js +3 -3
  518. package/build/src/utils/glob.js.map +1 -1
  519. package/build/src/utils/ip.js +4 -4
  520. package/build/src/utils/ip.js.map +1 -1
  521. package/build/src/utils/link.js +3 -3
  522. package/build/src/utils/link.js.map +1 -1
  523. package/build/src/utils/mergeGitIgnorePaths.js +10 -10
  524. package/build/src/utils/mergeGitIgnorePaths.js.map +1 -1
  525. package/build/src/utils/modifyConfigAsync.js +3 -3
  526. package/build/src/utils/modifyConfigAsync.js.map +1 -1
  527. package/build/src/utils/net.js +23 -4
  528. package/build/src/utils/net.js.map +1 -1
  529. package/build/src/utils/nodeEnv.js +6 -6
  530. package/build/src/utils/nodeEnv.js.map +1 -1
  531. package/build/src/utils/npm.js +10 -9
  532. package/build/src/utils/npm.js.map +1 -1
  533. package/build/src/utils/obj.js +4 -4
  534. package/build/src/utils/obj.js.map +1 -1
  535. package/build/src/utils/open.js +240 -11
  536. package/build/src/utils/open.js.map +1 -1
  537. package/build/src/utils/ora.js +4 -4
  538. package/build/src/utils/ora.js.map +1 -1
  539. package/build/src/utils/plist.js +5 -4
  540. package/build/src/utils/plist.js.map +1 -1
  541. package/build/src/utils/port.js +12 -5
  542. package/build/src/utils/port.js.map +1 -1
  543. package/build/src/utils/progress.js +4 -4
  544. package/build/src/utils/progress.js.map +1 -1
  545. package/build/src/utils/prompts.js +11 -11
  546. package/build/src/utils/prompts.js.map +1 -1
  547. package/build/src/utils/qr.js +5 -4
  548. package/build/src/utils/qr.js.map +1 -1
  549. package/build/src/utils/resolveArgs.js +10 -9
  550. package/build/src/utils/resolveArgs.js.map +1 -1
  551. package/build/src/utils/scheme.js +4 -4
  552. package/build/src/utils/scheme.js.map +1 -1
  553. package/build/src/utils/strings.js.map +1 -1
  554. package/build/src/utils/tar.js +8 -7
  555. package/build/src/utils/tar.js.map +1 -1
  556. package/build/src/utils/telemetry/Telemetry.js +5 -0
  557. package/build/src/utils/telemetry/Telemetry.js.map +1 -1
  558. package/build/src/utils/telemetry/clients/FetchClient.js +1 -1
  559. package/build/src/utils/telemetry/clients/FetchClient.js.map +1 -1
  560. package/build/src/utils/telemetry/clients/flushFetchDetached.js +5 -1
  561. package/build/src/utils/telemetry/clients/flushFetchDetached.js.map +1 -1
  562. package/build/src/utils/telemetry/index.js +4 -4
  563. package/build/src/utils/telemetry/index.js.map +1 -1
  564. package/build/src/utils/telemetry/utils/agent.js +42 -0
  565. package/build/src/utils/telemetry/utils/agent.js.map +1 -0
  566. package/build/src/utils/telemetry/utils/constants.js +3 -3
  567. package/build/src/utils/telemetry/utils/constants.js.map +1 -1
  568. package/build/src/utils/telemetry/utils/context.js +3 -2
  569. package/build/src/utils/telemetry/utils/context.js.map +1 -1
  570. package/build/src/utils/url.js +5 -17
  571. package/build/src/utils/url.js.map +1 -1
  572. package/build/src/utils/validateApplicationId.js +12 -12
  573. package/build/src/utils/validateApplicationId.js.map +1 -1
  574. package/build/src/utils/variadic.js +4 -4
  575. package/build/src/utils/variadic.js.map +1 -1
  576. package/build/src/whoami/index.js.map +1 -1
  577. package/changes.json +18 -26
  578. package/main.js +3 -0
  579. package/package.json +88 -80
  580. package/static/loading-page/index.html +45 -3
  581. package/static/template/+html.tsx +14 -5
  582. package/add-module.js +0 -8
  583. package/build/src/start/server/middleware/inspector/CdpClient.js +0 -81
  584. package/build/src/start/server/middleware/inspector/CdpClient.js.map +0 -1
  585. package/build/src/utils/resolveWatchFolders.js +0 -67
  586. package/build/src/utils/resolveWatchFolders.js.map +0 -1
  587. package/build/src/utils/tsconfig/evaluateTsConfig.js +0 -87
  588. package/build/src/utils/tsconfig/evaluateTsConfig.js.map +0 -1
  589. package/build/src/utils/tsconfig/loadTsConfigPaths.js +0 -84
  590. package/build/src/utils/tsconfig/loadTsConfigPaths.js.map +0 -1
  591. package/build/src/utils/tsconfig/matchTsConfigPathAlias.js +0 -94
  592. package/build/src/utils/tsconfig/matchTsConfigPathAlias.js.map +0 -1
  593. package/build/src/utils/tsconfig/resolveWithTsConfigPaths.js +0 -62
  594. package/build/src/utils/tsconfig/resolveWithTsConfigPaths.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/env.ts"],"sourcesContent":["import { boolish, int, string } from 'getenv';\nimport process from 'node:process';\n\n// @expo/webpack-config -> expo-pwa -> @expo/image-utils: EXPO_IMAGE_UTILS_NO_SHARP\n\n// TODO: EXPO_CLI_USERNAME, EXPO_CLI_PASSWORD\n\nclass Env {\n /** Enable profiling metrics */\n get EXPO_PROFILE() {\n return boolish('EXPO_PROFILE', false);\n }\n\n /** Enable debug logging */\n get EXPO_DEBUG() {\n return boolish('EXPO_DEBUG', false);\n }\n\n /** Disable all network requests */\n get EXPO_OFFLINE() {\n return boolish('EXPO_OFFLINE', false);\n }\n\n /** Enable the beta version of Expo (TODO: Should this just be in the beta version of expo releases?) */\n get EXPO_BETA() {\n return boolish('EXPO_BETA', false);\n }\n\n /** Enable staging API environment */\n get EXPO_STAGING() {\n return boolish('EXPO_STAGING', false);\n }\n\n /** Enable local API environment */\n get EXPO_LOCAL() {\n return boolish('EXPO_LOCAL', false);\n }\n\n /** Is running in non-interactive CI mode */\n get CI() {\n return boolish('CI', false);\n }\n\n /** Disable telemetry (analytics) */\n get EXPO_NO_TELEMETRY() {\n return boolish('EXPO_NO_TELEMETRY', false);\n }\n\n /** Disable detaching telemetry to separate process */\n get EXPO_NO_TELEMETRY_DETACH() {\n return boolish('EXPO_NO_TELEMETRY_DETACH', false);\n }\n\n /** local directory to the universe repo for testing locally */\n get EXPO_UNIVERSE_DIR() {\n return string('EXPO_UNIVERSE_DIR', '');\n }\n\n /** @deprecated Default Webpack host string */\n get WEB_HOST() {\n return string('WEB_HOST', '0.0.0.0');\n }\n\n /** Skip warning users about a dirty git status */\n get EXPO_NO_GIT_STATUS() {\n return boolish('EXPO_NO_GIT_STATUS', true);\n }\n /** Disable auto web setup */\n get EXPO_NO_WEB_SETUP() {\n return boolish('EXPO_NO_WEB_SETUP', envIsHeadless());\n }\n /** Disable auto TypeScript setup */\n get EXPO_NO_TYPESCRIPT_SETUP() {\n return boolish('EXPO_NO_TYPESCRIPT_SETUP', false);\n }\n /** Disable all API caches. Does not disable bundler caches. */\n get EXPO_NO_CACHE() {\n return boolish('EXPO_NO_CACHE', false);\n }\n /** Disable the app select redirect page. */\n get EXPO_NO_REDIRECT_PAGE() {\n return boolish('EXPO_NO_REDIRECT_PAGE', false);\n }\n /** Disable printing the QR code in the interactive Terminal UI. */\n get EXPO_NO_QR_CODE(): boolean {\n return boolish('EXPO_NO_QR_CODE', false);\n }\n /** The React Metro port that's baked into react-native scripts and tools. */\n get RCT_METRO_PORT() {\n return int('RCT_METRO_PORT', 0);\n }\n /** Skip validating the manifest during `export`. */\n get EXPO_SKIP_MANIFEST_VALIDATION_TOKEN(): boolean {\n return !!string('EXPO_SKIP_MANIFEST_VALIDATION_TOKEN', '');\n }\n\n /** Public folder path relative to the project root. Default to `public` */\n get EXPO_PUBLIC_FOLDER(): string {\n return string('EXPO_PUBLIC_FOLDER', 'public');\n }\n\n /** Higher priority `$EDIOTR` variable for indicating which editor to use when pressing `o` in the Terminal UI. */\n get EXPO_EDITOR(): string {\n return string('EXPO_EDITOR', '');\n }\n\n /**\n * Overwrite the dev server URL, disregarding the `--port`, `--host`, `--tunnel`, `--lan`, `--localhost` arguments.\n * This is useful for browser editors that require custom proxy URLs.\n */\n get EXPO_PACKAGER_PROXY_URL(): string {\n return string('EXPO_PACKAGER_PROXY_URL', '');\n }\n\n /**\n * **Experimental** - Disable using `exp.direct` as the hostname for\n * `--tunnel` connections. This enables **https://** forwarding which\n * can be used to test universal links on iOS.\n *\n * This may cause issues with `expo-linking` and Expo Go.\n *\n * Select the exact subdomain by passing a string value that is not one of: `true`, `false`, `1`, `0`.\n */\n get EXPO_TUNNEL_SUBDOMAIN(): string | boolean {\n const subdomain = string('EXPO_TUNNEL_SUBDOMAIN', '');\n if (['0', 'false', ''].includes(subdomain)) {\n return false;\n } else if (['1', 'true'].includes(subdomain)) {\n return true;\n }\n return subdomain;\n }\n\n /**\n * Force Expo CLI to use the [`resolver.resolverMainFields`](https://facebook.github.io/metro/docs/configuration/#resolvermainfields) from the project `metro.config.js` for all platforms.\n *\n * By default, Expo CLI will use `['browser', 'module', 'main']` (default for Webpack) for web and the user-defined main fields for other platforms.\n */\n get EXPO_METRO_NO_MAIN_FIELD_OVERRIDE(): boolean {\n return boolish('EXPO_METRO_NO_MAIN_FIELD_OVERRIDE', false);\n }\n\n /**\n * HTTP/HTTPS proxy to connect to for network requests. Configures [https-proxy-agent](https://www.npmjs.com/package/https-proxy-agent).\n */\n get HTTP_PROXY(): string {\n return process.env.HTTP_PROXY || process.env.http_proxy || '';\n }\n\n /**\n * Instructs a different Metro config to be loaded.\n * The path, according to metro-config, should be a path relative to the current working directory.\n * This flag is internal and was added for external tools.\n * @internal\n */\n get EXPO_OVERRIDE_METRO_CONFIG(): string | undefined {\n return process.env.EXPO_OVERRIDE_METRO_CONFIG?.trim() || undefined;\n }\n\n /**\n * Use the network inspector by overriding the metro inspector proxy with a custom version.\n * @deprecated This has been replaced by `@react-native/dev-middleware` and is now unused.\n */\n get EXPO_NO_INSPECTOR_PROXY(): boolean {\n return boolish('EXPO_NO_INSPECTOR_PROXY', false);\n }\n\n /** Disable lazy bundling in Metro bundler. */\n get EXPO_NO_METRO_LAZY() {\n return boolish('EXPO_NO_METRO_LAZY', false);\n }\n\n /**\n * Enable the unstable inverse dependency stack trace for Metro bundling errors.\n * @deprecated This will be removed in the future.\n */\n get EXPO_METRO_UNSTABLE_ERRORS() {\n return boolish('EXPO_METRO_UNSTABLE_ERRORS', true);\n }\n\n /** Disable Environment Variable injection in client bundles. */\n get EXPO_NO_CLIENT_ENV_VARS(): boolean {\n return boolish('EXPO_NO_CLIENT_ENV_VARS', false);\n }\n\n /** Set the default `user` that should be passed to `--user` with ADB commands. Used for installing APKs on Android devices with multiple profiles. Defaults to `0`. */\n get EXPO_ADB_USER(): string {\n return string('EXPO_ADB_USER', '0');\n }\n\n /** Used internally to enable E2E utilities. This behavior is not stable to external users. */\n get __EXPO_E2E_TEST(): boolean {\n return boolish('__EXPO_E2E_TEST', false);\n }\n\n /** Unstable: Force single-bundle exports in production. */\n get EXPO_NO_BUNDLE_SPLITTING(): boolean {\n return boolish('EXPO_NO_BUNDLE_SPLITTING', false);\n }\n\n /**\n * Enable Atlas to gather bundle information during development or export.\n * Note, because this used to be an experimental feature, both `EXPO_ATLAS` and `EXPO_UNSTABLE_ATLAS` are supported.\n */\n get EXPO_ATLAS() {\n return boolish('EXPO_ATLAS', boolish('EXPO_UNSTABLE_ATLAS', false));\n }\n\n /** Unstable: Enable tree shaking for Metro. */\n get EXPO_UNSTABLE_TREE_SHAKING() {\n return boolish('EXPO_UNSTABLE_TREE_SHAKING', false);\n }\n\n /** Unstable: Enable eager bundling where transformation runs uncached after the entire bundle has been created. This is required for production tree shaking and less optimized for development bundling. */\n get EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH() {\n return boolish('EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH', false);\n }\n\n /** Enable the use of Expo's custom metro require implementation. The custom require supports better debugging, tree shaking, and React Server Components. */\n get EXPO_USE_METRO_REQUIRE() {\n return boolish('EXPO_USE_METRO_REQUIRE', false);\n }\n\n /** Internal key used to pass eager bundle data from the CLI to the native run scripts during `npx expo run` commands. */\n get __EXPO_EAGER_BUNDLE_OPTIONS() {\n return string('__EXPO_EAGER_BUNDLE_OPTIONS', '');\n }\n\n /** Disable server deployment during production builds (during `expo export:embed`). This is useful for testing API routes and server components against a local server. */\n get EXPO_NO_DEPLOY(): boolean {\n return boolish('EXPO_NO_DEPLOY', false);\n }\n\n /** Enable hydration during development when rendering Expo Web */\n get EXPO_WEB_DEV_HYDRATE(): boolean {\n return boolish('EXPO_WEB_DEV_HYDRATE', false);\n }\n\n /** Enable experimental React Server Functions support. */\n get EXPO_UNSTABLE_SERVER_FUNCTIONS(): boolean {\n return boolish('EXPO_UNSTABLE_SERVER_FUNCTIONS', false);\n }\n\n /** Enable unstable/experimental mode where React Native Web isn't required to run Expo apps on web. */\n get EXPO_NO_REACT_NATIVE_WEB(): boolean {\n return boolish('EXPO_NO_REACT_NATIVE_WEB', false);\n }\n\n /** Enable unstable/experimental support for deploying the native server in `npx expo run` commands. */\n get EXPO_UNSTABLE_DEPLOY_SERVER(): boolean {\n return boolish('EXPO_UNSTABLE_DEPLOY_SERVER', false);\n }\n\n /** Is running in EAS Build. This is set by EAS: https://docs.expo.dev/eas/environment-variables/ */\n get EAS_BUILD(): boolean {\n return boolish('EAS_BUILD', false);\n }\n\n /** Disable the React Native Directory compatibility check for new architecture when installing packages */\n get EXPO_NO_NEW_ARCH_COMPAT_CHECK(): boolean {\n return boolish('EXPO_NO_NEW_ARCH_COMPAT_CHECK', envIsHeadless());\n }\n\n /** Disable the dependency validation when installing other dependencies and starting the project */\n get EXPO_NO_DEPENDENCY_VALIDATION(): boolean {\n return boolish('EXPO_NO_DEPENDENCY_VALIDATION', envIsHeadless());\n }\n\n /** Force Expo CLI to run in webcontainer mode, this has impact on which URL Expo is using by default */\n get EXPO_FORCE_WEBCONTAINER_ENV(): boolean {\n return boolish('EXPO_FORCE_WEBCONTAINER_ENV', false);\n }\n\n /** Force Expo CLI to run in webcontainer mode, this has impact on which URL Expo is using by default */\n get EXPO_UNSTABLE_WEB_MODAL(): boolean {\n return boolish('EXPO_UNSTABLE_WEB_MODAL', false);\n }\n\n /** Disable by falsy value live binding in experimental import export support. Enabled by default. */\n get EXPO_UNSTABLE_LIVE_BINDINGS(): boolean {\n return boolish('EXPO_UNSTABLE_LIVE_BINDINGS', true);\n }\n\n /**\n * Enable the experimental MCP integration or further specify the MCP server URL.\n */\n get EXPO_UNSTABLE_MCP_SERVER(): string {\n const value = string('EXPO_UNSTABLE_MCP_SERVER', '');\n if (value === '1' || value.toLowerCase() === 'true') {\n return this.EXPO_STAGING ? 'staging-mcp.expo.dev' : 'mcp.expo.dev';\n }\n return value;\n }\n\n /** Enable Expo Log Box for iOS and Android (Web is enabled by default) */\n get EXPO_UNSTABLE_LOG_BOX(): boolean {\n return boolish('EXPO_UNSTABLE_LOG_BOX', false);\n }\n\n /**\n * Enable Bonjour advertising of the Expo CLI on local networks\n */\n get EXPO_UNSTABLE_BONJOUR(): boolean {\n return boolish('EXPO_UNSTABLE_BONJOUR', !envIsHeadless());\n }\n\n /** @internal Configure other environment variables for headless operations */\n get EXPO_UNSTABLE_HEADLESS() {\n return boolish('EXPO_UNSTABLE_HEADLESS', envIsWebcontainer());\n }\n}\n\nexport const env = new Env();\n\nexport function envIsWebcontainer() {\n // See: https://github.com/unjs/std-env/blob/4b1e03c4efce58249858efc2cc5f5eac727d0adb/src/providers.ts#L134-L143\n return (\n env.EXPO_FORCE_WEBCONTAINER_ENV ||\n (process.env.SHELL === '/bin/jsh' && !!process.versions.webcontainer)\n );\n}\n\nexport function envIsHeadless() {\n return env.EXPO_UNSTABLE_HEADLESS;\n}\n"],"names":["env","envIsHeadless","envIsWebcontainer","Env","EXPO_PROFILE","boolish","EXPO_DEBUG","EXPO_OFFLINE","EXPO_BETA","EXPO_STAGING","EXPO_LOCAL","CI","EXPO_NO_TELEMETRY","EXPO_NO_TELEMETRY_DETACH","EXPO_UNIVERSE_DIR","string","WEB_HOST","EXPO_NO_GIT_STATUS","EXPO_NO_WEB_SETUP","EXPO_NO_TYPESCRIPT_SETUP","EXPO_NO_CACHE","EXPO_NO_REDIRECT_PAGE","EXPO_NO_QR_CODE","RCT_METRO_PORT","int","EXPO_SKIP_MANIFEST_VALIDATION_TOKEN","EXPO_PUBLIC_FOLDER","EXPO_EDITOR","EXPO_PACKAGER_PROXY_URL","EXPO_TUNNEL_SUBDOMAIN","subdomain","includes","EXPO_METRO_NO_MAIN_FIELD_OVERRIDE","HTTP_PROXY","process","http_proxy","EXPO_OVERRIDE_METRO_CONFIG","trim","undefined","EXPO_NO_INSPECTOR_PROXY","EXPO_NO_METRO_LAZY","EXPO_METRO_UNSTABLE_ERRORS","EXPO_NO_CLIENT_ENV_VARS","EXPO_ADB_USER","__EXPO_E2E_TEST","EXPO_NO_BUNDLE_SPLITTING","EXPO_ATLAS","EXPO_UNSTABLE_TREE_SHAKING","EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH","EXPO_USE_METRO_REQUIRE","__EXPO_EAGER_BUNDLE_OPTIONS","EXPO_NO_DEPLOY","EXPO_WEB_DEV_HYDRATE","EXPO_UNSTABLE_SERVER_FUNCTIONS","EXPO_NO_REACT_NATIVE_WEB","EXPO_UNSTABLE_DEPLOY_SERVER","EAS_BUILD","EXPO_NO_NEW_ARCH_COMPAT_CHECK","EXPO_NO_DEPENDENCY_VALIDATION","EXPO_FORCE_WEBCONTAINER_ENV","EXPO_UNSTABLE_WEB_MODAL","EXPO_UNSTABLE_LIVE_BINDINGS","EXPO_UNSTABLE_MCP_SERVER","value","toLowerCase","EXPO_UNSTABLE_LOG_BOX","EXPO_UNSTABLE_BONJOUR","EXPO_UNSTABLE_HEADLESS","SHELL","versions","webcontainer"],"mappings":";;;;;;;;;;;IAwTaA,GAAG;eAAHA;;IAUGC,aAAa;eAAbA;;IARAC,iBAAiB;eAAjBA;;;;yBA1TqB;;;;;;;gEACjB;;;;;;;;;;;AAEpB,mFAAmF;AAEnF,6CAA6C;AAE7C,MAAMC;IACJ,6BAA6B,GAC7B,IAAIC,eAAe;QACjB,OAAOC,IAAAA,iBAAO,EAAC,gBAAgB;IACjC;IAEA,yBAAyB,GACzB,IAAIC,aAAa;QACf,OAAOD,IAAAA,iBAAO,EAAC,cAAc;IAC/B;IAEA,iCAAiC,GACjC,IAAIE,eAAe;QACjB,OAAOF,IAAAA,iBAAO,EAAC,gBAAgB;IACjC;IAEA,sGAAsG,GACtG,IAAIG,YAAY;QACd,OAAOH,IAAAA,iBAAO,EAAC,aAAa;IAC9B;IAEA,mCAAmC,GACnC,IAAII,eAAe;QACjB,OAAOJ,IAAAA,iBAAO,EAAC,gBAAgB;IACjC;IAEA,iCAAiC,GACjC,IAAIK,aAAa;QACf,OAAOL,IAAAA,iBAAO,EAAC,cAAc;IAC/B;IAEA,0CAA0C,GAC1C,IAAIM,KAAK;QACP,OAAON,IAAAA,iBAAO,EAAC,MAAM;IACvB;IAEA,kCAAkC,GAClC,IAAIO,oBAAoB;QACtB,OAAOP,IAAAA,iBAAO,EAAC,qBAAqB;IACtC;IAEA,oDA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IAEA,sGAAsG,GACtG,IAAIuD,0BAAmC;QACrC,OAAOvD,IAAAA,iBAAO,EAAC,2BAA2B;IAC5C;IAEA,mGAAmG,GACnG,IAAIwD,8BAAuC;QACzC,OAAOxD,IAAAA,iBAAO,EAAC,+BAA+B;IAChD;IAEA;;GAEC,GACD,IAAIyD,2BAAmC;QACrC,MAAMC,QAAQhD,IAAAA,gBAAM,EAAC,4BAA4B;QACjD,IAAIgD,UAAU,OAAOA,MAAMC,WAAW,OAAO,QAAQ;YACnD,OAAO,IAAI,CAACvD,YAAY,GAAG,yBAAyB;QACtD;QACA,OAAOsD;IACT;IAEA,wEAAwE,GACxE,IAAIE,wBAAiC;QACnC,OAAO5D,IAAAA,iBAAO,EAAC,yBAAyB;IAC1C;IAEA;;GAEC,GACD,IAAI6D,wBAAiC;QACnC,OAAO7D,IAAAA,iBAAO,EAAC,yBAAyB,CAACJ;IAC3C;IAEA,4EAA4E,GAC5E,IAAIkE,yBAAyB;QAC3B,OAAO9D,IAAAA,iBAAO,EAAC,0BAA0BH;IAC3C;AACF;AAEO,MAAMF,MAAM,IAAIG;AAEhB,SAASD;IACd,gHAAgH;IAChH,OACEF,IAAI2D,2BAA2B,IAC9BzB,sBAAO,CAAClC,GAAG,CAACoE,KAAK,KAAK,cAAc,CAAC,CAAClC,sBAAO,CAACmC,QAAQ,CAACC,YAAY;AAExE;AAEO,SAASrE;IACd,OAAOD,IAAImE,sBAAsB;AACnC"}
1
+ {"version":3,"sources":["../../../src/utils/env.ts"],"sourcesContent":["import { getOriginalEnvValue } from '@expo/env';\nimport { boolish, int, string } from 'getenv';\nimport process from 'node:process';\n\n// @expo/webpack-config -> expo-pwa -> @expo/image-utils: EXPO_IMAGE_UTILS_NO_SHARP\n\n// TODO: EXPO_CLI_USERNAME, EXPO_CLI_PASSWORD\n\nclass Env {\n /** Enable profiling metrics */\n get EXPO_PROFILE() {\n return boolish('EXPO_PROFILE', false);\n }\n\n /** Enable debug logging */\n get EXPO_DEBUG() {\n return boolish('EXPO_DEBUG', false);\n }\n\n /** Disable all network requests */\n get EXPO_OFFLINE() {\n return boolish('EXPO_OFFLINE', false);\n }\n\n /** Enable the beta version of Expo (TODO: Should this just be in the beta version of expo releases?) */\n get EXPO_BETA() {\n return boolish('EXPO_BETA', false);\n }\n\n /** Enable staging API environment */\n get EXPO_STAGING() {\n return boolish('EXPO_STAGING', false);\n }\n\n /** Enable local API environment */\n get EXPO_LOCAL() {\n return boolish('EXPO_LOCAL', false);\n }\n\n /** Is running in non-interactive CI mode */\n get CI() {\n return boolish('CI', false);\n }\n\n /** Disable telemetry (analytics) */\n get EXPO_NO_TELEMETRY() {\n return boolish('EXPO_NO_TELEMETRY', false);\n }\n\n /** Disable detaching telemetry to separate process */\n get EXPO_NO_TELEMETRY_DETACH() {\n return boolish('EXPO_NO_TELEMETRY_DETACH', false);\n }\n\n /** local directory to the universe repo for testing locally */\n get EXPO_UNIVERSE_DIR() {\n // Read from the pre-dotenv env — this is a filesystem path used by internal\n // tooling; a project `.env` overriding it could redirect file access.\n return getOriginalEnvValue('EXPO_UNIVERSE_DIR') || '';\n }\n\n /** @deprecated Default Webpack host string */\n get WEB_HOST() {\n return string('WEB_HOST', '0.0.0.0');\n }\n\n /** Skip warning users about a dirty git status */\n get EXPO_NO_GIT_STATUS() {\n return boolish('EXPO_NO_GIT_STATUS', true);\n }\n /** Disable auto web setup */\n get EXPO_NO_WEB_SETUP() {\n return boolish('EXPO_NO_WEB_SETUP', envIsHeadless());\n }\n /** Disable auto TypeScript setup */\n get EXPO_NO_TYPESCRIPT_SETUP() {\n return boolish('EXPO_NO_TYPESCRIPT_SETUP', false);\n }\n /** Disable all API caches. Does not disable bundler caches. */\n get EXPO_NO_CACHE() {\n return boolish('EXPO_NO_CACHE', false);\n }\n /** Disable the app select redirect page. */\n get EXPO_NO_REDIRECT_PAGE() {\n return boolish('EXPO_NO_REDIRECT_PAGE', false);\n }\n /** Disable printing the QR code in the interactive Terminal UI. */\n get EXPO_NO_QR_CODE(): boolean {\n return boolish('EXPO_NO_QR_CODE', false);\n }\n /** Resolve application IDs from Expo app config before native files in `expo start`. */\n get EXPO_RUN_PREFER_APP_CONFIG_ID(): boolean {\n return boolish('EXPO_RUN_PREFER_APP_CONFIG_ID', false);\n }\n /** The React Metro port that's baked into react-native scripts and tools. */\n get RCT_METRO_PORT() {\n return int('RCT_METRO_PORT', 0);\n }\n /** Skip validating the manifest during `export`. */\n get EXPO_SKIP_MANIFEST_VALIDATION_TOKEN(): boolean {\n return !!string('EXPO_SKIP_MANIFEST_VALIDATION_TOKEN', '');\n }\n\n /** Public folder path relative to the project root. Default to `public` */\n get EXPO_PUBLIC_FOLDER(): string {\n return string('EXPO_PUBLIC_FOLDER', 'public');\n }\n\n /** Higher priority `$EDIOTR` variable for indicating which editor to use when pressing `o` in the Terminal UI. */\n get EXPO_EDITOR(): string {\n return string('EXPO_EDITOR', '');\n }\n\n /**\n * Overwrite the dev server URL, disregarding the `--port`, `--host`, `--tunnel`, `--lan`, `--localhost` arguments.\n * This is useful for browser editors that require custom proxy URLs.\n */\n get EXPO_PACKAGER_PROXY_URL(): string {\n // Read from the pre-dotenv env — overrides dev server URL served to clients.\n return getOriginalEnvValue('EXPO_PACKAGER_PROXY_URL') || '';\n }\n\n get EXPO_UNSTABLE_TUNNEL_V2(): boolean {\n return boolish('EXPO_UNSTABLE_TUNNEL_V2', false);\n }\n\n /**\n * **Experimental** - Disable using `exp.direct` as the hostname for\n * `--tunnel` connections. This enables **https://** forwarding which\n * can be used to test universal links on iOS.\n *\n * This may cause issues with `expo-linking` and Expo Go.\n *\n * Select the exact subdomain by passing a string value that is not one of: `true`, `false`, `1`, `0`.\n */\n get EXPO_TUNNEL_SUBDOMAIN(): string | boolean {\n const subdomain = string('EXPO_TUNNEL_SUBDOMAIN', '');\n if (['0', 'false', ''].includes(subdomain)) {\n return false;\n } else if (['1', 'true'].includes(subdomain)) {\n return true;\n }\n return subdomain;\n }\n\n /**\n * Force Expo CLI to use the [`resolver.resolverMainFields`](https://facebook.github.io/metro/docs/configuration/#resolvermainfields) from the project `metro.config.js` for all platforms.\n *\n * By default, Expo CLI will use `['browser', 'module', 'main']` (default for Webpack) for web and the user-defined main fields for other platforms.\n */\n get EXPO_METRO_NO_MAIN_FIELD_OVERRIDE(): boolean {\n return boolish('EXPO_METRO_NO_MAIN_FIELD_OVERRIDE', false);\n }\n\n /**\n * HTTP/HTTPS proxy to connect to for network requests. Configures [https-proxy-agent](https://www.npmjs.com/package/https-proxy-agent).\n */\n get HTTP_PROXY(): string {\n return process.env.HTTP_PROXY || process.env.http_proxy || '';\n }\n\n /**\n * Instructs a different Metro config to be loaded.\n * The path, according to metro-config, should be a path relative to the current working directory.\n * This flag is internal and was added for external tools.\n * @internal\n */\n get EXPO_OVERRIDE_METRO_CONFIG(): string | undefined {\n // Read from the pre-dotenv env — this path is `require()`d as Metro config,\n // so a project `.env` overriding it would execute attacker code in-process.\n return getOriginalEnvValue('EXPO_OVERRIDE_METRO_CONFIG')?.trim() || undefined;\n }\n\n /**\n * Use the network inspector by overriding the metro inspector proxy with a custom version.\n * @deprecated This has been replaced by `@react-native/dev-middleware` and is now unused.\n */\n get EXPO_NO_INSPECTOR_PROXY(): boolean {\n return boolish('EXPO_NO_INSPECTOR_PROXY', false);\n }\n\n /** Disable lazy bundling in Metro bundler. */\n get EXPO_NO_METRO_LAZY() {\n return boolish('EXPO_NO_METRO_LAZY', false);\n }\n\n /**\n * Enable the unstable inverse dependency stack trace for Metro bundling errors.\n * @deprecated This will be removed in the future.\n */\n get EXPO_METRO_UNSTABLE_ERRORS() {\n return boolish('EXPO_METRO_UNSTABLE_ERRORS', true);\n }\n\n /** Disable Environment Variable injection in client bundles. */\n get EXPO_NO_CLIENT_ENV_VARS(): boolean {\n return boolish('EXPO_NO_CLIENT_ENV_VARS', false);\n }\n\n /** Set the default `user` that should be passed to `--user` with ADB commands. Used for installing APKs on Android devices with multiple profiles. Defaults to `0`. */\n get EXPO_ADB_USER(): string {\n return string('EXPO_ADB_USER', '0');\n }\n\n /** Used internally to enable E2E utilities. This behavior is not stable to external users. */\n get __EXPO_E2E_TEST(): boolean {\n return boolish('__EXPO_E2E_TEST', false);\n }\n\n /** Unstable: Force single-bundle exports in production. */\n get EXPO_NO_BUNDLE_SPLITTING(): boolean {\n return boolish('EXPO_NO_BUNDLE_SPLITTING', false);\n }\n\n /**\n * Enable Atlas to gather bundle information during development or export.\n * Note, because this used to be an experimental feature, both `EXPO_ATLAS` and `EXPO_UNSTABLE_ATLAS` are supported.\n */\n get EXPO_ATLAS() {\n return boolish('EXPO_ATLAS', boolish('EXPO_UNSTABLE_ATLAS', false));\n }\n\n /** Unstable: Enable tree shaking for Metro. */\n get EXPO_UNSTABLE_TREE_SHAKING() {\n return boolish('EXPO_UNSTABLE_TREE_SHAKING', false);\n }\n\n /** Unstable: Enable eager bundling where transformation runs uncached after the entire bundle has been created. This is required for production tree shaking and less optimized for development bundling. */\n get EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH() {\n return boolish('EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH', false);\n }\n\n /** Enable the use of Expo's custom metro require implementation. The custom require supports better debugging, tree shaking, and React Server Components. */\n get EXPO_USE_METRO_REQUIRE() {\n return boolish('EXPO_USE_METRO_REQUIRE', false);\n }\n\n /** Internal key used to pass eager bundle data from the CLI to the native run scripts during `npx expo run` commands. */\n get __EXPO_EAGER_BUNDLE_OPTIONS() {\n return getOriginalEnvValue('__EXPO_EAGER_BUNDLE_OPTIONS') || '';\n }\n\n /** Disable server deployment during production builds (during `expo export:embed`). This is useful for testing API routes and server components against a local server. */\n get EXPO_NO_DEPLOY(): boolean {\n return boolish('EXPO_NO_DEPLOY', false);\n }\n\n /** Enable hydration during development when rendering Expo Web */\n get EXPO_WEB_DEV_HYDRATE(): boolean {\n return boolish('EXPO_WEB_DEV_HYDRATE', false);\n }\n\n /** Enable experimental React Server Functions support. */\n get EXPO_UNSTABLE_SERVER_FUNCTIONS(): boolean {\n return boolish('EXPO_UNSTABLE_SERVER_FUNCTIONS', false);\n }\n\n /** Enable unstable/experimental support for deploying the native server in `npx expo run` commands. */\n get EXPO_UNSTABLE_DEPLOY_SERVER(): boolean {\n return boolish('EXPO_UNSTABLE_DEPLOY_SERVER', false);\n }\n\n /** Is running in EAS Build. This is set by EAS: https://docs.expo.dev/eas/environment-variables/ */\n get EAS_BUILD(): boolean {\n return boolish('EAS_BUILD', false);\n }\n\n /** Disable the React Native Directory compatibility check for new architecture when installing packages */\n get EXPO_NO_NEW_ARCH_COMPAT_CHECK(): boolean {\n return boolish('EXPO_NO_NEW_ARCH_COMPAT_CHECK', envIsHeadless());\n }\n\n /** Disable the dependency validation when installing other dependencies and starting the project */\n get EXPO_NO_DEPENDENCY_VALIDATION(): boolean {\n return boolish('EXPO_NO_DEPENDENCY_VALIDATION', envIsHeadless());\n }\n\n /** Force Expo CLI to run in webcontainer mode, this has impact on which URL Expo is using by default */\n get EXPO_FORCE_WEBCONTAINER_ENV(): boolean {\n return boolish('EXPO_FORCE_WEBCONTAINER_ENV', false);\n }\n\n /** Force Expo CLI to run in webcontainer mode, this has impact on which URL Expo is using by default */\n get EXPO_UNSTABLE_WEB_MODAL(): boolean {\n return boolish('EXPO_UNSTABLE_WEB_MODAL', false);\n }\n\n /** Disable @react-navigation checks for expo-router projects */\n get EXPO_ROUTER_DISABLE_RN_NAVIGATION_CHECK(): boolean {\n return boolish('EXPO_ROUTER_DISABLE_RN_NAVIGATION_CHECK', false);\n }\n\n /**\n * Disable Material Symbols (`md`) icon support in expo-router's NativeTabs on Android.\n * When enabled, the Metro resolver swaps the Android-specific md icon converter for a no-op\n * stub, so the `expo-symbols` dependency is tree-shaken out of the Android bundle.\n */\n get EXPO_ROUTER_DISABLE_NATIVE_TABS_MD(): boolean {\n return boolish('EXPO_ROUTER_DISABLE_NATIVE_TABS_MD', false);\n }\n\n /** Disable by falsy value live binding in experimental import export support. Enabled by default. */\n get EXPO_UNSTABLE_LIVE_BINDINGS(): boolean {\n return boolish('EXPO_UNSTABLE_LIVE_BINDINGS', true);\n }\n\n /**\n * Enable the experimental MCP integration or further specify the MCP server URL.\n */\n get EXPO_UNSTABLE_MCP_SERVER(): string {\n const value = string('EXPO_UNSTABLE_MCP_SERVER', '');\n if (value === '1' || value.toLowerCase() === 'true') {\n return this.EXPO_STAGING ? 'staging-mcp.expo.dev' : 'mcp.expo.dev';\n }\n // Re-read from the pre-dotenv env — overrides dev server URL served to clients.\n return getOriginalEnvValue('EXPO_UNSTABLE_MCP_SERVER') || '';\n }\n\n /** Enable Expo Log Box for iOS and Android (Web is enabled by default) */\n get EXPO_UNSTABLE_LOG_BOX(): boolean {\n return boolish('EXPO_UNSTABLE_LOG_BOX', false);\n }\n\n /**\n * Enable Bonjour advertising of the Expo CLI on local networks\n */\n get EXPO_UNSTABLE_BONJOUR(): boolean {\n return boolish('EXPO_UNSTABLE_BONJOUR', !envIsHeadless());\n }\n\n /** @internal Configure other environment variables for headless operations */\n get EXPO_UNSTABLE_HEADLESS() {\n return boolish('EXPO_UNSTABLE_HEADLESS', envIsWebcontainer());\n }\n}\n\nexport const env = new Env();\n\nexport function envIsWebcontainer() {\n // See: https://github.com/unjs/std-env/blob/4b1e03c4efce58249858efc2cc5f5eac727d0adb/src/providers.ts#L134-L143\n return (\n env.EXPO_FORCE_WEBCONTAINER_ENV ||\n (process.env.SHELL === '/bin/jsh' && !!process.versions.webcontainer)\n );\n}\n\nexport function envIsHeadless() {\n return env.EXPO_UNSTABLE_HEADLESS;\n}\n"],"names":["env","envIsHeadless","envIsWebcontainer","Env","EXPO_PROFILE","boolish","EXPO_DEBUG","EXPO_OFFLINE","EXPO_BETA","EXPO_STAGING","EXPO_LOCAL","CI","EXPO_NO_TELEMETRY","EXPO_NO_TELEMETRY_DETACH","EXPO_UNIVERSE_DIR","getOriginalEnvValue","WEB_HOST","string","EXPO_NO_GIT_STATUS","EXPO_NO_WEB_SETUP","EXPO_NO_TYPESCRIPT_SETUP","EXPO_NO_CACHE","EXPO_NO_REDIRECT_PAGE","EXPO_NO_QR_CODE","EXPO_RUN_PREFER_APP_CONFIG_ID","RCT_METRO_PORT","int","EXPO_SKIP_MANIFEST_VALIDATION_TOKEN","EXPO_PUBLIC_FOLDER","EXPO_EDITOR","EXPO_PACKAGER_PROXY_URL","EXPO_UNSTABLE_TUNNEL_V2","EXPO_TUNNEL_SUBDOMAIN","subdomain","includes","EXPO_METRO_NO_MAIN_FIELD_OVERRIDE","HTTP_PROXY","process","http_proxy","EXPO_OVERRIDE_METRO_CONFIG","trim","undefined","EXPO_NO_INSPECTOR_PROXY","EXPO_NO_METRO_LAZY","EXPO_METRO_UNSTABLE_ERRORS","EXPO_NO_CLIENT_ENV_VARS","EXPO_ADB_USER","__EXPO_E2E_TEST","EXPO_NO_BUNDLE_SPLITTING","EXPO_ATLAS","EXPO_UNSTABLE_TREE_SHAKING","EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH","EXPO_USE_METRO_REQUIRE","__EXPO_EAGER_BUNDLE_OPTIONS","EXPO_NO_DEPLOY","EXPO_WEB_DEV_HYDRATE","EXPO_UNSTABLE_SERVER_FUNCTIONS","EXPO_UNSTABLE_DEPLOY_SERVER","EAS_BUILD","EXPO_NO_NEW_ARCH_COMPAT_CHECK","EXPO_NO_DEPENDENCY_VALIDATION","EXPO_FORCE_WEBCONTAINER_ENV","EXPO_UNSTABLE_WEB_MODAL","EXPO_ROUTER_DISABLE_RN_NAVIGATION_CHECK","EXPO_ROUTER_DISABLE_NATIVE_TABS_MD","EXPO_UNSTABLE_LIVE_BINDINGS","EXPO_UNSTABLE_MCP_SERVER","value","toLowerCase","EXPO_UNSTABLE_LOG_BOX","EXPO_UNSTABLE_BONJOUR","EXPO_UNSTABLE_HEADLESS","SHELL","versions","webcontainer"],"mappings":";;;;;;;;;;;QAgVaA;eAAAA;;QAUGC;eAAAA;;QARAC;eAAAA;;;;yBAlVoB;;;;;;;yBACC;;;;;;;gEACjB;;;;;;;;;;;AAE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AAMC,QAAQlD,IAAAA,gBAAM,EAAC,4BAA4B;QACjD,IAAIkD,UAAU,OAAOA,MAAMC,WAAW,OAAO,QAAQ;YACnD,OAAO,IAAI,CAAC3D,YAAY,GAAG,yBAAyB;QACtD;QACA,gFAAgF;QAChF,OAAOM,IAAAA,0BAAmB,EAAC,+BAA+B;IAC5D;IAEA,wEAAwE,GACxE,IAAIsD,wBAAiC;QACnC,OAAOhE,IAAAA,iBAAO,EAAC,yBAAyB;IAC1C;IAEA;;GAEC,GACD,IAAIiE,wBAAiC;QACnC,OAAOjE,IAAAA,iBAAO,EAAC,yBAAyB,CAACJ;IAC3C;IAEA,4EAA4E,GAC5E,IAAIsE,yBAAyB;QAC3B,OAAOlE,IAAAA,iBAAO,EAAC,0BAA0BH;IAC3C;AACF;AAEO,MAAMF,MAAM,IAAIG;AAEhB,SAASD;IACd,gHAAgH;IAChH,OACEF,IAAI6D,2BAA2B,IAC9BxB,sBAAO,CAACrC,GAAG,CAACwE,KAAK,KAAK,cAAc,CAAC,CAACnC,sBAAO,CAACoC,QAAQ,CAACC,YAAY;AAExE;AAEO,SAASzE;IACd,OAAOD,IAAIuE,sBAAsB;AACnC"}
@@ -5,23 +5,23 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- AbortCommandError: function() {
12
+ get AbortCommandError () {
13
13
  return AbortCommandError;
14
14
  },
15
- CommandError: function() {
15
+ get CommandError () {
16
16
  return CommandError;
17
17
  },
18
- SilentError: function() {
18
+ get SilentError () {
19
19
  return SilentError;
20
20
  },
21
- UnimplementedError: function() {
21
+ get UnimplementedError () {
22
22
  return UnimplementedError;
23
23
  },
24
- logCmdError: function() {
24
+ get logCmdError () {
25
25
  return logCmdError;
26
26
  }
27
27
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/errors.ts"],"sourcesContent":["import { AssertionError } from 'assert';\nimport chalk from 'chalk';\nimport { execSync } from 'child_process';\n\nimport { exit, exception, warn } from '../log';\n\nconst ERROR_PREFIX = 'Error: ';\n\n/**\n * General error, formatted as a message in red text when caught by expo-cli (no stack trace is printed). Should be used in favor of `log.error()` in most cases.\n */\nexport class CommandError extends Error {\n name = 'CommandError';\n readonly isCommandError = true;\n [prop: string]: unknown;\n\n constructor(\n public code: string,\n message: string = ''\n ) {\n super('');\n // If e.toString() was called to get `message` we don't want it to look\n // like \"Error: Error:\".\n if (message.startsWith(ERROR_PREFIX)) {\n message = message.substring(ERROR_PREFIX.length);\n }\n\n this.message = message || code;\n }\n}\n\nexport class AbortCommandError extends CommandError {\n constructor() {\n super('ABORTED', 'Interactive prompt was cancelled.');\n }\n}\n\n/**\n * Used to end a CLI process without printing a stack trace in the Expo CLI. Should be used in favor of `process.exit`.\n */\nexport class SilentError extends CommandError {\n constructor(messageOrError?: string | Error) {\n const message =\n (typeof messageOrError === 'string' ? messageOrError : messageOrError?.message) ??\n 'This error should fail silently in the CLI';\n super('SILENT', message);\n if (typeof messageOrError !== 'string') {\n // forward the props of the incoming error for tests or processes outside of expo-cli that use expo cli internals.\n this.stack = messageOrError?.stack ?? this.stack;\n this.name = messageOrError?.name ?? this.name;\n }\n }\n}\n\nexport function logCmdError(error: any): never {\n if (!(error instanceof Error)) {\n throw error;\n }\n if (error instanceof AbortCommandError || error instanceof SilentError) {\n // Do nothing, this is used for prompts or other cases that were custom logged.\n process.exit(1);\n } else if (\n error instanceof CommandError ||\n error instanceof AssertionError ||\n error.name === 'ApiV2Error' ||\n error.name === 'ConfigError'\n ) {\n // Print the stack trace in debug mode only.\n exit(error);\n }\n\n const errorDetails = error.stack ? '\\n' + chalk.gray(error.stack) : '';\n\n exit(chalk.red(error.toString()) + errorDetails);\n}\n\n/** This should never be thrown in production. */\nexport class UnimplementedError extends Error {\n constructor() {\n super('Unimplemented');\n this.name = 'UnimplementedError';\n }\n}\n\n/**\n * Add additional information when EMFILE errors are encountered.\n * These errors originate from Metro's FSEventsWatcher due to `fsevents` going over MacOS system limit.\n * Unfortunately, these limits in macOS are relatively low compared to an average React Native project.\n *\n * @see https://github.com/expo/expo/issues/29083\n * @see https://github.com/facebook/metro/issues/834\n * @see https://github.com/fsevents/fsevents/issues/42#issuecomment-62632234\n */\nfunction handleTooManyOpenFileErrors(error: any) {\n // Only enable special logging when running on macOS and are running into the `EMFILE` error\n if ('code' in error && error.code === 'EMFILE' && process.platform === 'darwin') {\n try {\n // Try to recover watchman, if it's not installed this will throw\n execSync('watchman shutdown-server', { stdio: 'ignore' });\n // NOTE(cedric): this both starts the watchman server and resets all watchers\n execSync('watchman watch-del-all', { stdio: 'ignore' });\n\n warn(\n 'Watchman is installed but was likely not enabled when starting Metro, try starting your project again.\\nIf this problem persists, follow the troubleshooting guide of Watchman: https://facebook.github.io/watchman/docs/troubleshooting'\n );\n } catch {\n warn(\n `Your macOS system limit does not allow enough watchers for Metro, install Watchman instead. Learn more: https://facebook.github.io/watchman/docs/install`\n );\n }\n\n exception(error);\n process.exit(1);\n }\n\n throw error;\n}\n\nprocess.on('uncaughtException', handleTooManyOpenFileErrors);\n"],"names":["AbortCommandError","CommandError","SilentError","UnimplementedError","logCmdError","ERROR_PREFIX","Error","constructor","code","message","name","isCommandError","startsWith","substring","length","messageOrError","stack","error","process","exit","AssertionError","errorDetails","chalk","gray","red","toString","handleTooManyOpenFileErrors","platform","execSync","stdio","warn","exception","on"],"mappings":";;;;;;;;;;;IA+BaA,iBAAiB;eAAjBA;;IApBAC,YAAY;eAAZA;;IA6BAC,WAAW;eAAXA;;IAqCAC,kBAAkB;eAAlBA;;IAvBGC,WAAW;eAAXA;;;;yBAtDe;;;;;;;gEACb;;;;;;;yBACO;;;;;;qBAEa;;;;;;AAEtC,MAAMC,eAAe;AAKd,MAAMJ,qBAAqBK;IAKhCC,YACE,AAAOC,IAAY,EACnBC,UAAkB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,MAAMJ;AACrC;AAGO,MAAMlB,2BAA2BG;IACtCC,aAAc;QACZ,KAAK,CAAC;QACN,IAAI,CAACG,IAAI,GAAG;IACd;AACF;AAEA;;;;;;;;CAQC,GACD,SAASgB,4BAA4BT,KAAU;IAC7C,4FAA4F;IAC5F,IAAI,UAAUA,SAASA,MAAMT,IAAI,KAAK,YAAYU,QAAQS,QAAQ,KAAK,UAAU;QAC/E,IAAI;YACF,iEAAiE;YACjEC,IAAAA,yBAAQ,EAAC,4BAA4B;gBAAEC,OAAO;YAAS;YACvD,6EAA6E;YAC7ED,IAAAA,yBAAQ,EAAC,0BAA0B;gBAAEC,OAAO;YAAS;YAErDC,IAAAA,SAAI,EACF;QAEJ,EAAE,OAAM;YACNA,IAAAA,SAAI,EACF,CAAC,wJAAwJ,CAAC;QAE9J;QAEAC,IAAAA,cAAS,EAACd;QACVC,QAAQC,IAAI,CAAC;IACf;IAEA,MAAMF;AACR;AAEAC,QAAQc,EAAE,CAAC,qBAAqBN"}
1
+ {"version":3,"sources":["../../../src/utils/errors.ts"],"sourcesContent":["import { AssertionError } from 'assert';\nimport chalk from 'chalk';\nimport { execSync } from 'child_process';\n\nimport { exit, exception, warn } from '../log';\n\nconst ERROR_PREFIX = 'Error: ';\n\n/**\n * General error, formatted as a message in red text when caught by expo-cli (no stack trace is printed). Should be used in favor of `log.error()` in most cases.\n */\nexport class CommandError extends Error {\n name = 'CommandError';\n readonly isCommandError = true;\n [prop: string]: unknown;\n\n constructor(\n public code: string,\n message: string = ''\n ) {\n super('');\n // If e.toString() was called to get `message` we don't want it to look\n // like \"Error: Error:\".\n if (message.startsWith(ERROR_PREFIX)) {\n message = message.substring(ERROR_PREFIX.length);\n }\n\n this.message = message || code;\n }\n}\n\nexport class AbortCommandError extends CommandError {\n constructor() {\n super('ABORTED', 'Interactive prompt was cancelled.');\n }\n}\n\n/**\n * Used to end a CLI process without printing a stack trace in the Expo CLI. Should be used in favor of `process.exit`.\n */\nexport class SilentError extends CommandError {\n constructor(messageOrError?: string | Error) {\n const message =\n (typeof messageOrError === 'string' ? messageOrError : messageOrError?.message) ??\n 'This error should fail silently in the CLI';\n super('SILENT', message);\n if (typeof messageOrError !== 'string') {\n // forward the props of the incoming error for tests or processes outside of expo-cli that use expo cli internals.\n this.stack = messageOrError?.stack ?? this.stack;\n this.name = messageOrError?.name ?? this.name;\n }\n }\n}\n\nexport function logCmdError(error: any): never {\n if (!(error instanceof Error)) {\n throw error;\n }\n if (error instanceof AbortCommandError || error instanceof SilentError) {\n // Do nothing, this is used for prompts or other cases that were custom logged.\n process.exit(1);\n } else if (\n error instanceof CommandError ||\n error instanceof AssertionError ||\n error.name === 'ApiV2Error' ||\n error.name === 'ConfigError'\n ) {\n // Print the stack trace in debug mode only.\n exit(error);\n }\n\n const errorDetails = error.stack ? '\\n' + chalk.gray(error.stack) : '';\n\n exit(chalk.red(error.toString()) + errorDetails);\n}\n\n/** This should never be thrown in production. */\nexport class UnimplementedError extends Error {\n constructor() {\n super('Unimplemented');\n this.name = 'UnimplementedError';\n }\n}\n\n/**\n * Add additional information when EMFILE errors are encountered.\n * These errors originate from Metro's FSEventsWatcher due to `fsevents` going over MacOS system limit.\n * Unfortunately, these limits in macOS are relatively low compared to an average React Native project.\n *\n * @see https://github.com/expo/expo/issues/29083\n * @see https://github.com/facebook/metro/issues/834\n * @see https://github.com/fsevents/fsevents/issues/42#issuecomment-62632234\n */\nfunction handleTooManyOpenFileErrors(error: any) {\n // Only enable special logging when running on macOS and are running into the `EMFILE` error\n if ('code' in error && error.code === 'EMFILE' && process.platform === 'darwin') {\n try {\n // Try to recover watchman, if it's not installed this will throw\n execSync('watchman shutdown-server', { stdio: 'ignore' });\n // NOTE(cedric): this both starts the watchman server and resets all watchers\n execSync('watchman watch-del-all', { stdio: 'ignore' });\n\n warn(\n 'Watchman is installed but was likely not enabled when starting Metro, try starting your project again.\\nIf this problem persists, follow the troubleshooting guide of Watchman: https://facebook.github.io/watchman/docs/troubleshooting'\n );\n } catch {\n warn(\n `Your macOS system limit does not allow enough watchers for Metro, install Watchman instead. Learn more: https://facebook.github.io/watchman/docs/install`\n );\n }\n\n exception(error);\n process.exit(1);\n }\n\n throw error;\n}\n\nprocess.on('uncaughtException', handleTooManyOpenFileErrors);\n"],"names":["AbortCommandError","CommandError","SilentError","UnimplementedError","logCmdError","ERROR_PREFIX","Error","code","message","name","isCommandError","startsWith","substring","length","messageOrError","stack","error","process","exit","AssertionError","errorDetails","chalk","gray","red","toString","handleTooManyOpenFileErrors","platform","execSync","stdio","warn","exception","on"],"mappings":";;;;;;;;;;;QA+BaA;eAAAA;;QApBAC;eAAAA;;QA6BAC;eAAAA;;QAqCAC;eAAAA;;QAvBGC;eAAAA;;;;yBAtDe;;;;;;;gEACb;;;;;;;yBACO;;;;;;qBAEa;;;;;;AAEtC,MAAMC,eAAe;AAKd,MAAMJ,qBAAqBK;IAKhC,YACE,AAAOC,IAAY,EACnBC,UAAkB,EAAE,CACpB;QACA,KAAK,CAAC,UAHCD,OAAAA,WALTE,OAAO,qBACEC,iBAAiB;QAQxB,uEAAuE;QACvE,wBAAwB;QACxB,IAAIF,QAAQG,UAAU,CAACN,eAAe;YACpCG,UAAUA,QAAQI,SAAS,CAACP,aAAaQ,MAAM;QACjD;QAEA,IAAI,CAACL,OAAO,GAAGA,WAAWD;IAC5B;AACF;AAEO,MAAMP,0BAA0BC;IACrC,aAAc;QACZ,KAAK,CAAC,WAAW;IACnB;AACF;AAKO,MAAMC,oBAAoBD;IAC/B,YAAYa,cAA+B,CAAE;QAC3C,MAAMN,UACJ,AAAC,CAAA,OAAOM,mBAAmB,WAAWA,iBAAiBA,kCAAAA,eAAgBN,OAAO,AAAD,KAC7E;QACF,KAAK,CAAC,UAAUA;QAChB,IAAI,OAAOM,mBAAmB,UAAU;YACtC,kHAAkH;YAClH,IAAI,CAACC,KAAK,GAAGD,CAAAA,kCAAAA,eAAgBC,KAAK,KAAI,IAAI,CAACA,KAAK;YAChD,IAAI,CAACN,IAAI,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, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- ensureProcessExitsAfterDelay: function() {
12
+ get ensureProcessExitsAfterDelay () {
13
13
  return ensureProcessExitsAfterDelay;
14
14
  },
15
- installExitHooks: function() {
15
+ get installExitHooks () {
16
16
  return installExitHooks;
17
17
  }
18
18
  });
@@ -97,7 +97,7 @@ function attachMasterListener() {
97
97
  }
98
98
  };
99
99
  }
100
- function ensureProcessExitsAfterDelay(waitUntilExitMs = 10000, startedAtMs = Date.now()) {
100
+ function ensureProcessExitsAfterDelay(waitUntilExitMs = 4000, startedAtMs = Date.now()) {
101
101
  // Create a list of the expected active resources before exiting.
102
102
  // Note, the order is undeterministic
103
103
  const expectedResources = [
@@ -116,19 +116,16 @@ function ensureProcessExitsAfterDelay(waitUntilExitMs = 10000, startedAtMs = Dat
116
116
  }
117
117
  return true;
118
118
  });
119
- // Check if only Timeouts remain (no blocking resources like ProcessWrap/PipeWrap)
120
- const hasBlockingResources = unexpectedActiveResources.some((resource)=>resource !== 'Timeout' && resource !== 'CloseReq');
121
- const canExitProcess = !unexpectedActiveResources.length || !hasBlockingResources;
122
- if (canExitProcess) {
123
- if (unexpectedActiveResources.length && !hasBlockingResources) {
124
- debug('only non-blocking resources remain (Timeout/CloseReq), process can safely exit');
125
- } else {
126
- debug('no active resources detected, process can safely exit');
127
- }
119
+ // Check if there are any resources that block the process from exiting.
120
+ // CloseReq is always transient and completes on its own.
121
+ // NOTE: Timeout is NOT excluded — getActiveResourcesInfo() only reports ref'd timers,
122
+ // so any Timeout in this list will keep the event loop alive indefinitely.
123
+ const hasBlockingResources = unexpectedActiveResources.some((resource)=>resource !== 'CloseReq');
124
+ if (!hasBlockingResources) {
125
+ debug(unexpectedActiveResources.length ? 'only transient resources remain (CloseReq), process can safely exit' : 'no active resources detected, process can safely exit');
128
126
  return;
129
- } else {
130
- debug(`process is trying to exit, but is stuck on unexpected active resources:`, unexpectedActiveResources);
131
127
  }
128
+ debug(`process is trying to exit, but is stuck on unexpected active resources:`, unexpectedActiveResources);
132
129
  // Check if the process needs to be force-closed
133
130
  const elapsedTime = Date.now() - startedAtMs;
134
131
  if (elapsedTime > waitUntilExitMs) {
@@ -137,10 +134,9 @@ function ensureProcessExitsAfterDelay(waitUntilExitMs = 10000, startedAtMs = Dat
137
134
  return _nodeprocess().default.exit(0);
138
135
  }
139
136
  const timeoutId = setTimeout(()=>{
140
- // Ensure the timeout is cleared before checking the active resources
141
- clearTimeout(timeoutId);
142
- // Check if the process can exit
143
- ensureProcessExitsAfterDelay(waitUntilExitMs, startedAtMs);
137
+ // Delay the next check by one tick so the current timer is fully cleaned up
138
+ // and doesn't appear in the active resources list.
139
+ _nodeprocess().default.nextTick(()=>ensureProcessExitsAfterDelay(waitUntilExitMs, startedAtMs));
144
140
  // setTimeout is using the global definitions from React Native which is missing the unref method in Node.js.
145
141
  }, 100);
146
142
  // Unref the timeout so it doesn't prevent the process from exiting naturally
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/exit.ts"],"sourcesContent":["import { ChildProcess } from 'node:child_process';\nimport process from 'node:process';\n\nimport { guardAsync } from './fn';\nimport { warn } from '../log';\n\nconst debug = require('debug')('expo:utils:exit') as typeof console.log;\n\n// NOTE: This is an internal method, not designed to be exposed. It's also our only way to get this info\ndeclare global {\n namespace NodeJS {\n interface Process {\n _getActiveHandles(): readonly any[];\n }\n }\n}\n\ntype AsyncExitHook = (signal: NodeJS.Signals) => void | Promise<void>;\n\nconst PRE_EXIT_SIGNALS: NodeJS.Signals[] = ['SIGHUP', 'SIGINT', 'SIGTERM', 'SIGBREAK'];\n\n// We create a queue since Node.js throws an error if we try to append too many listeners:\n// (node:4405) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added to [process]. Use emitter.setMaxListeners() to increase limit\nconst queue: AsyncExitHook[] = [];\n\nlet unsubscribe: (() => void) | null = null;\n\n/** Add functions that run before the process exits. Returns a function for removing the listeners. */\nexport function installExitHooks(asyncExitHook: AsyncExitHook): () => void {\n // We need to instantiate the master listener the first time the queue is used.\n if (!queue.length) {\n // Track the master listener so we can remove it later.\n unsubscribe = attachMasterListener();\n }\n\n queue.push(asyncExitHook);\n\n return () => {\n const index = queue.indexOf(asyncExitHook);\n if (index >= 0) {\n queue.splice(index, 1);\n }\n // Clean up the master listener if we don't need it anymore.\n if (!queue.length) {\n unsubscribe?.();\n }\n };\n}\n\n// Create a function that runs before the process exits and guards against running multiple times.\nfunction createExitHook(signal: NodeJS.Signals) {\n return guardAsync(async () => {\n debug(`pre-exit (signal: ${signal}, queue length: ${queue.length})`);\n\n for (const [index, hookAsync] of Object.entries(queue)) {\n try {\n await hookAsync(signal);\n } catch (error: any) {\n debug(`Error in exit hook: %O (queue: ${index})`, error);\n }\n }\n\n debug(`post-exit (code: ${process.exitCode ?? 0})`);\n\n process.exit();\n });\n}\n\nfunction attachMasterListener() {\n const hooks: [NodeJS.Signals, () => any][] = [];\n for (const signal of PRE_EXIT_SIGNALS) {\n const hook = createExitHook(signal);\n hooks.push([signal, hook]);\n process.on(signal, hook);\n }\n return () => {\n for (const [signal, hook] of hooks) {\n process.removeListener(signal, hook);\n }\n };\n}\n\n/**\n * Monitor if the current process is exiting before the delay is reached.\n * If there are active resources, the process will be forced to exit after the delay is reached.\n *\n * @see https://nodejs.org/docs/latest-v18.x/api/process.html#processgetactiveresourcesinfo\n */\nexport function ensureProcessExitsAfterDelay(waitUntilExitMs = 10000, startedAtMs = Date.now()) {\n // Create a list of the expected active resources before exiting.\n // Note, the order is undeterministic\n const expectedResources = [\n process.stdout.isTTY ? 'TTYWrap' : 'PipeWrap',\n process.stderr.isTTY ? 'TTYWrap' : 'PipeWrap',\n process.stdin.isTTY ? 'TTYWrap' : 'PipeWrap',\n ];\n // Check active resources, besides the TTYWrap/PipeWrap (process.stdin, process.stdout, process.stderr)\n const activeResources = process.getActiveResourcesInfo() as string[];\n // Filter the active resource list by subtracting the expected resources, in undeterministic order\n const unexpectedActiveResources = activeResources.filter((activeResource) => {\n const index = expectedResources.indexOf(activeResource);\n if (index >= 0) {\n expectedResources.splice(index, 1);\n return false;\n }\n\n return true;\n });\n\n // Check if only Timeouts remain (no blocking resources like ProcessWrap/PipeWrap)\n const hasBlockingResources = unexpectedActiveResources.some(\n (resource) => resource !== 'Timeout' && resource !== 'CloseReq'\n );\n\n const canExitProcess = !unexpectedActiveResources.length || !hasBlockingResources;\n if (canExitProcess) {\n if (unexpectedActiveResources.length && !hasBlockingResources) {\n debug('only non-blocking resources remain (Timeout/CloseReq), process can safely exit');\n } else {\n debug('no active resources detected, process can safely exit');\n }\n return;\n } else {\n debug(\n `process is trying to exit, but is stuck on unexpected active resources:`,\n unexpectedActiveResources\n );\n }\n\n // Check if the process needs to be force-closed\n const elapsedTime = Date.now() - startedAtMs;\n if (elapsedTime > waitUntilExitMs) {\n debug('active handles detected past the exit delay, forcefully exiting:', activeResources);\n tryWarnActiveProcesses();\n return process.exit(0);\n }\n\n const timeoutId = setTimeout(() => {\n // Ensure the timeout is cleared before checking the active resources\n clearTimeout(timeoutId);\n // Check if the process can exit\n ensureProcessExitsAfterDelay(waitUntilExitMs, startedAtMs);\n\n // setTimeout is using the global definitions from React Native which is missing the unref method in Node.js.\n }, 100) as unknown as NodeJS.Timeout;\n\n // Unref the timeout so it doesn't prevent the process from exiting naturally\n // when this timeout is the only remaining active resource\n timeoutId.unref();\n}\n\n/**\n * Try to warn the user about unexpected active processes running in the background.\n * This uses the internal `process._getActiveHandles` method, within a try-catch block.\n * If active child processes are detected, the commands of these processes are logged.\n *\n * @example ```bash\n * Done writing bundle output\n * Detected 2 processes preventing Expo from exiting, forcefully exiting now.\n * - node /Users/cedric/../node_modules/nativewind/dist/metro/tailwind/v3/child.js\n * - node /Users/cedric/../node_modules/nativewind/dist/metro/tailwind/v3/child.js\n * ```\n */\nfunction tryWarnActiveProcesses() {\n const activeProcesses: string[] = [];\n const handleSummary: Record<string, number> = {};\n const timeoutDetails: string[] = [];\n\n try {\n const handles = process._getActiveHandles();\n\n // Categorize handles by their constructor name\n for (const handle of handles) {\n const name = handle?.constructor?.name ?? 'Unknown';\n handleSummary[name] = (handleSummary[name] ?? 0) + 1;\n\n // Collect ChildProcess command info\n if (handle instanceof ChildProcess) {\n activeProcesses.push(handle.spawnargs.join(' '));\n }\n\n // Try to get more info about Timeout handles\n if (name === 'Timeout') {\n try {\n // Attempt to get callback name or source info\n const callback = handle._onTimeout ?? handle._repeat;\n const callbackName = callback?.name || '<anonymous>';\n const delay = handle._idleTimeout ?? 'unknown';\n timeoutDetails.push(`Timeout(${delay}ms, fn: ${callbackName})`);\n } catch {\n timeoutDetails.push('Timeout(details unavailable)');\n }\n }\n }\n\n // Log detailed handle info when debug is enabled\n debug('active handles by type:', handleSummary);\n if (timeoutDetails.length) {\n debug('timeout details:', timeoutDetails);\n }\n } catch (error) {\n debug('failed to get active process information:', error);\n }\n\n if (!activeProcesses.length) {\n warn('Something prevented Expo from exiting, forcefully exiting now.');\n // Log handle summary when no specific processes are identified\n if (Object.keys(handleSummary).length > 0) {\n debug('handle summary (use DEBUG=expo:utils:exit for details):', handleSummary);\n }\n } else {\n const singularOrPlural =\n activeProcesses.length === 1 ? '1 process' : `${activeProcesses.length} processes`;\n\n warn(`Detected ${singularOrPlural} preventing Expo from exiting, forcefully exiting now.`);\n warn(' - ' + activeProcesses.join('\\n - '));\n }\n}\n"],"names":["ensureProcessExitsAfterDelay","installExitHooks","debug","require","PRE_EXIT_SIGNALS","queue","unsubscribe","asyncExitHook","length","attachMasterListener","push","index","indexOf","splice","createExitHook","signal","guardAsync","hookAsync","Object","entries","error","process","exitCode","exit","hooks","hook","on","removeListener","waitUntilExitMs","startedAtMs","Date","now","expectedResources","stdout","isTTY","stderr","stdin","activeResources","getActiveResourcesInfo","unexpectedActiveResources","filter","activeResource","hasBlockingResources","some","resource","canExitProcess","elapsedTime","tryWarnActiveProcesses","timeoutId","setTimeout","clearTimeout","unref","activeProcesses","handleSummary","timeoutDetails","handles","_getActiveHandles","handle","name","constructor","ChildProcess","spawnargs","join","callback","_onTimeout","_repeat","callbackName","delay","_idleTimeout","warn","keys","singularOrPlural"],"mappings":";;;;;;;;;;;IAwFgBA,4BAA4B;eAA5BA;;IA5DAC,gBAAgB;eAAhBA;;;;yBA5Ba;;;;;;;gEACT;;;;;;oBAEO;qBACN;;;;;;AAErB,MAAMC,QAAQC,QAAQ,SAAS;AAa/B,MAAMC,mBAAqC;IAAC;IAAU;IAAU;IAAW;CAAW;AAEtF,0FAA0F;AAC1F,+KAA+K;AAC/K,MAAMC,QAAyB,EAAE;AAEjC,IAAIC,cAAmC;AAGhC,SAASL,iBAAiBM,aAA4B;IAC3D,+EAA+E;IAC/E,IAAI,CAACF,MAAMG,MAAM,EAAE;QACjB,uDAAuD;QACvDF,cAAcG;IAChB;IAEAJ,MAAMK,IAAI,CAACH;IAEX,OAAO;QACL,MAAMI,QAAQN,MAAMO,OAAO,CAACL;QAC5B,IAAII,SAAS,GAAG;YACdN,MAAMQ,MAAM,CAACF,OAAO;QACtB;QACA,4DAA4D;QAC5D,IAAI,CAACN,MAAMG,MAAM,EAAE;YACjBF,+BAAAA;QACF;IACF;AACF;AAEA,kGAAkG;AAClG,SAASQ,eAAeC,MAAsB;IAC5C,OAAOC,IAAAA,cAAU,EAAC;QAChBd,MAAM,CAAC,kBAAkB,EAAEa,OAAO,gBAAgB,EAAEV,MAAMG,MAAM,CAAC,CAAC,CAAC;QAEnE,KAAK,MAAM,CAACG,OAAOM,UAAU,IAAIC,OAAOC,OAAO,CAACd,OAAQ;YACtD,IAAI;gBACF,MAAMY,UAAUF;YAClB,EAAE,OAAOK,OAAY;gBACnBlB,MAAM,CAAC,+BAA+B,EAAES,MAAM,CAAC,CAAC,EAAES;YACpD;QACF;QAEAlB,MAAM,CAAC,iBAAiB,EAAE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AC;gBAChE,EAAE,OAAM;oBACNZ,eAAe5C,IAAI,CAAC;gBACtB;YACF;QACF;QAEA,iDAAiD;QACjDR,MAAM,2BAA2BmD;QACjC,IAAIC,eAAe9C,MAAM,EAAE;YACzBN,MAAM,oBAAoBoD;QAC5B;IACF,EAAE,OAAOlC,OAAO;QACdlB,MAAM,6CAA6CkB;IACrD;IAEA,IAAI,CAACgC,gBAAgB5C,MAAM,EAAE;QAC3B6D,IAAAA,SAAI,EAAC;QACL,+DAA+D;QAC/D,IAAInD,OAAOoD,IAAI,CAACjB,eAAe7C,MAAM,GAAG,GAAG;YACzCN,MAAM,2DAA2DmD;QACnE;IACF,OAAO;QACL,MAAMkB,mBACJnB,gBAAgB5C,MAAM,KAAK,IAAI,cAAc,GAAG4C,gBAAgB5C,MAAM,CAAC,UAAU,CAAC;QAEpF6D,IAAAA,SAAI,EAAC,CAAC,SAAS,EAAEE,iBAAiB,sDAAsD,CAAC;QACzFF,IAAAA,SAAI,EAAC,SAASjB,gBAAgBU,IAAI,CAAC;IACrC;AACF"}
1
+ {"version":3,"sources":["../../../src/utils/exit.ts"],"sourcesContent":["import { ChildProcess } from 'node:child_process';\nimport process from 'node:process';\n\nimport { guardAsync } from './fn';\nimport { warn } from '../log';\n\nconst debug = require('debug')('expo:utils:exit') as typeof console.log;\n\n// NOTE: This is an internal method, not designed to be exposed. It's also our only way to get this info\ndeclare global {\n namespace NodeJS {\n interface Process {\n _getActiveHandles(): readonly any[];\n }\n }\n}\n\ntype AsyncExitHook = (signal: NodeJS.Signals) => void | Promise<void>;\n\nconst PRE_EXIT_SIGNALS: NodeJS.Signals[] = ['SIGHUP', 'SIGINT', 'SIGTERM', 'SIGBREAK'];\n\n// We create a queue since Node.js throws an error if we try to append too many listeners:\n// (node:4405) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added to [process]. Use emitter.setMaxListeners() to increase limit\nconst queue: AsyncExitHook[] = [];\n\nlet unsubscribe: (() => void) | null = null;\n\n/** Add functions that run before the process exits. Returns a function for removing the listeners. */\nexport function installExitHooks(asyncExitHook: AsyncExitHook): () => void {\n // We need to instantiate the master listener the first time the queue is used.\n if (!queue.length) {\n // Track the master listener so we can remove it later.\n unsubscribe = attachMasterListener();\n }\n\n queue.push(asyncExitHook);\n\n return () => {\n const index = queue.indexOf(asyncExitHook);\n if (index >= 0) {\n queue.splice(index, 1);\n }\n // Clean up the master listener if we don't need it anymore.\n if (!queue.length) {\n unsubscribe?.();\n }\n };\n}\n\n// Create a function that runs before the process exits and guards against running multiple times.\nfunction createExitHook(signal: NodeJS.Signals) {\n return guardAsync(async () => {\n debug(`pre-exit (signal: ${signal}, queue length: ${queue.length})`);\n\n for (const [index, hookAsync] of Object.entries(queue)) {\n try {\n await hookAsync(signal);\n } catch (error: any) {\n debug(`Error in exit hook: %O (queue: ${index})`, error);\n }\n }\n\n debug(`post-exit (code: ${process.exitCode ?? 0})`);\n\n process.exit();\n });\n}\n\nfunction attachMasterListener() {\n const hooks: [NodeJS.Signals, () => any][] = [];\n for (const signal of PRE_EXIT_SIGNALS) {\n const hook = createExitHook(signal);\n hooks.push([signal, hook]);\n process.on(signal, hook);\n }\n return () => {\n for (const [signal, hook] of hooks) {\n process.removeListener(signal, hook);\n }\n };\n}\n\n/**\n * Monitor if the current process is exiting before the delay is reached.\n * If there are active resources, the process will be forced to exit after the delay is reached.\n *\n * @see https://nodejs.org/docs/latest-v18.x/api/process.html#processgetactiveresourcesinfo\n */\nexport function ensureProcessExitsAfterDelay(waitUntilExitMs = 4_000, startedAtMs = Date.now()) {\n // Create a list of the expected active resources before exiting.\n // Note, the order is undeterministic\n const expectedResources = [\n process.stdout.isTTY ? 'TTYWrap' : 'PipeWrap',\n process.stderr.isTTY ? 'TTYWrap' : 'PipeWrap',\n process.stdin.isTTY ? 'TTYWrap' : 'PipeWrap',\n ];\n // Check active resources, besides the TTYWrap/PipeWrap (process.stdin, process.stdout, process.stderr)\n const activeResources = process.getActiveResourcesInfo() as string[];\n // Filter the active resource list by subtracting the expected resources, in undeterministic order\n const unexpectedActiveResources = activeResources.filter((activeResource) => {\n const index = expectedResources.indexOf(activeResource);\n if (index >= 0) {\n expectedResources.splice(index, 1);\n return false;\n }\n\n return true;\n });\n\n // Check if there are any resources that block the process from exiting.\n // CloseReq is always transient and completes on its own.\n // NOTE: Timeout is NOT excluded — getActiveResourcesInfo() only reports ref'd timers,\n // so any Timeout in this list will keep the event loop alive indefinitely.\n const hasBlockingResources = unexpectedActiveResources.some(\n (resource) => resource !== 'CloseReq'\n );\n\n if (!hasBlockingResources) {\n debug(\n unexpectedActiveResources.length\n ? 'only transient resources remain (CloseReq), process can safely exit'\n : 'no active resources detected, process can safely exit'\n );\n return;\n }\n\n debug(\n `process is trying to exit, but is stuck on unexpected active resources:`,\n unexpectedActiveResources\n );\n\n // Check if the process needs to be force-closed\n const elapsedTime = Date.now() - startedAtMs;\n if (elapsedTime > waitUntilExitMs) {\n debug('active handles detected past the exit delay, forcefully exiting:', activeResources);\n tryWarnActiveProcesses();\n return process.exit(0);\n }\n\n const timeoutId = setTimeout(() => {\n // Delay the next check by one tick so the current timer is fully cleaned up\n // and doesn't appear in the active resources list.\n process.nextTick(() => ensureProcessExitsAfterDelay(waitUntilExitMs, startedAtMs));\n\n // setTimeout is using the global definitions from React Native which is missing the unref method in Node.js.\n }, 100) as unknown as NodeJS.Timeout;\n\n // Unref the timeout so it doesn't prevent the process from exiting naturally\n // when this timeout is the only remaining active resource\n timeoutId.unref();\n}\n\n/**\n * Try to warn the user about unexpected active processes running in the background.\n * This uses the internal `process._getActiveHandles` method, within a try-catch block.\n * If active child processes are detected, the commands of these processes are logged.\n *\n * @example ```bash\n * Done writing bundle output\n * Detected 2 processes preventing Expo from exiting, forcefully exiting now.\n * - node /Users/cedric/../node_modules/nativewind/dist/metro/tailwind/v3/child.js\n * - node /Users/cedric/../node_modules/nativewind/dist/metro/tailwind/v3/child.js\n * ```\n */\nfunction tryWarnActiveProcesses() {\n const activeProcesses: string[] = [];\n const handleSummary: Record<string, number> = {};\n const timeoutDetails: string[] = [];\n\n try {\n const handles = process._getActiveHandles();\n\n // Categorize handles by their constructor name\n for (const handle of handles) {\n const name = handle?.constructor?.name ?? 'Unknown';\n handleSummary[name] = (handleSummary[name] ?? 0) + 1;\n\n // Collect ChildProcess command info\n if (handle instanceof ChildProcess) {\n activeProcesses.push(handle.spawnargs.join(' '));\n }\n\n // Try to get more info about Timeout handles\n if (name === 'Timeout') {\n try {\n // Attempt to get callback name or source info\n const callback = handle._onTimeout ?? handle._repeat;\n const callbackName = callback?.name || '<anonymous>';\n const delay = handle._idleTimeout ?? 'unknown';\n timeoutDetails.push(`Timeout(${delay}ms, fn: ${callbackName})`);\n } catch {\n timeoutDetails.push('Timeout(details unavailable)');\n }\n }\n }\n\n // Log detailed handle info when debug is enabled\n debug('active handles by type:', handleSummary);\n if (timeoutDetails.length) {\n debug('timeout details:', timeoutDetails);\n }\n } catch (error) {\n debug('failed to get active process information:', error);\n }\n\n if (!activeProcesses.length) {\n warn('Something prevented Expo from exiting, forcefully exiting now.');\n // Log handle summary when no specific processes are identified\n if (Object.keys(handleSummary).length > 0) {\n debug('handle summary (use DEBUG=expo:utils:exit for details):', handleSummary);\n }\n } else {\n const singularOrPlural =\n activeProcesses.length === 1 ? '1 process' : `${activeProcesses.length} processes`;\n\n warn(`Detected ${singularOrPlural} preventing Expo from exiting, forcefully exiting now.`);\n warn(' - ' + activeProcesses.join('\\n - '));\n }\n}\n"],"names":["ensureProcessExitsAfterDelay","installExitHooks","debug","require","PRE_EXIT_SIGNALS","queue","unsubscribe","asyncExitHook","length","attachMasterListener","push","index","indexOf","splice","createExitHook","signal","guardAsync","hookAsync","Object","entries","error","process","exitCode","exit","hooks","hook","on","removeListener","waitUntilExitMs","startedAtMs","Date","now","expectedResources","stdout","isTTY","stderr","stdin","activeResources","getActiveResourcesInfo","unexpectedActiveResources","filter","activeResource","hasBlockingResources","some","resource","elapsedTime","tryWarnActiveProcesses","timeoutId","setTimeout","nextTick","unref","activeProcesses","handleSummary","timeoutDetails","handles","_getActiveHandles","handle","name","ChildProcess","spawnargs","join","callback","_onTimeout","_repeat","callbackName","delay","_idleTimeout","warn","keys","singularOrPlural"],"mappings":";;;;;;;;;;;QAwFgBA;eAAAA;;QA5DAC;eAAAA;;;;yBA5Ba;;;;;;;gEACT;;;;;;oBAEO;qBACN;;;;;;AAErB,MAAMC,QAAQC,QAAQ,SAAS;AAa/B,MAAMC,mBAAqC;IAAC;IAAU;IAAU;IAAW;CAAW;AAEtF,0FAA0F;AAC1F,+KAA+K;AAC/K,MAAMC,QAAyB,EAAE;AAEjC,IAAIC,cAAmC;AAGhC,SAASL,iBAAiBM,aAA4B;IAC3D,+EAA+E;IAC/E,IAAI,CAACF,MAAMG,MAAM,EAAE;QACjB,uDAAuD;QACvDF,cAAcG;IAChB;IAEAJ,MAAMK,IAAI,CAACH;IAEX,OAAO;QACL,MAAMI,QAAQN,MAAMO,OAAO,CAACL;QAC5B,IAAII,SAAS,GAAG;YACdN,MAAMQ,MAAM,CAACF,OAAO;QACtB;QACA,4DAA4D;QAC5D,IAAI,CAACN,MAAMG,MAAM,EAAE;YACjBF,+BAAAA;QACF;IACF;AACF;AAEA,kGAAkG;AAClG,SAASQ,eAAeC,MAAsB;IAC5C,OAAOC,IAAAA,cAAU,EAAC;QAChBd,MAAM,CAAC,kBAAkB,EAAEa,OAAO,gBAAgB,EAAEV,MAAMG,MAAM,CAAC,CAAC,CAAC;QAEnE,KAAK,MAAM,CAACG,OAAOM,UAAU,IAAIC,OAAOC,OAAO,CAACd,OAAQ;YACtD,IAAI;gBACF,MAAMY,UAAUF;YAClB,EAAE,OAAOK,OAAY;gBACnBlB,MAAM,CAAC,+BAA+B,EAAES,MAAM,CAAC,CAAC,EAAES;YACpD;QACF;QAEAlB,MAAM,CAAC,iBAAiB,EAAEmB,sBAAO,CAACC,QAAQ,IAAI,EAAE,CAAC,CAAC;QAElDD,sBAAO,CAACE,IAAI;IACd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AAE;YACzBN,MAAM,oBAAoBmD;QAC5B;IACF,EAAE,OAAOjC,OAAO;QACdlB,MAAM,6CAA6CkB;IACrD;IAEA,IAAI,CAAC+B,gBAAgB3C,MAAM,EAAE;QAC3B2D,IAAAA,SAAI,EAAC;QACL,+DAA+D;QAC/D,IAAIjD,OAAOkD,IAAI,CAAChB,eAAe5C,MAAM,GAAG,GAAG;YACzCN,MAAM,2DAA2DkD;QACnE;IACF,OAAO;QACL,MAAMiB,mBACJlB,gBAAgB3C,MAAM,KAAK,IAAI,cAAc,GAAG2C,gBAAgB3C,MAAM,CAAC,UAAU,CAAC;QAEpF2D,IAAAA,SAAI,EAAC,CAAC,SAAS,EAAEE,iBAAiB,sDAAsD,CAAC;QACzFF,IAAAA,SAAI,EAAC,SAAShB,gBAAgBS,IAAI,CAAC;IACrC;AACF"}
@@ -5,20 +5,20 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- ExpoUpdatesCLICommandFailedError: function() {
12
+ get ExpoUpdatesCLICommandFailedError () {
13
13
  return ExpoUpdatesCLICommandFailedError;
14
14
  },
15
- ExpoUpdatesCLIInvalidCommandError: function() {
15
+ get ExpoUpdatesCLIInvalidCommandError () {
16
16
  return ExpoUpdatesCLIInvalidCommandError;
17
17
  },
18
- ExpoUpdatesCLIModuleNotFoundError: function() {
18
+ get ExpoUpdatesCLIModuleNotFoundError () {
19
19
  return ExpoUpdatesCLIModuleNotFoundError;
20
20
  },
21
- expoUpdatesCommandAsync: function() {
21
+ get expoUpdatesCommandAsync () {
22
22
  return expoUpdatesCommandAsync;
23
23
  }
24
24
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/expoUpdatesCli.ts"],"sourcesContent":["import spawnAsync from '@expo/spawn-async';\nimport resolveFrom, { silent as silentResolveFrom } from 'resolve-from';\n\nexport class ExpoUpdatesCLIModuleNotFoundError extends Error {}\nexport class ExpoUpdatesCLIInvalidCommandError extends Error {}\nexport class ExpoUpdatesCLICommandFailedError extends Error {}\n\nexport async function expoUpdatesCommandAsync(projectDir: string, args: string[]): Promise<string> {\n let expoUpdatesCli;\n try {\n expoUpdatesCli =\n silentResolveFrom(projectDir, 'expo-updates/bin/cli') ??\n resolveFrom(projectDir, 'expo-updates/bin/cli.js');\n } catch (e: any) {\n if (e.code === 'MODULE_NOT_FOUND') {\n throw new ExpoUpdatesCLIModuleNotFoundError(`The \\`expo-updates\\` package was not found. `);\n }\n throw e;\n }\n\n try {\n return (\n await spawnAsync(expoUpdatesCli, args, {\n stdio: 'pipe',\n env: { ...process.env },\n })\n ).stdout;\n } catch (e: any) {\n if (e.stderr && typeof e.stderr === 'string') {\n if (e.stderr.includes('Invalid command')) {\n throw new ExpoUpdatesCLIInvalidCommandError(\n `The command specified by ${args} was not valid in the \\`expo-updates\\` CLI.`\n );\n } else {\n throw new ExpoUpdatesCLICommandFailedError(e.stderr);\n }\n }\n\n throw e;\n }\n}\n"],"names":["ExpoUpdatesCLICommandFailedError","ExpoUpdatesCLIInvalidCommandError","ExpoUpdatesCLIModuleNotFoundError","expoUpdatesCommandAsync","Error","projectDir","args","expoUpdatesCli","silentResolveFrom","resolveFrom","e","code","spawnAsync","stdio","env","process","stdout","stderr","includes"],"mappings":";;;;;;;;;;;IAKaA,gCAAgC;eAAhCA;;IADAC,iCAAiC;eAAjCA;;IADAC,iCAAiC;eAAjCA;;IAISC,uBAAuB;eAAvBA;;;;gEAPC;;;;;;;iEACkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElD,MAAMD,0CAA0CE;AAAO;AACvD,MAAMH,0CAA0CG;AAAO;AACvD,MAAMJ,yCAAyCI;AAAO;AAEtD,eAAeD,wBAAwBE,UAAkB,EAAEC,IAAc;IAC9E,IAAIC;IACJ,IAAI;QACFA,iBACEC,IAAAA,qBAAiB,EAACH,YAAY,2BAC9BI,IAAAA,sBAAW,EAACJ,YAAY;IAC5B,EAAE,OAAOK,GAAQ;QACf,IAAIA,EAAEC,IAAI,KAAK,oBAAoB;YACjC,MAAM,IAAIT,kCAAkC,CAAC,4CAA4C,CAAC;QAC5F;QACA,MAAMQ;IACR;IAEA,IAAI;QACF,OAAO,AACL,CAAA,MAAME,IAAAA,qBAAU,EAACL,gBAAgBD,MAAM;YACrCO,OAAO;YACPC,KAAK;gBAAE,GAAGC,QAAQD,GAAG;YAAC;QACxB,EAAC,EACDE,MAAM;IACV,EAAE,OAAON,GAAQ;QACf,IAAIA,EAAEO,MAAM,IAAI,OAAOP,EAAEO,MAAM,KAAK,UAAU;YAC5C,IAAIP,EAAEO,MAAM,CAACC,QAAQ,CAAC,oBAAoB;gBACxC,MAAM,IAAIjB,kCACR,CAAC,yBAAyB,EAAEK,KAAK,2CAA2C,CAAC;YAEjF,OAAO;gBACL,MAAM,IAAIN,iCAAiCU,EAAEO,MAAM;YACrD;QACF;QAEA,MAAMP;IACR;AACF"}
1
+ {"version":3,"sources":["../../../src/utils/expoUpdatesCli.ts"],"sourcesContent":["import spawnAsync from '@expo/spawn-async';\nimport resolveFrom, { silent as silentResolveFrom } from 'resolve-from';\n\nexport class ExpoUpdatesCLIModuleNotFoundError extends Error {}\nexport class ExpoUpdatesCLIInvalidCommandError extends Error {}\nexport class ExpoUpdatesCLICommandFailedError extends Error {}\n\nexport async function expoUpdatesCommandAsync(projectDir: string, args: string[]): Promise<string> {\n let expoUpdatesCli;\n try {\n expoUpdatesCli =\n silentResolveFrom(projectDir, 'expo-updates/bin/cli') ??\n resolveFrom(projectDir, 'expo-updates/bin/cli.js');\n } catch (e: any) {\n if (e.code === 'MODULE_NOT_FOUND') {\n throw new ExpoUpdatesCLIModuleNotFoundError(`The \\`expo-updates\\` package was not found. `);\n }\n throw e;\n }\n\n try {\n return (\n await spawnAsync(expoUpdatesCli, args, {\n stdio: 'pipe',\n env: { ...process.env },\n })\n ).stdout;\n } catch (e: any) {\n if (e.stderr && typeof e.stderr === 'string') {\n if (e.stderr.includes('Invalid command')) {\n throw new ExpoUpdatesCLIInvalidCommandError(\n `The command specified by ${args} was not valid in the \\`expo-updates\\` CLI.`\n );\n } else {\n throw new ExpoUpdatesCLICommandFailedError(e.stderr);\n }\n }\n\n throw e;\n }\n}\n"],"names":["ExpoUpdatesCLICommandFailedError","ExpoUpdatesCLIInvalidCommandError","ExpoUpdatesCLIModuleNotFoundError","expoUpdatesCommandAsync","Error","projectDir","args","expoUpdatesCli","silentResolveFrom","resolveFrom","e","code","spawnAsync","stdio","env","process","stdout","stderr","includes"],"mappings":";;;;;;;;;;;QAKaA;eAAAA;;QADAC;eAAAA;;QADAC;eAAAA;;QAISC;eAAAA;;;;gEAPC;;;;;;;iEACkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElD,MAAMD,0CAA0CE;AAAO;AACvD,MAAMH,0CAA0CG;AAAO;AACvD,MAAMJ,yCAAyCI;AAAO;AAEtD,eAAeD,wBAAwBE,UAAkB,EAAEC,IAAc;IAC9E,IAAIC;IACJ,IAAI;QACFA,iBACEC,IAAAA,qBAAiB,EAACH,YAAY,2BAC9BI,IAAAA,sBAAW,EAACJ,YAAY;IAC5B,EAAE,OAAOK,GAAQ;QACf,IAAIA,EAAEC,IAAI,KAAK,oBAAoB;YACjC,MAAM,IAAIT,kCAAkC,CAAC,4CAA4C,CAAC;QAC5F;QACA,MAAMQ;IACR;IAEA,IAAI;QACF,OAAO,AACL,CAAA,MAAME,IAAAA,qBAAU,EAACL,gBAAgBD,MAAM;YACrCO,OAAO;YACPC,KAAK;gBAAE,GAAGC,QAAQD,GAAG;YAAC;QACxB,EAAC,EACDE,MAAM;IACV,EAAE,OAAON,GAAQ;QACf,IAAIA,EAAEO,MAAM,IAAI,OAAOP,EAAEO,MAAM,KAAK,UAAU;YAC5C,IAAIP,EAAEO,MAAM,CAACC,QAAQ,CAAC,oBAAoB;gBACxC,MAAM,IAAIjB,kCACR,CAAC,yBAAyB,EAAEK,KAAK,2CAA2C,CAAC;YAEjF,OAAO;gBACL,MAAM,IAAIN,iCAAiCU,EAAEO,MAAM;YACrD;QACF;QAEA,MAAMP;IACR;AACF"}
@@ -5,17 +5,17 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- Headers: function() {
12
+ get Headers () {
13
13
  return _fetchnodeshim().Headers;
14
14
  },
15
- Response: function() {
15
+ get Response () {
16
16
  return _fetchnodeshim().Response;
17
17
  },
18
- fetch: function() {
18
+ get fetch () {
19
19
  return _fetchnodeshim().fetch;
20
20
  }
21
21
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/fetch.ts"],"sourcesContent":["import {\n fetch,\n Blob,\n URL,\n URLSearchParams,\n Request,\n Response,\n Headers,\n FormData,\n} from 'fetch-nodeshim';\n\n// NOTE(@kitten): Protect against accidental use of globals that don't match `fetch-nodeshim`\nObject.assign(globalThis, {\n fetch,\n Blob,\n URL,\n URLSearchParams,\n Request,\n Response,\n Headers,\n FormData,\n});\n\nexport { fetch, Headers, Response };\n"],"names":["Headers","Response","fetch","Object","assign","globalThis","Blob","URL","URLSearchParams","Request","FormData"],"mappings":";;;;;;;;;;;IAuBgBA,OAAO;eAAPA,wBAAO;;IAAEC,QAAQ;eAARA,yBAAQ;;IAAxBC,KAAK;eAALA,sBAAK;;;;yBAdP;;;;;;AAEP,6FAA6F;AAC7FC,OAAOC,MAAM,CAACC,YAAY;IACxBH,OAAAA,sBAAK;IACLI,MAAAA,qBAAI;IACJC,KAAAA,oBAAG;IACHC,iBAAAA,gCAAe;IACfC,SAAAA,wBAAO;IACPR,UAAAA,yBAAQ;IACRD,SAAAA,wBAAO;IACPU,UAAAA,yBAAQ;AACV"}
1
+ {"version":3,"sources":["../../../src/utils/fetch.ts"],"sourcesContent":["import {\n fetch,\n Blob,\n URL,\n URLSearchParams,\n Request,\n Response,\n Headers,\n FormData,\n} from 'fetch-nodeshim';\n\n// NOTE(@kitten): Protect against accidental use of globals that don't match `fetch-nodeshim`\nObject.assign(globalThis, {\n fetch,\n Blob,\n URL,\n URLSearchParams,\n Request,\n Response,\n Headers,\n FormData,\n});\n\nexport { fetch, Headers, Response };\n"],"names":["Headers","Response","fetch","Object","assign","globalThis","Blob","URL","URLSearchParams","Request","FormData"],"mappings":";;;;;;;;;;;QAuBgBA;eAAAA,wBAAO;;QAAEC;eAAAA,yBAAQ;;QAAxBC;eAAAA,sBAAK;;;;yBAdP;;;;;;AAEP,6FAA6F;AAC7FC,OAAOC,MAAM,CAACC,YAAY;IACxBH,OAAAA,sBAAK;IACLI,MAAAA,qBAAI;IACJC,KAAAA,oBAAG;IACHC,iBAAAA,gCAAe;IACfC,SAAAA,wBAAO;IACPR,UAAAA,yBAAQ;IACRD,SAAAA,wBAAO;IACPU,UAAAA,yBAAQ;AACV"}
@@ -5,14 +5,14 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- findFileInParents: function() {
12
+ get findFileInParents () {
13
13
  return findFileInParents;
14
14
  },
15
- findUpProjectRootOrAssert: function() {
15
+ get findUpProjectRootOrAssert () {
16
16
  return findUpProjectRootOrAssert;
17
17
  }
18
18
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/findUp.ts"],"sourcesContent":["import path from 'path';\nimport resolveFrom from 'resolve-from';\n\nimport { CommandError } from '../utils/errors';\n\n/** Look up directories until one with a `package.json` can be found, assert if none can be found. */\nexport function findUpProjectRootOrAssert(cwd: string): string {\n const projectRoot = findUpProjectRoot(cwd);\n if (!projectRoot) {\n throw new CommandError(`Project root directory not found (working directory: ${cwd})`);\n }\n return projectRoot;\n}\n\nfunction findUpProjectRoot(cwd: string): string | null {\n const found = resolveFrom.silent(cwd, './package.json');\n if (found) return path.dirname(found);\n\n const parent = path.dirname(cwd);\n if (parent === cwd) return null;\n\n return findUpProjectRoot(parent);\n}\n\n/**\n * Find a file in the (closest) parent directories.\n * This will recursively look for the file, until the root directory is reached.\n */\nexport function findFileInParents(cwd: string, fileName: string): string | null {\n const found = resolveFrom.silent(cwd, `./${fileName}`);\n if (found) return found;\n\n const parent = path.dirname(cwd);\n if (parent === cwd) return null;\n\n return findFileInParents(parent, fileName);\n}\n"],"names":["findFileInParents","findUpProjectRootOrAssert","cwd","projectRoot","findUpProjectRoot","CommandError","found","resolveFrom","silent","path","dirname","parent","fileName"],"mappings":";;;;;;;;;;;IA4BgBA,iBAAiB;eAAjBA;;IAtBAC,yBAAyB;eAAzBA;;;;gEANC;;;;;;;gEACO;;;;;;wBAEK;;;;;;AAGtB,SAASA,0BAA0BC,GAAW;IACnD,MAAMC,cAAcC,kBAAkBF;IACtC,IAAI,CAACC,aAAa;QAChB,MAAM,IAAIE,oBAAY,CAAC,CAAC,qDAAqD,EAAEH,IAAI,CAAC,CAAC;IACvF;IACA,OAAOC;AACT;AAEA,SAASC,kBAAkBF,GAAW;IACpC,MAAMI,QAAQC,sBAAW,CAACC,MAAM,CAACN,KAAK;IACtC,IAAII,OAAO,OAAOG,eAAI,CAACC,OAAO,CAACJ;IAE/B,MAAMK,SAASF,eAAI,CAACC,OAAO,CAACR;IAC5B,IAAIS,WAAWT,KAAK,OAAO;IAE3B,OAAOE,kBAAkBO;AAC3B;AAMO,SAASX,kBAAkBE,GAAW,EAAEU,QAAgB;IAC7D,MAAMN,QAAQC,sBAAW,CAACC,MAAM,CAACN,KAAK,CAAC,EAAE,EAAEU,UAAU;IACrD,IAAIN,OAAO,OAAOA;IAElB,MAAMK,SAASF,eAAI,CAACC,OAAO,CAACR;IAC5B,IAAIS,WAAWT,KAAK,OAAO;IAE3B,OAAOF,kBAAkBW,QAAQC;AACnC"}
1
+ {"version":3,"sources":["../../../src/utils/findUp.ts"],"sourcesContent":["import path from 'path';\nimport resolveFrom from 'resolve-from';\n\nimport { CommandError } from '../utils/errors';\n\n/** Look up directories until one with a `package.json` can be found, assert if none can be found. */\nexport function findUpProjectRootOrAssert(cwd: string): string {\n const projectRoot = findUpProjectRoot(cwd);\n if (!projectRoot) {\n throw new CommandError(`Project root directory not found (working directory: ${cwd})`);\n }\n return projectRoot;\n}\n\nfunction findUpProjectRoot(cwd: string): string | null {\n const found = resolveFrom.silent(cwd, './package.json');\n if (found) return path.dirname(found);\n\n const parent = path.dirname(cwd);\n if (parent === cwd) return null;\n\n return findUpProjectRoot(parent);\n}\n\n/**\n * Find a file in the (closest) parent directories.\n * This will recursively look for the file, until the root directory is reached.\n */\nexport function findFileInParents(cwd: string, fileName: string): string | null {\n const found = resolveFrom.silent(cwd, `./${fileName}`);\n if (found) return found;\n\n const parent = path.dirname(cwd);\n if (parent === cwd) return null;\n\n return findFileInParents(parent, fileName);\n}\n"],"names":["findFileInParents","findUpProjectRootOrAssert","cwd","projectRoot","findUpProjectRoot","CommandError","found","resolveFrom","silent","path","dirname","parent","fileName"],"mappings":";;;;;;;;;;;QA4BgBA;eAAAA;;QAtBAC;eAAAA;;;;gEANC;;;;;;;gEACO;;;;;;wBAEK;;;;;;AAGtB,SAASA,0BAA0BC,GAAW;IACnD,MAAMC,cAAcC,kBAAkBF;IACtC,IAAI,CAACC,aAAa;QAChB,MAAM,IAAIE,oBAAY,CAAC,CAAC,qDAAqD,EAAEH,IAAI,CAAC,CAAC;IACvF;IACA,OAAOC;AACT;AAEA,SAASC,kBAAkBF,GAAW;IACpC,MAAMI,QAAQC,sBAAW,CAACC,MAAM,CAACN,KAAK;IACtC,IAAII,OAAO,OAAOG,eAAI,CAACC,OAAO,CAACJ;IAE/B,MAAMK,SAASF,eAAI,CAACC,OAAO,CAACR;IAC5B,IAAIS,WAAWT,KAAK,OAAO;IAE3B,OAAOE,kBAAkBO;AAC3B;AAMO,SAASX,kBAAkBE,GAAW,EAAEU,QAAgB;IAC7D,MAAMN,QAAQC,sBAAW,CAACC,MAAM,CAACN,KAAK,CAAC,EAAE,EAAEU,UAAU;IACrD,IAAIN,OAAO,OAAOA;IAElB,MAAMK,SAASF,eAAI,CAACC,OAAO,CAACR;IAC5B,IAAIS,WAAWT,KAAK,OAAO;IAE3B,OAAOF,kBAAkBW,QAAQC;AACnC"}
@@ -5,14 +5,14 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- guardAsync: function() {
12
+ get guardAsync () {
13
13
  return guardAsync;
14
14
  },
15
- memoize: function() {
15
+ get memoize () {
16
16
  return memoize;
17
17
  }
18
18
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/fn.ts"],"sourcesContent":["/** `lodash.memoize` */\nexport function memoize<T extends (...args: any[]) => any>(fn: T): T {\n const cache = new Map<string, any>();\n return ((...args: any[]) => {\n const key = JSON.stringify(args);\n if (cache.has(key)) {\n return cache.get(key);\n }\n const result = fn(...args);\n cache.set(key, result);\n return result;\n }) as T;\n}\n\n/** memoizes an async function to prevent subsequent calls that might be invoked before the function has finished resolving. */\nexport function guardAsync<V, T extends (...args: any[]) => Promise<V>>(fn: T): T {\n let invoked = false;\n let returnValue: V;\n\n const guard: any = async (...args: any[]): Promise<V> => {\n if (!invoked) {\n invoked = true;\n returnValue = await fn(...args);\n }\n\n return returnValue;\n };\n\n return guard;\n}\n"],"names":["guardAsync","memoize","fn","cache","Map","args","key","JSON","stringify","has","get","result","set","invoked","returnValue","guard"],"mappings":"AAAA,qBAAqB;;;;;;;;;;;IAeLA,UAAU;eAAVA;;IAdAC,OAAO;eAAPA;;;AAAT,SAASA,QAA2CC,EAAK;IAC9D,MAAMC,QAAQ,IAAIC;IAClB,OAAQ,CAAC,GAAGC;QACV,MAAMC,MAAMC,KAAKC,SAAS,CAACH;QAC3B,IAAIF,MAAMM,GAAG,CAACH,MAAM;YAClB,OAAOH,MAAMO,GAAG,CAACJ;QACnB;QACA,MAAMK,SAAST,MAAMG;QACrBF,MAAMS,GAAG,CAACN,KAAKK;QACf,OAAOA;IACT;AACF;AAGO,SAASX,WAAwDE,EAAK;IAC3E,IAAIW,UAAU;IACd,IAAIC;IAEJ,MAAMC,QAAa,OAAO,GAAGV;QAC3B,IAAI,CAACQ,SAAS;YACZA,UAAU;YACVC,cAAc,MAAMZ,MAAMG;QAC5B;QAEA,OAAOS;IACT;IAEA,OAAOC;AACT"}
1
+ {"version":3,"sources":["../../../src/utils/fn.ts"],"sourcesContent":["/** `lodash.memoize` */\nexport function memoize<T extends (...args: any[]) => any>(fn: T): T {\n const cache = new Map<string, any>();\n return ((...args: any[]) => {\n const key = JSON.stringify(args);\n if (cache.has(key)) {\n return cache.get(key);\n }\n const result = fn(...args);\n cache.set(key, result);\n return result;\n }) as T;\n}\n\n/** memoizes an async function to prevent subsequent calls that might be invoked before the function has finished resolving. */\nexport function guardAsync<V, T extends (...args: any[]) => Promise<V>>(fn: T): T {\n let invoked = false;\n let returnValue: V;\n\n const guard: any = async (...args: any[]): Promise<V> => {\n if (!invoked) {\n invoked = true;\n returnValue = await fn(...args);\n }\n\n return returnValue;\n };\n\n return guard;\n}\n"],"names":["guardAsync","memoize","fn","cache","Map","args","key","JSON","stringify","has","get","result","set","invoked","returnValue","guard"],"mappings":"AAAA,qBAAqB;;;;;;;;;;;QAeLA;eAAAA;;QAdAC;eAAAA;;;AAAT,SAASA,QAA2CC,EAAK;IAC9D,MAAMC,QAAQ,IAAIC;IAClB,OAAQ,CAAC,GAAGC;QACV,MAAMC,MAAMC,KAAKC,SAAS,CAACH;QAC3B,IAAIF,MAAMM,GAAG,CAACH,MAAM;YAClB,OAAOH,MAAMO,GAAG,CAACJ;QACnB;QACA,MAAMK,SAAST,MAAMG;QACrBF,MAAMS,GAAG,CAACN,KAAKK;QACf,OAAOA;IACT;AACF;AAGO,SAASX,WAAwDE,EAAK;IAC3E,IAAIW,UAAU;IACd,IAAIC;IAEJ,MAAMC,QAAa,OAAO,GAAGV;QAC3B,IAAI,CAACQ,SAAS;YACZA,UAAU;YACVC,cAAc,MAAMZ,MAAMG;QAC5B;QAEA,OAAOS;IACT;IAEA,OAAOC;AACT"}
@@ -5,14 +5,14 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- freePortAsync: function() {
12
+ get freePortAsync () {
13
13
  return freePortAsync;
14
14
  },
15
- testPortAsync: function() {
15
+ get testPortAsync () {
16
16
  return testPortAsync;
17
17
  }
18
18
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/freeport.ts"],"sourcesContent":["import net from 'node:net';\n\nasync function testHostPortAsync(port: number, host: string | null): Promise<boolean> {\n return new Promise((resolve) => {\n const server = net.createServer();\n server.listen({ port, host }, () => {\n server.once('close', () => {\n setTimeout(() => resolve(true), 0);\n });\n server.close();\n });\n server.once('error', (_error) => {\n setTimeout(() => resolve(false), 0);\n });\n });\n}\n\nexport async function testPortAsync(port: number, hostnames?: (string | null)[]): Promise<boolean> {\n if (!hostnames?.length) {\n hostnames = [null];\n }\n for (const host of hostnames) {\n if (!(await testHostPortAsync(port, host))) {\n return false;\n }\n }\n return true;\n}\n\nexport async function freePortAsync(\n portStart: number,\n hostnames?: (string | null)[]\n): Promise<number | null> {\n for (let port = portStart; port <= 65_535; port++) {\n if (await testPortAsync(port, hostnames)) {\n return port;\n }\n }\n return null;\n}\n"],"names":["freePortAsync","testPortAsync","testHostPortAsync","port","host","Promise","resolve","server","net","createServer","listen","once","setTimeout","close","_error","hostnames","length","portStart"],"mappings":";;;;;;;;;;;IA6BsBA,aAAa;eAAbA;;IAZAC,aAAa;eAAbA;;;;gEAjBN;;;;;;;;;;;AAEhB,eAAeC,kBAAkBC,IAAY,EAAEC,IAAmB;IAChE,OAAO,IAAIC,QAAQ,CAACC;QAClB,MAAMC,SAASC,kBAAG,CAACC,YAAY;QAC/BF,OAAOG,MAAM,CAAC;YAAEP;YAAMC;QAAK,GAAG;YAC5BG,OAAOI,IAAI,CAAC,SAAS;gBACnBC,WAAW,IAAMN,QAAQ,OAAO;YAClC;YACAC,OAAOM,KAAK;QACd;QACAN,OAAOI,IAAI,CAAC,SAAS,CAACG;YACpBF,WAAW,IAAMN,QAAQ,QAAQ;QACnC;IACF;AACF;AAEO,eAAeL,cAAcE,IAAY,EAAEY,SAA6B;IAC7E,IAAI,EAACA,6BAAAA,UAAWC,MAAM,GAAE;QACtBD,YAAY;YAAC;SAAK;IACpB;IACA,KAAK,MAAMX,QAAQW,UAAW;QAC5B,IAAI,CAAE,MAAMb,kBAAkBC,MAAMC,OAAQ;YAC1C,OAAO;QACT;IACF;IACA,OAAO;AACT;AAEO,eAAeJ,cACpBiB,SAAiB,EACjBF,SAA6B;IAE7B,IAAK,IAAIZ,OAAOc,WAAWd,QAAQ,OAAQA,OAAQ;QACjD,IAAI,MAAMF,cAAcE,MAAMY,YAAY;YACxC,OAAOZ;QACT;IACF;IACA,OAAO;AACT"}
1
+ {"version":3,"sources":["../../../src/utils/freeport.ts"],"sourcesContent":["import net from 'node:net';\n\nasync function testHostPortAsync(port: number, host: string | null): Promise<boolean> {\n return new Promise((resolve) => {\n const server = net.createServer();\n server.listen({ port, host }, () => {\n server.once('close', () => {\n setTimeout(() => resolve(true), 0);\n });\n server.close();\n });\n server.once('error', (_error) => {\n setTimeout(() => resolve(false), 0);\n });\n });\n}\n\nexport async function testPortAsync(port: number, hostnames?: (string | null)[]): Promise<boolean> {\n if (!hostnames?.length) {\n hostnames = [null];\n }\n for (const host of hostnames) {\n if (!(await testHostPortAsync(port, host))) {\n return false;\n }\n }\n return true;\n}\n\nexport async function freePortAsync(\n portStart: number,\n hostnames?: (string | null)[]\n): Promise<number | null> {\n for (let port = portStart; port <= 65_535; port++) {\n if (await testPortAsync(port, hostnames)) {\n return port;\n }\n }\n return null;\n}\n"],"names":["freePortAsync","testPortAsync","testHostPortAsync","port","host","Promise","resolve","server","net","createServer","listen","once","setTimeout","close","_error","hostnames","length","portStart"],"mappings":";;;;;;;;;;;QA6BsBA;eAAAA;;QAZAC;eAAAA;;;;gEAjBN;;;;;;;;;;;AAEhB,eAAeC,kBAAkBC,IAAY,EAAEC,IAAmB;IAChE,OAAO,IAAIC,QAAQ,CAACC;QAClB,MAAMC,SAASC,kBAAG,CAACC,YAAY;QAC/BF,OAAOG,MAAM,CAAC;YAAEP;YAAMC;QAAK,GAAG;YAC5BG,OAAOI,IAAI,CAAC,SAAS;gBACnBC,WAAW,IAAMN,QAAQ,OAAO;YAClC;YACAC,OAAOM,KAAK;QACd;QACAN,OAAOI,IAAI,CAAC,SAAS,CAACG;YACpBF,WAAW,IAAMN,QAAQ,QAAQ;QACnC;IACF;AACF;AAEO,eAAeL,cAAcE,IAAY,EAAEY,SAA6B;IAC7E,IAAI,EAACA,6BAAAA,UAAWC,MAAM,GAAE;QACtBD,YAAY;YAAC;SAAK;IACpB;IACA,KAAK,MAAMX,QAAQW,UAAW;QAC5B,IAAI,CAAE,MAAMb,kBAAkBC,MAAMC,OAAQ;YAC1C,OAAO;QACT;IACF;IACA,OAAO;AACT;AAEO,eAAeJ,cACpBiB,SAAiB,EACjBF,SAA6B;IAE7B,IAAK,IAAIZ,OAAOc,WAAWd,QAAQ,OAAQA,OAAQ;QACjD,IAAI,MAAMF,cAAcE,MAAMY,YAAY;YACxC,OAAOZ;QACT;IACF;IACA,OAAO;AACT"}
@@ -5,14 +5,14 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- getOrPromptForBundleIdentifierAsync: function() {
12
+ get getOrPromptForBundleIdentifierAsync () {
13
13
  return getOrPromptForBundleIdentifierAsync;
14
14
  },
15
- getOrPromptForPackageAsync: function() {
15
+ get getOrPromptForPackageAsync () {
16
16
  return getOrPromptForPackageAsync;
17
17
  }
18
18
  });
@@ -147,7 +147,6 @@ async function promptForBundleIdWithInitialAsync(projectRoot, exp, bundleIdentif
147
147
  // Apply the changes to the config.
148
148
  if (await (0, _modifyConfigAsync.attemptModification)(projectRoot, {
149
149
  ios: {
150
- ...exp.ios || {},
151
150
  bundleIdentifier
152
151
  }
153
152
  }, {
@@ -243,7 +242,6 @@ async function promptForPackageWithInitialAsync(projectRoot, exp, packageName) {
243
242
  // Apply the changes to the config.
244
243
  if (await (0, _modifyConfigAsync.attemptModification)(projectRoot, {
245
244
  android: {
246
- ...exp.android || {},
247
245
  package: packageName
248
246
  }
249
247
  }, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/getOrPromptApplicationId.ts"],"sourcesContent":["import { ExpoConfig, getConfig } from '@expo/config';\nimport chalk from 'chalk';\n\nimport { memoize } from './fn';\nimport { learnMore } from './link';\nimport { attemptModification } from './modifyConfigAsync';\nimport prompt, { confirmAsync } from './prompts';\nimport {\n assertValidBundleId,\n assertValidPackage,\n getBundleIdWarningAsync,\n getPackageNameWarningAsync,\n getSanitizedBundleIdentifier,\n getSanitizedPackage,\n validateBundleId,\n validatePackage,\n validatePackageWithWarning,\n} from './validateApplicationId';\nimport { UnexpectedServerError, UnexpectedServerData } from '../api/graphql/client';\nimport { AppQuery } from '../api/graphql/queries/AppQuery';\nimport { getSettings } from '../api/user/UserSettings';\nimport * as Log from '../log';\n\nconst debug = require('debug')('expo:app-id') as typeof console.log;\n\nconst ANONYMOUS_USERNAME = 'anonymous';\n\nasync function getRecommendedReverseDomainNameSecondPartAsync(\n exp: ExpoConfig\n): Promise<string | null> {\n // Get the cached username.\n const cachedUsername = getSettings().read().auth?.username;\n if (cachedUsername) {\n return cachedUsername;\n }\n const easProjectId = exp.extra?.eas?.projectId;\n if (!easProjectId) {\n return null;\n }\n\n try {\n const app = await AppQuery.byIdAsync(easProjectId);\n return app.ownerAccount.name;\n } catch (e) {\n if (e instanceof UnexpectedServerData || e instanceof UnexpectedServerError) {\n return null;\n }\n throw e;\n }\n}\n\nconst NO_BUNDLE_ID_MESSAGE = `Project must have a \\`ios.bundleIdentifier\\` set in the Expo config (app.json or app.config.js).`;\n\nconst NO_PACKAGE_MESSAGE = `Project must have a \\`android.package\\` set in the Expo config (app.json or app.config.js).`;\n\n/**\n * Get the bundle identifier from the Expo config or prompt the user to choose a new bundle identifier.\n * Prompted value will be validated against the App Store and a local regex.\n * If the project Expo config is a static JSON file, the bundle identifier will be updated in the config automatically.\n */\nexport async function getOrPromptForBundleIdentifierAsync(\n projectRoot: string,\n exp: ExpoConfig = getConfig(projectRoot).exp\n): Promise<string> {\n const current = exp.ios?.bundleIdentifier;\n if (current) {\n assertValidBundleId(current);\n return current;\n }\n\n return promptForBundleIdWithInitialAsync(\n projectRoot,\n exp,\n await getRecommendedBundleIdAsync(exp)\n );\n}\n\nconst memoLog = memoize(Log.log);\n\nasync function promptForBundleIdWithInitialAsync(\n projectRoot: string,\n exp: ExpoConfig,\n bundleIdentifier?: string\n): Promise<string> {\n if (!bundleIdentifier) {\n memoLog(\n chalk`\\n{bold 📝 iOS Bundle Identifier} {dim ${learnMore(\n 'https://expo.fyi/bundle-identifier'\n )}}\\n`\n );\n\n // Prompt the user for the bundle ID.\n // Even if the project is using a dynamic config we can still\n // prompt a better error message, recommend a default value, and help the user\n // validate their custom bundle ID upfront.\n const { input } = await prompt(\n {\n type: 'text',\n name: 'input',\n // The Apple helps people know this isn't an EAS feature.\n message: `What would you like your iOS bundle identifier to be?`,\n validate: validateBundleId,\n },\n {\n nonInteractiveHelp: NO_BUNDLE_ID_MESSAGE,\n }\n );\n bundleIdentifier = input as string;\n }\n\n // Warn the user if the bundle ID is already in use.\n const warning = await getBundleIdWarningAsync(bundleIdentifier);\n\n if (warning && !(await warnAndConfirmAsync(warning))) {\n // Cycle the Bundle ID prompt to try again.\n return await promptForBundleIdWithInitialAsync(projectRoot, exp);\n }\n\n // Apply the changes to the config.\n if (\n await attemptModification(\n projectRoot,\n {\n ios: { ...(exp.ios || {}), bundleIdentifier },\n },\n { ios: { bundleIdentifier } }\n )\n ) {\n Log.log(chalk.gray`\\u203A Apple bundle identifier: ${bundleIdentifier}`);\n }\n\n return bundleIdentifier;\n}\n\nasync function warnAndConfirmAsync(warning: string): Promise<boolean> {\n Log.log();\n Log.warn(warning);\n Log.log();\n if (\n !(await confirmAsync({\n message: `Continue?`,\n initial: true,\n }))\n ) {\n return false;\n }\n return true;\n}\n\n// Recommend a bundle identifier based on the account name of the owner of the project and project slug.\nasync function getRecommendedBundleIdAsync(exp: ExpoConfig): Promise<string | undefined> {\n const possibleIdFromAndroid = exp.android?.package\n ? getSanitizedBundleIdentifier(exp.android.package)\n : undefined;\n // Attempt to use the android package name first since it's convenient to have them aligned.\n if (possibleIdFromAndroid && validateBundleId(possibleIdFromAndroid)) {\n return possibleIdFromAndroid;\n } else {\n const recommendedReverseDomainNameSecondPart =\n (await getRecommendedReverseDomainNameSecondPartAsync(exp)) ?? ANONYMOUS_USERNAME;\n const possibleId = getSanitizedBundleIdentifier(\n `com.${recommendedReverseDomainNameSecondPart}.${exp.slug}`\n );\n if (validateBundleId(possibleId)) {\n return possibleId;\n }\n }\n\n return undefined;\n}\n\n// Recommend a package name based on the account name of the owner of the project and project slug.\nasync function getRecommendedPackageNameAsync(exp: ExpoConfig): Promise<string | undefined> {\n const possibleIdFromApple = exp.ios?.bundleIdentifier\n ? getSanitizedPackage(exp.ios.bundleIdentifier)\n : undefined;\n\n // Attempt to use the ios bundle id first since it's convenient to have them aligned.\n if (possibleIdFromApple && validatePackage(possibleIdFromApple)) {\n return possibleIdFromApple;\n } else {\n const recommendedReverseDomainNameSecondPart =\n (await getRecommendedReverseDomainNameSecondPartAsync(exp)) ?? ANONYMOUS_USERNAME;\n\n const possibleId = getSanitizedPackage(\n `com.${recommendedReverseDomainNameSecondPart}.${exp.slug}`\n );\n if (validatePackage(possibleId)) {\n return possibleId;\n } else {\n debug(\n `Recommended package name is invalid: \"${possibleId}\" (owner: ${recommendedReverseDomainNameSecondPart}, slug: ${exp.slug})`\n );\n }\n }\n return undefined;\n}\n\n/**\n * Get the package name from the Expo config or prompt the user to choose a new package name.\n * Prompted value will be validated against the Play Store and a local regex.\n * If the project Expo config is a static JSON file, the package name will be updated in the config automatically.\n */\nexport async function getOrPromptForPackageAsync(\n projectRoot: string,\n exp: ExpoConfig = getConfig(projectRoot).exp\n): Promise<string> {\n const current = exp.android?.package;\n if (current) {\n assertValidPackage(current);\n return current;\n }\n\n return await promptForPackageAsync(projectRoot, exp);\n}\n\nasync function promptForPackageAsync(projectRoot: string, exp: ExpoConfig): Promise<string> {\n return promptForPackageWithInitialAsync(\n projectRoot,\n exp,\n await getRecommendedPackageNameAsync(exp)\n );\n}\n\nasync function promptForPackageWithInitialAsync(\n projectRoot: string,\n exp: ExpoConfig,\n packageName?: string\n): Promise<string> {\n if (!packageName) {\n memoLog(\n chalk`\\n{bold 📝 Android package} {dim ${learnMore('https://expo.fyi/android-package')}}\\n`\n );\n\n // Prompt the user for the android package.\n // Even if the project is using a dynamic config we can still\n // prompt a better error message, recommend a default value, and help the user\n // validate their custom android package upfront.\n const { input } = await prompt(\n {\n type: 'text',\n name: 'input',\n message: `What would you like your Android package name to be?`,\n validate: validatePackageWithWarning,\n },\n {\n nonInteractiveHelp: NO_PACKAGE_MESSAGE,\n }\n );\n packageName = input as string;\n }\n\n // Warn the user if the package name is already in use.\n const warning = await getPackageNameWarningAsync(packageName);\n if (warning && !(await warnAndConfirmAsync(warning))) {\n // Cycle the Package name prompt to try again.\n return promptForPackageWithInitialAsync(projectRoot, exp);\n }\n\n // Apply the changes to the config.\n if (\n await attemptModification(\n projectRoot,\n {\n android: { ...(exp.android || {}), package: packageName },\n },\n {\n android: { package: packageName },\n }\n )\n ) {\n Log.log(chalk.gray`\\u203A Android package name: ${packageName}`);\n }\n\n return packageName;\n}\n"],"names":["getOrPromptForBundleIdentifierAsync","getOrPromptForPackageAsync","debug","require","ANONYMOUS_USERNAME","getRecommendedReverseDomainNameSecondPartAsync","exp","getSettings","cachedUsername","read","auth","username","easProjectId","extra","eas","projectId","app","AppQuery","byIdAsync","ownerAccount","name","e","UnexpectedServerData","UnexpectedServerError","NO_BUNDLE_ID_MESSAGE","NO_PACKAGE_MESSAGE","projectRoot","getConfig","current","ios","bundleIdentifier","assertValidBundleId","promptForBundleIdWithInitialAsync","getRecommendedBundleIdAsync","memoLog","memoize","Log","log","chalk","learnMore","input","prompt","type","message","validate","validateBundleId","nonInteractiveHelp","warning","getBundleIdWarningAsync","warnAndConfirmAsync","attemptModification","gray","warn","confirmAsync","initial","possibleIdFromAndroid","android","package","getSanitizedBundleIdentifier","undefined","recommendedReverseDomainNameSecondPart","possibleId","slug","getRecommendedPackageNameAsync","possibleIdFromApple","getSanitizedPackage","validatePackage","assertValidPackage","promptForPackageAsync","promptForPackageWithInitialAsync","packageName","validatePackageWithWarning","getPackageNameWarningAsync"],"mappings":";;;;;;;;;;;IA4DsBA,mCAAmC;eAAnCA;;IA+IAC,0BAA0B;eAA1BA;;;;yBA3MgB;;;;;;;gEACpB;;;;;;oBAEM;sBACE;mCACU;iEACC;uCAW9B;wBACqD;0BACnC;8BACG;6DACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAErB,MAAMC,QAAQC,QAAQ,SAAS;AAE/B,MAAMC,qBA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+BAA+BzD;AAEzC;AAEA,eAAe+D,iCACb3C,WAAmB,EACnBpB,GAAe,EACfgE,WAAoB;IAEpB,IAAI,CAACA,aAAa;QAChBpC,QACEI,IAAAA,gBAAK,CAAA,CAAC,kCAAkC,EAAEC,IAAAA,eAAS,EAAC,oCAAoC,GAAG,CAAC;QAG9F,2CAA2C;QAC3C,6DAA6D;QAC7D,8EAA8E;QAC9E,iDAAiD;QACjD,MAAM,EAAEC,KAAK,EAAE,GAAG,MAAMC,IAAAA,gBAAM,EAC5B;YACEC,MAAM;YACNtB,MAAM;YACNuB,SAAS,CAAC,oDAAoD,CAAC;YAC/DC,UAAU2B,iDAA0B;QACtC,GACA;YACEzB,oBAAoBrB;QACtB;QAEF6C,cAAc9B;IAChB;IAEA,uDAAuD;IACvD,MAAMO,UAAU,MAAMyB,IAAAA,iDAA0B,EAACF;IACjD,IAAIvB,WAAW,CAAE,MAAME,oBAAoBF,UAAW;QACpD,8CAA8C;QAC9C,OAAOsB,iCAAiC3C,aAAapB;IACvD;IAEA,mCAAmC;IACnC,IACE,MAAM4C,IAAAA,sCAAmB,EACvBxB,aACA;QACE8B,SAAS;YAAE,GAAIlD,IAAIkD,OAAO,IAAI,CAAC,CAAC;YAAGC,SAASa;QAAY;IAC1D,GACA;QACEd,SAAS;YAAEC,SAASa;QAAY;IAClC,IAEF;QACAlC,KAAIC,GAAG,CAACC,gBAAK,CAACa,IAAI,CAAC,6BAA6B,EAAEmB,YAAY,CAAC;IACjE;IAEA,OAAOA;AACT"}
1
+ {"version":3,"sources":["../../../src/utils/getOrPromptApplicationId.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config';\nimport { getConfig } from '@expo/config';\nimport chalk from 'chalk';\n\nimport { memoize } from './fn';\nimport { learnMore } from './link';\nimport { attemptModification } from './modifyConfigAsync';\nimport prompt, { confirmAsync } from './prompts';\nimport {\n assertValidBundleId,\n assertValidPackage,\n getBundleIdWarningAsync,\n getPackageNameWarningAsync,\n getSanitizedBundleIdentifier,\n getSanitizedPackage,\n validateBundleId,\n validatePackage,\n validatePackageWithWarning,\n} from './validateApplicationId';\nimport { UnexpectedServerError, UnexpectedServerData } from '../api/graphql/client';\nimport { AppQuery } from '../api/graphql/queries/AppQuery';\nimport { getSettings } from '../api/user/UserSettings';\nimport * as Log from '../log';\n\nconst debug = require('debug')('expo:app-id') as typeof console.log;\n\nconst ANONYMOUS_USERNAME = 'anonymous';\n\nasync function getRecommendedReverseDomainNameSecondPartAsync(\n exp: ExpoConfig\n): Promise<string | null> {\n // Get the cached username.\n const cachedUsername = getSettings().read().auth?.username;\n if (cachedUsername) {\n return cachedUsername;\n }\n const easProjectId = exp.extra?.eas?.projectId;\n if (!easProjectId) {\n return null;\n }\n\n try {\n const app = await AppQuery.byIdAsync(easProjectId);\n return app.ownerAccount.name;\n } catch (e) {\n if (e instanceof UnexpectedServerData || e instanceof UnexpectedServerError) {\n return null;\n }\n throw e;\n }\n}\n\nconst NO_BUNDLE_ID_MESSAGE = `Project must have a \\`ios.bundleIdentifier\\` set in the Expo config (app.json or app.config.js).`;\n\nconst NO_PACKAGE_MESSAGE = `Project must have a \\`android.package\\` set in the Expo config (app.json or app.config.js).`;\n\n/**\n * Get the bundle identifier from the Expo config or prompt the user to choose a new bundle identifier.\n * Prompted value will be validated against the App Store and a local regex.\n * If the project Expo config is a static JSON file, the bundle identifier will be updated in the config automatically.\n */\nexport async function getOrPromptForBundleIdentifierAsync(\n projectRoot: string,\n exp: ExpoConfig = getConfig(projectRoot).exp\n): Promise<string> {\n const current = exp.ios?.bundleIdentifier;\n if (current) {\n assertValidBundleId(current);\n return current;\n }\n\n return promptForBundleIdWithInitialAsync(\n projectRoot,\n exp,\n await getRecommendedBundleIdAsync(exp)\n );\n}\n\nconst memoLog = memoize(Log.log);\n\nasync function promptForBundleIdWithInitialAsync(\n projectRoot: string,\n exp: ExpoConfig,\n bundleIdentifier?: string\n): Promise<string> {\n if (!bundleIdentifier) {\n memoLog(\n chalk`\\n{bold 📝 iOS Bundle Identifier} {dim ${learnMore(\n 'https://expo.fyi/bundle-identifier'\n )}}\\n`\n );\n\n // Prompt the user for the bundle ID.\n // Even if the project is using a dynamic config we can still\n // prompt a better error message, recommend a default value, and help the user\n // validate their custom bundle ID upfront.\n const { input } = await prompt(\n {\n type: 'text',\n name: 'input',\n // The Apple helps people know this isn't an EAS feature.\n message: `What would you like your iOS bundle identifier to be?`,\n validate: validateBundleId,\n },\n {\n nonInteractiveHelp: NO_BUNDLE_ID_MESSAGE,\n }\n );\n bundleIdentifier = input as string;\n }\n\n // Warn the user if the bundle ID is already in use.\n const warning = await getBundleIdWarningAsync(bundleIdentifier);\n\n if (warning && !(await warnAndConfirmAsync(warning))) {\n // Cycle the Bundle ID prompt to try again.\n return await promptForBundleIdWithInitialAsync(projectRoot, exp);\n }\n\n // Apply the changes to the config.\n if (\n await attemptModification(\n projectRoot,\n { ios: { bundleIdentifier } },\n { ios: { bundleIdentifier } }\n )\n ) {\n Log.log(chalk.gray`\\u203A Apple bundle identifier: ${bundleIdentifier}`);\n }\n\n return bundleIdentifier;\n}\n\nasync function warnAndConfirmAsync(warning: string): Promise<boolean> {\n Log.log();\n Log.warn(warning);\n Log.log();\n if (\n !(await confirmAsync({\n message: `Continue?`,\n initial: true,\n }))\n ) {\n return false;\n }\n return true;\n}\n\n// Recommend a bundle identifier based on the account name of the owner of the project and project slug.\nasync function getRecommendedBundleIdAsync(exp: ExpoConfig): Promise<string | undefined> {\n const possibleIdFromAndroid = exp.android?.package\n ? getSanitizedBundleIdentifier(exp.android.package)\n : undefined;\n // Attempt to use the android package name first since it's convenient to have them aligned.\n if (possibleIdFromAndroid && validateBundleId(possibleIdFromAndroid)) {\n return possibleIdFromAndroid;\n } else {\n const recommendedReverseDomainNameSecondPart =\n (await getRecommendedReverseDomainNameSecondPartAsync(exp)) ?? ANONYMOUS_USERNAME;\n const possibleId = getSanitizedBundleIdentifier(\n `com.${recommendedReverseDomainNameSecondPart}.${exp.slug}`\n );\n if (validateBundleId(possibleId)) {\n return possibleId;\n }\n }\n\n return undefined;\n}\n\n// Recommend a package name based on the account name of the owner of the project and project slug.\nasync function getRecommendedPackageNameAsync(exp: ExpoConfig): Promise<string | undefined> {\n const possibleIdFromApple = exp.ios?.bundleIdentifier\n ? getSanitizedPackage(exp.ios.bundleIdentifier)\n : undefined;\n\n // Attempt to use the ios bundle id first since it's convenient to have them aligned.\n if (possibleIdFromApple && validatePackage(possibleIdFromApple)) {\n return possibleIdFromApple;\n } else {\n const recommendedReverseDomainNameSecondPart =\n (await getRecommendedReverseDomainNameSecondPartAsync(exp)) ?? ANONYMOUS_USERNAME;\n\n const possibleId = getSanitizedPackage(\n `com.${recommendedReverseDomainNameSecondPart}.${exp.slug}`\n );\n if (validatePackage(possibleId)) {\n return possibleId;\n } else {\n debug(\n `Recommended package name is invalid: \"${possibleId}\" (owner: ${recommendedReverseDomainNameSecondPart}, slug: ${exp.slug})`\n );\n }\n }\n return undefined;\n}\n\n/**\n * Get the package name from the Expo config or prompt the user to choose a new package name.\n * Prompted value will be validated against the Play Store and a local regex.\n * If the project Expo config is a static JSON file, the package name will be updated in the config automatically.\n */\nexport async function getOrPromptForPackageAsync(\n projectRoot: string,\n exp: ExpoConfig = getConfig(projectRoot).exp\n): Promise<string> {\n const current = exp.android?.package;\n if (current) {\n assertValidPackage(current);\n return current;\n }\n\n return await promptForPackageAsync(projectRoot, exp);\n}\n\nasync function promptForPackageAsync(projectRoot: string, exp: ExpoConfig): Promise<string> {\n return promptForPackageWithInitialAsync(\n projectRoot,\n exp,\n await getRecommendedPackageNameAsync(exp)\n );\n}\n\nasync function promptForPackageWithInitialAsync(\n projectRoot: string,\n exp: ExpoConfig,\n packageName?: string\n): Promise<string> {\n if (!packageName) {\n memoLog(\n chalk`\\n{bold 📝 Android package} {dim ${learnMore('https://expo.fyi/android-package')}}\\n`\n );\n\n // Prompt the user for the android package.\n // Even if the project is using a dynamic config we can still\n // prompt a better error message, recommend a default value, and help the user\n // validate their custom android package upfront.\n const { input } = await prompt(\n {\n type: 'text',\n name: 'input',\n message: `What would you like your Android package name to be?`,\n validate: validatePackageWithWarning,\n },\n {\n nonInteractiveHelp: NO_PACKAGE_MESSAGE,\n }\n );\n packageName = input as string;\n }\n\n // Warn the user if the package name is already in use.\n const warning = await getPackageNameWarningAsync(packageName);\n if (warning && !(await warnAndConfirmAsync(warning))) {\n // Cycle the Package name prompt to try again.\n return promptForPackageWithInitialAsync(projectRoot, exp);\n }\n\n // Apply the changes to the config.\n if (\n await attemptModification(\n projectRoot,\n { android: { package: packageName } },\n { android: { package: packageName } }\n )\n ) {\n Log.log(chalk.gray`\\u203A Android package name: ${packageName}`);\n }\n\n return packageName;\n}\n"],"names":["getOrPromptForBundleIdentifierAsync","getOrPromptForPackageAsync","debug","require","ANONYMOUS_USERNAME","getRecommendedReverseDomainNameSecondPartAsync","exp","getSettings","cachedUsername","read","auth","username","easProjectId","extra","eas","projectId","app","AppQuery","byIdAsync","ownerAccount","name","e","UnexpectedServerData","UnexpectedServerError","NO_BUNDLE_ID_MESSAGE","NO_PACKAGE_MESSAGE","projectRoot","getConfig","current","ios","bundleIdentifier","assertValidBundleId","promptForBundleIdWithInitialAsync","getRecommendedBundleIdAsync","memoLog","memoize","Log","log","chalk","learnMore","input","prompt","type","message","validate","validateBundleId","nonInteractiveHelp","warning","getBundleIdWarningAsync","warnAndConfirmAsync","attemptModification","gray","warn","confirmAsync","initial","possibleIdFromAndroid","android","package","getSanitizedBundleIdentifier","undefined","recommendedReverseDomainNameSecondPart","possibleId","slug","getRecommendedPackageNameAsync","possibleIdFromApple","getSanitizedPackage","validatePackage","assertValidPackage","promptForPackageAsync","promptForPackageWithInitialAsync","packageName","validatePackageWithWarning","getPackageNameWarningAsync"],"mappings":";;;;;;;;;;;QA6DsBA;eAAAA;;QA6IAC;eAAAA;;;;yBAzMI;;;;;;;gEACR;;;;;;oBAEM;sBACE;mCACU;iEACC;uCAW9B;wBACqD;0BACnC;8BACG;6DACP;;;;;;;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