@expo/build-tools 1.0.272 → 18.0.1

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 (313) hide show
  1. package/LICENSE +21 -100
  2. package/README.md +1 -1
  3. package/dist/android/credentials.js +2 -3
  4. package/dist/android/expoUpdates.js +5 -8
  5. package/dist/android/gradle.js +6 -8
  6. package/dist/android/gradleConfig.js +2 -3
  7. package/dist/buildErrors/buildErrorHandlers.js +4 -3
  8. package/dist/buildErrors/detectError.js +11 -11
  9. package/dist/buildErrors/errors.types.js +0 -1
  10. package/dist/buildErrors/userErrorHandlers.js +2 -3
  11. package/dist/builders/android.js +19 -24
  12. package/dist/builders/common.js +0 -1
  13. package/dist/builders/custom.js +9 -11
  14. package/dist/builders/index.js +0 -1
  15. package/dist/builders/ios.js +24 -29
  16. package/dist/common/eagerBundle.js +3 -4
  17. package/dist/common/easBuildInternal.js +5 -7
  18. package/dist/common/fastlane.js +0 -1
  19. package/dist/common/git.js +0 -1
  20. package/dist/common/installDependencies.d.ts +1 -1
  21. package/dist/common/installDependencies.js +1 -2
  22. package/dist/common/prebuild.js +3 -5
  23. package/dist/common/projectSources.js +12 -16
  24. package/dist/common/setup.js +28 -33
  25. package/dist/context.d.ts +1 -1
  26. package/dist/context.js +33 -25
  27. package/dist/customBuildContext.d.ts +1 -1
  28. package/dist/customBuildContext.js +32 -10
  29. package/dist/gcs/LoggerStream.d.ts +1 -1
  30. package/dist/gcs/LoggerStream.js +22 -14
  31. package/dist/gcs/__unit__/gcs.test.js +5 -8
  32. package/dist/gcs/client.d.ts +1 -1
  33. package/dist/gcs/client.js +28 -19
  34. package/dist/gcs/retry.js +4 -5
  35. package/dist/generic.d.ts +1 -1
  36. package/dist/generic.js +5 -7
  37. package/dist/index.d.ts +1 -1
  38. package/dist/index.js +19 -10
  39. package/dist/ios/configure.d.ts +1 -1
  40. package/dist/ios/configure.js +9 -11
  41. package/dist/ios/credentials/distributionCertificate.js +1 -3
  42. package/dist/ios/credentials/keychain.js +9 -8
  43. package/dist/ios/credentials/manager.d.ts +1 -1
  44. package/dist/ios/credentials/manager.js +24 -13
  45. package/dist/ios/credentials/provisioningProfile.js +12 -6
  46. package/dist/ios/expoUpdates.js +7 -11
  47. package/dist/ios/fastfile.d.ts +1 -1
  48. package/dist/ios/fastfile.js +0 -1
  49. package/dist/ios/fastlane.d.ts +1 -1
  50. package/dist/ios/fastlane.js +8 -9
  51. package/dist/ios/gymfile.d.ts +1 -1
  52. package/dist/ios/gymfile.js +1 -2
  53. package/dist/ios/pod.js +1 -2
  54. package/dist/ios/resign.js +3 -5
  55. package/dist/ios/resolve.js +1 -2
  56. package/dist/ios/tvos.js +1 -3
  57. package/dist/ios/xcodeBuildLogs.d.ts +1 -1
  58. package/dist/ios/xcodeBuildLogs.js +5 -7
  59. package/dist/ios/xcodeEnv.js +1 -2
  60. package/dist/ios/xcpretty.js +11 -7
  61. package/dist/steps/easFunctionGroups.js +0 -1
  62. package/dist/steps/easFunctions.js +26 -25
  63. package/dist/steps/functionGroups/build.d.ts +1 -1
  64. package/dist/steps/functionGroups/build.js +24 -26
  65. package/dist/steps/functionGroups/maestroTest.js +7 -9
  66. package/dist/steps/functions/calculateEASUpdateRuntimeVersion.js +6 -9
  67. package/dist/steps/functions/ccacheStats.js +4 -6
  68. package/dist/steps/functions/checkout.js +0 -1
  69. package/dist/steps/functions/configureAndroidVersion.js +3 -5
  70. package/dist/steps/functions/configureEASUpdateIfInstalled.js +4 -6
  71. package/dist/steps/functions/configureIosCredentials.js +3 -4
  72. package/dist/steps/functions/configureIosVersion.js +4 -6
  73. package/dist/steps/functions/createSubmissionEntity.js +2 -4
  74. package/dist/steps/functions/downloadArtifact.d.ts +1 -1
  75. package/dist/steps/functions/downloadArtifact.js +7 -9
  76. package/dist/steps/functions/downloadBuild.d.ts +1 -1
  77. package/dist/steps/functions/downloadBuild.js +10 -12
  78. package/dist/steps/functions/eagerBundle.js +2 -4
  79. package/dist/steps/functions/findAndUploadBuildArtifacts.js +5 -8
  80. package/dist/steps/functions/generateGymfileFromTemplate.js +6 -8
  81. package/dist/steps/functions/getCredentialsForBuildTriggeredByGitHubIntegration.js +0 -1
  82. package/dist/steps/functions/injectAndroidCredentials.js +3 -4
  83. package/dist/steps/functions/installMaestro.js +3 -4
  84. package/dist/steps/functions/installNodeModules.d.ts +1 -1
  85. package/dist/steps/functions/installNodeModules.js +12 -12
  86. package/dist/steps/functions/installPods.js +0 -1
  87. package/dist/steps/functions/internalMaestroTest.js +16 -16
  88. package/dist/steps/functions/prebuild.js +3 -5
  89. package/dist/steps/functions/repack.d.ts +1 -1
  90. package/dist/steps/functions/repack.js +25 -19
  91. package/dist/steps/functions/resolveAppleTeamIdFromCredentials.js +1 -2
  92. package/dist/steps/functions/resolveBuildConfig.js +0 -1
  93. package/dist/steps/functions/restoreBuildCache.d.ts +1 -1
  94. package/dist/steps/functions/restoreBuildCache.js +8 -10
  95. package/dist/steps/functions/restoreCache.d.ts +1 -1
  96. package/dist/steps/functions/restoreCache.js +34 -26
  97. package/dist/steps/functions/runFastlane.js +0 -1
  98. package/dist/steps/functions/runGradle.js +2 -3
  99. package/dist/steps/functions/saveBuildCache.d.ts +1 -1
  100. package/dist/steps/functions/saveBuildCache.js +6 -7
  101. package/dist/steps/functions/saveCache.d.ts +1 -1
  102. package/dist/steps/functions/saveCache.js +26 -18
  103. package/dist/steps/functions/sendSlackMessage.js +1 -3
  104. package/dist/steps/functions/startAndroidEmulator.js +5 -7
  105. package/dist/steps/functions/startCuttlefishDevice.js +32 -10
  106. package/dist/steps/functions/startIosSimulator.js +8 -11
  107. package/dist/steps/functions/uploadArtifact.js +4 -6
  108. package/dist/steps/functions/uploadToAsc.d.ts +2 -0
  109. package/dist/steps/functions/uploadToAsc.js +287 -0
  110. package/dist/steps/functions/useNpmToken.js +3 -4
  111. package/dist/steps/utils/android/expoUpdates.js +3 -5
  112. package/dist/steps/utils/android/gradle.d.ts +1 -1
  113. package/dist/steps/utils/android/gradle.js +6 -7
  114. package/dist/steps/utils/android/gradleConfig.js +4 -5
  115. package/dist/steps/utils/cache.js +0 -1
  116. package/dist/steps/utils/expoUpdates.d.ts +1 -1
  117. package/dist/steps/utils/expoUpdates.js +15 -18
  118. package/dist/steps/utils/ios/AscApiClient.d.ts +250 -0
  119. package/dist/steps/utils/ios/AscApiClient.js +299 -0
  120. package/dist/steps/utils/ios/configure.js +4 -5
  121. package/dist/steps/utils/ios/credentials/credentials.js +0 -1
  122. package/dist/steps/utils/ios/credentials/distributionCertificate.js +1 -3
  123. package/dist/steps/utils/ios/credentials/keychain.js +8 -8
  124. package/dist/steps/utils/ios/credentials/manager.js +24 -13
  125. package/dist/steps/utils/ios/credentials/provisioningProfile.js +11 -6
  126. package/dist/steps/utils/ios/expoUpdates.js +4 -7
  127. package/dist/steps/utils/ios/fastlane.d.ts +1 -1
  128. package/dist/steps/utils/ios/fastlane.js +3 -4
  129. package/dist/steps/utils/ios/resolve.js +1 -2
  130. package/dist/steps/utils/ios/tvos.js +1 -3
  131. package/dist/steps/utils/ios/xcpretty.js +11 -7
  132. package/dist/steps/utils/slackMessageDynamicFields.js +0 -1
  133. package/dist/templates/EasBuildConfigureVersionGradle.js +0 -1
  134. package/dist/templates/EasBuildGradle.js +0 -1
  135. package/dist/templates/EasBuildInjectAndroidCredentialsGradle.js +0 -1
  136. package/dist/templates/FastfileResign.js +0 -1
  137. package/dist/templates/GymfileArchive.js +0 -1
  138. package/dist/templates/GymfileSimulator.js +0 -1
  139. package/dist/templates/npmrc.js +0 -1
  140. package/dist/utils/AndroidEmulatorUtils.js +20 -22
  141. package/dist/utils/IosSimulatorUtils.js +9 -11
  142. package/dist/utils/appConfig.js +1 -2
  143. package/dist/utils/artifacts.d.ts +1 -1
  144. package/dist/utils/artifacts.js +7 -8
  145. package/dist/utils/cacheKey.js +21 -12
  146. package/dist/utils/diffFingerprintsAsync.d.ts +1 -1
  147. package/dist/utils/diffFingerprintsAsync.js +0 -1
  148. package/dist/utils/environmentSecrets.js +3 -4
  149. package/dist/utils/expoFingerprintCli.js +5 -6
  150. package/dist/utils/expoUpdates.d.ts +1 -2
  151. package/dist/utils/expoUpdates.js +19 -33
  152. package/dist/utils/expoUpdatesCli.js +20 -11
  153. package/dist/utils/files.js +23 -15
  154. package/dist/utils/findMaestroPathsFlowsToExecuteAsync.js +27 -21
  155. package/dist/utils/fingerprint.js +0 -1
  156. package/dist/utils/getExpoUpdatesPackageVersionIfInstalledAsync.js +0 -1
  157. package/dist/utils/hooks.js +1 -3
  158. package/dist/utils/isModernExpoUpdatesCLIWithRuntimeVersionCommandSupported.d.ts +1 -0
  159. package/dist/utils/isModernExpoUpdatesCLIWithRuntimeVersionCommandSupported.js +14 -0
  160. package/dist/utils/npmrc.js +2 -3
  161. package/dist/utils/outputs.d.ts +1 -1
  162. package/dist/utils/outputs.js +2 -5
  163. package/dist/utils/packageManager.js +22 -14
  164. package/dist/utils/prepareBuildExecutable.js +1 -2
  165. package/dist/utils/processes.js +2 -3
  166. package/dist/utils/project.js +1 -2
  167. package/dist/utils/promiseRetryWithCondition.js +0 -1
  168. package/dist/utils/resolveRuntimeVersionAsync.d.ts +1 -1
  169. package/dist/utils/resolveRuntimeVersionAsync.js +4 -6
  170. package/dist/utils/retry.js +2 -3
  171. package/dist/utils/retryOnDNSFailure.js +0 -1
  172. package/dist/utils/stepMetrics.d.ts +1 -1
  173. package/dist/utils/stepMetrics.js +0 -1
  174. package/dist/utils/strings.js +1 -3
  175. package/dist/utils/turtleFetch.d.ts +1 -1
  176. package/dist/utils/turtleFetch.js +2 -2
  177. package/package.json +25 -22
  178. package/dist/android/credentials.js.map +0 -1
  179. package/dist/android/expoUpdates.js.map +0 -1
  180. package/dist/android/gradle.js.map +0 -1
  181. package/dist/android/gradleConfig.js.map +0 -1
  182. package/dist/buildErrors/buildErrorHandlers.js.map +0 -1
  183. package/dist/buildErrors/detectError.js.map +0 -1
  184. package/dist/buildErrors/errors.types.js.map +0 -1
  185. package/dist/buildErrors/userErrorHandlers.js.map +0 -1
  186. package/dist/builders/android.js.map +0 -1
  187. package/dist/builders/common.js.map +0 -1
  188. package/dist/builders/custom.js.map +0 -1
  189. package/dist/builders/index.js.map +0 -1
  190. package/dist/builders/ios.js.map +0 -1
  191. package/dist/common/eagerBundle.js.map +0 -1
  192. package/dist/common/easBuildInternal.js.map +0 -1
  193. package/dist/common/fastlane.js.map +0 -1
  194. package/dist/common/git.js.map +0 -1
  195. package/dist/common/installDependencies.js.map +0 -1
  196. package/dist/common/prebuild.js.map +0 -1
  197. package/dist/common/projectSources.js.map +0 -1
  198. package/dist/common/setup.js.map +0 -1
  199. package/dist/context.js.map +0 -1
  200. package/dist/customBuildContext.js.map +0 -1
  201. package/dist/gcs/LoggerStream.js.map +0 -1
  202. package/dist/gcs/__unit__/gcs.test.js.map +0 -1
  203. package/dist/gcs/client.js.map +0 -1
  204. package/dist/gcs/retry.js.map +0 -1
  205. package/dist/generic.js.map +0 -1
  206. package/dist/index.js.map +0 -1
  207. package/dist/ios/configure.js.map +0 -1
  208. package/dist/ios/credentials/distributionCertificate.js.map +0 -1
  209. package/dist/ios/credentials/keychain.js.map +0 -1
  210. package/dist/ios/credentials/manager.js.map +0 -1
  211. package/dist/ios/credentials/provisioningProfile.js.map +0 -1
  212. package/dist/ios/expoUpdates.js.map +0 -1
  213. package/dist/ios/fastfile.js.map +0 -1
  214. package/dist/ios/fastlane.js.map +0 -1
  215. package/dist/ios/gymfile.js.map +0 -1
  216. package/dist/ios/pod.js.map +0 -1
  217. package/dist/ios/resign.js.map +0 -1
  218. package/dist/ios/resolve.js.map +0 -1
  219. package/dist/ios/tvos.js.map +0 -1
  220. package/dist/ios/xcodeBuildLogs.js.map +0 -1
  221. package/dist/ios/xcodeEnv.js.map +0 -1
  222. package/dist/ios/xcpretty.js.map +0 -1
  223. package/dist/steps/easFunctionGroups.js.map +0 -1
  224. package/dist/steps/easFunctions.js.map +0 -1
  225. package/dist/steps/functionGroups/build.js.map +0 -1
  226. package/dist/steps/functionGroups/maestroTest.js.map +0 -1
  227. package/dist/steps/functions/calculateEASUpdateRuntimeVersion.js.map +0 -1
  228. package/dist/steps/functions/ccacheStats.js.map +0 -1
  229. package/dist/steps/functions/checkout.js.map +0 -1
  230. package/dist/steps/functions/configureAndroidVersion.js.map +0 -1
  231. package/dist/steps/functions/configureEASUpdateIfInstalled.js.map +0 -1
  232. package/dist/steps/functions/configureIosCredentials.js.map +0 -1
  233. package/dist/steps/functions/configureIosVersion.js.map +0 -1
  234. package/dist/steps/functions/createSubmissionEntity.js.map +0 -1
  235. package/dist/steps/functions/downloadArtifact.js.map +0 -1
  236. package/dist/steps/functions/downloadBuild.js.map +0 -1
  237. package/dist/steps/functions/eagerBundle.js.map +0 -1
  238. package/dist/steps/functions/findAndUploadBuildArtifacts.js.map +0 -1
  239. package/dist/steps/functions/generateGymfileFromTemplate.js.map +0 -1
  240. package/dist/steps/functions/getCredentialsForBuildTriggeredByGitHubIntegration.js.map +0 -1
  241. package/dist/steps/functions/injectAndroidCredentials.js.map +0 -1
  242. package/dist/steps/functions/installMaestro.js.map +0 -1
  243. package/dist/steps/functions/installNodeModules.js.map +0 -1
  244. package/dist/steps/functions/installPods.js.map +0 -1
  245. package/dist/steps/functions/internalMaestroTest.js.map +0 -1
  246. package/dist/steps/functions/prebuild.js.map +0 -1
  247. package/dist/steps/functions/repack.js.map +0 -1
  248. package/dist/steps/functions/resolveAppleTeamIdFromCredentials.js.map +0 -1
  249. package/dist/steps/functions/resolveBuildConfig.js.map +0 -1
  250. package/dist/steps/functions/restoreBuildCache.js.map +0 -1
  251. package/dist/steps/functions/restoreCache.js.map +0 -1
  252. package/dist/steps/functions/runFastlane.js.map +0 -1
  253. package/dist/steps/functions/runGradle.js.map +0 -1
  254. package/dist/steps/functions/saveBuildCache.js.map +0 -1
  255. package/dist/steps/functions/saveCache.js.map +0 -1
  256. package/dist/steps/functions/sendSlackMessage.js.map +0 -1
  257. package/dist/steps/functions/startAndroidEmulator.js.map +0 -1
  258. package/dist/steps/functions/startCuttlefishDevice.js.map +0 -1
  259. package/dist/steps/functions/startIosSimulator.js.map +0 -1
  260. package/dist/steps/functions/uploadArtifact.js.map +0 -1
  261. package/dist/steps/functions/useNpmToken.js.map +0 -1
  262. package/dist/steps/utils/android/expoUpdates.js.map +0 -1
  263. package/dist/steps/utils/android/gradle.js.map +0 -1
  264. package/dist/steps/utils/android/gradleConfig.js.map +0 -1
  265. package/dist/steps/utils/cache.js.map +0 -1
  266. package/dist/steps/utils/expoUpdates.js.map +0 -1
  267. package/dist/steps/utils/ios/configure.js.map +0 -1
  268. package/dist/steps/utils/ios/credentials/credentials.js.map +0 -1
  269. package/dist/steps/utils/ios/credentials/distributionCertificate.js.map +0 -1
  270. package/dist/steps/utils/ios/credentials/keychain.js.map +0 -1
  271. package/dist/steps/utils/ios/credentials/manager.js.map +0 -1
  272. package/dist/steps/utils/ios/credentials/provisioningProfile.js.map +0 -1
  273. package/dist/steps/utils/ios/expoUpdates.js.map +0 -1
  274. package/dist/steps/utils/ios/fastlane.js.map +0 -1
  275. package/dist/steps/utils/ios/resolve.js.map +0 -1
  276. package/dist/steps/utils/ios/tvos.js.map +0 -1
  277. package/dist/steps/utils/ios/xcpretty.js.map +0 -1
  278. package/dist/steps/utils/slackMessageDynamicFields.js.map +0 -1
  279. package/dist/templates/EasBuildConfigureVersionGradle.js.map +0 -1
  280. package/dist/templates/EasBuildGradle.js.map +0 -1
  281. package/dist/templates/EasBuildInjectAndroidCredentialsGradle.js.map +0 -1
  282. package/dist/templates/FastfileResign.js.map +0 -1
  283. package/dist/templates/GymfileArchive.js.map +0 -1
  284. package/dist/templates/GymfileSimulator.js.map +0 -1
  285. package/dist/templates/npmrc.js.map +0 -1
  286. package/dist/utils/AndroidEmulatorUtils.js.map +0 -1
  287. package/dist/utils/IosSimulatorUtils.js.map +0 -1
  288. package/dist/utils/appConfig.js.map +0 -1
  289. package/dist/utils/artifacts.js.map +0 -1
  290. package/dist/utils/cacheKey.js.map +0 -1
  291. package/dist/utils/diffFingerprintsAsync.js.map +0 -1
  292. package/dist/utils/environmentSecrets.js.map +0 -1
  293. package/dist/utils/expoFingerprintCli.js.map +0 -1
  294. package/dist/utils/expoUpdates.js.map +0 -1
  295. package/dist/utils/expoUpdatesCli.js.map +0 -1
  296. package/dist/utils/files.js.map +0 -1
  297. package/dist/utils/findMaestroPathsFlowsToExecuteAsync.js.map +0 -1
  298. package/dist/utils/fingerprint.js.map +0 -1
  299. package/dist/utils/getExpoUpdatesPackageVersionIfInstalledAsync.js.map +0 -1
  300. package/dist/utils/hooks.js.map +0 -1
  301. package/dist/utils/npmrc.js.map +0 -1
  302. package/dist/utils/outputs.js.map +0 -1
  303. package/dist/utils/packageManager.js.map +0 -1
  304. package/dist/utils/prepareBuildExecutable.js.map +0 -1
  305. package/dist/utils/processes.js.map +0 -1
  306. package/dist/utils/project.js.map +0 -1
  307. package/dist/utils/promiseRetryWithCondition.js.map +0 -1
  308. package/dist/utils/resolveRuntimeVersionAsync.js.map +0 -1
  309. package/dist/utils/retry.js.map +0 -1
  310. package/dist/utils/retryOnDNSFailure.js.map +0 -1
  311. package/dist/utils/stepMetrics.js.map +0 -1
  312. package/dist/utils/strings.js.map +0 -1
  313. package/dist/utils/turtleFetch.js.map +0 -1
package/LICENSE CHANGED
@@ -1,100 +1,21 @@
1
- Business Source License 1.1
2
-
3
- Parameters
4
-
5
- Licensor: 650 Industries, Inc.
6
- Licensed Work: EAS Build
7
- The Licensed Work is (c) 2021 650 Industries, Inc.
8
- Additional Use Grant: You may make use of the Licensed Work, provided that you do
9
- not use the Licensed Work for commercial offerings such as
10
- a CI/CD service or application build service that allows
11
- third parties (other than your employees and contractors)
12
- to access the functionality of and directly benefit from the
13
- functionality of the Licensed Work.
14
-
15
- Change Date: 2028-04-01
16
-
17
- Change License: MIT
18
-
19
- For information about alternative licensing arrangements for the Software,
20
- please visit: https://expo.dev/pricing/
21
-
22
- Notice
23
-
24
- The Business Source License (this document, or the "License") is not an Open
25
- Source license. However, the Licensed Work will eventually be made available
26
- under an Open Source License, as stated in this License.
27
-
28
- License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
29
- "Business Source License" is a trademark of MariaDB Corporation Ab.
30
-
31
- -----------------------------------------------------------------------------
32
-
33
- Business Source License 1.1
34
-
35
- Terms
36
-
37
- The Licensor hereby grants you the right to copy, modify, create derivative
38
- works, redistribute, and make non-production use of the Licensed Work. The
39
- Licensor may make an Additional Use Grant, above, permitting limited
40
- production use.
41
-
42
- Effective on the Change Date, or the fourth anniversary of the first publicly
43
- available distribution of a specific version of the Licensed Work under this
44
- License, whichever comes first, the Licensor hereby grants you rights under
45
- the terms of the Change License, and the rights granted in the paragraph
46
- above terminate.
47
-
48
- If your use of the Licensed Work does not comply with the requirements
49
- currently in effect as described in this License, you must purchase a
50
- commercial license from the Licensor, its affiliated entities, or authorized
51
- resellers, or you must refrain from using the Licensed Work.
52
-
53
- All copies of the original and modified Licensed Work, and derivative works
54
- of the Licensed Work, are subject to this License. This License applies
55
- separately for each version of the Licensed Work and the Change Date may vary
56
- for each version of the Licensed Work released by Licensor.
57
-
58
- You must conspicuously display this License on each original or modified copy
59
- of the Licensed Work. If you receive the Licensed Work in original or
60
- modified form from a third party, the terms and conditions set forth in this
61
- License apply to your use of that work.
62
-
63
- Any use of the Licensed Work in violation of this License will automatically
64
- terminate your rights under this License for the current and all other
65
- versions of the Licensed Work.
66
-
67
- This License does not grant you any right in any trademark or logo of
68
- Licensor or its affiliates (provided that you may use a trademark or logo of
69
- Licensor as expressly required by this License).
70
-
71
- TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
72
- AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
73
- EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
74
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
75
- TITLE.
76
-
77
- MariaDB hereby grants you permission to use this License’s text to license
78
- your works, and to refer to it using the trademark "Business Source License",
79
- as long as you comply with the Covenants of Licensor below.
80
-
81
- Covenants of Licensor
82
-
83
- In consideration of the right to use this License’s text and the "Business
84
- Source License" name and trademark, Licensor covenants to MariaDB, and to all
85
- other recipients of the licensed work to be provided by Licensor:
86
-
87
- 1. To specify as the Change License the GPL Version 2.0 or any later version,
88
- or a license that is compatible with GPL Version 2.0 or a later version,
89
- where "compatible" means that software provided under the Change License can
90
- be included in a program with software provided under GPL Version 2.0 or a
91
- later version. Licensor may specify additional Change Licenses without
92
- limitation.
93
-
94
- 2. To either: (a) specify an additional grant of rights to use that does not
95
- impose any additional restriction on the right granted in this License, as
96
- the Additional Use Grant; or (b) insert the text "None".
97
-
98
- 3. To specify a Change Date.
99
-
100
- 4. Not to modify this License in any other way.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020-present 650 Industries, Inc. (aka Expo)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -4,4 +4,4 @@
4
4
 
5
5
  ## Repository
6
6
 
7
- https://github.com/expo/eas-build/tree/main/packages/build-tools
7
+ https://github.com/expo/eas-cli/tree/main/packages/build-tools
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.restoreCredentials = restoreCredentials;
7
- const path_1 = __importDefault(require("path"));
8
7
  const fs_extra_1 = __importDefault(require("fs-extra"));
9
8
  const nullthrows_1 = __importDefault(require("nullthrows"));
9
+ const path_1 = __importDefault(require("path"));
10
10
  const uuid_1 = require("uuid");
11
11
  async function restoreCredentials(ctx) {
12
12
  const { buildCredentials } = (0, nullthrows_1.default)(ctx.job.secrets, 'Secrets must be defined for non-custom builds');
@@ -16,7 +16,7 @@ async function restoreCredentials(ctx) {
16
16
  }
17
17
  ctx.logger.info("Writing secrets to the project's directory");
18
18
  const keystorePath = path_1.default.join(ctx.buildDirectory, `keystore-${(0, uuid_1.v4)()}`);
19
- await fs_extra_1.default.writeFile(keystorePath, Buffer.from(buildCredentials.keystore.dataBase64, 'base64'));
19
+ await fs_extra_1.default.writeFile(keystorePath, new Uint8Array(Buffer.from(buildCredentials.keystore.dataBase64, 'base64')));
20
20
  const credentialsJson = {
21
21
  android: {
22
22
  keystore: {
@@ -29,4 +29,3 @@ async function restoreCredentials(ctx) {
29
29
  };
30
30
  await fs_extra_1.default.writeFile(path_1.default.join(ctx.buildDirectory, 'credentials.json'), JSON.stringify(credentialsJson));
31
31
  }
32
- //# sourceMappingURL=credentials.js.map
@@ -8,9 +8,9 @@ exports.androidSetRuntimeVersionNativelyAsync = androidSetRuntimeVersionNatively
8
8
  exports.androidSetChannelNativelyAsync = androidSetChannelNativelyAsync;
9
9
  exports.androidGetNativelyDefinedChannelAsync = androidGetNativelyDefinedChannelAsync;
10
10
  exports.androidGetNativelyDefinedRuntimeVersionAsync = androidGetNativelyDefinedRuntimeVersionAsync;
11
+ const config_plugins_1 = require("@expo/config-plugins");
11
12
  const assert_1 = __importDefault(require("assert"));
12
13
  const fs_extra_1 = __importDefault(require("fs-extra"));
13
- const config_plugins_1 = require("@expo/config-plugins");
14
14
  var AndroidMetadataName;
15
15
  (function (AndroidMetadataName) {
16
16
  AndroidMetadataName["UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY"] = "expo.modules.updates.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY";
@@ -27,8 +27,7 @@ async function androidSetRuntimeVersionNativelyAsync(ctx, runtimeVersion) {
27
27
  await config_plugins_1.AndroidConfig.Manifest.writeAndroidManifestAsync(manifestPath, androidManifest);
28
28
  }
29
29
  async function androidSetChannelNativelyAsync(ctx) {
30
- var _a;
31
- (0, assert_1.default)((_a = ctx.job.updates) === null || _a === void 0 ? void 0 : _a.channel, 'updates.channel must be defined');
30
+ (0, assert_1.default)(ctx.job.updates?.channel, 'updates.channel must be defined');
32
31
  const manifestPath = await config_plugins_1.AndroidConfig.Paths.getAndroidManifestAsync(ctx.getReactNativeProjectDirectory());
33
32
  if (!(await fs_extra_1.default.pathExists(manifestPath))) {
34
33
  throw new Error(`Couldn't find Android manifest at ${manifestPath}`);
@@ -37,13 +36,12 @@ async function androidSetChannelNativelyAsync(ctx) {
37
36
  const mainApp = config_plugins_1.AndroidConfig.Manifest.getMainApplicationOrThrow(androidManifest);
38
37
  const stringifiedUpdatesRequestHeaders = config_plugins_1.AndroidConfig.Manifest.getMainApplicationMetaDataValue(androidManifest, AndroidMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY);
39
38
  config_plugins_1.AndroidConfig.Manifest.addMetaDataItemToMainApplication(mainApp, AndroidMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY, JSON.stringify({
40
- ...JSON.parse(stringifiedUpdatesRequestHeaders !== null && stringifiedUpdatesRequestHeaders !== void 0 ? stringifiedUpdatesRequestHeaders : '{}'),
39
+ ...JSON.parse(stringifiedUpdatesRequestHeaders ?? '{}'),
41
40
  'expo-channel-name': ctx.job.updates.channel,
42
41
  }), 'value');
43
42
  await config_plugins_1.AndroidConfig.Manifest.writeAndroidManifestAsync(manifestPath, androidManifest);
44
43
  }
45
44
  async function androidGetNativelyDefinedChannelAsync(ctx) {
46
- var _a;
47
45
  const manifestPath = await config_plugins_1.AndroidConfig.Paths.getAndroidManifestAsync(ctx.getReactNativeProjectDirectory());
48
46
  if (!(await fs_extra_1.default.pathExists(manifestPath))) {
49
47
  return null;
@@ -51,8 +49,8 @@ async function androidGetNativelyDefinedChannelAsync(ctx) {
51
49
  const androidManifest = await config_plugins_1.AndroidConfig.Manifest.readAndroidManifestAsync(manifestPath);
52
50
  const stringifiedUpdatesRequestHeaders = config_plugins_1.AndroidConfig.Manifest.getMainApplicationMetaDataValue(androidManifest, AndroidMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY);
53
51
  try {
54
- const updatesRequestHeaders = JSON.parse(stringifiedUpdatesRequestHeaders !== null && stringifiedUpdatesRequestHeaders !== void 0 ? stringifiedUpdatesRequestHeaders : '{}');
55
- return (_a = updatesRequestHeaders['expo-channel-name']) !== null && _a !== void 0 ? _a : null;
52
+ const updatesRequestHeaders = JSON.parse(stringifiedUpdatesRequestHeaders ?? '{}');
53
+ return updatesRequestHeaders['expo-channel-name'] ?? null;
56
54
  }
57
55
  catch (err) {
58
56
  throw new Error(`Failed to parse ${AndroidMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY} from AndroidManifest.xml: ${err.message}`);
@@ -66,4 +64,3 @@ async function androidGetNativelyDefinedRuntimeVersionAsync(ctx) {
66
64
  const androidManifest = await config_plugins_1.AndroidConfig.Manifest.readAndroidManifestAsync(manifestPath);
67
65
  return config_plugins_1.AndroidConfig.Manifest.getMainApplicationMetaDataValue(androidManifest, AndroidMetadataName.RUNTIME_VERSION);
68
66
  }
69
- //# sourceMappingURL=expoUpdates.js.map
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ensureLFLineEndingsInGradlewScript = ensureLFLineEndingsInGradlewScript;
7
7
  exports.runGradleCommand = runGradleCommand;
8
8
  exports.resolveGradleCommand = resolveGradleCommand;
9
- const path_1 = __importDefault(require("path"));
10
- const assert_1 = __importDefault(require("assert"));
11
- const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
12
9
  const eas_build_job_1 = require("@expo/eas-build-job");
10
+ const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
11
+ const assert_1 = __importDefault(require("assert"));
13
12
  const fs_extra_1 = __importDefault(require("fs-extra"));
13
+ const path_1 = __importDefault(require("path"));
14
14
  const processes_1 = require("../utils/processes");
15
15
  async function ensureLFLineEndingsInGradlewScript(ctx) {
16
16
  const gradlewPath = path_1.default.join(ctx.getReactNativeProjectDirectory(), 'android', 'gradlew');
@@ -63,7 +63,7 @@ function adjustOOMScore(spawnPromise, logger) {
63
63
  }));
64
64
  }
65
65
  catch (err) {
66
- logger.debug({ err, stderr: err === null || err === void 0 ? void 0 : err.stderr }, 'Failed to override oom_score_adj');
66
+ logger.debug({ err, stderr: err?.stderr }, 'Failed to override oom_score_adj');
67
67
  }
68
68
  },
69
69
  // Wait 20 seconds to make sure all child processes are started
@@ -72,15 +72,14 @@ function adjustOOMScore(spawnPromise, logger) {
72
72
  // Version envs should be set at the beginning of the build, but when building
73
73
  // from github those values are resolved later.
74
74
  function resolveVersionOverridesEnvs(ctx) {
75
- var _a, _b;
76
75
  const extraEnvs = {};
77
76
  if (ctx.job.platform === eas_build_job_1.Platform.ANDROID &&
78
- ((_a = ctx.job.version) === null || _a === void 0 ? void 0 : _a.versionCode) &&
77
+ ctx.job.version?.versionCode &&
79
78
  !ctx.env.EAS_BUILD_ANDROID_VERSION_CODE) {
80
79
  extraEnvs.EAS_BUILD_ANDROID_VERSION_CODE = ctx.job.version.versionCode;
81
80
  }
82
81
  if (ctx.job.platform === eas_build_job_1.Platform.ANDROID &&
83
- ((_b = ctx.job.version) === null || _b === void 0 ? void 0 : _b.versionName) &&
82
+ ctx.job.version?.versionName &&
84
83
  !ctx.env.EAS_BUILD_ANDROID_VERSION_NAME) {
85
84
  extraEnvs.EAS_BUILD_ANDROID_VERSION_NAME = ctx.job.version.versionName;
86
85
  }
@@ -103,4 +102,3 @@ function resolveGradleCommand(job) {
103
102
  return ':app:bundleRelease';
104
103
  }
105
104
  }
106
- //# sourceMappingURL=gradle.js.map
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.configureBuildGradle = configureBuildGradle;
7
- const path_1 = __importDefault(require("path"));
8
7
  const config_plugins_1 = require("@expo/config-plugins");
9
8
  const fs_extra_1 = __importDefault(require("fs-extra"));
9
+ const path_1 = __importDefault(require("path"));
10
10
  const EasBuildGradle_1 = require("../templates/EasBuildGradle");
11
11
  const APPLY_EAS_BUILD_GRADLE_LINE = 'apply from: "./eas-build.gradle"';
12
12
  async function configureBuildGradle(ctx) {
@@ -43,6 +43,5 @@ function hasLine(haystack, needle) {
43
43
  .replace(/\r\n/g, '\n')
44
44
  .split('\n')
45
45
  // Check for both single and double quotes
46
- .some((line) => line === needle || line === needle.replace(/"/g, "'")));
46
+ .some(line => line === needle || line === needle.replace(/"/g, "'")));
47
47
  }
48
- //# sourceMappingURL=gradleConfig.js.map
@@ -7,6 +7,8 @@ exports.buildErrorHandlers = exports.TrackedBuildError = void 0;
7
7
  const eas_build_job_1 = require("@expo/eas-build-job");
8
8
  const escapeRegExp_1 = __importDefault(require("lodash/escapeRegExp"));
9
9
  class TrackedBuildError extends Error {
10
+ errorCode;
11
+ message;
10
12
  constructor(errorCode, message) {
11
13
  super(message);
12
14
  this.errorCode = errorCode;
@@ -123,14 +125,14 @@ exports.buildErrorHandlers = [
123
125
  regexp: /\[!\] Invalid `Podfile` file: .* unexpected token at 'info Run CLI with --verbose flag for more details./,
124
126
  createError: () => new TrackedBuildError('NODE_ENV_PRODUCTION_DEFINED', 'npm: NODE_ENV=production was defined.'),
125
127
  },
126
- ...[eas_build_job_1.BuildPhase.INSTALL_DEPENDENCIES, eas_build_job_1.BuildPhase.PREBUILD].map((phase) => ({
128
+ ...[eas_build_job_1.BuildPhase.INSTALL_DEPENDENCIES, eas_build_job_1.BuildPhase.PREBUILD].map(phase => ({
127
129
  phase,
128
130
  // example log:
129
131
  // [stderr] WARN tarball tarball data for @typescript-eslint/typescript-estree@5.26.0 (sha512-cozo/GbwixVR0sgfHItz3t1yXu521yn71Wj6PlYCFA3WPhy51CUPkifFKfBis91bDclGmAY45hhaAXVjdn4new==) seems to be corrupted. Trying again.
130
132
  regexp: /tarball tarball data for ([^ ]*) .* seems to be corrupted. Trying again/,
131
133
  createError: (match) => new TrackedBuildError('NPM_CORRUPTED_PACKAGE', `npm: corrupted package ${match[1]}`),
132
134
  })),
133
- ...[eas_build_job_1.BuildPhase.INSTALL_DEPENDENCIES, eas_build_job_1.BuildPhase.PREBUILD].map((phase) => ({
135
+ ...[eas_build_job_1.BuildPhase.INSTALL_DEPENDENCIES, eas_build_job_1.BuildPhase.PREBUILD].map(phase => ({
134
136
  phase,
135
137
  regexp: ({ env }) => env.EAS_BUILD_NPM_CACHE_URL
136
138
  ? new RegExp((0, escapeRegExp_1.default)(env.EAS_BUILD_NPM_CACHE_URL))
@@ -272,4 +274,3 @@ exports.buildErrorHandlers = [
272
274
  createError: () => new TrackedBuildError('XCODE_BUILD_BUNDLER_ERROR', 'fastlane: Bundle React Native code and images failed.'),
273
275
  },
274
276
  ];
275
- //# sourceMappingURL=buildErrorHandlers.js.map
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.resolveBuildPhaseErrorAsync = resolveBuildPhaseErrorAsync;
7
7
  const eas_build_job_1 = require("@expo/eas-build-job");
8
8
  const fs_extra_1 = __importDefault(require("fs-extra"));
9
- const xcodeBuildLogs_1 = require("../ios/xcodeBuildLogs");
9
+ const buildErrorHandlers_1 = require("./buildErrorHandlers");
10
10
  const errors_types_1 = require("./errors.types");
11
11
  const userErrorHandlers_1 = require("./userErrorHandlers");
12
- const buildErrorHandlers_1 = require("./buildErrorHandlers");
12
+ const xcodeBuildLogs_1 = require("../ios/xcodeBuildLogs");
13
13
  async function maybeReadXcodeBuildLogs(phase, buildLogsDirectory) {
14
14
  if (phase !== eas_build_job_1.BuildPhase.RUN_FASTLANE) {
15
15
  return;
@@ -30,17 +30,17 @@ function resolveError(errorHandlers, logLines, errorContext, xcodeBuildLogs) {
30
30
  const { platform } = job;
31
31
  const logs = logLines.join('\n');
32
32
  const handlers = errorHandlers
33
- .filter((handler) => handler.platform === platform || !handler.platform)
34
- .filter((handler) => (handler.phase === errors_types_1.XCODE_BUILD_PHASE && phase === eas_build_job_1.BuildPhase.RUN_FASTLANE) ||
33
+ .filter(handler => handler.platform === platform || !handler.platform)
34
+ .filter(handler => (handler.phase === errors_types_1.XCODE_BUILD_PHASE && phase === eas_build_job_1.BuildPhase.RUN_FASTLANE) ||
35
35
  handler.phase === phase ||
36
36
  !handler.phase)
37
- .filter((handler) => ('mode' in job && handler.mode === job.mode) || !handler.mode);
37
+ .filter(handler => ('mode' in job && handler.mode === job.mode) || !handler.mode);
38
38
  for (const handler of handlers) {
39
39
  const regexp = typeof handler.regexp === 'function' ? handler.regexp(errorContext) : handler.regexp;
40
40
  if (!regexp) {
41
41
  continue;
42
42
  }
43
- const match = handler.phase === errors_types_1.XCODE_BUILD_PHASE ? xcodeBuildLogs === null || xcodeBuildLogs === void 0 ? void 0 : xcodeBuildLogs.match(regexp) : logs.match(regexp);
43
+ const match = handler.phase === errors_types_1.XCODE_BUILD_PHASE ? xcodeBuildLogs?.match(regexp) : logs.match(regexp);
44
44
  if (match) {
45
45
  return handler.createError(match, errorContext);
46
46
  }
@@ -48,7 +48,6 @@ function resolveError(errorHandlers, logLines, errorContext, xcodeBuildLogs) {
48
48
  return undefined;
49
49
  }
50
50
  async function resolveBuildPhaseErrorAsync(error, logLines, errorContext, buildLogsDirectory) {
51
- var _a, _b, _c;
52
51
  const { phase } = errorContext;
53
52
  if (error instanceof eas_build_job_1.errors.BuildError) {
54
53
  return error;
@@ -56,7 +55,8 @@ async function resolveBuildPhaseErrorAsync(error, logLines, errorContext, buildL
56
55
  const xcodeBuildLogs = await maybeReadXcodeBuildLogs(phase, buildLogsDirectory);
57
56
  const userFacingError = error instanceof eas_build_job_1.errors.UserFacingError
58
57
  ? error
59
- : (_a = resolveError(userErrorHandlers_1.userErrorHandlers, logLines, errorContext, xcodeBuildLogs)) !== null && _a !== void 0 ? _a : new eas_build_job_1.errors.UnknownError(errorContext.phase);
58
+ : (resolveError(userErrorHandlers_1.userErrorHandlers, logLines, errorContext, xcodeBuildLogs) ??
59
+ new eas_build_job_1.errors.UnknownError(errorContext.phase));
60
60
  const buildError = resolveError(buildErrorHandlers_1.buildErrorHandlers, logLines, errorContext, xcodeBuildLogs);
61
61
  const isUnknownUserError = !userFacingError ||
62
62
  [
@@ -64,8 +64,9 @@ async function resolveBuildPhaseErrorAsync(error, logLines, errorContext, buildL
64
64
  eas_build_job_1.errors.ErrorCode.UNKNOWN_GRADLE_ERROR,
65
65
  eas_build_job_1.errors.ErrorCode.UNKNOWN_FASTLANE_ERROR,
66
66
  ].includes(userFacingError.errorCode);
67
- const message = (_b = (isUnknownUserError ? buildError === null || buildError === void 0 ? void 0 : buildError.message : userFacingError.message)) !== null && _b !== void 0 ? _b : userFacingError.message;
68
- const errorCode = (_c = (isUnknownUserError ? buildError === null || buildError === void 0 ? void 0 : buildError.errorCode : userFacingError.errorCode)) !== null && _c !== void 0 ? _c : userFacingError.errorCode;
67
+ const message = (isUnknownUserError ? buildError?.message : userFacingError.message) ?? userFacingError.message;
68
+ const errorCode = (isUnknownUserError ? buildError?.errorCode : userFacingError.errorCode) ??
69
+ userFacingError.errorCode;
69
70
  return new eas_build_job_1.errors.BuildError(message, {
70
71
  errorCode,
71
72
  userFacingErrorCode: userFacingError.errorCode,
@@ -75,4 +76,3 @@ async function resolveBuildPhaseErrorAsync(error, logLines, errorContext, buildL
75
76
  buildPhase: phase,
76
77
  });
77
78
  }
78
- //# sourceMappingURL=detectError.js.map
@@ -2,4 +2,3 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.XCODE_BUILD_PHASE = void 0;
4
4
  exports.XCODE_BUILD_PHASE = 'XCODE_BUILD';
5
- //# sourceMappingURL=errors.types.js.map
@@ -215,8 +215,8 @@ To resolve this issue, downgrade to an older Xcode version using the "image" fie
215
215
  // file modified: /Users/expo/workingdir/build/packages/video/ios/Vendor/dependency/ProgrammaticAccessLibrary.xcframework/ios-arm64_x86_64-simulator/ProgrammaticAccessLibrary.framework/ProgrammaticAccessLibrary
216
216
  // file modified: /Users/expo/workingdir/build/packages/video/ios/Vendor/dependency/ProgrammaticAccessLibrary.xcframework/ios-arm64/ProgrammaticAccessLibrary.framework/ProgrammaticAccessLibrary
217
217
  regexp: /error: .+/g,
218
- createError: (matchResult) => new UserFacingError('XCODE_BUILD_ERROR', `The "Run fastlane" step failed because of an error in the Xcode build process. We automatically detected following errors in your Xcode build logs:\n${matchResult
219
- .map((match) => `- ${match.replace('error: ', '')}`)
218
+ createError: matchResult => new UserFacingError('XCODE_BUILD_ERROR', `The "Run fastlane" step failed because of an error in the Xcode build process. We automatically detected following errors in your Xcode build logs:\n${matchResult
219
+ .map(match => `- ${match.replace('error: ', '')}`)
220
220
  .join('\n')}\nRefer to "Xcode Logs" below for additional, more detailed logs.`),
221
221
  },
222
222
  {
@@ -226,4 +226,3 @@ To resolve this issue, downgrade to an older Xcode version using the "image" fie
226
226
  createError: () => new UserFacingError(eas_build_job_1.errors.ErrorCode.UNKNOWN_FASTLANE_ERROR, `The "Run fastlane" step failed with an unknown error. Refer to "Xcode Logs" below for additional, more detailed logs.`),
227
227
  },
228
228
  ];
229
- //# sourceMappingURL=userErrorHandlers.js.map
@@ -4,24 +4,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.default = androidBuilder;
7
- const path_1 = __importDefault(require("path"));
8
7
  const eas_build_job_1 = require("@expo/eas-build-job");
9
8
  const nullthrows_1 = __importDefault(require("nullthrows"));
10
- const context_1 = require("../context");
11
- const expoUpdates_1 = require("../utils/expoUpdates");
12
- const gradle_1 = require("../android/gradle");
13
- const artifacts_1 = require("../utils/artifacts");
14
- const hooks_1 = require("../utils/hooks");
9
+ const path_1 = __importDefault(require("path"));
10
+ const common_1 = require("./common");
11
+ const custom_1 = require("./custom");
15
12
  const credentials_1 = require("../android/credentials");
13
+ const gradle_1 = require("../android/gradle");
16
14
  const gradleConfig_1 = require("../android/gradleConfig");
17
- const setup_1 = require("../common/setup");
18
- const prebuild_1 = require("../common/prebuild");
19
- const prepareBuildExecutable_1 = require("../utils/prepareBuildExecutable");
20
15
  const eagerBundle_1 = require("../common/eagerBundle");
16
+ const prebuild_1 = require("../common/prebuild");
17
+ const setup_1 = require("../common/setup");
18
+ const context_1 = require("../context");
21
19
  const restoreBuildCache_1 = require("../steps/functions/restoreBuildCache");
22
20
  const saveBuildCache_1 = require("../steps/functions/saveBuildCache");
23
- const common_1 = require("./common");
24
- const custom_1 = require("./custom");
21
+ const artifacts_1 = require("../utils/artifacts");
22
+ const expoUpdates_1 = require("../utils/expoUpdates");
23
+ const hooks_1 = require("../utils/hooks");
24
+ const prepareBuildExecutable_1 = require("../utils/prepareBuildExecutable");
25
25
  async function androidBuilder(ctx) {
26
26
  if (ctx.job.mode === eas_build_job_1.BuildMode.BUILD) {
27
27
  await (0, prepareBuildExecutable_1.prepareExecutableAsync)(ctx);
@@ -59,12 +59,11 @@ async function buildAsync(ctx) {
59
59
  });
60
60
  });
61
61
  await ctx.runBuildPhase(eas_build_job_1.BuildPhase.RESTORE_CACHE, async () => {
62
- var _a;
63
62
  if (ctx.isLocal) {
64
63
  ctx.logger.info('Local builds do not support restoring cache');
65
64
  return;
66
65
  }
67
- await ((_a = ctx.cacheManager) === null || _a === void 0 ? void 0 : _a.restoreCache(ctx));
66
+ await ctx.cacheManager?.restoreCache(ctx);
68
67
  await (0, restoreBuildCache_1.restoreCcacheAsync)({
69
68
  logger: ctx.logger,
70
69
  workingDirectory,
@@ -93,10 +92,9 @@ async function buildAsync(ctx) {
93
92
  });
94
93
  }
95
94
  await ctx.runBuildPhase(eas_build_job_1.BuildPhase.CONFIGURE_EXPO_UPDATES, async () => {
96
- var _a, _b;
97
95
  await (0, expoUpdates_1.configureExpoUpdatesIfInstalledAsync)(ctx, {
98
- resolvedRuntimeVersion: (_a = resolvedExpoUpdatesRuntimeVersion === null || resolvedExpoUpdatesRuntimeVersion === void 0 ? void 0 : resolvedExpoUpdatesRuntimeVersion.runtimeVersion) !== null && _a !== void 0 ? _a : null,
99
- resolvedFingerprintSources: (_b = resolvedExpoUpdatesRuntimeVersion === null || resolvedExpoUpdatesRuntimeVersion === void 0 ? void 0 : resolvedExpoUpdatesRuntimeVersion.fingerprintSources) !== null && _b !== void 0 ? _b : null,
96
+ resolvedRuntimeVersion: resolvedExpoUpdatesRuntimeVersion?.runtimeVersion ?? null,
97
+ resolvedFingerprintSources: resolvedExpoUpdatesRuntimeVersion?.fingerprintSources ?? null,
100
98
  });
101
99
  });
102
100
  if (ctx.skipNativeBuild) {
@@ -110,9 +108,9 @@ async function buildAsync(ctx) {
110
108
  logger: ctx.logger,
111
109
  env: {
112
110
  ...ctx.env,
113
- ...((resolvedExpoUpdatesRuntimeVersion === null || resolvedExpoUpdatesRuntimeVersion === void 0 ? void 0 : resolvedExpoUpdatesRuntimeVersion.runtimeVersion)
111
+ ...(resolvedExpoUpdatesRuntimeVersion?.runtimeVersion
114
112
  ? {
115
- EXPO_UPDATES_FINGERPRINT_OVERRIDE: resolvedExpoUpdatesRuntimeVersion === null || resolvedExpoUpdatesRuntimeVersion === void 0 ? void 0 : resolvedExpoUpdatesRuntimeVersion.runtimeVersion,
113
+ EXPO_UPDATES_FINGERPRINT_OVERRIDE: resolvedExpoUpdatesRuntimeVersion?.runtimeVersion,
116
114
  EXPO_UPDATES_WORKFLOW_OVERRIDE: ctx.job.type,
117
115
  }
118
116
  : null),
@@ -127,7 +125,7 @@ async function buildAsync(ctx) {
127
125
  logger: ctx.logger,
128
126
  gradleCommand,
129
127
  androidDir: path_1.default.join(ctx.getReactNativeProjectDirectory(), 'android'),
130
- ...((resolvedExpoUpdatesRuntimeVersion === null || resolvedExpoUpdatesRuntimeVersion === void 0 ? void 0 : resolvedExpoUpdatesRuntimeVersion.runtimeVersion)
128
+ ...(resolvedExpoUpdatesRuntimeVersion?.runtimeVersion
131
129
  ? {
132
130
  extraEnv: {
133
131
  EXPO_UPDATES_FINGERPRINT_OVERRIDE: resolvedExpoUpdatesRuntimeVersion.runtimeVersion,
@@ -141,20 +139,18 @@ async function buildAsync(ctx) {
141
139
  await (0, hooks_1.runHookIfPresent)(ctx, hooks_1.Hook.PRE_UPLOAD_ARTIFACTS);
142
140
  });
143
141
  await ctx.runBuildPhase(eas_build_job_1.BuildPhase.UPLOAD_APPLICATION_ARCHIVE, async () => {
144
- var _a;
145
142
  await (0, artifacts_1.uploadApplicationArchive)(ctx, {
146
- patternOrPath: (_a = ctx.job.applicationArchivePath) !== null && _a !== void 0 ? _a : 'android/app/build/outputs/**/*.{apk,aab}',
143
+ patternOrPath: ctx.job.applicationArchivePath ?? 'android/app/build/outputs/**/*.{apk,aab}',
147
144
  rootDir: ctx.getReactNativeProjectDirectory(),
148
145
  logger: ctx.logger,
149
146
  });
150
147
  });
151
148
  await ctx.runBuildPhase(eas_build_job_1.BuildPhase.SAVE_CACHE, async () => {
152
- var _a;
153
149
  if (ctx.isLocal) {
154
150
  ctx.logger.info('Local builds do not support saving cache.');
155
151
  return;
156
152
  }
157
- await ((_a = ctx.cacheManager) === null || _a === void 0 ? void 0 : _a.saveCache(ctx));
153
+ await ctx.cacheManager?.saveCache(ctx);
158
154
  await (0, saveBuildCache_1.saveCcacheAsync)({
159
155
  logger: ctx.logger,
160
156
  workingDirectory,
@@ -172,4 +168,3 @@ async function buildAsync(ctx) {
172
168
  });
173
169
  });
174
170
  }
175
- //# sourceMappingURL=android.js.map
@@ -47,4 +47,3 @@ async function runBuilderWithHooksAsync(ctx, builderAsync) {
47
47
  }
48
48
  return ctx.artifacts;
49
49
  }
50
- //# sourceMappingURL=common.js.map
@@ -4,21 +4,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.runCustomBuildAsync = runCustomBuildAsync;
7
+ const eas_build_job_1 = require("@expo/eas-build-job");
8
+ const steps_1 = require("@expo/steps");
7
9
  const assert_1 = __importDefault(require("assert"));
8
- const path_1 = __importDefault(require("path"));
9
10
  const promises_1 = __importDefault(require("fs/promises"));
10
11
  const nullthrows_1 = __importDefault(require("nullthrows"));
11
- const eas_build_job_1 = require("@expo/eas-build-job");
12
- const steps_1 = require("@expo/steps");
12
+ const path_1 = __importDefault(require("path"));
13
+ const easBuildInternal_1 = require("../common/easBuildInternal");
13
14
  const projectSources_1 = require("../common/projectSources");
14
- const easFunctions_1 = require("../steps/easFunctions");
15
15
  const customBuildContext_1 = require("../customBuildContext");
16
- const easBuildInternal_1 = require("../common/easBuildInternal");
17
- const easFunctionGroups_1 = require("../steps/easFunctionGroups");
18
16
  const xcodeBuildLogs_1 = require("../ios/xcodeBuildLogs");
17
+ const easFunctionGroups_1 = require("../steps/easFunctionGroups");
18
+ const easFunctions_1 = require("../steps/easFunctions");
19
19
  const retry_1 = require("../utils/retry");
20
20
  async function runCustomBuildAsync(ctx) {
21
- var _a, _b;
22
21
  const customBuildCtx = new customBuildContext_1.CustomBuildContext(ctx);
23
22
  await ctx.runBuildPhase(eas_build_job_1.BuildPhase.PREPARE_PROJECT, async () => {
24
23
  await (0, retry_1.retryAsync)(async () => {
@@ -28,14 +27,14 @@ async function runCustomBuildAsync(ctx) {
28
27
  }, {
29
28
  retryOptions: {
30
29
  retries: 3,
31
- retryIntervalMs: 1000,
30
+ retryIntervalMs: 1_000,
32
31
  },
33
32
  });
34
33
  });
35
34
  if (ctx.job.triggeredBy === eas_build_job_1.BuildTrigger.GIT_BASED_INTEGRATION) {
36
35
  // We need to setup envs from eas.json
37
36
  const env = await (0, easBuildInternal_1.resolveEnvFromBuildProfileAsync)(ctx, {
38
- cwd: path_1.default.join(customBuildCtx.projectSourceDirectory, (_a = ctx.job.projectRootDirectory) !== null && _a !== void 0 ? _a : '.'),
37
+ cwd: path_1.default.join(customBuildCtx.projectSourceDirectory, ctx.job.projectRootDirectory ?? '.'),
39
38
  });
40
39
  ctx.updateEnv(env);
41
40
  customBuildCtx.updateEnv(ctx.env);
@@ -53,7 +52,7 @@ async function runCustomBuildAsync(ctx) {
53
52
  : new steps_1.BuildConfigParser(globalContext, {
54
53
  externalFunctions: easFunctions,
55
54
  externalFunctionGroups: easFunctionGroups,
56
- configPath: path_1.default.join(ctx.getReactNativeProjectDirectory(customBuildCtx.projectSourceDirectory), (0, nullthrows_1.default)((_b = ctx.job.customBuildConfig) === null || _b === void 0 ? void 0 : _b.path, 'Steps or custom build config path are required in custom jobs')),
55
+ configPath: path_1.default.join(ctx.getReactNativeProjectDirectory(customBuildCtx.projectSourceDirectory), (0, nullthrows_1.default)(ctx.job.customBuildConfig?.path, 'Steps or custom build config path are required in custom jobs')),
57
56
  });
58
57
  const workflow = await ctx.runBuildPhase(eas_build_job_1.BuildPhase.PARSE_CUSTOM_WORKFLOW_CONFIG, async () => {
59
58
  try {
@@ -92,4 +91,3 @@ async function runCustomBuildAsync(ctx) {
92
91
  }
93
92
  return ctx.artifacts;
94
93
  }
95
- //# sourceMappingURL=custom.js.map
@@ -8,4 +8,3 @@ const android_1 = __importDefault(require("./android"));
8
8
  exports.androidBuilder = android_1.default;
9
9
  const ios_1 = __importDefault(require("./ios"));
10
10
  exports.iosBuilder = ios_1.default;
11
- //# sourceMappingURL=index.js.map