@expo/cli 1.0.0-canary-20250320-7a205d3 → 1.0.0-canary-20250402-161f57b

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 (719) hide show
  1. package/build/bin/cli +93 -91
  2. package/build/bin/cli.map +1 -1
  3. package/build/metro-require/require.js +53 -52
  4. package/build/src/api/endpoint.js +6 -2
  5. package/build/src/api/endpoint.js.map +1 -1
  6. package/build/src/api/getExpoGoIntermediateCertificate.js +5 -3
  7. package/build/src/api/getExpoGoIntermediateCertificate.js.map +1 -1
  8. package/build/src/api/getExpoSchema.js +16 -12
  9. package/build/src/api/getExpoSchema.js.map +1 -1
  10. package/build/src/api/getNativeModuleVersions.js +6 -4
  11. package/build/src/api/getNativeModuleVersions.js.map +1 -1
  12. package/build/src/api/getProjectDevelopmentCertificate.js +5 -3
  13. package/build/src/api/getProjectDevelopmentCertificate.js.map +1 -1
  14. package/build/src/api/getVersions.js +7 -5
  15. package/build/src/api/getVersions.js.map +1 -1
  16. package/build/src/api/graphql/client.js +32 -26
  17. package/build/src/api/graphql/client.js.map +1 -1
  18. package/build/src/api/graphql/queries/AppQuery.js +6 -4
  19. package/build/src/api/graphql/queries/AppQuery.js.map +1 -1
  20. package/build/src/api/graphql/queries/UserQuery.js +5 -3
  21. package/build/src/api/graphql/queries/UserQuery.js.map +1 -1
  22. package/build/src/api/graphql/types/App.js +3 -1
  23. package/build/src/api/graphql/types/App.js.map +1 -1
  24. package/build/src/api/rest/cache/FileSystemResponseCache.js +36 -32
  25. package/build/src/api/rest/cache/FileSystemResponseCache.js.map +1 -1
  26. package/build/src/api/rest/cache/ResponseCache.js +20 -12
  27. package/build/src/api/rest/cache/ResponseCache.js.map +1 -1
  28. package/build/src/api/rest/cache/wrapFetchWithCache.js +13 -11
  29. package/build/src/api/rest/cache/wrapFetchWithCache.js.map +1 -1
  30. package/build/src/api/rest/client.js +55 -37
  31. package/build/src/api/rest/client.js.map +1 -1
  32. package/build/src/api/rest/client.types.js.map +1 -1
  33. package/build/src/api/rest/wrapFetchWithBaseUrl.js +5 -3
  34. package/build/src/api/rest/wrapFetchWithBaseUrl.js.map +1 -1
  35. package/build/src/api/rest/wrapFetchWithOffline.js +5 -3
  36. package/build/src/api/rest/wrapFetchWithOffline.js.map +1 -1
  37. package/build/src/api/rest/wrapFetchWithProgress.js +11 -7
  38. package/build/src/api/rest/wrapFetchWithProgress.js.map +1 -1
  39. package/build/src/api/rest/wrapFetchWithProxy.js +5 -3
  40. package/build/src/api/rest/wrapFetchWithProxy.js.map +1 -1
  41. package/build/src/api/rest/wrapFetchWithUserAgent.js +8 -6
  42. package/build/src/api/rest/wrapFetchWithUserAgent.js.map +1 -1
  43. package/build/src/api/settings.js +7 -5
  44. package/build/src/api/settings.js.map +1 -1
  45. package/build/src/api/updateDevelopmentSession.js +23 -17
  46. package/build/src/api/updateDevelopmentSession.js.map +1 -1
  47. package/build/src/api/user/UserSettings.js +53 -31
  48. package/build/src/api/user/UserSettings.js.map +1 -1
  49. package/build/src/api/user/actions.js +27 -21
  50. package/build/src/api/user/actions.js.map +1 -1
  51. package/build/src/api/user/expoSsoLauncher.js +30 -26
  52. package/build/src/api/user/expoSsoLauncher.js.map +1 -1
  53. package/build/src/api/user/otp.js +35 -29
  54. package/build/src/api/user/otp.js.map +1 -1
  55. package/build/src/api/user/user.js +44 -30
  56. package/build/src/api/user/user.js.map +1 -1
  57. package/build/src/config/configAsync.js +29 -23
  58. package/build/src/config/configAsync.js.map +1 -1
  59. package/build/src/config/index.js +25 -21
  60. package/build/src/config/index.js.map +1 -1
  61. package/build/src/customize/customizeAsync.js +8 -6
  62. package/build/src/customize/customizeAsync.js.map +1 -1
  63. package/build/src/customize/generate.js +20 -16
  64. package/build/src/customize/generate.js.map +1 -1
  65. package/build/src/customize/index.js +14 -12
  66. package/build/src/customize/index.js.map +1 -1
  67. package/build/src/customize/resolveOptions.js +4 -2
  68. package/build/src/customize/resolveOptions.js.map +1 -1
  69. package/build/src/customize/templates.js +58 -54
  70. package/build/src/customize/templates.js.map +1 -1
  71. package/build/src/customize/typescript.js +11 -7
  72. package/build/src/customize/typescript.js.map +1 -1
  73. package/build/src/export/createMetadataJson.js +11 -9
  74. package/build/src/export/createMetadataJson.js.map +1 -1
  75. package/build/src/export/embed/exportEager.js +8 -6
  76. package/build/src/export/embed/exportEager.js.map +1 -1
  77. package/build/src/export/embed/exportEmbedAsync.js +72 -62
  78. package/build/src/export/embed/exportEmbedAsync.js.map +1 -1
  79. package/build/src/export/embed/exportServer.js +57 -55
  80. package/build/src/export/embed/exportServer.js.map +1 -1
  81. package/build/src/export/embed/index.js +44 -40
  82. package/build/src/export/embed/index.js.map +1 -1
  83. package/build/src/export/embed/resolveOptions.js +44 -36
  84. package/build/src/export/embed/resolveOptions.js.map +1 -1
  85. package/build/src/export/embed/xcodeCompilerLogger.js +39 -27
  86. package/build/src/export/embed/xcodeCompilerLogger.js.map +1 -1
  87. package/build/src/export/exportApp.js +68 -64
  88. package/build/src/export/exportApp.js.map +1 -1
  89. package/build/src/export/exportAssets.js +34 -26
  90. package/build/src/export/exportAssets.js.map +1 -1
  91. package/build/src/export/exportAsync.js +13 -9
  92. package/build/src/export/exportAsync.js.map +1 -1
  93. package/build/src/export/exportDomComponents.js +53 -45
  94. package/build/src/export/exportDomComponents.js.map +1 -1
  95. package/build/src/export/exportHermes.js +75 -53
  96. package/build/src/export/exportHermes.js.map +1 -1
  97. package/build/src/export/exportStaticAsync.js +73 -62
  98. package/build/src/export/exportStaticAsync.js.map +1 -1
  99. package/build/src/export/favicon.js +33 -27
  100. package/build/src/export/favicon.js.map +1 -1
  101. package/build/src/export/getPublicExpoManifest.js +7 -5
  102. package/build/src/export/getPublicExpoManifest.js.map +1 -1
  103. package/build/src/export/getResolvedLocales.js +11 -9
  104. package/build/src/export/getResolvedLocales.js.map +1 -1
  105. package/build/src/export/html.js +10 -6
  106. package/build/src/export/html.js.map +1 -1
  107. package/build/src/export/index.js +32 -28
  108. package/build/src/export/index.js.map +1 -1
  109. package/build/src/export/metroAssetLocalPath.js +36 -30
  110. package/build/src/export/metroAssetLocalPath.js.map +1 -1
  111. package/build/src/export/persistMetroAssets.js +64 -34
  112. package/build/src/export/persistMetroAssets.js.map +1 -1
  113. package/build/src/export/publicFolder.js +10 -6
  114. package/build/src/export/publicFolder.js.map +1 -1
  115. package/build/src/export/resolveOptions.js +28 -24
  116. package/build/src/export/resolveOptions.js.map +1 -1
  117. package/build/src/export/saveAssets.js +50 -46
  118. package/build/src/export/saveAssets.js.map +1 -1
  119. package/build/src/export/web/exportWebAsync.js +13 -11
  120. package/build/src/export/web/exportWebAsync.js.map +1 -1
  121. package/build/src/export/web/index.js +19 -15
  122. package/build/src/export/web/index.js.map +1 -1
  123. package/build/src/export/web/resolveOptions.js +5 -3
  124. package/build/src/export/web/resolveOptions.js.map +1 -1
  125. package/build/src/export/writeContents.js +4 -2
  126. package/build/src/export/writeContents.js.map +1 -1
  127. package/build/src/graphql/generated.js +705 -479
  128. package/build/src/graphql/generated.js.map +1 -1
  129. package/build/src/install/applyPlugins.js +11 -7
  130. package/build/src/install/applyPlugins.js.map +1 -1
  131. package/build/src/install/checkPackages.js +26 -22
  132. package/build/src/install/checkPackages.js.map +1 -1
  133. package/build/src/install/fixPackages.js +16 -12
  134. package/build/src/install/fixPackages.js.map +1 -1
  135. package/build/src/install/index.js +18 -16
  136. package/build/src/install/index.js.map +1 -1
  137. package/build/src/install/installAsync.js +32 -26
  138. package/build/src/install/installAsync.js.map +1 -1
  139. package/build/src/install/installExpoPackage.js +22 -18
  140. package/build/src/install/installExpoPackage.js.map +1 -1
  141. package/build/src/install/resolveOptions.js +21 -19
  142. package/build/src/install/resolveOptions.js.map +1 -1
  143. package/build/src/install/utils/autoAddConfigPlugins.js +18 -14
  144. package/build/src/install/utils/autoAddConfigPlugins.js.map +1 -1
  145. package/build/src/install/utils/checkPackagesCompatibility.js +14 -12
  146. package/build/src/install/utils/checkPackagesCompatibility.js.map +1 -1
  147. package/build/src/lint/ESlintPrerequisite.js +50 -44
  148. package/build/src/lint/ESlintPrerequisite.js.map +1 -1
  149. package/build/src/lint/index.js +12 -8
  150. package/build/src/lint/index.js.map +1 -1
  151. package/build/src/lint/lintAsync.js +10 -8
  152. package/build/src/lint/lintAsync.js.map +1 -1
  153. package/build/src/log.js +36 -16
  154. package/build/src/log.js.map +1 -1
  155. package/build/src/login/index.js +24 -20
  156. package/build/src/login/index.js.map +1 -1
  157. package/build/src/logout/index.js +11 -7
  158. package/build/src/logout/index.js.map +1 -1
  159. package/build/src/prebuild/clearNativeFolder.js +38 -26
  160. package/build/src/prebuild/clearNativeFolder.js.map +1 -1
  161. package/build/src/prebuild/configureProjectAsync.js +18 -14
  162. package/build/src/prebuild/configureProjectAsync.js.map +1 -1
  163. package/build/src/prebuild/copyTemplateFiles.js +17 -13
  164. package/build/src/prebuild/copyTemplateFiles.js.map +1 -1
  165. package/build/src/prebuild/ensureConfigAsync.js +6 -4
  166. package/build/src/prebuild/ensureConfigAsync.js.map +1 -1
  167. package/build/src/prebuild/index.js +36 -32
  168. package/build/src/prebuild/index.js.map +1 -1
  169. package/build/src/prebuild/prebuildAsync.js +29 -25
  170. package/build/src/prebuild/prebuildAsync.js.map +1 -1
  171. package/build/src/prebuild/renameTemplateAppName.js +43 -37
  172. package/build/src/prebuild/renameTemplateAppName.js.map +1 -1
  173. package/build/src/prebuild/resolveOptions.js +70 -53
  174. package/build/src/prebuild/resolveOptions.js.map +1 -1
  175. package/build/src/prebuild/resolveTemplate.js +36 -32
  176. package/build/src/prebuild/resolveTemplate.js.map +1 -1
  177. package/build/src/prebuild/updateFromTemplate.js +19 -13
  178. package/build/src/prebuild/updateFromTemplate.js.map +1 -1
  179. package/build/src/prebuild/updatePackageJson.js +53 -39
  180. package/build/src/prebuild/updatePackageJson.js.map +1 -1
  181. package/build/src/prebuild/validateTemplatePlatforms.js +12 -8
  182. package/build/src/prebuild/validateTemplatePlatforms.js.map +1 -1
  183. package/build/src/register/index.js +11 -7
  184. package/build/src/register/index.js.map +1 -1
  185. package/build/src/register/registerAsync.js +5 -3
  186. package/build/src/register/registerAsync.js.map +1 -1
  187. package/build/src/run/android/index.js +36 -32
  188. package/build/src/run/android/index.js.map +1 -1
  189. package/build/src/run/android/resolveDevice.js +10 -8
  190. package/build/src/run/android/resolveDevice.js.map +1 -1
  191. package/build/src/run/android/resolveGradlePropsAsync.js +18 -16
  192. package/build/src/run/android/resolveGradlePropsAsync.js.map +1 -1
  193. package/build/src/run/android/resolveInstallApkName.js +17 -15
  194. package/build/src/run/android/resolveInstallApkName.js.map +1 -1
  195. package/build/src/run/android/resolveLaunchProps.js +12 -10
  196. package/build/src/run/android/resolveLaunchProps.js.map +1 -1
  197. package/build/src/run/android/resolveOptions.js +4 -2
  198. package/build/src/run/android/resolveOptions.js.map +1 -1
  199. package/build/src/run/android/runAndroidAsync.js +23 -21
  200. package/build/src/run/android/runAndroidAsync.js.map +1 -1
  201. package/build/src/run/ensureNativeProject.js +7 -5
  202. package/build/src/run/ensureNativeProject.js.map +1 -1
  203. package/build/src/run/hints.js +13 -7
  204. package/build/src/run/hints.js.map +1 -1
  205. package/build/src/run/index.js +27 -23
  206. package/build/src/run/index.js.map +1 -1
  207. package/build/src/run/ios/XcodeBuild.js +80 -60
  208. package/build/src/run/ios/XcodeBuild.js.map +1 -1
  209. package/build/src/run/ios/XcodeBuild.types.js.map +1 -1
  210. package/build/src/run/ios/appleDevice/AppleDevice.js +69 -63
  211. package/build/src/run/ios/appleDevice/AppleDevice.js.map +1 -1
  212. package/build/src/run/ios/appleDevice/ClientManager.js +29 -26
  213. package/build/src/run/ios/appleDevice/ClientManager.js.map +1 -1
  214. package/build/src/run/ios/appleDevice/client/AFCClient.js +28 -25
  215. package/build/src/run/ios/appleDevice/client/AFCClient.js.map +1 -1
  216. package/build/src/run/ios/appleDevice/client/DebugserverClient.js +29 -26
  217. package/build/src/run/ios/appleDevice/client/DebugserverClient.js.map +1 -1
  218. package/build/src/run/ios/appleDevice/client/InstallationProxyClient.js +22 -21
  219. package/build/src/run/ios/appleDevice/client/InstallationProxyClient.js.map +1 -1
  220. package/build/src/run/ios/appleDevice/client/LockdowndClient.js +32 -29
  221. package/build/src/run/ios/appleDevice/client/LockdowndClient.js.map +1 -1
  222. package/build/src/run/ios/appleDevice/client/MobileImageMounterClient.js +28 -24
  223. package/build/src/run/ios/appleDevice/client/MobileImageMounterClient.js.map +1 -1
  224. package/build/src/run/ios/appleDevice/client/ServiceClient.js +7 -4
  225. package/build/src/run/ios/appleDevice/client/ServiceClient.js.map +1 -1
  226. package/build/src/run/ios/appleDevice/client/UsbmuxdClient.js +28 -27
  227. package/build/src/run/ios/appleDevice/client/UsbmuxdClient.js.map +1 -1
  228. package/build/src/run/ios/appleDevice/installOnDeviceAsync.js +23 -17
  229. package/build/src/run/ios/appleDevice/installOnDeviceAsync.js.map +1 -1
  230. package/build/src/run/ios/appleDevice/protocol/AFCProtocol.js +146 -132
  231. package/build/src/run/ios/appleDevice/protocol/AFCProtocol.js.map +1 -1
  232. package/build/src/run/ios/appleDevice/protocol/AbstractProtocol.js +29 -21
  233. package/build/src/run/ios/appleDevice/protocol/AbstractProtocol.js.map +1 -1
  234. package/build/src/run/ios/appleDevice/protocol/GDBProtocol.js +29 -21
  235. package/build/src/run/ios/appleDevice/protocol/GDBProtocol.js.map +1 -1
  236. package/build/src/run/ios/appleDevice/protocol/LockdownProtocol.js +34 -22
  237. package/build/src/run/ios/appleDevice/protocol/LockdownProtocol.js.map +1 -1
  238. package/build/src/run/ios/appleDevice/protocol/UsbmuxProtocol.js +27 -17
  239. package/build/src/run/ios/appleDevice/protocol/UsbmuxProtocol.js.map +1 -1
  240. package/build/src/run/ios/codeSigning/Security.js +53 -39
  241. package/build/src/run/ios/codeSigning/Security.js.map +1 -1
  242. package/build/src/run/ios/codeSigning/configureCodeSigning.js +13 -9
  243. package/build/src/run/ios/codeSigning/configureCodeSigning.js.map +1 -1
  244. package/build/src/run/ios/codeSigning/resolveCertificateSigningIdentity.js +27 -19
  245. package/build/src/run/ios/codeSigning/resolveCertificateSigningIdentity.js.map +1 -1
  246. package/build/src/run/ios/codeSigning/settings.js +9 -5
  247. package/build/src/run/ios/codeSigning/settings.js.map +1 -1
  248. package/build/src/run/ios/codeSigning/simulatorCodeSigning.js +14 -12
  249. package/build/src/run/ios/codeSigning/simulatorCodeSigning.js.map +1 -1
  250. package/build/src/run/ios/codeSigning/xcodeCodeSigning.js +27 -21
  251. package/build/src/run/ios/codeSigning/xcodeCodeSigning.js.map +1 -1
  252. package/build/src/run/ios/index.js +40 -36
  253. package/build/src/run/ios/index.js.map +1 -1
  254. package/build/src/run/ios/launchApp.js +23 -17
  255. package/build/src/run/ios/launchApp.js.map +1 -1
  256. package/build/src/run/ios/options/appleDestinations.js +38 -36
  257. package/build/src/run/ios/options/appleDestinations.js.map +1 -1
  258. package/build/src/run/ios/options/promptDevice.js +20 -16
  259. package/build/src/run/ios/options/promptDevice.js.map +1 -1
  260. package/build/src/run/ios/options/resolveDevice.js +30 -24
  261. package/build/src/run/ios/options/resolveDevice.js.map +1 -1
  262. package/build/src/run/ios/options/resolveNativeScheme.js +31 -23
  263. package/build/src/run/ios/options/resolveNativeScheme.js.map +1 -1
  264. package/build/src/run/ios/options/resolveOptions.js +7 -5
  265. package/build/src/run/ios/options/resolveOptions.js.map +1 -1
  266. package/build/src/run/ios/options/resolveXcodeProject.js +7 -5
  267. package/build/src/run/ios/options/resolveXcodeProject.js.map +1 -1
  268. package/build/src/run/ios/runIosAsync.js +48 -44
  269. package/build/src/run/ios/runIosAsync.js.map +1 -1
  270. package/build/src/run/ios/validateExternalBinary.js +24 -22
  271. package/build/src/run/ios/validateExternalBinary.js.map +1 -1
  272. package/build/src/run/resolveBundlerProps.js +4 -2
  273. package/build/src/run/resolveBundlerProps.js.map +1 -1
  274. package/build/src/run/startBundler.js +16 -12
  275. package/build/src/run/startBundler.js.map +1 -1
  276. package/build/src/serve/index.js +20 -16
  277. package/build/src/serve/index.js.map +1 -1
  278. package/build/src/serve/serveAsync.js +36 -32
  279. package/build/src/serve/serveAsync.js.map +1 -1
  280. package/build/src/start/detectDevClient.js +13 -9
  281. package/build/src/start/detectDevClient.js.map +1 -1
  282. package/build/src/start/doctor/Prerequisite.js +12 -7
  283. package/build/src/start/doctor/Prerequisite.js.map +1 -1
  284. package/build/src/start/doctor/SecurityBinPrerequisite.js +13 -11
  285. package/build/src/start/doctor/SecurityBinPrerequisite.js.map +1 -1
  286. package/build/src/start/doctor/apple/SimulatorAppPrerequisite.js +23 -19
  287. package/build/src/start/doctor/apple/SimulatorAppPrerequisite.js.map +1 -1
  288. package/build/src/start/doctor/apple/XcodeDeveloperDiskImagePrerequisite.js +23 -19
  289. package/build/src/start/doctor/apple/XcodeDeveloperDiskImagePrerequisite.js.map +1 -1
  290. package/build/src/start/doctor/apple/XcodePrerequisite.js +51 -45
  291. package/build/src/start/doctor/apple/XcodePrerequisite.js.map +1 -1
  292. package/build/src/start/doctor/apple/XcrunPrerequisite.js +18 -16
  293. package/build/src/start/doctor/apple/XcrunPrerequisite.js.map +1 -1
  294. package/build/src/start/doctor/dependencies/bundledNativeModules.js +23 -19
  295. package/build/src/start/doctor/dependencies/bundledNativeModules.js.map +1 -1
  296. package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js +31 -25
  297. package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js.map +1 -1
  298. package/build/src/start/doctor/dependencies/getMissingPackages.js +25 -17
  299. package/build/src/start/doctor/dependencies/getMissingPackages.js.map +1 -1
  300. package/build/src/start/doctor/dependencies/getVersionedPackages.js +40 -32
  301. package/build/src/start/doctor/dependencies/getVersionedPackages.js.map +1 -1
  302. package/build/src/start/doctor/dependencies/resolvePackages.js +32 -26
  303. package/build/src/start/doctor/dependencies/resolvePackages.js.map +1 -1
  304. package/build/src/start/doctor/dependencies/validateDependenciesVersions.js +41 -31
  305. package/build/src/start/doctor/dependencies/validateDependenciesVersions.js.map +1 -1
  306. package/build/src/start/doctor/ngrok/ExternalModule.js +34 -29
  307. package/build/src/start/doctor/ngrok/ExternalModule.js.map +1 -1
  308. package/build/src/start/doctor/ngrok/NgrokResolver.js +12 -8
  309. package/build/src/start/doctor/ngrok/NgrokResolver.js.map +1 -1
  310. package/build/src/start/doctor/typescript/TypeScriptProjectPrerequisite.js +32 -28
  311. package/build/src/start/doctor/typescript/TypeScriptProjectPrerequisite.js.map +1 -1
  312. package/build/src/start/doctor/typescript/updateTSConfig.js +23 -17
  313. package/build/src/start/doctor/typescript/updateTSConfig.js.map +1 -1
  314. package/build/src/start/doctor/web/WebSupportProjectPrerequisite.js +33 -27
  315. package/build/src/start/doctor/web/WebSupportProjectPrerequisite.js.map +1 -1
  316. package/build/src/start/index.js +46 -42
  317. package/build/src/start/index.js.map +1 -1
  318. package/build/src/start/interface/KeyPressHandler.js +18 -14
  319. package/build/src/start/interface/KeyPressHandler.js.map +1 -1
  320. package/build/src/start/interface/commandsTable.js +94 -80
  321. package/build/src/start/interface/commandsTable.js.map +1 -1
  322. package/build/src/start/interface/interactiveActions.js +44 -40
  323. package/build/src/start/interface/interactiveActions.js.map +1 -1
  324. package/build/src/start/interface/startInterface.js +65 -61
  325. package/build/src/start/interface/startInterface.js.map +1 -1
  326. package/build/src/start/platforms/AppIdResolver.js +6 -4
  327. package/build/src/start/platforms/AppIdResolver.js.map +1 -1
  328. package/build/src/start/platforms/DeviceManager.js +10 -6
  329. package/build/src/start/platforms/DeviceManager.js.map +1 -1
  330. package/build/src/start/platforms/ExpoGoInstaller.js +25 -20
  331. package/build/src/start/platforms/ExpoGoInstaller.js.map +1 -1
  332. package/build/src/start/platforms/PlatformManager.js +17 -15
  333. package/build/src/start/platforms/PlatformManager.js.map +1 -1
  334. package/build/src/start/platforms/android/ADBServer.js +39 -35
  335. package/build/src/start/platforms/android/ADBServer.js.map +1 -1
  336. package/build/src/start/platforms/android/AndroidAppIdResolver.js +18 -16
  337. package/build/src/start/platforms/android/AndroidAppIdResolver.js.map +1 -1
  338. package/build/src/start/platforms/android/AndroidDeviceManager.js +24 -20
  339. package/build/src/start/platforms/android/AndroidDeviceManager.js.map +1 -1
  340. package/build/src/start/platforms/android/AndroidPlatformManager.js +17 -17
  341. package/build/src/start/platforms/android/AndroidPlatformManager.js.map +1 -1
  342. package/build/src/start/platforms/android/AndroidSdk.js +11 -9
  343. package/build/src/start/platforms/android/AndroidSdk.js.map +1 -1
  344. package/build/src/start/platforms/android/activateWindow.js +26 -22
  345. package/build/src/start/platforms/android/activateWindow.js.map +1 -1
  346. package/build/src/start/platforms/android/adb.js +121 -83
  347. package/build/src/start/platforms/android/adb.js.map +1 -1
  348. package/build/src/start/platforms/android/adbReverse.js +20 -12
  349. package/build/src/start/platforms/android/adbReverse.js.map +1 -1
  350. package/build/src/start/platforms/android/emulator.js +36 -26
  351. package/build/src/start/platforms/android/emulator.js.map +1 -1
  352. package/build/src/start/platforms/android/getDevices.js +7 -5
  353. package/build/src/start/platforms/android/getDevices.js.map +1 -1
  354. package/build/src/start/platforms/android/gradle.js +36 -28
  355. package/build/src/start/platforms/android/gradle.js.map +1 -1
  356. package/build/src/start/platforms/android/promptAndroidDevice.js +19 -15
  357. package/build/src/start/platforms/android/promptAndroidDevice.js.map +1 -1
  358. package/build/src/start/platforms/ios/AppleAppIdResolver.js +21 -19
  359. package/build/src/start/platforms/ios/AppleAppIdResolver.js.map +1 -1
  360. package/build/src/start/platforms/ios/AppleDeviceManager.js +37 -31
  361. package/build/src/start/platforms/ios/AppleDeviceManager.js.map +1 -1
  362. package/build/src/start/platforms/ios/ApplePlatformManager.js +12 -12
  363. package/build/src/start/platforms/ios/ApplePlatformManager.js.map +1 -1
  364. package/build/src/start/platforms/ios/assertSystemRequirements.js +9 -7
  365. package/build/src/start/platforms/ios/assertSystemRequirements.js.map +1 -1
  366. package/build/src/start/platforms/ios/devicectl.js +88 -74
  367. package/build/src/start/platforms/ios/devicectl.js.map +1 -1
  368. package/build/src/start/platforms/ios/ensureSimulatorAppRunning.js +22 -18
  369. package/build/src/start/platforms/ios/ensureSimulatorAppRunning.js.map +1 -1
  370. package/build/src/start/platforms/ios/getBestSimulator.js +29 -19
  371. package/build/src/start/platforms/ios/getBestSimulator.js.map +1 -1
  372. package/build/src/start/platforms/ios/promptAppleDevice.js +14 -10
  373. package/build/src/start/platforms/ios/promptAppleDevice.js.map +1 -1
  374. package/build/src/start/platforms/ios/simctl.js +102 -74
  375. package/build/src/start/platforms/ios/simctl.js.map +1 -1
  376. package/build/src/start/platforms/ios/simctlLogging.js +57 -52
  377. package/build/src/start/platforms/ios/simctlLogging.js.map +1 -1
  378. package/build/src/start/platforms/ios/xcrun.js +22 -18
  379. package/build/src/start/platforms/ios/xcrun.js.map +1 -1
  380. package/build/src/start/project/devices.js +19 -9
  381. package/build/src/start/project/devices.js.map +1 -1
  382. package/build/src/start/project/dotExpo.js +15 -11
  383. package/build/src/start/project/dotExpo.js.map +1 -1
  384. package/build/src/start/project/settings.js +4 -2
  385. package/build/src/start/project/settings.js.map +1 -1
  386. package/build/src/start/resolveOptions.js +48 -40
  387. package/build/src/start/resolveOptions.js.map +1 -1
  388. package/build/src/start/server/AsyncNgrok.js +55 -51
  389. package/build/src/start/server/AsyncNgrok.js.map +1 -1
  390. package/build/src/start/server/AsyncWsTunnel.js +37 -33
  391. package/build/src/start/server/AsyncWsTunnel.js.map +1 -1
  392. package/build/src/start/server/BundlerDevServer.js +81 -79
  393. package/build/src/start/server/BundlerDevServer.js.map +1 -1
  394. package/build/src/start/server/DevServerManager.js +42 -38
  395. package/build/src/start/server/DevServerManager.js.map +1 -1
  396. package/build/src/start/server/DevToolsPluginManager.js +18 -14
  397. package/build/src/start/server/DevToolsPluginManager.js.map +1 -1
  398. package/build/src/start/server/DevelopmentSession.js +18 -14
  399. package/build/src/start/server/DevelopmentSession.js.map +1 -1
  400. package/build/src/start/server/ReactDevToolsProxy.js +16 -10
  401. package/build/src/start/server/ReactDevToolsProxy.js.map +1 -1
  402. package/build/src/start/server/UrlCreator.js +36 -33
  403. package/build/src/start/server/UrlCreator.js.map +1 -1
  404. package/build/src/start/server/getStaticRenderFunctions.js +30 -22
  405. package/build/src/start/server/getStaticRenderFunctions.js.map +1 -1
  406. package/build/src/start/server/metro/DevToolsPluginWebsocketEndpoint.js +9 -5
  407. package/build/src/start/server/metro/DevToolsPluginWebsocketEndpoint.js.map +1 -1
  408. package/build/src/start/server/metro/MetroBundlerDevServer.js +293 -280
  409. package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
  410. package/build/src/start/server/metro/MetroTerminalReporter.js +63 -56
  411. package/build/src/start/server/metro/MetroTerminalReporter.js.map +1 -1
  412. package/build/src/start/server/metro/TerminalReporter.js +39 -33
  413. package/build/src/start/server/metro/TerminalReporter.js.map +1 -1
  414. package/build/src/start/server/metro/TerminalReporter.types.js.map +1 -1
  415. package/build/src/start/server/metro/createExpoFallbackResolver.js +13 -11
  416. package/build/src/start/server/metro/createExpoFallbackResolver.js.map +1 -1
  417. package/build/src/start/server/metro/createExpoMetroResolver.js +47 -41
  418. package/build/src/start/server/metro/createExpoMetroResolver.js.map +1 -1
  419. package/build/src/start/server/metro/createJResolver.js +31 -27
  420. package/build/src/start/server/metro/createJResolver.js.map +1 -1
  421. package/build/src/start/server/metro/createServerComponentsMiddleware.js +110 -98
  422. package/build/src/start/server/metro/createServerComponentsMiddleware.js.map +1 -1
  423. package/build/src/start/server/metro/createServerRouteMiddleware.js +34 -30
  424. package/build/src/start/server/metro/createServerRouteMiddleware.js.map +1 -1
  425. package/build/src/start/server/metro/debugging/AtlasPrerequisite.js +13 -11
  426. package/build/src/start/server/metro/debugging/AtlasPrerequisite.js.map +1 -1
  427. package/build/src/start/server/metro/debugging/MessageHandler.js +3 -1
  428. package/build/src/start/server/metro/debugging/MessageHandler.js.map +1 -1
  429. package/build/src/start/server/metro/debugging/attachAtlas.js +26 -22
  430. package/build/src/start/server/metro/debugging/attachAtlas.js.map +1 -1
  431. package/build/src/start/server/metro/debugging/createDebugMiddleware.js +19 -17
  432. package/build/src/start/server/metro/debugging/createDebugMiddleware.js.map +1 -1
  433. package/build/src/start/server/metro/debugging/createHandlersFactory.js +25 -31
  434. package/build/src/start/server/metro/debugging/createHandlersFactory.js.map +1 -1
  435. package/build/src/start/server/metro/debugging/getDebuggerType.js +6 -4
  436. package/build/src/start/server/metro/debugging/getDebuggerType.js.map +1 -1
  437. package/build/src/start/server/metro/debugging/messageHandlers/NetworkResponse.js +14 -8
  438. package/build/src/start/server/metro/debugging/messageHandlers/NetworkResponse.js.map +1 -1
  439. package/build/src/start/server/metro/debugging/messageHandlers/VscodeDebuggerGetPossibleBreakpoints.js +7 -5
  440. package/build/src/start/server/metro/debugging/messageHandlers/VscodeDebuggerGetPossibleBreakpoints.js.map +1 -1
  441. package/build/src/start/server/metro/debugging/messageHandlers/VscodeDebuggerSetBreakpointByUrl.js +8 -6
  442. package/build/src/start/server/metro/debugging/messageHandlers/VscodeDebuggerSetBreakpointByUrl.js.map +1 -1
  443. package/build/src/start/server/metro/debugging/messageHandlers/VscodeRuntimeCallFunctionOn.js +7 -5
  444. package/build/src/start/server/metro/debugging/messageHandlers/VscodeRuntimeCallFunctionOn.js.map +1 -1
  445. package/build/src/start/server/metro/debugging/messageHandlers/VscodeRuntimeEvaluate.js +14 -12
  446. package/build/src/start/server/metro/debugging/messageHandlers/VscodeRuntimeEvaluate.js.map +1 -1
  447. package/build/src/start/server/metro/debugging/messageHandlers/VscodeRuntimeGetProperties.js +14 -10
  448. package/build/src/start/server/metro/debugging/messageHandlers/VscodeRuntimeGetProperties.js.map +1 -1
  449. package/build/src/start/server/metro/debugging/pageIsSupported.js +6 -4
  450. package/build/src/start/server/metro/debugging/pageIsSupported.js.map +1 -1
  451. package/build/src/start/server/metro/debugging/types.js.map +1 -1
  452. package/build/src/start/server/metro/dev-server/createEventSocket.js +18 -16
  453. package/build/src/start/server/metro/dev-server/createEventSocket.js.map +1 -1
  454. package/build/src/start/server/metro/dev-server/createMessageSocket.js +23 -21
  455. package/build/src/start/server/metro/dev-server/createMessageSocket.js.map +1 -1
  456. package/build/src/start/server/metro/dev-server/createMetroMiddleware.js +23 -21
  457. package/build/src/start/server/metro/dev-server/createMetroMiddleware.js.map +1 -1
  458. package/build/src/start/server/metro/dev-server/utils/createSocketBroadcaster.js +4 -2
  459. package/build/src/start/server/metro/dev-server/utils/createSocketBroadcaster.js.map +1 -1
  460. package/build/src/start/server/metro/dev-server/utils/createSocketMap.js +4 -2
  461. package/build/src/start/server/metro/dev-server/utils/createSocketMap.js.map +1 -1
  462. package/build/src/start/server/metro/dev-server/utils/socketMessages.js +8 -4
  463. package/build/src/start/server/metro/dev-server/utils/socketMessages.js.map +1 -1
  464. package/build/src/start/server/metro/externals.js +33 -25
  465. package/build/src/start/server/metro/externals.js.map +1 -1
  466. package/build/src/start/server/metro/fetchRouterManifest.js +28 -12
  467. package/build/src/start/server/metro/fetchRouterManifest.js.map +1 -1
  468. package/build/src/start/server/metro/formatFileCandidates.js +11 -9
  469. package/build/src/start/server/metro/formatFileCandidates.js.map +1 -1
  470. package/build/src/start/server/metro/getCssModulesFromBundler.js +24 -20
  471. package/build/src/start/server/metro/getCssModulesFromBundler.js.map +1 -1
  472. package/build/src/start/server/metro/instantiateMetro.js +87 -81
  473. package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
  474. package/build/src/start/server/metro/log-box/LogBoxLog.js +40 -36
  475. package/build/src/start/server/metro/log-box/LogBoxLog.js.map +1 -1
  476. package/build/src/start/server/metro/log-box/LogBoxSymbolication.js +20 -14
  477. package/build/src/start/server/metro/log-box/LogBoxSymbolication.js.map +1 -1
  478. package/build/src/start/server/metro/log-box/formatProjectFilePath.js +10 -6
  479. package/build/src/start/server/metro/log-box/formatProjectFilePath.js.map +1 -1
  480. package/build/src/start/server/metro/metroErrorInterface.js +88 -78
  481. package/build/src/start/server/metro/metroErrorInterface.js.map +1 -1
  482. package/build/src/start/server/metro/metroErrors.js +8 -4
  483. package/build/src/start/server/metro/metroErrors.js.map +1 -1
  484. package/build/src/start/server/metro/metroPrivateServer.js +9 -7
  485. package/build/src/start/server/metro/metroPrivateServer.js.map +1 -1
  486. package/build/src/start/server/metro/metroVirtualModules.js +10 -8
  487. package/build/src/start/server/metro/metroVirtualModules.js.map +1 -1
  488. package/build/src/start/server/metro/metroWatchTypeScriptFiles.js +24 -22
  489. package/build/src/start/server/metro/metroWatchTypeScriptFiles.js.map +1 -1
  490. package/build/src/start/server/metro/router.js +48 -32
  491. package/build/src/start/server/metro/router.js.map +1 -1
  492. package/build/src/start/server/metro/runServer-fork.js +24 -22
  493. package/build/src/start/server/metro/runServer-fork.js.map +1 -1
  494. package/build/src/start/server/metro/serializeHtml.js +24 -22
  495. package/build/src/start/server/metro/serializeHtml.js.map +1 -1
  496. package/build/src/start/server/metro/symbolicate.js.map +1 -1
  497. package/build/src/start/server/metro/waitForMetroToObserveTypeScriptFile.js +35 -29
  498. package/build/src/start/server/metro/waitForMetroToObserveTypeScriptFile.js.map +1 -1
  499. package/build/src/start/server/metro/withMetroMultiPlatform.js +150 -140
  500. package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -1
  501. package/build/src/start/server/metro/withMetroResolvers.js +49 -39
  502. package/build/src/start/server/metro/withMetroResolvers.js.map +1 -1
  503. package/build/src/start/server/middleware/ContextModuleSourceMapsMiddleware.js +8 -6
  504. package/build/src/start/server/middleware/ContextModuleSourceMapsMiddleware.js.map +1 -1
  505. package/build/src/start/server/middleware/CorsMiddleware.js +17 -15
  506. package/build/src/start/server/middleware/CorsMiddleware.js.map +1 -1
  507. package/build/src/start/server/middleware/CreateFileMiddleware.js +32 -31
  508. package/build/src/start/server/middleware/CreateFileMiddleware.js.map +1 -1
  509. package/build/src/start/server/middleware/DevToolsPluginMiddleware.js +22 -19
  510. package/build/src/start/server/middleware/DevToolsPluginMiddleware.js.map +1 -1
  511. package/build/src/start/server/middleware/DomComponentsMiddleware.js +33 -27
  512. package/build/src/start/server/middleware/DomComponentsMiddleware.js.map +1 -1
  513. package/build/src/start/server/middleware/ExpoGoManifestHandlerMiddleware.js +61 -57
  514. package/build/src/start/server/middleware/ExpoGoManifestHandlerMiddleware.js.map +1 -1
  515. package/build/src/start/server/middleware/ExpoMiddleware.js +15 -9
  516. package/build/src/start/server/middleware/ExpoMiddleware.js.map +1 -1
  517. package/build/src/start/server/middleware/FaviconMiddleware.js +16 -15
  518. package/build/src/start/server/middleware/FaviconMiddleware.js.map +1 -1
  519. package/build/src/start/server/middleware/HistoryFallbackMiddleware.js +4 -2
  520. package/build/src/start/server/middleware/HistoryFallbackMiddleware.js.map +1 -1
  521. package/build/src/start/server/middleware/InterstitialPageMiddleware.js +34 -31
  522. package/build/src/start/server/middleware/InterstitialPageMiddleware.js.map +1 -1
  523. package/build/src/start/server/middleware/ManifestMiddleware.js +64 -56
  524. package/build/src/start/server/middleware/ManifestMiddleware.js.map +1 -1
  525. package/build/src/start/server/middleware/ReactDevToolsPageMiddleware.js +23 -19
  526. package/build/src/start/server/middleware/ReactDevToolsPageMiddleware.js.map +1 -1
  527. package/build/src/start/server/middleware/RuntimeRedirectMiddleware.js +20 -19
  528. package/build/src/start/server/middleware/RuntimeRedirectMiddleware.js.map +1 -1
  529. package/build/src/start/server/middleware/ServeStaticMiddleware.js +11 -9
  530. package/build/src/start/server/middleware/ServeStaticMiddleware.js.map +1 -1
  531. package/build/src/start/server/middleware/createBuiltinAPIRequestHandler.js +17 -11
  532. package/build/src/start/server/middleware/createBuiltinAPIRequestHandler.js.map +1 -1
  533. package/build/src/start/server/middleware/inspector/CdpClient.js +12 -10
  534. package/build/src/start/server/middleware/inspector/CdpClient.js.map +1 -1
  535. package/build/src/start/server/middleware/inspector/JsInspector.js +35 -27
  536. package/build/src/start/server/middleware/inspector/JsInspector.js.map +1 -1
  537. package/build/src/start/server/middleware/inspector/createJsInspectorMiddleware.js +21 -19
  538. package/build/src/start/server/middleware/inspector/createJsInspectorMiddleware.js.map +1 -1
  539. package/build/src/start/server/middleware/inspector/middlwareMutations.js +6 -2
  540. package/build/src/start/server/middleware/inspector/middlwareMutations.js.map +1 -1
  541. package/build/src/start/server/middleware/metroOptions.js +120 -96
  542. package/build/src/start/server/middleware/metroOptions.js.map +1 -1
  543. package/build/src/start/server/middleware/mutations.js +7 -3
  544. package/build/src/start/server/middleware/mutations.js.map +1 -1
  545. package/build/src/start/server/middleware/resolveAssets.js +26 -18
  546. package/build/src/start/server/middleware/resolveAssets.js.map +1 -1
  547. package/build/src/start/server/middleware/resolvePlatform.js +23 -15
  548. package/build/src/start/server/middleware/resolvePlatform.js.map +1 -1
  549. package/build/src/start/server/middleware/resolveRuntimeVersionWithExpoUpdatesAsync.js +11 -9
  550. package/build/src/start/server/middleware/resolveRuntimeVersionWithExpoUpdatesAsync.js.map +1 -1
  551. package/build/src/start/server/middleware/server.types.js.map +1 -1
  552. package/build/src/start/server/openPlatforms.js +10 -8
  553. package/build/src/start/server/openPlatforms.js.map +1 -1
  554. package/build/src/start/server/platformBundlers.js +13 -11
  555. package/build/src/start/server/platformBundlers.js.map +1 -1
  556. package/build/src/start/server/serverLogLikeMetro.js +58 -50
  557. package/build/src/start/server/serverLogLikeMetro.js.map +1 -1
  558. package/build/src/start/server/type-generation/expo-env.js +11 -7
  559. package/build/src/start/server/type-generation/expo-env.js.map +1 -1
  560. package/build/src/start/server/type-generation/routes.js +72 -50
  561. package/build/src/start/server/type-generation/routes.js.map +1 -1
  562. package/build/src/start/server/type-generation/startTypescriptTypeGeneration.js +21 -19
  563. package/build/src/start/server/type-generation/startTypescriptTypeGeneration.js.map +1 -1
  564. package/build/src/start/server/type-generation/tsconfig.js +36 -28
  565. package/build/src/start/server/type-generation/tsconfig.js.map +1 -1
  566. package/build/src/start/server/webTemplate.js +28 -24
  567. package/build/src/start/server/webTemplate.js.map +1 -1
  568. package/build/src/start/server/webpack/WebpackBundlerDevServer.js +52 -46
  569. package/build/src/start/server/webpack/WebpackBundlerDevServer.js.map +1 -1
  570. package/build/src/start/server/webpack/compile.js +15 -11
  571. package/build/src/start/server/webpack/compile.js.map +1 -1
  572. package/build/src/start/server/webpack/formatWebpackMessages.js +28 -26
  573. package/build/src/start/server/webpack/formatWebpackMessages.js.map +1 -1
  574. package/build/src/start/server/webpack/resolveFromProject.js +18 -12
  575. package/build/src/start/server/webpack/resolveFromProject.js.map +1 -1
  576. package/build/src/start/server/webpack/tls.js +18 -12
  577. package/build/src/start/server/webpack/tls.js.map +1 -1
  578. package/build/src/start/startAsync.js +31 -27
  579. package/build/src/start/startAsync.js.map +1 -1
  580. package/build/src/utils/FileNotifier.js +20 -17
  581. package/build/src/utils/FileNotifier.js.map +1 -1
  582. package/build/src/utils/ansi.js +7 -5
  583. package/build/src/utils/ansi.js.map +1 -1
  584. package/build/src/utils/args.js +24 -14
  585. package/build/src/utils/args.js.map +1 -1
  586. package/build/src/utils/array.js +18 -6
  587. package/build/src/utils/array.js.map +1 -1
  588. package/build/src/utils/cocoapods.js +54 -46
  589. package/build/src/utils/cocoapods.js.map +1 -1
  590. package/build/src/utils/codesigning.js +79 -69
  591. package/build/src/utils/codesigning.js.map +1 -1
  592. package/build/src/utils/createFileTransform.js +16 -12
  593. package/build/src/utils/createFileTransform.js.map +1 -1
  594. package/build/src/utils/createTempPath.js +12 -8
  595. package/build/src/utils/createTempPath.js.map +1 -1
  596. package/build/src/utils/delay.js +12 -6
  597. package/build/src/utils/delay.js.map +1 -1
  598. package/build/src/utils/dir.js +40 -22
  599. package/build/src/utils/dir.js.map +1 -1
  600. package/build/src/utils/downloadAppAsync.js +10 -8
  601. package/build/src/utils/downloadAppAsync.js.map +1 -1
  602. package/build/src/utils/downloadExpoGoAsync.js +27 -23
  603. package/build/src/utils/downloadExpoGoAsync.js.map +1 -1
  604. package/build/src/utils/editor.js +41 -35
  605. package/build/src/utils/editor.js.map +1 -1
  606. package/build/src/utils/env.js +63 -59
  607. package/build/src/utils/env.js.map +1 -1
  608. package/build/src/utils/errors.js +37 -30
  609. package/build/src/utils/errors.js.map +1 -1
  610. package/build/src/utils/exit.js +35 -31
  611. package/build/src/utils/exit.js.map +1 -1
  612. package/build/src/utils/expoUpdatesCli.js +32 -22
  613. package/build/src/utils/expoUpdatesCli.js.map +1 -1
  614. package/build/src/utils/fetch.js +8 -4
  615. package/build/src/utils/fetch.js.map +1 -1
  616. package/build/src/utils/filePath.js +10 -6
  617. package/build/src/utils/filePath.js.map +1 -1
  618. package/build/src/utils/findUp.js +13 -9
  619. package/build/src/utils/findUp.js.map +1 -1
  620. package/build/src/utils/fn.js +6 -2
  621. package/build/src/utils/fn.js.map +1 -1
  622. package/build/src/utils/getOrPromptApplicationId.js +41 -35
  623. package/build/src/utils/getOrPromptApplicationId.js.map +1 -1
  624. package/build/src/utils/getRunningProcess.js +29 -21
  625. package/build/src/utils/getRunningProcess.js.map +1 -1
  626. package/build/src/utils/git.js +26 -20
  627. package/build/src/utils/git.js.map +1 -1
  628. package/build/src/utils/glob.js +8 -4
  629. package/build/src/utils/glob.js.map +1 -1
  630. package/build/src/utils/interactive.js +3 -1
  631. package/build/src/utils/interactive.js.map +1 -1
  632. package/build/src/utils/ip.js +21 -19
  633. package/build/src/utils/ip.js.map +1 -1
  634. package/build/src/utils/isModuleSymlinked.js +11 -9
  635. package/build/src/utils/isModuleSymlinked.js.map +1 -1
  636. package/build/src/utils/jsonSchemaDeref.js +20 -18
  637. package/build/src/utils/jsonSchemaDeref.js.map +1 -1
  638. package/build/src/utils/link.js +17 -13
  639. package/build/src/utils/link.js.map +1 -1
  640. package/build/src/utils/mergeGitIgnorePaths.js +46 -28
  641. package/build/src/utils/mergeGitIgnorePaths.js.map +1 -1
  642. package/build/src/utils/modifyConfigAsync.js +16 -10
  643. package/build/src/utils/modifyConfigAsync.js.map +1 -1
  644. package/build/src/utils/modifyConfigPlugins.js +10 -6
  645. package/build/src/utils/modifyConfigPlugins.js.map +1 -1
  646. package/build/src/utils/multipartMixed.js +13 -11
  647. package/build/src/utils/multipartMixed.js.map +1 -1
  648. package/build/src/utils/nodeEnv.js +12 -6
  649. package/build/src/utils/nodeEnv.js.map +1 -1
  650. package/build/src/utils/nodeModules.js +10 -8
  651. package/build/src/utils/nodeModules.js.map +1 -1
  652. package/build/src/utils/npm.js +49 -35
  653. package/build/src/utils/npm.js.map +1 -1
  654. package/build/src/utils/obj.js +11 -5
  655. package/build/src/utils/obj.js.map +1 -1
  656. package/build/src/utils/open.js +10 -8
  657. package/build/src/utils/open.js.map +1 -1
  658. package/build/src/utils/ora.js +13 -7
  659. package/build/src/utils/ora.js.map +1 -1
  660. package/build/src/utils/plist.js +21 -15
  661. package/build/src/utils/plist.js.map +1 -1
  662. package/build/src/utils/port.js +43 -33
  663. package/build/src/utils/port.js.map +1 -1
  664. package/build/src/utils/profile.js +11 -7
  665. package/build/src/utils/profile.js.map +1 -1
  666. package/build/src/utils/progress.js +11 -5
  667. package/build/src/utils/progress.js.map +1 -1
  668. package/build/src/utils/prompts.js +47 -29
  669. package/build/src/utils/prompts.js.map +1 -1
  670. package/build/src/utils/resolveArgs.js +36 -24
  671. package/build/src/utils/resolveArgs.js.map +1 -1
  672. package/build/src/utils/scheme.js +40 -32
  673. package/build/src/utils/scheme.js.map +1 -1
  674. package/build/src/utils/stream.js +5 -3
  675. package/build/src/utils/stream.js.map +1 -1
  676. package/build/src/utils/strings.js +6 -4
  677. package/build/src/utils/strings.js.map +1 -1
  678. package/build/src/utils/tar.js +18 -14
  679. package/build/src/utils/tar.js.map +1 -1
  680. package/build/src/utils/telemetry/Telemetry.js +29 -27
  681. package/build/src/utils/telemetry/Telemetry.js.map +1 -1
  682. package/build/src/utils/telemetry/clients/FetchClient.js +15 -13
  683. package/build/src/utils/telemetry/clients/FetchClient.js.map +1 -1
  684. package/build/src/utils/telemetry/clients/FetchDetachedClient.js +26 -22
  685. package/build/src/utils/telemetry/clients/FetchDetachedClient.js.map +1 -1
  686. package/build/src/utils/telemetry/clients/flushFetchDetached.js +10 -10
  687. package/build/src/utils/telemetry/clients/flushFetchDetached.js.map +1 -1
  688. package/build/src/utils/telemetry/events.js +4 -2
  689. package/build/src/utils/telemetry/events.js.map +1 -1
  690. package/build/src/utils/telemetry/index.js +25 -29
  691. package/build/src/utils/telemetry/index.js.map +1 -1
  692. package/build/src/utils/telemetry/types.js.map +1 -1
  693. package/build/src/utils/telemetry/utils/constants.js +8 -4
  694. package/build/src/utils/telemetry/utils/constants.js.map +1 -1
  695. package/build/src/utils/telemetry/utils/context.js +18 -14
  696. package/build/src/utils/telemetry/utils/context.js.map +1 -1
  697. package/build/src/utils/template.js +6 -4
  698. package/build/src/utils/template.js.map +1 -1
  699. package/build/src/utils/terminal.js +4 -2
  700. package/build/src/utils/terminal.js.map +1 -1
  701. package/build/src/utils/tsconfig/evaluateTsConfig.js +21 -17
  702. package/build/src/utils/tsconfig/evaluateTsConfig.js.map +1 -1
  703. package/build/src/utils/tsconfig/loadTsConfigPaths.js +18 -14
  704. package/build/src/utils/tsconfig/loadTsConfigPaths.js.map +1 -1
  705. package/build/src/utils/tsconfig/matchTsConfigPathAlias.js +7 -5
  706. package/build/src/utils/tsconfig/matchTsConfigPathAlias.js.map +1 -1
  707. package/build/src/utils/tsconfig/resolveWithTsConfigPaths.js +14 -12
  708. package/build/src/utils/tsconfig/resolveWithTsConfigPaths.js.map +1 -1
  709. package/build/src/utils/url.js +23 -13
  710. package/build/src/utils/url.js.map +1 -1
  711. package/build/src/utils/validateApplicationId.js +108 -86
  712. package/build/src/utils/validateApplicationId.js.map +1 -1
  713. package/build/src/utils/variadic.js +22 -16
  714. package/build/src/utils/variadic.js.map +1 -1
  715. package/build/src/whoami/index.js +11 -7
  716. package/build/src/whoami/index.js.map +1 -1
  717. package/build/src/whoami/whoamiAsync.js +11 -7
  718. package/build/src/whoami/whoamiAsync.js.map +1 -1
  719. package/package.json +17 -16
@@ -9,32 +9,50 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- generatedFooterComment: ()=>generatedFooterComment,
13
- mergeGitIgnorePaths: ()=>mergeGitIgnorePaths,
14
- removeGeneratedGitIgnoreContents: ()=>removeGeneratedGitIgnoreContents,
15
- mergeGitIgnoreContents: ()=>mergeGitIgnoreContents,
16
- upsertGitIgnoreContents: ()=>upsertGitIgnoreContents,
17
- createGeneratedHeaderComment: ()=>createGeneratedHeaderComment,
18
- getSanitizedGitIgnoreLines: ()=>getSanitizedGitIgnoreLines,
19
- createGitIgnoreHash: ()=>createGitIgnoreHash,
20
- removeFromGitIgnore: ()=>removeFromGitIgnore
12
+ createGeneratedHeaderComment: function() {
13
+ return createGeneratedHeaderComment;
14
+ },
15
+ createGitIgnoreHash: function() {
16
+ return createGitIgnoreHash;
17
+ },
18
+ generatedFooterComment: function() {
19
+ return generatedFooterComment;
20
+ },
21
+ getSanitizedGitIgnoreLines: function() {
22
+ return getSanitizedGitIgnoreLines;
23
+ },
24
+ mergeGitIgnoreContents: function() {
25
+ return mergeGitIgnoreContents;
26
+ },
27
+ mergeGitIgnorePaths: function() {
28
+ return mergeGitIgnorePaths;
29
+ },
30
+ removeFromGitIgnore: function() {
31
+ return removeFromGitIgnore;
32
+ },
33
+ removeGeneratedGitIgnoreContents: function() {
34
+ return removeGeneratedGitIgnoreContents;
35
+ },
36
+ upsertGitIgnoreContents: function() {
37
+ return upsertGitIgnoreContents;
38
+ }
21
39
  });
22
40
  function _crypto() {
23
- const data = /*#__PURE__*/ _interopRequireDefault(require("crypto"));
41
+ const data = /*#__PURE__*/ _interop_require_default(require("crypto"));
24
42
  _crypto = function() {
25
43
  return data;
26
44
  };
27
45
  return data;
28
46
  }
29
47
  function _fs() {
30
- const data = /*#__PURE__*/ _interopRequireDefault(require("fs"));
48
+ const data = /*#__PURE__*/ _interop_require_default(require("fs"));
31
49
  _fs = function() {
32
50
  return data;
33
51
  };
34
52
  return data;
35
53
  }
36
54
  const _log = require("../log");
37
- function _interopRequireDefault(obj) {
55
+ function _interop_require_default(obj) {
38
56
  return obj && obj.__esModule ? obj : {
39
57
  default: obj
40
58
  };
@@ -65,7 +83,7 @@ function mergeGitIgnorePaths(targetGitIgnorePath, sourceGitIgnorePath) {
65
83
  *
66
84
  * @param gitIgnore
67
85
  */ function getGeneratedSectionIndexes(gitIgnore) {
68
- const contents = gitIgnore.split("\n");
86
+ const contents = gitIgnore.split('\n');
69
87
  const start = contents.findIndex((line)=>line.startsWith(generatedHeaderPrefix));
70
88
  const end = contents.findIndex((line)=>line.startsWith(generatedFooterComment));
71
89
  return {
@@ -75,12 +93,12 @@ function mergeGitIgnorePaths(targetGitIgnorePath, sourceGitIgnorePath) {
75
93
  };
76
94
  }
77
95
  function removeGeneratedGitIgnoreContents(gitIgnore) {
78
- const { contents , start , end } = getGeneratedSectionIndexes(gitIgnore);
96
+ const { contents, start, end } = getGeneratedSectionIndexes(gitIgnore);
79
97
  if (start > -1 && end > -1 && start < end) {
80
98
  contents.splice(start, end - start + 1);
81
99
  // TODO: We could in theory check that the contents we're removing match the hash used in the header,
82
100
  // this would ensure that we don't accidentally remove lines that someone added or removed from the generated section.
83
- return contents.join("\n");
101
+ return contents.join('\n');
84
102
  }
85
103
  return null;
86
104
  }
@@ -96,8 +114,8 @@ function mergeGitIgnoreContents(targetGitIgnore, sourceGitIgnore) {
96
114
  `# The following patterns were generated by expo-cli`,
97
115
  ``,
98
116
  sourceGitIgnore,
99
- generatedFooterComment,
100
- ].join("\n"),
117
+ generatedFooterComment
118
+ ].join('\n'),
101
119
  didMerge: true,
102
120
  didClear: !!sanitizedTarget
103
121
  };
@@ -110,16 +128,16 @@ function mergeGitIgnoreContents(targetGitIgnore, sourceGitIgnore) {
110
128
  }
111
129
  function upsertGitIgnoreContents(targetGitIgnorePath, contents) {
112
130
  const targetGitIgnore = _fs().default.readFileSync(targetGitIgnorePath, {
113
- encoding: "utf-8",
114
- flag: "a+"
131
+ encoding: 'utf-8',
132
+ flag: 'a+'
115
133
  });
116
- if (targetGitIgnore.match(new RegExp(`^${contents}[\\n\\r\\s]*$`, "m"))) {
134
+ if (targetGitIgnore.match(new RegExp(`^${contents}[\\n\\r\\s]*$`, 'm'))) {
117
135
  return null;
118
136
  }
119
137
  // If there is an existing section, update it with the new content
120
138
  if (targetGitIgnore.includes(generatedHeaderPrefix)) {
121
139
  const indexes = getGeneratedSectionIndexes(targetGitIgnore);
122
- contents = `${indexes.contents.slice(indexes.start + 3, indexes.end).join("\n")}\n${contents}`;
140
+ contents = `${indexes.contents.slice(indexes.start + 3, indexes.end).join('\n')}\n${contents}`;
123
141
  }
124
142
  const merged = mergeGitIgnoreContents(targetGitIgnore, contents);
125
143
  if (merged.contents) {
@@ -128,15 +146,15 @@ function upsertGitIgnoreContents(targetGitIgnorePath, contents) {
128
146
  return merged;
129
147
  }
130
148
  function createGeneratedHeaderComment(gitIgnore) {
131
- const hashKey = createGitIgnoreHash(getSanitizedGitIgnoreLines(gitIgnore).join("\n"));
149
+ const hashKey = createGitIgnoreHash(getSanitizedGitIgnoreLines(gitIgnore).join('\n'));
132
150
  return `${generatedHeaderPrefix} ${hashKey}`;
133
151
  }
134
152
  function getSanitizedGitIgnoreLines(gitIgnore) {
135
153
  // filter, trim, and sort the lines.
136
- return gitIgnore.split("\n").filter((v)=>{
154
+ return gitIgnore.split('\n').filter((v)=>{
137
155
  const line = v.trim();
138
156
  // Strip comments
139
- if (line.startsWith("#")) {
157
+ if (line.startsWith('#')) {
140
158
  return false;
141
159
  }
142
160
  return !!line;
@@ -144,7 +162,7 @@ function getSanitizedGitIgnoreLines(gitIgnore) {
144
162
  }
145
163
  function createGitIgnoreHash(gitIgnore) {
146
164
  // this doesn't need to be secure, the shorter the better.
147
- const hash = _crypto().default.createHash("sha1").update(gitIgnore).digest("hex");
165
+ const hash = _crypto().default.createHash('sha1').update(gitIgnore).digest('hex');
148
166
  return `sync-${hash}`;
149
167
  }
150
168
  function removeFromGitIgnore(targetGitIgnorePath, contents) {
@@ -152,14 +170,14 @@ function removeFromGitIgnore(targetGitIgnorePath, contents) {
152
170
  if (!_fs().default.existsSync(targetGitIgnorePath)) {
153
171
  return;
154
172
  }
155
- let targetGitIgnore = _fs().default.readFileSync(targetGitIgnorePath, "utf-8");
173
+ let targetGitIgnore = _fs().default.readFileSync(targetGitIgnorePath, 'utf-8');
156
174
  if (!targetGitIgnore.includes(contents)) {
157
175
  return null;
158
176
  }
159
- targetGitIgnore = targetGitIgnore.replace(`${contents}\n`, "");
177
+ targetGitIgnore = targetGitIgnore.replace(`${contents}\n`, '');
160
178
  const indexes = getGeneratedSectionIndexes(targetGitIgnore);
161
179
  if (indexes.start === indexes.end - 3) {
162
- targetGitIgnore = targetGitIgnore.replace(new RegExp(`^${generatedHeaderPrefix}((.|\n)*)${generatedFooterComment}$`, "m"), "");
180
+ targetGitIgnore = targetGitIgnore.replace(new RegExp(`^${generatedHeaderPrefix}((.|\n)*)${generatedFooterComment}$`, 'm'), '');
163
181
  }
164
182
  return _fs().default.writeFileSync(targetGitIgnorePath, targetGitIgnore);
165
183
  } catch (error) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/mergeGitIgnorePaths.ts"],"sourcesContent":["import crypto from 'crypto';\nimport fs from 'fs';\n\nimport { Log } from '../log';\n\ntype MergeResults = {\n contents: string;\n didClear: boolean;\n didMerge: boolean;\n};\n\nconst generatedHeaderPrefix = `# @generated expo-cli`;\nexport const generatedFooterComment = `# @end expo-cli`;\n\n/**\n * Merge two gitignore files together and add a generated header.\n *\n * @param targetGitIgnorePath\n * @param sourceGitIgnorePath\n *\n * @returns `null` if one of the gitignore files doesn't exist. Otherwise, returns the merged contents.\n */\nexport function mergeGitIgnorePaths(\n targetGitIgnorePath: string,\n sourceGitIgnorePath: string\n): null | MergeResults {\n if (!fs.existsSync(targetGitIgnorePath)) {\n // No gitignore in the project already, no need to merge anything into anything. I guess they\n // are not using git :O\n return null;\n }\n\n if (!fs.existsSync(sourceGitIgnorePath)) {\n // Maybe we don't have a gitignore in the template project\n return null;\n }\n\n const targetGitIgnore = fs.readFileSync(targetGitIgnorePath).toString();\n const sourceGitIgnore = fs.readFileSync(sourceGitIgnorePath).toString();\n const merged = mergeGitIgnoreContents(targetGitIgnore, sourceGitIgnore);\n // Only rewrite the file if it was modified.\n if (merged.contents) {\n fs.writeFileSync(targetGitIgnorePath, merged.contents);\n }\n\n return merged;\n}\n\n/**\n * Get line indexes for the generated section of a gitignore.\n *\n * @param gitIgnore\n */\nfunction getGeneratedSectionIndexes(gitIgnore: string): {\n contents: string[];\n start: number;\n end: number;\n} {\n const contents = gitIgnore.split('\\n');\n const start = contents.findIndex((line) => line.startsWith(generatedHeaderPrefix));\n const end = contents.findIndex((line) => line.startsWith(generatedFooterComment));\n\n return { contents, start, end };\n}\n\n/**\n * Removes the generated section from a gitignore, returns null when nothing can be removed.\n * This sways heavily towards not removing lines unless it's certain that modifications were not made to the gitignore manually.\n *\n * @param gitIgnore\n */\nexport function removeGeneratedGitIgnoreContents(gitIgnore: string): string | null {\n const { contents, start, end } = getGeneratedSectionIndexes(gitIgnore);\n if (start > -1 && end > -1 && start < end) {\n contents.splice(start, end - start + 1);\n // TODO: We could in theory check that the contents we're removing match the hash used in the header,\n // this would ensure that we don't accidentally remove lines that someone added or removed from the generated section.\n return contents.join('\\n');\n }\n return null;\n}\n\n/**\n * Merge the contents of two gitignores together and add a generated header.\n *\n * @param targetGitIgnore contents of the existing gitignore\n * @param sourceGitIgnore contents of the extra gitignore\n */\nexport function mergeGitIgnoreContents(\n targetGitIgnore: string,\n sourceGitIgnore: string\n): MergeResults {\n const header = createGeneratedHeaderComment(sourceGitIgnore);\n if (!targetGitIgnore.includes(header)) {\n // Ensure the old generated gitignore contents are removed.\n const sanitizedTarget = removeGeneratedGitIgnoreContents(targetGitIgnore);\n return {\n contents: [\n sanitizedTarget ?? targetGitIgnore,\n header,\n `# The following patterns were generated by expo-cli`,\n ``,\n sourceGitIgnore,\n generatedFooterComment,\n ].join('\\n'),\n didMerge: true,\n didClear: !!sanitizedTarget,\n };\n }\n return { contents: targetGitIgnore, didClear: false, didMerge: false };\n}\n\n/**\n * Adds the contents into an existing gitignore \"generated by expo-cli section\"\n * If no section exists, it will be created (hence the name upsert)\n */\nexport function upsertGitIgnoreContents(\n targetGitIgnorePath: string,\n contents: string\n): MergeResults | null {\n const targetGitIgnore = fs.readFileSync(targetGitIgnorePath, {\n encoding: 'utf-8',\n flag: 'a+',\n });\n\n if (targetGitIgnore.match(new RegExp(`^${contents}[\\\\n\\\\r\\\\s]*$`, 'm'))) {\n return null;\n }\n\n // If there is an existing section, update it with the new content\n if (targetGitIgnore.includes(generatedHeaderPrefix)) {\n const indexes = getGeneratedSectionIndexes(targetGitIgnore);\n\n contents = `${indexes.contents.slice(indexes.start + 3, indexes.end).join('\\n')}\\n${contents}`;\n }\n\n const merged = mergeGitIgnoreContents(targetGitIgnore, contents);\n\n if (merged.contents) {\n fs.writeFileSync(targetGitIgnorePath, merged.contents);\n }\n return merged;\n}\n\nexport function createGeneratedHeaderComment(gitIgnore: string): string {\n const hashKey = createGitIgnoreHash(getSanitizedGitIgnoreLines(gitIgnore).join('\\n'));\n\n return `${generatedHeaderPrefix} ${hashKey}`;\n}\n\n/**\n * Normalize the contents of a gitignore to ensure that minor changes like new lines or sort order don't cause a regeneration.\n */\nexport function getSanitizedGitIgnoreLines(gitIgnore: string): string[] {\n // filter, trim, and sort the lines.\n return gitIgnore\n .split('\\n')\n .filter((v) => {\n const line = v.trim();\n // Strip comments\n if (line.startsWith('#')) {\n return false;\n }\n return !!line;\n })\n .sort();\n}\n\nexport function createGitIgnoreHash(gitIgnore: string): string {\n // this doesn't need to be secure, the shorter the better.\n const hash = crypto.createHash('sha1').update(gitIgnore).digest('hex');\n return `sync-${hash}`;\n}\n\nexport function removeFromGitIgnore(targetGitIgnorePath: string, contents: string) {\n try {\n if (!fs.existsSync(targetGitIgnorePath)) {\n return;\n }\n\n let targetGitIgnore = fs.readFileSync(targetGitIgnorePath, 'utf-8');\n\n if (!targetGitIgnore.includes(contents)) {\n return null;\n }\n\n targetGitIgnore = targetGitIgnore.replace(`${contents}\\n`, '');\n\n const indexes = getGeneratedSectionIndexes(targetGitIgnore);\n\n if (indexes.start === indexes.end - 3) {\n targetGitIgnore = targetGitIgnore.replace(\n new RegExp(`^${generatedHeaderPrefix}((.|\\n)*)${generatedFooterComment}$`, 'm'),\n ''\n );\n }\n\n return fs.writeFileSync(targetGitIgnorePath, targetGitIgnore);\n } catch (error) {\n Log.error(`Failed to read/write to .gitignore path: ${targetGitIgnorePath}`);\n throw error;\n }\n}\n"],"names":["generatedFooterComment","mergeGitIgnorePaths","removeGeneratedGitIgnoreContents","mergeGitIgnoreContents","upsertGitIgnoreContents","createGeneratedHeaderComment","getSanitizedGitIgnoreLines","createGitIgnoreHash","removeFromGitIgnore","generatedHeaderPrefix","targetGitIgnorePath","sourceGitIgnorePath","fs","existsSync","targetGitIgnore","readFileSync","toString","sourceGitIgnore","merged","contents","writeFileSync","getGeneratedSectionIndexes","gitIgnore","split","start","findIndex","line","startsWith","end","splice","join","header","includes","sanitizedTarget","didMerge","didClear","encoding","flag","match","RegExp","indexes","slice","hashKey","filter","v","trim","sort","hash","crypto","createHash","update","digest","replace","error","Log"],"mappings":"AAAA;;;;;;;;;;;IAYaA,sBAAsB,MAAtBA,sBAAsB;IAUnBC,mBAAmB,MAAnBA,mBAAmB;IAiDnBC,gCAAgC,MAAhCA,gCAAgC;IAiBhCC,sBAAsB,MAAtBA,sBAAsB;IA4BtBC,uBAAuB,MAAvBA,uBAAuB;IA4BvBC,4BAA4B,MAA5BA,4BAA4B;IAS5BC,0BAA0B,MAA1BA,0BAA0B;IAe1BC,mBAAmB,MAAnBA,mBAAmB;IAMnBC,mBAAmB,MAAnBA,mBAAmB;;;8DA9KhB,QAAQ;;;;;;;8DACZ,IAAI;;;;;;qBAEC,QAAQ;;;;;;AAQ5B,MAAMC,qBAAqB,GAAG,CAAC,qBAAqB,CAAC,AAAC;AAC/C,MAAMT,sBAAsB,GAAG,CAAC,eAAe,CAAC,AAAC;AAUjD,SAASC,mBAAmB,CACjCS,mBAA2B,EAC3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B,qBAAqB,CAAC,SAAS,EAAET,sBAAsB,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAC/E,EAAE,CACH,CAAC;QACJ,CAAC;QAED,OAAOY,GAAE,EAAA,QAAA,CAACQ,aAAa,CAACV,mBAAmB,EAAEI,eAAe,CAAC,CAAC;IAChE,EAAE,OAAOuC,KAAK,EAAE;QACdC,IAAG,IAAA,CAACD,KAAK,CAAC,CAAC,yCAAyC,EAAE3C,mBAAmB,CAAC,CAAC,CAAC,CAAC;QAC7E,MAAM2C,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
1
+ {"version":3,"sources":["../../../src/utils/mergeGitIgnorePaths.ts"],"sourcesContent":["import crypto from 'crypto';\nimport fs from 'fs';\n\nimport { Log } from '../log';\n\ntype MergeResults = {\n contents: string;\n didClear: boolean;\n didMerge: boolean;\n};\n\nconst generatedHeaderPrefix = `# @generated expo-cli`;\nexport const generatedFooterComment = `# @end expo-cli`;\n\n/**\n * Merge two gitignore files together and add a generated header.\n *\n * @param targetGitIgnorePath\n * @param sourceGitIgnorePath\n *\n * @returns `null` if one of the gitignore files doesn't exist. Otherwise, returns the merged contents.\n */\nexport function mergeGitIgnorePaths(\n targetGitIgnorePath: string,\n sourceGitIgnorePath: string\n): null | MergeResults {\n if (!fs.existsSync(targetGitIgnorePath)) {\n // No gitignore in the project already, no need to merge anything into anything. I guess they\n // are not using git :O\n return null;\n }\n\n if (!fs.existsSync(sourceGitIgnorePath)) {\n // Maybe we don't have a gitignore in the template project\n return null;\n }\n\n const targetGitIgnore = fs.readFileSync(targetGitIgnorePath).toString();\n const sourceGitIgnore = fs.readFileSync(sourceGitIgnorePath).toString();\n const merged = mergeGitIgnoreContents(targetGitIgnore, sourceGitIgnore);\n // Only rewrite the file if it was modified.\n if (merged.contents) {\n fs.writeFileSync(targetGitIgnorePath, merged.contents);\n }\n\n return merged;\n}\n\n/**\n * Get line indexes for the generated section of a gitignore.\n *\n * @param gitIgnore\n */\nfunction getGeneratedSectionIndexes(gitIgnore: string): {\n contents: string[];\n start: number;\n end: number;\n} {\n const contents = gitIgnore.split('\\n');\n const start = contents.findIndex((line) => line.startsWith(generatedHeaderPrefix));\n const end = contents.findIndex((line) => line.startsWith(generatedFooterComment));\n\n return { contents, start, end };\n}\n\n/**\n * Removes the generated section from a gitignore, returns null when nothing can be removed.\n * This sways heavily towards not removing lines unless it's certain that modifications were not made to the gitignore manually.\n *\n * @param gitIgnore\n */\nexport function removeGeneratedGitIgnoreContents(gitIgnore: string): string | null {\n const { contents, start, end } = getGeneratedSectionIndexes(gitIgnore);\n if (start > -1 && end > -1 && start < end) {\n contents.splice(start, end - start + 1);\n // TODO: We could in theory check that the contents we're removing match the hash used in the header,\n // this would ensure that we don't accidentally remove lines that someone added or removed from the generated section.\n return contents.join('\\n');\n }\n return null;\n}\n\n/**\n * Merge the contents of two gitignores together and add a generated header.\n *\n * @param targetGitIgnore contents of the existing gitignore\n * @param sourceGitIgnore contents of the extra gitignore\n */\nexport function mergeGitIgnoreContents(\n targetGitIgnore: string,\n sourceGitIgnore: string\n): MergeResults {\n const header = createGeneratedHeaderComment(sourceGitIgnore);\n if (!targetGitIgnore.includes(header)) {\n // Ensure the old generated gitignore contents are removed.\n const sanitizedTarget = removeGeneratedGitIgnoreContents(targetGitIgnore);\n return {\n contents: [\n sanitizedTarget ?? targetGitIgnore,\n header,\n `# The following patterns were generated by expo-cli`,\n ``,\n sourceGitIgnore,\n generatedFooterComment,\n ].join('\\n'),\n didMerge: true,\n didClear: !!sanitizedTarget,\n };\n }\n return { contents: targetGitIgnore, didClear: false, didMerge: false };\n}\n\n/**\n * Adds the contents into an existing gitignore \"generated by expo-cli section\"\n * If no section exists, it will be created (hence the name upsert)\n */\nexport function upsertGitIgnoreContents(\n targetGitIgnorePath: string,\n contents: string\n): MergeResults | null {\n const targetGitIgnore = fs.readFileSync(targetGitIgnorePath, {\n encoding: 'utf-8',\n flag: 'a+',\n });\n\n if (targetGitIgnore.match(new RegExp(`^${contents}[\\\\n\\\\r\\\\s]*$`, 'm'))) {\n return null;\n }\n\n // If there is an existing section, update it with the new content\n if (targetGitIgnore.includes(generatedHeaderPrefix)) {\n const indexes = getGeneratedSectionIndexes(targetGitIgnore);\n\n contents = `${indexes.contents.slice(indexes.start + 3, indexes.end).join('\\n')}\\n${contents}`;\n }\n\n const merged = mergeGitIgnoreContents(targetGitIgnore, contents);\n\n if (merged.contents) {\n fs.writeFileSync(targetGitIgnorePath, merged.contents);\n }\n return merged;\n}\n\nexport function createGeneratedHeaderComment(gitIgnore: string): string {\n const hashKey = createGitIgnoreHash(getSanitizedGitIgnoreLines(gitIgnore).join('\\n'));\n\n return `${generatedHeaderPrefix} ${hashKey}`;\n}\n\n/**\n * Normalize the contents of a gitignore to ensure that minor changes like new lines or sort order don't cause a regeneration.\n */\nexport function getSanitizedGitIgnoreLines(gitIgnore: string): string[] {\n // filter, trim, and sort the lines.\n return gitIgnore\n .split('\\n')\n .filter((v) => {\n const line = v.trim();\n // Strip comments\n if (line.startsWith('#')) {\n return false;\n }\n return !!line;\n })\n .sort();\n}\n\nexport function createGitIgnoreHash(gitIgnore: string): string {\n // this doesn't need to be secure, the shorter the better.\n const hash = crypto.createHash('sha1').update(gitIgnore).digest('hex');\n return `sync-${hash}`;\n}\n\nexport function removeFromGitIgnore(targetGitIgnorePath: string, contents: string) {\n try {\n if (!fs.existsSync(targetGitIgnorePath)) {\n return;\n }\n\n let targetGitIgnore = fs.readFileSync(targetGitIgnorePath, 'utf-8');\n\n if (!targetGitIgnore.includes(contents)) {\n return null;\n }\n\n targetGitIgnore = targetGitIgnore.replace(`${contents}\\n`, '');\n\n const indexes = getGeneratedSectionIndexes(targetGitIgnore);\n\n if (indexes.start === indexes.end - 3) {\n targetGitIgnore = targetGitIgnore.replace(\n new RegExp(`^${generatedHeaderPrefix}((.|\\n)*)${generatedFooterComment}$`, 'm'),\n ''\n );\n }\n\n return fs.writeFileSync(targetGitIgnorePath, targetGitIgnore);\n } catch (error) {\n Log.error(`Failed to read/write to .gitignore path: ${targetGitIgnorePath}`);\n throw error;\n }\n}\n"],"names":["createGeneratedHeaderComment","createGitIgnoreHash","generatedFooterComment","getSanitizedGitIgnoreLines","mergeGitIgnoreContents","mergeGitIgnorePaths","removeFromGitIgnore","removeGeneratedGitIgnoreContents","upsertGitIgnoreContents","generatedHeaderPrefix","targetGitIgnorePath","sourceGitIgnorePath","fs","existsSync","targetGitIgnore","readFileSync","toString","sourceGitIgnore","merged","contents","writeFileSync","getGeneratedSectionIndexes","gitIgnore","split","start","findIndex","line","startsWith","end","splice","join","header","includes","sanitizedTarget","didMerge","didClear","encoding","flag","match","RegExp","indexes","slice","hashKey","filter","v","trim","sort","hash","crypto","createHash","update","digest","replace","error","Log"],"mappings":";;;;;;;;;;;IAgJgBA,4BAA4B;eAA5BA;;IAwBAC,mBAAmB;eAAnBA;;IA5JHC,sBAAsB;eAAtBA;;IA6IGC,0BAA0B;eAA1BA;;IAjEAC,sBAAsB;eAAtBA;;IAlEAC,mBAAmB;eAAnBA;;IAwJAC,mBAAmB;eAAnBA;;IAvGAC,gCAAgC;eAAhCA;;IA6CAC,uBAAuB;eAAvBA;;;;gEApHG;;;;;;;gEACJ;;;;;;qBAEK;;;;;;AAQpB,MAAMC,wBAAwB,CAAC,qBAAqB,CAAC;AAC9C,MAAMP,yBAAyB,CAAC,eAAe,CAAC;AAUhD,SAASG,oBACdK,mBAA2B,EAC3BC,mBAA2B;IAE3B,IAAI,CAACC,aAAE,CAACC,UAAU,CAACH,sBAAsB;QACvC,6FAA6F;QAC7F,uBAAuB;QACvB,OAAO;IACT;IAEA,IAAI,CAACE,aAAE,CAACC,UAAU,CAACF,sBAAsB;QACvC,0DAA0D;QAC1D,OAAO;IACT;IAEA,MAAMG,kBAAkBF,aAAE,CAACG,YAAY,CAACL,qBAAqBM,QAAQ;IACrE,MAAMC,kBAAkBL,aAAE,CAACG,YAAY,CAACJ,qBAAqBK,QAAQ;IACrE,MAAME,SAASd,uBAAuBU,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,UAAU,CAACH,sBAAsB;YACvC;QACF;QAEA,IAAII,kBAAkBF,aAAE,CAACG,YAAY,CAACL,qBAAqB;QAE3D,IAAI,CAACI,gBAAgBkB,QAAQ,CAACb,WAAW;YACvC,OAAO;QACT;QAEAL,kBAAkBA,gBAAgBsC,OAAO,CAAC,GAAGjC,SAAS,EAAE,CAAC,EAAE;QAE3D,MAAMqB,UAAUnB,2BAA2BP;QAE3C,IAAI0B,QAAQhB,KAAK,KAAKgB,QAAQZ,GAAG,GAAG,GAAG;YACrCd,kBAAkBA,gBAAgBsC,OAAO,CACvC,IAAIb,OAAO,CAAC,CAAC,EAAE9B,sBAAsB,SAAS,EAAEP,uBAAuB,CAAC,CAAC,EAAE,MAC3E;QAEJ;QAEA,OAAOU,aAAE,CAACQ,aAAa,CAACV,qBAAqBI;IAC/C,EAAE,OAAOuC,OAAO;QACdC,QAAG,CAACD,KAAK,CAAC,CAAC,yCAAyC,EAAE3C,qBAAqB;QAC3E,MAAM2C;IACR;AACF"}
@@ -9,8 +9,12 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- attemptModification: ()=>attemptModification,
13
- warnAboutConfigAndThrow: ()=>warnAboutConfigAndThrow
12
+ attemptModification: function() {
13
+ return attemptModification;
14
+ },
15
+ warnAboutConfigAndThrow: function() {
16
+ return warnAboutConfigAndThrow;
17
+ }
14
18
  });
15
19
  function _config() {
16
20
  const data = require("@expo/config");
@@ -20,15 +24,15 @@ function _config() {
20
24
  return data;
21
25
  }
22
26
  function _chalk() {
23
- const data = /*#__PURE__*/ _interopRequireDefault(require("chalk"));
27
+ const data = /*#__PURE__*/ _interop_require_default(require("chalk"));
24
28
  _chalk = function() {
25
29
  return data;
26
30
  };
27
31
  return data;
28
32
  }
29
33
  const _errors = require("./errors");
30
- const _log = /*#__PURE__*/ _interopRequireWildcard(require("../log"));
31
- function _interopRequireDefault(obj) {
34
+ const _log = /*#__PURE__*/ _interop_require_wildcard(require("../log"));
35
+ function _interop_require_default(obj) {
32
36
  return obj && obj.__esModule ? obj : {
33
37
  default: obj
34
38
  };
@@ -41,7 +45,7 @@ function _getRequireWildcardCache(nodeInterop) {
41
45
  return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
42
46
  })(nodeInterop);
43
47
  }
44
- function _interopRequireWildcard(obj, nodeInterop) {
48
+ function _interop_require_wildcard(obj, nodeInterop) {
45
49
  if (!nodeInterop && obj && obj.__esModule) {
46
50
  return obj;
47
51
  }
@@ -54,7 +58,9 @@ function _interopRequireWildcard(obj, nodeInterop) {
54
58
  if (cache && cache.has(obj)) {
55
59
  return cache.get(obj);
56
60
  }
57
- var newObj = {};
61
+ var newObj = {
62
+ __proto__: null
63
+ };
58
64
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
59
65
  for(var key in obj){
60
66
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -76,14 +82,14 @@ async function attemptModification(projectRoot, edits, exactEdits) {
76
82
  const modification = await (0, _config().modifyConfigAsync)(projectRoot, edits, {
77
83
  skipSDKVersionRequirement: true
78
84
  });
79
- if (modification.type !== "success") {
85
+ if (modification.type !== 'success') {
80
86
  warnAboutConfigAndThrow(modification.type, modification.message, exactEdits);
81
87
  }
82
- return modification.type === "success";
88
+ return modification.type === 'success';
83
89
  }
84
90
  function warnAboutConfigAndThrow(type, message, edits) {
85
91
  _log.log();
86
- if (type === "warn") {
92
+ if (type === 'warn') {
87
93
  // The project is using a dynamic config, give the user a helpful log and bail out.
88
94
  _log.log(_chalk().default.yellow(message));
89
95
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/modifyConfigAsync.ts"],"sourcesContent":["import { ExpoConfig, modifyConfigAsync } from '@expo/config';\nimport chalk from 'chalk';\n\nimport { SilentError } from './errors';\nimport * as Log from '../log';\n\n/** Wraps `[@expo/config] modifyConfigAsync()` and adds additional logging. */\nexport async function attemptModification(\n projectRoot: string,\n edits: Partial<ExpoConfig>,\n exactEdits: Partial<ExpoConfig>\n): Promise<boolean> {\n const modification = await modifyConfigAsync(projectRoot, edits, {\n skipSDKVersionRequirement: true,\n });\n if (modification.type !== 'success') {\n warnAboutConfigAndThrow(modification.type, modification.message!, exactEdits);\n }\n return modification.type === 'success';\n}\n\nexport function warnAboutConfigAndThrow(type: string, message: string, edits: Partial<ExpoConfig>) {\n Log.log();\n if (type === 'warn') {\n // The project is using a dynamic config, give the user a helpful log and bail out.\n Log.log(chalk.yellow(message));\n }\n notifyAboutManualConfigEdits(edits);\n throw new SilentError();\n}\n\nfunction notifyAboutManualConfigEdits(edits: Partial<ExpoConfig>) {\n Log.log(chalk.cyan(`Please add the following to your Expo config`));\n Log.log();\n Log.log(JSON.stringify(edits, null, 2));\n Log.log();\n}\n"],"names":["attemptModification","warnAboutConfigAndThrow","projectRoot","edits","exactEdits","modification","modifyConfigAsync","skipSDKVersionRequirement","type","message","Log","log","chalk","yellow","notifyAboutManualConfigEdits","SilentError","cyan","JSON","stringify"],"mappings":"AAAA;;;;;;;;;;;IAOsBA,mBAAmB,MAAnBA,mBAAmB;IAczBC,uBAAuB,MAAvBA,uBAAuB;;;yBArBO,cAAc;;;;;;;8DAC1C,OAAO;;;;;;wBAEG,UAAU;2DACjB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtB,eAAeD,mBAAmB,CACvCE,WAAmB,EACnBC,KAA0B,EAC1BC,UAA+B,EACb;IAClB,MAAMC,YAAY,GAAG,MAAMC,IAAAA,OAAiB,EAAA,kBAAA,EAACJ,WAAW,EAAEC,KAAK,EAAE;QAC/DI,yBAAyB,EAAE,IAAI;KAChC,CAAC,AAAC;IACH,IAAIF,YAAY,CAACG,IAAI,KAAK,SAAS,EAAE;QACnCP,uBAAuB,CAACI,YAAY,CAACG,IAAI,EAAEH,YAAY,CAACI,OAAO,EAAGL,UAAU,CAAC,CAAC;IAChF,CAAC;IACD,OAAOC,YAAY,CAACG,IAAI,KAAK,SAAS,CAAC;AACzC,CAAC;AAEM,SAASP,uBAAuB,CAACO,IAAY,EAAEC,OAAe,EAAEN,KAA0B,EAAE;IACjGO,IAAG,CAACC,GAAG,EAAE,CAAC;IACV,IAAIH,IAAI,KAAK,MAAM,EAAE;QACnB,mFAAmF;QACnFE,IAAG,CAACC,GAAG,CAACC,MAAK,EAAA,QAAA,CAACC,MAAM,CAACJ,OAAO,CAAC,CAAC,CAAC;IACjC,CAAC;IACDK,4BAA4B,CAACX,KAAK,CAAC,CAAC;IACpC,MAAM,IAAIY,OAAW,YAAA,EAAE,CAAC;AAC1B,CAAC;AAED,SAASD,4BAA4B,CAACX,KAA0B,EAAE;IAChEO,IAAG,CAACC,GAAG,CAACC,MAAK,EAAA,QAAA,CAACI,IAAI,CAAC,CAAC,4CAA4C,CAAC,CAAC,CAAC,CAAC;IACpEN,IAAG,CAACC,GAAG,EAAE,CAAC;IACVD,IAAG,CAACC,GAAG,CAACM,IAAI,CAACC,SAAS,CAACf,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACxCO,IAAG,CAACC,GAAG,EAAE,CAAC;AACZ,CAAC"}
1
+ {"version":3,"sources":["../../../src/utils/modifyConfigAsync.ts"],"sourcesContent":["import { ExpoConfig, modifyConfigAsync } from '@expo/config';\nimport chalk from 'chalk';\n\nimport { SilentError } from './errors';\nimport * as Log from '../log';\n\n/** Wraps `[@expo/config] modifyConfigAsync()` and adds additional logging. */\nexport async function attemptModification(\n projectRoot: string,\n edits: Partial<ExpoConfig>,\n exactEdits: Partial<ExpoConfig>\n): Promise<boolean> {\n const modification = await modifyConfigAsync(projectRoot, edits, {\n skipSDKVersionRequirement: true,\n });\n if (modification.type !== 'success') {\n warnAboutConfigAndThrow(modification.type, modification.message!, exactEdits);\n }\n return modification.type === 'success';\n}\n\nexport function warnAboutConfigAndThrow(type: string, message: string, edits: Partial<ExpoConfig>) {\n Log.log();\n if (type === 'warn') {\n // The project is using a dynamic config, give the user a helpful log and bail out.\n Log.log(chalk.yellow(message));\n }\n notifyAboutManualConfigEdits(edits);\n throw new SilentError();\n}\n\nfunction notifyAboutManualConfigEdits(edits: Partial<ExpoConfig>) {\n Log.log(chalk.cyan(`Please add the following to your Expo config`));\n Log.log();\n Log.log(JSON.stringify(edits, null, 2));\n Log.log();\n}\n"],"names":["attemptModification","warnAboutConfigAndThrow","projectRoot","edits","exactEdits","modification","modifyConfigAsync","skipSDKVersionRequirement","type","message","Log","log","chalk","yellow","notifyAboutManualConfigEdits","SilentError","cyan","JSON","stringify"],"mappings":";;;;;;;;;;;IAOsBA,mBAAmB;eAAnBA;;IAcNC,uBAAuB;eAAvBA;;;;yBArB8B;;;;;;;gEAC5B;;;;;;wBAEU;6DACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGd,eAAeD,oBACpBE,WAAmB,EACnBC,KAA0B,EAC1BC,UAA+B;IAE/B,MAAMC,eAAe,MAAMC,IAAAA,2BAAiB,EAACJ,aAAaC,OAAO;QAC/DI,2BAA2B;IAC7B;IACA,IAAIF,aAAaG,IAAI,KAAK,WAAW;QACnCP,wBAAwBI,aAAaG,IAAI,EAAEH,aAAaI,OAAO,EAAGL;IACpE;IACA,OAAOC,aAAaG,IAAI,KAAK;AAC/B;AAEO,SAASP,wBAAwBO,IAAY,EAAEC,OAAe,EAAEN,KAA0B;IAC/FO,KAAIC,GAAG;IACP,IAAIH,SAAS,QAAQ;QACnB,mFAAmF;QACnFE,KAAIC,GAAG,CAACC,gBAAK,CAACC,MAAM,CAACJ;IACvB;IACAK,6BAA6BX;IAC7B,MAAM,IAAIY,mBAAW;AACvB;AAEA,SAASD,6BAA6BX,KAA0B;IAC9DO,KAAIC,GAAG,CAACC,gBAAK,CAACI,IAAI,CAAC,CAAC,4CAA4C,CAAC;IACjEN,KAAIC,GAAG;IACPD,KAAIC,GAAG,CAACM,KAAKC,SAAS,CAACf,OAAO,MAAM;IACpCO,KAAIC,GAAG;AACT"}
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "attemptAddingPluginsAsync", {
6
6
  enumerable: true,
7
- get: ()=>attemptAddingPluginsAsync
7
+ get: function() {
8
+ return attemptAddingPluginsAsync;
9
+ }
8
10
  });
9
11
  function _config() {
10
12
  const data = require("@expo/config");
@@ -14,7 +16,7 @@ function _config() {
14
16
  return data;
15
17
  }
16
18
  const _modifyConfigAsync = require("./modifyConfigAsync");
17
- const _log = /*#__PURE__*/ _interopRequireWildcard(require("../log"));
19
+ const _log = /*#__PURE__*/ _interop_require_wildcard(require("../log"));
18
20
  function _getRequireWildcardCache(nodeInterop) {
19
21
  if (typeof WeakMap !== "function") return null;
20
22
  var cacheBabelInterop = new WeakMap();
@@ -23,7 +25,7 @@ function _getRequireWildcardCache(nodeInterop) {
23
25
  return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
24
26
  })(nodeInterop);
25
27
  }
26
- function _interopRequireWildcard(obj, nodeInterop) {
28
+ function _interop_require_wildcard(obj, nodeInterop) {
27
29
  if (!nodeInterop && obj && obj.__esModule) {
28
30
  return obj;
29
31
  }
@@ -36,7 +38,9 @@ function _interopRequireWildcard(obj, nodeInterop) {
36
38
  if (cache && cache.has(obj)) {
37
39
  return cache.get(obj);
38
40
  }
39
- var newObj = {};
41
+ var newObj = {
42
+ __proto__: null
43
+ };
40
44
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
41
45
  for(var key in obj){
42
46
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -62,8 +66,8 @@ async function attemptAddingPluginsAsync(projectRoot, plugins) {
62
66
  skipSDKVersionRequirement: true,
63
67
  skipPlugins: true
64
68
  });
65
- if (modification.type === "success") {
66
- _log.log(`\u203A Added config plugin${plugins.length === 1 ? "" : "s"}: ${plugins.join(", ")}`);
69
+ if (modification.type === 'success') {
70
+ _log.log(`\u203A Added config plugin${plugins.length === 1 ? '' : 's'}: ${plugins.join(', ')}`);
67
71
  } else {
68
72
  const exactEdits = {
69
73
  plugins
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/modifyConfigPlugins.ts"],"sourcesContent":["import { modifyConfigAsync } from '@expo/config';\n\nimport { warnAboutConfigAndThrow } from './modifyConfigAsync';\nimport * as Log from '../log';\n\nexport async function attemptAddingPluginsAsync(\n projectRoot: string,\n plugins: string[]\n): Promise<void> {\n if (!plugins.length) return;\n\n const modification = await modifyConfigAsync(\n projectRoot,\n { plugins },\n {\n skipSDKVersionRequirement: true,\n skipPlugins: true,\n }\n );\n if (modification.type === 'success') {\n Log.log(`\\u203A Added config plugin${plugins.length === 1 ? '' : 's'}: ${plugins.join(', ')}`);\n } else {\n const exactEdits = {\n plugins,\n };\n warnAboutConfigAndThrow(modification.type, modification.message!, exactEdits);\n }\n}\n"],"names":["attemptAddingPluginsAsync","projectRoot","plugins","length","modification","modifyConfigAsync","skipSDKVersionRequirement","skipPlugins","type","Log","log","join","exactEdits","warnAboutConfigAndThrow","message"],"mappings":"AAAA;;;;+BAKsBA,2BAAyB;;aAAzBA,yBAAyB;;;yBALb,cAAc;;;;;;mCAER,qBAAqB;2DACxC,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtB,eAAeA,yBAAyB,CAC7CC,WAAmB,EACnBC,OAAiB,EACF;IACf,IAAI,CAACA,OAAO,CAACC,MAAM,EAAE,OAAO;IAE5B,MAAMC,YAAY,GAAG,MAAMC,IAAAA,OAAiB,EAAA,kBAAA,EAC1CJ,WAAW,EACX;QAAEC,OAAO;KAAE,EACX;QACEI,yBAAyB,EAAE,IAAI;QAC/BC,WAAW,EAAE,IAAI;KAClB,CACF,AAAC;IACF,IAAIH,YAAY,CAACI,IAAI,KAAK,SAAS,EAAE;QACnCC,IAAG,CAACC,GAAG,CAAC,CAAC,0BAA0B,EAAER,OAAO,CAACC,MAAM,KAAK,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,EAAE,EAAED,OAAO,CAACS,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACjG,OAAO;QACL,MAAMC,UAAU,GAAG;YACjBV,OAAO;SACR,AAAC;QACFW,IAAAA,kBAAuB,wBAAA,EAACT,YAAY,CAACI,IAAI,EAAEJ,YAAY,CAACU,OAAO,EAAGF,UAAU,CAAC,CAAC;IAChF,CAAC;AACH,CAAC"}
1
+ {"version":3,"sources":["../../../src/utils/modifyConfigPlugins.ts"],"sourcesContent":["import { modifyConfigAsync } from '@expo/config';\n\nimport { warnAboutConfigAndThrow } from './modifyConfigAsync';\nimport * as Log from '../log';\n\nexport async function attemptAddingPluginsAsync(\n projectRoot: string,\n plugins: string[]\n): Promise<void> {\n if (!plugins.length) return;\n\n const modification = await modifyConfigAsync(\n projectRoot,\n { plugins },\n {\n skipSDKVersionRequirement: true,\n skipPlugins: true,\n }\n );\n if (modification.type === 'success') {\n Log.log(`\\u203A Added config plugin${plugins.length === 1 ? '' : 's'}: ${plugins.join(', ')}`);\n } else {\n const exactEdits = {\n plugins,\n };\n warnAboutConfigAndThrow(modification.type, modification.message!, exactEdits);\n }\n}\n"],"names":["attemptAddingPluginsAsync","projectRoot","plugins","length","modification","modifyConfigAsync","skipSDKVersionRequirement","skipPlugins","type","Log","log","join","exactEdits","warnAboutConfigAndThrow","message"],"mappings":";;;;+BAKsBA;;;eAAAA;;;;yBALY;;;;;;mCAEM;6DACnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,eAAeA,0BACpBC,WAAmB,EACnBC,OAAiB;IAEjB,IAAI,CAACA,QAAQC,MAAM,EAAE;IAErB,MAAMC,eAAe,MAAMC,IAAAA,2BAAiB,EAC1CJ,aACA;QAAEC;IAAQ,GACV;QACEI,2BAA2B;QAC3BC,aAAa;IACf;IAEF,IAAIH,aAAaI,IAAI,KAAK,WAAW;QACnCC,KAAIC,GAAG,CAAC,CAAC,0BAA0B,EAAER,QAAQC,MAAM,KAAK,IAAI,KAAK,IAAI,EAAE,EAAED,QAAQS,IAAI,CAAC,OAAO;IAC/F,OAAO;QACL,MAAMC,aAAa;YACjBV;QACF;QACAW,IAAAA,0CAAuB,EAACT,aAAaI,IAAI,EAAEJ,aAAaU,OAAO,EAAGF;IACpE;AACF"}
@@ -4,23 +4,25 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "encodeMultipartMixed", {
6
6
  enumerable: true,
7
- get: ()=>encodeMultipartMixed
7
+ get: function() {
8
+ return encodeMultipartMixed;
9
+ }
8
10
  });
9
- function _nodeCrypto() {
11
+ function _nodecrypto() {
10
12
  const data = require("node:crypto");
11
- _nodeCrypto = function() {
13
+ _nodecrypto = function() {
12
14
  return data;
13
15
  };
14
16
  return data;
15
17
  }
16
- const CRLF = "\r\n";
17
- const BOUNDARY_HYPHEN_CHARACTERS = "-".repeat(2);
18
+ const CRLF = '\r\n';
19
+ const BOUNDARY_HYPHEN_CHARACTERS = '-'.repeat(2);
18
20
  const getFormHeader = (boundary, field)=>{
19
21
  let header = `${BOUNDARY_HYPHEN_CHARACTERS}${boundary}${CRLF}`;
20
22
  header += `Content-Disposition: form-data; name="${field.name}"`;
21
- if (typeof field.value !== "string") {
22
- header += `; filename="${field.value.name ?? "blob"}"${CRLF}`;
23
- header += `Content-Type: ${field.value.type || "application/octet-stream"}`;
23
+ if (typeof field.value !== 'string') {
24
+ header += `; filename="${field.value.name ?? 'blob'}"${CRLF}`;
25
+ header += `Content-Type: ${field.value.type || 'application/octet-stream'}`;
24
26
  } else if (field.contentType) {
25
27
  header += `${CRLF}Content-Type: ${field.contentType}`;
26
28
  }
@@ -33,10 +35,10 @@ const getFormHeader = (boundary, field)=>{
33
35
  };
34
36
  const getFormFooter = (boundary)=>`${BOUNDARY_HYPHEN_CHARACTERS}${boundary}${BOUNDARY_HYPHEN_CHARACTERS}${CRLF}${CRLF}`;
35
37
  async function encodeMultipartMixed(fields) {
36
- const boundary = `formdata-${(0, _nodeCrypto().randomBytes)(8).toString("hex")}`;
37
- let body = "";
38
+ const boundary = `formdata-${(0, _nodecrypto().randomBytes)(8).toString('hex')}`;
39
+ let body = '';
38
40
  for (const field of fields){
39
- if (typeof field.value !== "string") {
41
+ if (typeof field.value !== 'string') {
40
42
  body += getFormHeader(boundary, field);
41
43
  body += await field.value.text();
42
44
  body += CRLF;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/multipartMixed.ts"],"sourcesContent":["import { randomBytes } from 'node:crypto';\n\nexport interface FormDataField {\n name: string;\n value: string | File | Blob;\n contentType?: string | null;\n partHeaders?: Record<string, string> | null;\n}\n\nexport interface EncodedFormData {\n boundary: string;\n body: string;\n}\n\nconst CRLF = '\\r\\n';\nconst BOUNDARY_HYPHEN_CHARACTERS = '-'.repeat(2);\n\nconst getFormHeader = (boundary: string, field: FormDataField): string => {\n let header = `${BOUNDARY_HYPHEN_CHARACTERS}${boundary}${CRLF}`;\n header += `Content-Disposition: form-data; name=\"${field.name}\"`;\n if (typeof field.value !== 'string') {\n header += `; filename=\"${(field.value as File).name ?? 'blob'}\"${CRLF}`;\n header += `Content-Type: ${field.value.type || 'application/octet-stream'}`;\n } else if (field.contentType) {\n header += `${CRLF}Content-Type: ${field.contentType}`;\n }\n if (field.partHeaders) {\n for (const headerName in field.partHeaders) {\n header += `${CRLF}${headerName}: ${field.partHeaders[headerName]}`;\n }\n }\n return `${header}${CRLF}${CRLF}`;\n};\n\nconst getFormFooter = (boundary: string) =>\n `${BOUNDARY_HYPHEN_CHARACTERS}${boundary}${BOUNDARY_HYPHEN_CHARACTERS}${CRLF}${CRLF}`;\n\nexport async function encodeMultipartMixed(fields: FormDataField[]): Promise<EncodedFormData> {\n const boundary = `formdata-${randomBytes(8).toString('hex')}`;\n let body = '';\n for (const field of fields) {\n if (typeof field.value !== 'string') {\n body += getFormHeader(boundary, field);\n body += await field.value.text();\n body += CRLF;\n } else {\n body += getFormHeader(boundary, field) + field.value + CRLF;\n }\n }\n body += getFormFooter(boundary);\n return { boundary, body };\n}\n"],"names":["encodeMultipartMixed","CRLF","BOUNDARY_HYPHEN_CHARACTERS","repeat","getFormHeader","boundary","field","header","name","value","type","contentType","partHeaders","headerName","getFormFooter","fields","randomBytes","toString","body","text"],"mappings":"AAAA;;;;+BAqCsBA,sBAAoB;;aAApBA,oBAAoB;;;yBArCd,aAAa;;;;;;AAczC,MAAMC,IAAI,GAAG,MAAM,AAAC;AACpB,MAAMC,0BAA0B,GAAG,GAAG,CAACC,MAAM,CAAC,CAAC,CAAC,AAAC;AAEjD,MAAMC,aAAa,GAAG,CAACC,QAAgB,EAAEC,KAAoB,GAAa;IACxE,IAAIC,MAAM,GAAG,CAAC,EAAEL,0BAA0B,CAAC,EAAEG,QAAQ,CAAC,EAAEJ,IAAI,CAAC,CAAC,AAAC;IAC/DM,MAAM,IAAI,CAAC,sCAAsC,EAAED,KAAK,CAACE,IAAI,CAAC,CAAC,CAAC,CAAC;IACjE,IAAI,OAAOF,KAAK,CAACG,KAAK,KAAK,QAAQ,EAAE;QACnCF,MAAM,IAAI,CAAC,YAAY,EAAE,AAACD,KAAK,CAACG,KAAK,CAAUD,IAAI,IAAI,MAAM,CAAC,CAAC,EAAEP,IAAI,CAAC,CAAC,CAAC;QACxEM,MAAM,IAAI,CAAC,cAAc,EAAED,KAAK,CAACG,KAAK,CAACC,IAAI,IAAI,0BAA0B,CAAC,CAAC,CAAC;IAC9E,OAAO,IAAIJ,KAAK,CAACK,WAAW,EAAE;QAC5BJ,MAAM,IAAI,CAAC,EAAEN,IAAI,CAAC,cAAc,EAAEK,KAAK,CAACK,WAAW,CAAC,CAAC,CAAC;IACxD,CAAC;IACD,IAAIL,KAAK,CAACM,WAAW,EAAE;QACrB,IAAK,MAAMC,UAAU,IAAIP,KAAK,CAACM,WAAW,CAAE;YAC1CL,MAAM,IAAI,CAAC,EAAEN,IAAI,CAAC,EAAEY,UAAU,CAAC,EAAE,EAAEP,KAAK,CAACM,WAAW,CAACC,UAAU,CAAC,CAAC,CAAC,CAAC;QACrE,CAAC;IACH,CAAC;IACD,OAAO,CAAC,EAAEN,MAAM,CAAC,EAAEN,IAAI,CAAC,EAAEA,IAAI,CAAC,CAAC,CAAC;AACnC,CAAC,AAAC;AAEF,MAAMa,aAAa,GAAG,CAACT,QAAgB,GACrC,CAAC,EAAEH,0BAA0B,CAAC,EAAEG,QAAQ,CAAC,EAAEH,0BAA0B,CAAC,EAAED,IAAI,CAAC,EAAEA,IAAI,CAAC,CAAC,AAAC;AAEjF,eAAeD,oBAAoB,CAACe,MAAuB,EAA4B;IAC5F,MAAMV,QAAQ,GAAG,CAAC,SAAS,EAAEW,IAAAA,WAAW,EAAA,YAAA,EAAC,CAAC,CAAC,CAACC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,AAAC;IAC9D,IAAIC,IAAI,GAAG,EAAE,AAAC;IACd,KAAK,MAAMZ,KAAK,IAAIS,MAAM,CAAE;QAC1B,IAAI,OAAOT,KAAK,CAACG,KAAK,KAAK,QAAQ,EAAE;YACnCS,IAAI,IAAId,aAAa,CAACC,QAAQ,EAAEC,KAAK,CAAC,CAAC;YACvCY,IAAI,IAAI,MAAMZ,KAAK,CAACG,KAAK,CAACU,IAAI,EAAE,CAAC;YACjCD,IAAI,IAAIjB,IAAI,CAAC;QACf,OAAO;YACLiB,IAAI,IAAId,aAAa,CAACC,QAAQ,EAAEC,KAAK,CAAC,GAAGA,KAAK,CAACG,KAAK,GAAGR,IAAI,CAAC;QAC9D,CAAC;IACH,CAAC;IACDiB,IAAI,IAAIJ,aAAa,CAACT,QAAQ,CAAC,CAAC;IAChC,OAAO;QAAEA,QAAQ;QAAEa,IAAI;KAAE,CAAC;AAC5B,CAAC"}
1
+ {"version":3,"sources":["../../../src/utils/multipartMixed.ts"],"sourcesContent":["import { randomBytes } from 'node:crypto';\n\nexport interface FormDataField {\n name: string;\n value: string | File | Blob;\n contentType?: string | null;\n partHeaders?: Record<string, string> | null;\n}\n\nexport interface EncodedFormData {\n boundary: string;\n body: string;\n}\n\nconst CRLF = '\\r\\n';\nconst BOUNDARY_HYPHEN_CHARACTERS = '-'.repeat(2);\n\nconst getFormHeader = (boundary: string, field: FormDataField): string => {\n let header = `${BOUNDARY_HYPHEN_CHARACTERS}${boundary}${CRLF}`;\n header += `Content-Disposition: form-data; name=\"${field.name}\"`;\n if (typeof field.value !== 'string') {\n header += `; filename=\"${(field.value as File).name ?? 'blob'}\"${CRLF}`;\n header += `Content-Type: ${field.value.type || 'application/octet-stream'}`;\n } else if (field.contentType) {\n header += `${CRLF}Content-Type: ${field.contentType}`;\n }\n if (field.partHeaders) {\n for (const headerName in field.partHeaders) {\n header += `${CRLF}${headerName}: ${field.partHeaders[headerName]}`;\n }\n }\n return `${header}${CRLF}${CRLF}`;\n};\n\nconst getFormFooter = (boundary: string) =>\n `${BOUNDARY_HYPHEN_CHARACTERS}${boundary}${BOUNDARY_HYPHEN_CHARACTERS}${CRLF}${CRLF}`;\n\nexport async function encodeMultipartMixed(fields: FormDataField[]): Promise<EncodedFormData> {\n const boundary = `formdata-${randomBytes(8).toString('hex')}`;\n let body = '';\n for (const field of fields) {\n if (typeof field.value !== 'string') {\n body += getFormHeader(boundary, field);\n body += await field.value.text();\n body += CRLF;\n } else {\n body += getFormHeader(boundary, field) + field.value + CRLF;\n }\n }\n body += getFormFooter(boundary);\n return { boundary, body };\n}\n"],"names":["encodeMultipartMixed","CRLF","BOUNDARY_HYPHEN_CHARACTERS","repeat","getFormHeader","boundary","field","header","name","value","type","contentType","partHeaders","headerName","getFormFooter","fields","randomBytes","toString","body","text"],"mappings":";;;;+BAqCsBA;;;eAAAA;;;;yBArCM;;;;;;AAc5B,MAAMC,OAAO;AACb,MAAMC,6BAA6B,IAAIC,MAAM,CAAC;AAE9C,MAAMC,gBAAgB,CAACC,UAAkBC;IACvC,IAAIC,SAAS,GAAGL,6BAA6BG,WAAWJ,MAAM;IAC9DM,UAAU,CAAC,sCAAsC,EAAED,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() {
13
+ return loadEnvFiles;
14
+ },
15
+ setNodeEnv: function() {
16
+ return setNodeEnv;
17
+ }
14
18
  });
15
19
  function _env() {
16
- const data = /*#__PURE__*/ _interopRequireWildcard(require("@expo/env"));
20
+ const data = /*#__PURE__*/ _interop_require_wildcard(require("@expo/env"));
17
21
  _env = function() {
18
22
  return data;
19
23
  };
@@ -27,7 +31,7 @@ function _getRequireWildcardCache(nodeInterop) {
27
31
  return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
28
32
  })(nodeInterop);
29
33
  }
30
- function _interopRequireWildcard(obj, nodeInterop) {
34
+ function _interop_require_wildcard(obj, nodeInterop) {
31
35
  if (!nodeInterop && obj && obj.__esModule) {
32
36
  return obj;
33
37
  }
@@ -40,7 +44,9 @@ function _interopRequireWildcard(obj, nodeInterop) {
40
44
  if (cache && cache.has(obj)) {
41
45
  return cache.get(obj);
42
46
  }
43
- var newObj = {};
47
+ var newObj = {
48
+ __proto__: null
49
+ };
44
50
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
45
51
  for(var key in obj){
46
52
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -62,7 +68,7 @@ function setNodeEnv(mode) {
62
68
  process.env.NODE_ENV = process.env.NODE_ENV || mode;
63
69
  process.env.BABEL_ENV = process.env.BABEL_ENV || process.env.NODE_ENV;
64
70
  // @ts-expect-error: Add support for external React libraries being loaded in the same process.
65
- globalThis.__DEV__ = process.env.NODE_ENV !== "production";
71
+ globalThis.__DEV__ = process.env.NODE_ENV !== 'production';
66
72
  }
67
73
  function loadEnvFiles(projectRoot, options) {
68
74
  return _env().load(projectRoot, options);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/nodeEnv.ts"],"sourcesContent":["import * as env from '@expo/env';\n\n/**\n * Set the environment to production or development\n * lots of tools use this to determine if they should run in a dev mode.\n */\nexport function setNodeEnv(mode: 'development' | 'production') {\n process.env.NODE_ENV = process.env.NODE_ENV || mode;\n process.env.BABEL_ENV = process.env.BABEL_ENV || process.env.NODE_ENV;\n\n // @ts-expect-error: Add support for external React libraries being loaded in the same process.\n globalThis.__DEV__ = process.env.NODE_ENV !== 'production';\n}\n\n/**\n * Load the dotenv files into the current `process.env` scope.\n * Note, this requires `NODE_ENV` being set through `setNodeEnv`.\n */\nexport function loadEnvFiles(projectRoot: string, options?: Parameters<typeof env.load>[1]) {\n return env.load(projectRoot, options);\n}\n"],"names":["setNodeEnv","loadEnvFiles","mode","process","env","NODE_ENV","BABEL_ENV","globalThis","__DEV__","projectRoot","options","load"],"mappings":"AAAA;;;;;;;;;;;IAMgBA,UAAU,MAAVA,UAAU;IAYVC,YAAY,MAAZA,YAAY;;;+DAlBP,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMzB,SAASD,UAAU,CAACE,IAAkC,EAAE;IAC7DC,OAAO,CAACC,GAAG,CAACC,QAAQ,GAAGF,OAAO,CAACC,GAAG,CAACC,QAAQ,IAAIH,IAAI,CAAC;IACpDC,OAAO,CAACC,GAAG,CAACE,SAAS,GAAGH,OAAO,CAACC,GAAG,CAACE,SAAS,IAAIH,OAAO,CAACC,GAAG,CAACC,QAAQ,CAAC;IAEtE,+FAA+F;IAC/FE,UAAU,CAACC,OAAO,GAAGL,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,CAAC;AAC7D,CAAC;AAMM,SAASJ,YAAY,CAACQ,WAAmB,EAAEC,OAAwC,EAAE;IAC1F,OAAON,IAAG,EAAA,CAACO,IAAI,CAACF,WAAW,EAAEC,OAAO,CAAC,CAAC;AACxC,CAAC"}
1
+ {"version":3,"sources":["../../../src/utils/nodeEnv.ts"],"sourcesContent":["import * as env from '@expo/env';\n\n/**\n * Set the environment to production or development\n * lots of tools use this to determine if they should run in a dev mode.\n */\nexport function setNodeEnv(mode: 'development' | 'production') {\n process.env.NODE_ENV = process.env.NODE_ENV || mode;\n process.env.BABEL_ENV = process.env.BABEL_ENV || process.env.NODE_ENV;\n\n // @ts-expect-error: Add support for external React libraries being loaded in the same process.\n globalThis.__DEV__ = process.env.NODE_ENV !== 'production';\n}\n\n/**\n * Load the dotenv files into the current `process.env` scope.\n * Note, this requires `NODE_ENV` being set through `setNodeEnv`.\n */\nexport function loadEnvFiles(projectRoot: string, options?: Parameters<typeof env.load>[1]) {\n return env.load(projectRoot, options);\n}\n"],"names":["loadEnvFiles","setNodeEnv","mode","process","env","NODE_ENV","BABEL_ENV","globalThis","__DEV__","projectRoot","options","load"],"mappings":";;;;;;;;;;;IAkBgBA,YAAY;eAAZA;;IAZAC,UAAU;eAAVA;;;;iEANK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMd,SAASA,WAAWC,IAAkC;IAC3DC,QAAQC,GAAG,CAACC,QAAQ,GAAGF,QAAQC,GAAG,CAACC,QAAQ,IAAIH;IAC/CC,QAAQC,GAAG,CAACE,SAAS,GAAGH,QAAQC,GAAG,CAACE,SAAS,IAAIH,QAAQC,GAAG,CAACC,QAAQ;IAErE,+FAA+F;IAC/FE,WAAWC,OAAO,GAAGL,QAAQC,GAAG,CAACC,QAAQ,KAAK;AAChD;AAMO,SAASL,aAAaS,WAAmB,EAAEC,OAAwC;IACxF,OAAON,OAAIO,IAAI,CAACF,aAAaC;AAC/B"}
@@ -4,31 +4,33 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "clearNodeModulesAsync", {
6
6
  enumerable: true,
7
- get: ()=>clearNodeModulesAsync
7
+ get: function() {
8
+ return clearNodeModulesAsync;
9
+ }
8
10
  });
9
11
  function _chalk() {
10
- const data = /*#__PURE__*/ _interopRequireDefault(require("chalk"));
12
+ const data = /*#__PURE__*/ _interop_require_default(require("chalk"));
11
13
  _chalk = function() {
12
14
  return data;
13
15
  };
14
16
  return data;
15
17
  }
16
18
  function _fs() {
17
- const data = /*#__PURE__*/ _interopRequireDefault(require("fs"));
19
+ const data = /*#__PURE__*/ _interop_require_default(require("fs"));
18
20
  _fs = function() {
19
21
  return data;
20
22
  };
21
23
  return data;
22
24
  }
23
25
  function _path() {
24
- const data = /*#__PURE__*/ _interopRequireDefault(require("path"));
26
+ const data = /*#__PURE__*/ _interop_require_default(require("path"));
25
27
  _path = function() {
26
28
  return data;
27
29
  };
28
30
  return data;
29
31
  }
30
32
  const _ora = require("./ora");
31
- function _interopRequireDefault(obj) {
33
+ function _interop_require_default(obj) {
32
34
  return obj && obj.__esModule ? obj : {
33
35
  default: obj
34
36
  };
@@ -36,15 +38,15 @@ function _interopRequireDefault(obj) {
36
38
  async function clearNodeModulesAsync(projectRoot) {
37
39
  // This step can take a couple seconds, if the installation logs are enabled (with EXPO_DEBUG) then it
38
40
  // ends up looking odd to see "Installing JavaScript dependencies" for ~5 seconds before the logs start showing up.
39
- const cleanJsDepsStep = (0, _ora.logNewSection)("Cleaning JavaScript dependencies");
41
+ const cleanJsDepsStep = (0, _ora.logNewSection)('Cleaning JavaScript dependencies');
40
42
  const time = Date.now();
41
43
  // nuke the node modules
42
44
  // TODO: this is substantially slower, we should find a better alternative to ensuring the modules are installed.
43
- await _fs().default.promises.rm(_path().default.join(projectRoot, "node_modules"), {
45
+ await _fs().default.promises.rm(_path().default.join(projectRoot, 'node_modules'), {
44
46
  recursive: true,
45
47
  force: true
46
48
  });
47
- cleanJsDepsStep.succeed(`Cleaned JavaScript dependencies ${_chalk().default.gray(Date.now() - time + "ms")}`);
49
+ cleanJsDepsStep.succeed(`Cleaned JavaScript dependencies ${_chalk().default.gray(Date.now() - time + 'ms')}`);
48
50
  }
49
51
 
50
52
  //# sourceMappingURL=nodeModules.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/nodeModules.ts"],"sourcesContent":["import chalk from 'chalk';\nimport fs from 'fs';\nimport path from 'path';\n\nimport { logNewSection } from './ora';\n\nexport async function clearNodeModulesAsync(projectRoot: string) {\n // This step can take a couple seconds, if the installation logs are enabled (with EXPO_DEBUG) then it\n // ends up looking odd to see \"Installing JavaScript dependencies\" for ~5 seconds before the logs start showing up.\n const cleanJsDepsStep = logNewSection('Cleaning JavaScript dependencies');\n const time = Date.now();\n // nuke the node modules\n // TODO: this is substantially slower, we should find a better alternative to ensuring the modules are installed.\n await fs.promises.rm(path.join(projectRoot, 'node_modules'), { recursive: true, force: true });\n cleanJsDepsStep.succeed(\n `Cleaned JavaScript dependencies ${chalk.gray(Date.now() - time + 'ms')}`\n );\n}\n"],"names":["clearNodeModulesAsync","projectRoot","cleanJsDepsStep","logNewSection","time","Date","now","fs","promises","rm","path","join","recursive","force","succeed","chalk","gray"],"mappings":"AAAA;;;;+BAMsBA,uBAAqB;;aAArBA,qBAAqB;;;8DANzB,OAAO;;;;;;;8DACV,IAAI;;;;;;;8DACF,MAAM;;;;;;qBAEO,OAAO;;;;;;AAE9B,eAAeA,qBAAqB,CAACC,WAAmB,EAAE;IAC/D,sGAAsG;IACtG,mHAAmH;IACnH,MAAMC,eAAe,GAAGC,IAAAA,IAAa,cAAA,EAAC,kCAAkC,CAAC,AAAC;IAC1E,MAAMC,IAAI,GAAGC,IAAI,CAACC,GAAG,EAAE,AAAC;IACxB,wBAAwB;IACxB,iHAAiH;IACjH,MAAMC,GAAE,EAAA,QAAA,CAACC,QAAQ,CAACC,EAAE,CAACC,KAAI,EAAA,QAAA,CAACC,IAAI,CAACV,WAAW,EAAE,cAAc,CAAC,EAAE;QAAEW,SAAS,EAAE,IAAI;QAAEC,KAAK,EAAE,IAAI;KAAE,CAAC,CAAC;IAC/FX,eAAe,CAACY,OAAO,CACrB,CAAC,gCAAgC,EAAEC,MAAK,EAAA,QAAA,CAACC,IAAI,CAACX,IAAI,CAACC,GAAG,EAAE,GAAGF,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAC1E,CAAC;AACJ,CAAC"}
1
+ {"version":3,"sources":["../../../src/utils/nodeModules.ts"],"sourcesContent":["import chalk from 'chalk';\nimport fs from 'fs';\nimport path from 'path';\n\nimport { logNewSection } from './ora';\n\nexport async function clearNodeModulesAsync(projectRoot: string) {\n // This step can take a couple seconds, if the installation logs are enabled (with EXPO_DEBUG) then it\n // ends up looking odd to see \"Installing JavaScript dependencies\" for ~5 seconds before the logs start showing up.\n const cleanJsDepsStep = logNewSection('Cleaning JavaScript dependencies');\n const time = Date.now();\n // nuke the node modules\n // TODO: this is substantially slower, we should find a better alternative to ensuring the modules are installed.\n await fs.promises.rm(path.join(projectRoot, 'node_modules'), { recursive: true, force: true });\n cleanJsDepsStep.succeed(\n `Cleaned JavaScript dependencies ${chalk.gray(Date.now() - time + 'ms')}`\n );\n}\n"],"names":["clearNodeModulesAsync","projectRoot","cleanJsDepsStep","logNewSection","time","Date","now","fs","promises","rm","path","join","recursive","force","succeed","chalk","gray"],"mappings":";;;;+BAMsBA;;;eAAAA;;;;gEANJ;;;;;;;gEACH;;;;;;;gEACE;;;;;;qBAEa;;;;;;AAEvB,eAAeA,sBAAsBC,WAAmB;IAC7D,sGAAsG;IACtG,mHAAmH;IACnH,MAAMC,kBAAkBC,IAAAA,kBAAa,EAAC;IACtC,MAAMC,OAAOC,KAAKC,GAAG;IACrB,wBAAwB;IACxB,iHAAiH;IACjH,MAAMC,aAAE,CAACC,QAAQ,CAACC,EAAE,CAACC,eAAI,CAACC,IAAI,CAACV,aAAa,iBAAiB;QAAEW,WAAW;QAAMC,OAAO;IAAK;IAC5FX,gBAAgBY,OAAO,CACrB,CAAC,gCAAgC,EAAEC,gBAAK,CAACC,IAAI,CAACX,KAAKC,GAAG,KAAKF,OAAO,OAAO;AAE7E"}