@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
@@ -5,11 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.evaluateTemplateString = evaluateTemplateString;
7
7
  exports.configureXcodeProject = configureXcodeProject;
8
- const path_1 = __importDefault(require("path"));
9
8
  const config_plugins_1 = require("@expo/config-plugins");
10
- const uniq_1 = __importDefault(require("lodash/uniq"));
11
- const fs_extra_1 = __importDefault(require("fs-extra"));
12
9
  const plist_1 = __importDefault(require("@expo/plist"));
10
+ const fs_extra_1 = __importDefault(require("fs-extra"));
11
+ const uniq_1 = __importDefault(require("lodash/uniq"));
12
+ const path_1 = __importDefault(require("path"));
13
13
  async function configureXcodeProject(ctx, { credentials, buildConfiguration, }) {
14
14
  ctx.logger.info('Configuring Xcode project');
15
15
  await configureCredentialsAsync(ctx, {
@@ -18,7 +18,7 @@ async function configureXcodeProject(ctx, { credentials, buildConfiguration, })
18
18
  });
19
19
  const { version } = ctx.job;
20
20
  // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
21
- if ((version === null || version === void 0 ? void 0 : version.appVersion) || (version === null || version === void 0 ? void 0 : version.buildNumber)) {
21
+ if (version?.appVersion || version?.buildNumber) {
22
22
  await updateVersionsAsync(ctx, {
23
23
  targetNames: Object.keys(credentials.targetProvisioningProfiles),
24
24
  buildConfiguration,
@@ -39,7 +39,6 @@ async function configureCredentialsAsync(ctx, { credentials, buildConfiguration,
39
39
  }
40
40
  }
41
41
  async function updateVersionsAsync(ctx, { targetNames, buildConfiguration, }) {
42
- var _a, _b, _c, _d;
43
42
  const project = config_plugins_1.IOSConfig.XcodeUtils.getPbxproj(ctx.getReactNativeProjectDirectory());
44
43
  const iosDir = path_1.default.join(ctx.getReactNativeProjectDirectory(), 'ios');
45
44
  const infoPlistPaths = [];
@@ -64,17 +63,17 @@ async function updateVersionsAsync(ctx, { targetNames, buildConfiguration, }) {
64
63
  ctx.logger.info(`Updating versions in ${infoPlistPath}`);
65
64
  const infoPlistRaw = await fs_extra_1.default.readFile(infoPlistPath, 'utf-8');
66
65
  const infoPlist = plist_1.default.parse(infoPlistRaw);
67
- if ((_a = ctx.job.version) === null || _a === void 0 ? void 0 : _a.buildNumber) {
68
- infoPlist.CFBundleVersion = (_b = ctx.job.version) === null || _b === void 0 ? void 0 : _b.buildNumber;
66
+ if (ctx.job.version?.buildNumber) {
67
+ infoPlist.CFBundleVersion = ctx.job.version?.buildNumber;
69
68
  }
70
- if ((_c = ctx.job.version) === null || _c === void 0 ? void 0 : _c.appVersion) {
71
- infoPlist.CFBundleShortVersionString = (_d = ctx.job.version) === null || _d === void 0 ? void 0 : _d.appVersion;
69
+ if (ctx.job.version?.appVersion) {
70
+ infoPlist.CFBundleShortVersionString = ctx.job.version?.appVersion;
72
71
  }
73
72
  await fs_extra_1.default.writeFile(infoPlistPath, plist_1.default.build(infoPlist));
74
73
  }
75
74
  }
76
75
  function trimQuotes(s) {
77
- return (s === null || s === void 0 ? void 0 : s.startsWith('"')) && s.endsWith('"') ? s.slice(1, -1) : s;
76
+ return s?.startsWith('"') && s.endsWith('"') ? s.slice(1, -1) : s;
78
77
  }
79
78
  function evaluateTemplateString(s, buildSettings) {
80
79
  // necessary because buildSettings might be XCBuildConfiguration['buildSettings'] which is not a plain object
@@ -89,4 +88,3 @@ function evaluateTemplateString(s, buildSettings) {
89
88
  }
90
89
  });
91
90
  }
92
- //# sourceMappingURL=configure.js.map
@@ -20,7 +20,6 @@ function getCommonName({ dataBase64, password }) {
20
20
  return Buffer.from(commonNameAttribute.value, 'ascii').toString();
21
21
  }
22
22
  function getCertData(certificateBase64, password) {
23
- var _a, _b, _c;
24
23
  const p12Der = node_forge_1.default.util.decode64(certificateBase64);
25
24
  const p12Asn1 = node_forge_1.default.asn1.fromDer(p12Der);
26
25
  let p12;
@@ -42,10 +41,9 @@ function getCertData(certificateBase64, password) {
42
41
  }
43
42
  }
44
43
  const certBagType = node_forge_1.default.pki.oids.certBag;
45
- const certData = (_c = (_b = (_a = p12.getBags({ bagType: certBagType })) === null || _a === void 0 ? void 0 : _a[certBagType]) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.cert;
44
+ const certData = p12.getBags({ bagType: certBagType })?.[certBagType]?.[0]?.cert;
46
45
  if (!certData) {
47
46
  throw new Error("getCertData: couldn't find cert bag");
48
47
  }
49
48
  return certData;
50
49
  }
51
- //# sourceMappingURL=distributionCertificate.js.map
@@ -3,16 +3,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
6
7
  const os_1 = __importDefault(require("os"));
7
8
  const path_1 = __importDefault(require("path"));
8
- const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
9
9
  const uuid_1 = require("uuid");
10
10
  const fastlane_1 = require("../fastlane");
11
11
  class Keychain {
12
+ ctx;
13
+ keychainPath;
14
+ keychainPassword;
15
+ created = false;
16
+ destroyed = false;
12
17
  constructor(ctx) {
13
18
  this.ctx = ctx;
14
- this.created = false;
15
- this.destroyed = false;
16
19
  this.keychainPath = path_1.default.join(os_1.default.tmpdir(), `eas-build-${(0, uuid_1.v4)()}.keychain`);
17
20
  this.keychainPassword = (0, uuid_1.v4)();
18
21
  }
@@ -63,7 +66,7 @@ class Keychain {
63
66
  this.ctx.logger.warn('The keychain has been already destroyed');
64
67
  return;
65
68
  }
66
- const keychainToDeletePath = keychainPath !== null && keychainPath !== void 0 ? keychainPath : this.keychainPath;
69
+ const keychainToDeletePath = keychainPath ?? this.keychainPath;
67
70
  this.ctx.logger.info(`Destroying keychain - ${keychainToDeletePath}`);
68
71
  try {
69
72
  await (0, fastlane_1.runFastlane)(['run', 'delete_keychain', `keychain_path:${keychainToDeletePath}`]);
@@ -75,10 +78,9 @@ class Keychain {
75
78
  }
76
79
  }
77
80
  async cleanUpKeychains() {
78
- var _a;
79
81
  const { stdout } = await (0, turtle_spawn_1.default)('security', ['list-keychains'], { stdio: 'pipe' });
80
- const keychainList = ((_a = /"(.*)"/g.exec(stdout)) !== null && _a !== void 0 ? _a : []).map((i) => i.slice(1, i.length - 1));
81
- const turtleKeychainList = keychainList.filter((keychain) => /eas-build-[\w-]+\.keychain$/.exec(keychain));
82
+ const keychainList = (/"(.*)"/g.exec(stdout) ?? []).map(i => i.slice(1, i.length - 1));
83
+ const turtleKeychainList = keychainList.filter(keychain => /eas-build-[\w-]+\.keychain$/.exec(keychain));
82
84
  for (const turtleKeychainPath of turtleKeychainList) {
83
85
  await this.destroy(turtleKeychainPath);
84
86
  }
@@ -91,4 +93,3 @@ class Keychain {
91
93
  }
92
94
  }
93
95
  exports.default = Keychain;
94
- //# sourceMappingURL=keychain.js.map
@@ -1,6 +1,6 @@
1
1
  import { Ios } from '@expo/eas-build-job';
2
- import { BuildContext } from '../../context';
3
2
  import ProvisioningProfile, { DistributionType, ProvisioningProfileData } from './provisioningProfile';
3
+ import { BuildContext } from '../../context';
4
4
  export interface Credentials {
5
5
  applicationTargetProvisioningProfile: ProvisioningProfile<Ios.Job>;
6
6
  keychainPath: string;
@@ -15,32 +15,44 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  const assert_1 = __importDefault(require("assert"));
30
- const os_1 = __importDefault(require("os"));
31
- const path_1 = __importDefault(require("path"));
32
40
  const fs_extra_1 = __importDefault(require("fs-extra"));
33
41
  const lodash_1 = require("lodash");
34
42
  const nullthrows_1 = __importDefault(require("nullthrows"));
43
+ const os_1 = __importDefault(require("os"));
44
+ const path_1 = __importDefault(require("path"));
35
45
  const uuid_1 = require("uuid");
36
46
  const distributionCertificateUtils = __importStar(require("./distributionCertificate"));
37
47
  const keychain_1 = __importDefault(require("./keychain"));
38
48
  const provisioningProfile_1 = __importDefault(require("./provisioningProfile"));
39
49
  class IosCredentialsManager {
50
+ ctx;
51
+ keychain;
52
+ provisioningProfiles = [];
53
+ cleanedUp = false;
40
54
  constructor(ctx) {
41
55
  this.ctx = ctx;
42
- this.provisioningProfiles = [];
43
- this.cleanedUp = false;
44
56
  }
45
57
  async prepare() {
46
58
  if (this.ctx.job.simulator) {
@@ -96,7 +108,7 @@ class IosCredentialsManager {
96
108
  const certificateCommonName = distributionCertificateUtils.getCommonName(targetCredentials.distributionCertificate);
97
109
  this.ctx.logger.info(`Fingerprint = "${certificateFingerprint}", common name = ${certificateCommonName}`);
98
110
  this.ctx.logger.info(`Writing distribution certificate to ${distCertPath}`);
99
- await fs_extra_1.default.writeFile(distCertPath, Buffer.from(targetCredentials.distributionCertificate.dataBase64, 'base64'));
111
+ await fs_extra_1.default.writeFile(distCertPath, new Uint8Array(Buffer.from(targetCredentials.distributionCertificate.dataBase64, 'base64')));
100
112
  this.ctx.logger.info('Importing distribution certificate into the keychain');
101
113
  await this.keychain.importCertificate(distCertPath, targetCredentials.distributionCertificate.password);
102
114
  this.ctx.logger.info('Initializing provisioning profile');
@@ -120,4 +132,3 @@ class IosCredentialsManager {
120
132
  }
121
133
  }
122
134
  exports.default = IosCredentialsManager;
123
- //# sourceMappingURL=manager.js.map
@@ -4,12 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.DistributionType = void 0;
7
- const crypto_1 = __importDefault(require("crypto"));
8
- const os_1 = __importDefault(require("os"));
9
- const path_1 = __importDefault(require("path"));
10
7
  const eas_build_job_1 = require("@expo/eas-build-job");
11
8
  const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
9
+ const crypto_1 = __importDefault(require("crypto"));
12
10
  const fs_extra_1 = __importDefault(require("fs-extra"));
11
+ const os_1 = __importDefault(require("os"));
12
+ const path_1 = __importDefault(require("path"));
13
13
  const plist_1 = __importDefault(require("plist"));
14
14
  const uuid_1 = require("uuid");
15
15
  var DistributionType;
@@ -20,6 +20,11 @@ var DistributionType;
20
20
  })(DistributionType || (exports.DistributionType = DistributionType = {}));
21
21
  const PROVISIONING_PROFILES_DIRECTORY = path_1.default.join(os_1.default.homedir(), 'Library/MobileDevice/Provisioning Profiles');
22
22
  class ProvisioningProfile {
23
+ ctx;
24
+ profile;
25
+ keychainPath;
26
+ target;
27
+ certificateCommonName;
23
28
  get data() {
24
29
  if (!this.profileData) {
25
30
  throw new Error('You must init the profile first!');
@@ -28,6 +33,8 @@ class ProvisioningProfile {
28
33
  return this.profileData;
29
34
  }
30
35
  }
36
+ profilePath;
37
+ profileData;
31
38
  constructor(ctx, profile, keychainPath, target, certificateCommonName) {
32
39
  this.ctx = ctx;
33
40
  this.profile = profile;
@@ -40,7 +47,7 @@ class ProvisioningProfile {
40
47
  this.ctx.logger.debug(`Making sure ${PROVISIONING_PROFILES_DIRECTORY} exits`);
41
48
  await fs_extra_1.default.ensureDir(PROVISIONING_PROFILES_DIRECTORY);
42
49
  this.ctx.logger.debug(`Writing provisioning profile to ${this.profilePath}`);
43
- await fs_extra_1.default.writeFile(this.profilePath, this.profile);
50
+ await fs_extra_1.default.writeFile(this.profilePath, new Uint8Array(this.profile));
44
51
  this.ctx.logger.debug('Loading provisioning profile');
45
52
  await this.load();
46
53
  }
@@ -106,10 +113,9 @@ Profile's certificate fingerprint = ${devCertFingerprint}, distribution certific
106
113
  genDerCertFingerprint() {
107
114
  return crypto_1.default
108
115
  .createHash('sha1')
109
- .update(this.data.developerCertificate)
116
+ .update(new Uint8Array(this.data.developerCertificate))
110
117
  .digest('hex')
111
118
  .toUpperCase();
112
119
  }
113
120
  }
114
121
  exports.default = ProvisioningProfile;
115
- //# sourceMappingURL=provisioningProfile.js.map
@@ -8,10 +8,10 @@ exports.iosSetRuntimeVersionNativelyAsync = iosSetRuntimeVersionNativelyAsync;
8
8
  exports.iosSetChannelNativelyAsync = iosSetChannelNativelyAsync;
9
9
  exports.iosGetNativelyDefinedChannelAsync = iosGetNativelyDefinedChannelAsync;
10
10
  exports.iosGetNativelyDefinedRuntimeVersionAsync = iosGetNativelyDefinedRuntimeVersionAsync;
11
- const assert_1 = __importDefault(require("assert"));
12
11
  const config_plugins_1 = require("@expo/config-plugins");
13
- const fs_extra_1 = __importDefault(require("fs-extra"));
14
12
  const plist_1 = __importDefault(require("@expo/plist"));
13
+ const assert_1 = __importDefault(require("assert"));
14
+ const fs_extra_1 = __importDefault(require("fs-extra"));
15
15
  var IosMetadataName;
16
16
  (function (IosMetadataName) {
17
17
  IosMetadataName["UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY"] = "EXUpdatesRequestHeaders";
@@ -29,8 +29,7 @@ async function iosSetRuntimeVersionNativelyAsync(ctx, runtimeVersion) {
29
29
  await fs_extra_1.default.writeFile(expoPlistPath, updatedExpoPlistContents);
30
30
  }
31
31
  async function iosSetChannelNativelyAsync(ctx) {
32
- var _a, _b;
33
- (0, assert_1.default)((_a = ctx.job.updates) === null || _a === void 0 ? void 0 : _a.channel, 'updates.channel must be defined');
32
+ (0, assert_1.default)(ctx.job.updates?.channel, 'updates.channel must be defined');
34
33
  const expoPlistPath = config_plugins_1.IOSConfig.Paths.getExpoPlistPath(ctx.getReactNativeProjectDirectory());
35
34
  if (!(await fs_extra_1.default.pathExists(expoPlistPath))) {
36
35
  throw new Error(`${expoPlistPath} does not exist`);
@@ -38,14 +37,13 @@ async function iosSetChannelNativelyAsync(ctx) {
38
37
  const expoPlistContents = await fs_extra_1.default.readFile(expoPlistPath, 'utf8');
39
38
  const items = plist_1.default.parse(expoPlistContents);
40
39
  items[IosMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY] = {
41
- ...((_b = items[IosMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY]) !== null && _b !== void 0 ? _b : {}),
40
+ ...(items[IosMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY] ?? {}),
42
41
  'expo-channel-name': ctx.job.updates.channel,
43
42
  };
44
43
  const updatedExpoPlistContents = plist_1.default.build(items);
45
44
  await fs_extra_1.default.writeFile(expoPlistPath, updatedExpoPlistContents);
46
45
  }
47
46
  async function iosGetNativelyDefinedChannelAsync(ctx) {
48
- var _a, _b;
49
47
  const expoPlistPath = config_plugins_1.IOSConfig.Paths.getExpoPlistPath(ctx.getReactNativeProjectDirectory());
50
48
  if (!(await fs_extra_1.default.pathExists(expoPlistPath))) {
51
49
  return null;
@@ -53,15 +51,14 @@ async function iosGetNativelyDefinedChannelAsync(ctx) {
53
51
  const expoPlistContents = await fs_extra_1.default.readFile(expoPlistPath, 'utf8');
54
52
  try {
55
53
  const items = plist_1.default.parse(expoPlistContents);
56
- const updatesRequestHeaders = ((_a = items[IosMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY]) !== null && _a !== void 0 ? _a : {});
57
- return (_b = updatesRequestHeaders['expo-channel-name']) !== null && _b !== void 0 ? _b : null;
54
+ const updatesRequestHeaders = (items[IosMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY] ?? {});
55
+ return updatesRequestHeaders['expo-channel-name'] ?? null;
58
56
  }
59
57
  catch (err) {
60
58
  throw new Error(`Failed to parse ${IosMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY} from Expo.plist: ${err.message}`);
61
59
  }
62
60
  }
63
61
  async function iosGetNativelyDefinedRuntimeVersionAsync(ctx) {
64
- var _a;
65
62
  const expoPlistPath = config_plugins_1.IOSConfig.Paths.getExpoPlistPath(ctx.getReactNativeProjectDirectory());
66
63
  if (!(await fs_extra_1.default.pathExists(expoPlistPath))) {
67
64
  return null;
@@ -71,6 +68,5 @@ async function iosGetNativelyDefinedRuntimeVersionAsync(ctx) {
71
68
  if (!parsedPlist) {
72
69
  return null;
73
70
  }
74
- return (_a = parsedPlist[IosMetadataName.RUNTIME_VERSION]) !== null && _a !== void 0 ? _a : null;
71
+ return parsedPlist[IosMetadataName.RUNTIME_VERSION] ?? null;
75
72
  }
76
- //# sourceMappingURL=expoUpdates.js.map
@@ -1,4 +1,4 @@
1
- import { TargetProvisioningProfiles } from './credentials/manager';
1
+ import type { TargetProvisioningProfiles } from './credentials/manager';
2
2
  export declare function createFastfileForResigningBuild({ outputFile, ipaPath, signingIdentity, keychainPath, targetProvisioningProfiles, }: {
3
3
  outputFile: string;
4
4
  ipaPath: string;
@@ -29,4 +29,3 @@ async function createFastfileForResigningBuild({ outputFile, ipaPath, signingIde
29
29
  });
30
30
  await fs_extra_1.default.writeFile(outputFile, output);
31
31
  }
32
- //# sourceMappingURL=fastfile.js.map
@@ -1,8 +1,8 @@
1
1
  import { Env, Ios } from '@expo/eas-build-job';
2
2
  import { bunyan } from '@expo/logger';
3
3
  import { SpawnResult } from '@expo/turtle-spawn';
4
+ import type { Credentials } from './credentials/manager';
4
5
  import { BuildContext } from '../context';
5
- import { Credentials } from './credentials/manager';
6
6
  export declare function runFastlaneGym<TJob extends Ios.Job>(ctx: BuildContext<TJob>, { scheme, buildConfiguration, credentials, entitlements, extraEnv, }: {
7
7
  scheme: string;
8
8
  buildConfiguration?: string;
@@ -6,16 +6,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.runFastlaneGym = runFastlaneGym;
7
7
  exports.runFastlaneResign = runFastlaneResign;
8
8
  exports.runFastlane = runFastlane;
9
- const path_1 = __importDefault(require("path"));
10
9
  const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
11
10
  const fs_extra_1 = __importDefault(require("fs-extra"));
12
11
  const nullthrows_1 = __importDefault(require("nullthrows"));
13
- const context_1 = require("../context");
14
- const fastlane_1 = require("../common/fastlane");
12
+ const path_1 = __importDefault(require("path"));
13
+ const fastfile_1 = require("./fastfile");
15
14
  const gymfile_1 = require("./gymfile");
16
- const xcpretty_1 = require("./xcpretty");
17
15
  const tvos_1 = require("./tvos");
18
- const fastfile_1 = require("./fastfile");
16
+ const xcpretty_1 = require("./xcpretty");
17
+ const fastlane_1 = require("../common/fastlane");
18
+ const context_1 = require("../context");
19
19
  async function runFastlaneGym(ctx, { scheme, buildConfiguration, credentials, entitlements, extraEnv, }) {
20
20
  await ensureGymfileExists(ctx, {
21
21
  scheme,
@@ -62,7 +62,7 @@ async function runFastlane(fastlaneArgs, { logger, env, cwd, } = {}) {
62
62
  return await (0, turtle_spawn_1.default)('fastlane', fastlaneArgs, {
63
63
  env: {
64
64
  ...fastlane_1.COMMON_FASTLANE_ENV,
65
- ...(env !== null && env !== void 0 ? env : process.env),
65
+ ...(env ?? process.env),
66
66
  },
67
67
  logger,
68
68
  cwd,
@@ -81,7 +81,7 @@ async function ensureGymfileExists(ctx, { scheme, buildConfiguration, credential
81
81
  await (0, gymfile_1.createGymfileForSimulatorBuild)({
82
82
  outputFile: gymfilePath,
83
83
  scheme,
84
- buildConfiguration: buildConfiguration !== null && buildConfiguration !== void 0 ? buildConfiguration : 'release',
84
+ buildConfiguration: buildConfiguration ?? 'release',
85
85
  derivedDataPath: './build',
86
86
  clean: false,
87
87
  logsDirectory,
@@ -97,9 +97,8 @@ async function ensureGymfileExists(ctx, { scheme, buildConfiguration, credential
97
97
  outputDirectory: './build',
98
98
  clean: false,
99
99
  logsDirectory,
100
- entitlements: entitlements !== null && entitlements !== void 0 ? entitlements : undefined,
100
+ entitlements: entitlements ?? undefined,
101
101
  });
102
102
  }
103
103
  ctx.logger.info('Gymfile created');
104
104
  }
105
- //# sourceMappingURL=fastlane.js.map
@@ -1,4 +1,4 @@
1
- import { Credentials } from './credentials/manager';
1
+ import type { Credentials } from './credentials/manager';
2
2
  interface ArchiveBuildOptions {
3
3
  outputFile: string;
4
4
  credentials: Credentials;
@@ -19,7 +19,7 @@ async function createGymfileForArchiveBuild({ outputFile, clean, credentials, sc
19
19
  UUID: profile.uuid,
20
20
  });
21
21
  }
22
- const ICLOUD_CONTAINER_ENVIRONMENT = entitlements === null || entitlements === void 0 ? void 0 : entitlements['com.apple.developer.icloud-container-environment'];
22
+ const ICLOUD_CONTAINER_ENVIRONMENT = entitlements?.['com.apple.developer.icloud-container-environment'];
23
23
  await fs_extra_1.default.mkdirp(logsDirectory);
24
24
  await createGymfile({
25
25
  template: GymfileArchive_1.GymfileArchiveTemplate,
@@ -60,4 +60,3 @@ async function createGymfile({ template, outputFile, vars, }) {
60
60
  });
61
61
  await fs_extra_1.default.writeFile(outputFile, output);
62
62
  }
63
- //# sourceMappingURL=gymfile.js.map
package/dist/ios/pod.js CHANGED
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.installPods = installPods;
7
- const path_1 = __importDefault(require("path"));
8
7
  const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
8
+ const path_1 = __importDefault(require("path"));
9
9
  async function installPods(ctx, { infoCallbackFn }) {
10
10
  const iosDir = path_1.default.join(ctx.getReactNativeProjectDirectory(), 'ios');
11
11
  const verboseFlag = ctx.env['EAS_VERBOSE'] === '1' ? ['--verbose'] : [];
@@ -31,4 +31,3 @@ async function installPods(ctx, { infoCallbackFn }) {
31
31
  }),
32
32
  };
33
33
  }
34
- //# sourceMappingURL=pod.js.map
@@ -4,12 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.downloadApplicationArchiveAsync = downloadApplicationArchiveAsync;
7
- const assert_1 = __importDefault(require("assert"));
8
- const path_1 = __importDefault(require("path"));
9
7
  const downloader_1 = __importDefault(require("@expo/downloader"));
10
8
  const eas_build_job_1 = require("@expo/eas-build-job");
9
+ const assert_1 = __importDefault(require("assert"));
10
+ const path_1 = __importDefault(require("path"));
11
11
  async function downloadApplicationArchiveAsync(ctx) {
12
- var _a;
13
12
  (0, assert_1.default)(ctx.job.resign);
14
13
  const applicationArchivePath = path_1.default.join(ctx.workingdir, 'application.ipa');
15
14
  const { applicationArchiveSource } = ctx.job.resign;
@@ -18,7 +17,7 @@ async function downloadApplicationArchiveAsync(ctx) {
18
17
  await (0, downloader_1.default)(applicationArchiveSource.url, applicationArchivePath, { retry: 3 });
19
18
  }
20
19
  catch (err) {
21
- (_a = ctx.reportError) === null || _a === void 0 ? void 0 : _a.call(ctx, 'Failed to download the application archive', err, {
20
+ ctx.reportError?.('Failed to download the application archive', err, {
22
21
  extras: { buildId: ctx.env.EAS_BUILD_ID },
23
22
  });
24
23
  throw err;
@@ -29,4 +28,3 @@ async function downloadApplicationArchiveAsync(ctx) {
29
28
  }
30
29
  return applicationArchivePath;
31
30
  }
32
- //# sourceMappingURL=resign.js.map
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.resolveScheme = resolveScheme;
7
7
  exports.resolveArtifactPath = resolveArtifactPath;
8
8
  exports.resolveBuildConfiguration = resolveBuildConfiguration;
9
- const assert_1 = __importDefault(require("assert"));
10
9
  const config_plugins_1 = require("@expo/config-plugins");
10
+ const assert_1 = __importDefault(require("assert"));
11
11
  function resolveScheme(ctx) {
12
12
  if (ctx.job.scheme) {
13
13
  return ctx.job.scheme;
@@ -38,4 +38,3 @@ function resolveBuildConfiguration(ctx) {
38
38
  return 'Release';
39
39
  }
40
40
  }
41
- //# sourceMappingURL=resolve.js.map
package/dist/ios/tvos.js CHANGED
@@ -11,7 +11,6 @@ const resolve_1 = require("./resolve");
11
11
  * @returns true if this is an Apple TV configuration, false otherwise
12
12
  */
13
13
  async function isTVOS(ctx) {
14
- var _a, _b;
15
14
  const scheme = (0, resolve_1.resolveScheme)(ctx);
16
15
  const project = config_plugins_1.IOSConfig.XcodeUtils.getPbxproj(ctx.getReactNativeProjectDirectory());
17
16
  const targetName = await config_plugins_1.IOSConfig.BuildScheme.getApplicationTargetNameForSchemeAsync(ctx.getReactNativeProjectDirectory(), scheme);
@@ -20,6 +19,5 @@ async function isTVOS(ctx) {
20
19
  targetName,
21
20
  buildConfiguration,
22
21
  });
23
- return (_b = (_a = xcBuildConfiguration === null || xcBuildConfiguration === void 0 ? void 0 : xcBuildConfiguration.buildSettings) === null || _a === void 0 ? void 0 : _a.SDKROOT) === null || _b === void 0 ? void 0 : _b.includes('appletv');
22
+ return xcBuildConfiguration?.buildSettings?.SDKROOT?.includes('appletv');
24
23
  }
25
- //# sourceMappingURL=tvos.js.map
@@ -1,6 +1,6 @@
1
1
  import { Ios } from '@expo/eas-build-job';
2
2
  import { bunyan } from '@expo/logger';
3
- import { BuildContext } from '../context';
3
+ import type { BuildContext } from '../context';
4
4
  export declare function findAndUploadXcodeBuildLogsAsync(ctx: BuildContext<Ios.Job>, { logger }: {
5
5
  logger: bunyan;
6
6
  }): Promise<void>;
@@ -5,10 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.findAndUploadXcodeBuildLogsAsync = findAndUploadXcodeBuildLogsAsync;
7
7
  exports.findXcodeBuildLogsPathAsync = findXcodeBuildLogsPathAsync;
8
- const os_1 = __importDefault(require("os"));
9
- const path_1 = __importDefault(require("path"));
10
8
  const eas_build_job_1 = require("@expo/eas-build-job");
11
9
  const fast_glob_1 = __importDefault(require("fast-glob"));
10
+ const os_1 = __importDefault(require("os"));
11
+ const path_1 = __importDefault(require("path"));
12
12
  async function findAndUploadXcodeBuildLogsAsync(ctx, { logger }) {
13
13
  try {
14
14
  const xcodeBuildLogsPath = await findXcodeBuildLogsPathAsync(ctx.buildLogsDirectory);
@@ -27,12 +27,10 @@ async function findAndUploadXcodeBuildLogsAsync(ctx, { logger }) {
27
27
  }
28
28
  }
29
29
  async function findXcodeBuildLogsPathAsync(buildLogsDirectory) {
30
- var _a, _b;
31
- const customLogPaths = (await (0, fast_glob_1.default)('*.log', { cwd: buildLogsDirectory })).map((filename) => path_1.default.join(buildLogsDirectory, filename));
30
+ const customLogPaths = (await (0, fast_glob_1.default)('*.log', { cwd: buildLogsDirectory })).map(filename => path_1.default.join(buildLogsDirectory, filename));
32
31
  if (customLogPaths[0]) {
33
32
  return customLogPaths[0];
34
33
  }
35
- const fallbackLogPaths = (await (0, fast_glob_1.default)('Library/Logs/gym/*.log', { cwd: os_1.default.homedir() })).map((relativePath) => path_1.default.join(os_1.default.homedir(), relativePath));
36
- return (_b = (_a = customLogPaths[0]) !== null && _a !== void 0 ? _a : fallbackLogPaths[0]) !== null && _b !== void 0 ? _b : undefined;
34
+ const fallbackLogPaths = (await (0, fast_glob_1.default)('Library/Logs/gym/*.log', { cwd: os_1.default.homedir() })).map(relativePath => path_1.default.join(os_1.default.homedir(), relativePath));
35
+ return customLogPaths[0] ?? fallbackLogPaths[0] ?? undefined;
37
36
  }
38
- //# sourceMappingURL=xcodeBuildLogs.js.map
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.deleteXcodeEnvLocalIfExistsAsync = deleteXcodeEnvLocalIfExistsAsync;
7
- const path_1 = __importDefault(require("path"));
8
7
  const fs_extra_1 = __importDefault(require("fs-extra"));
8
+ const path_1 = __importDefault(require("path"));
9
9
  async function deleteXcodeEnvLocalIfExistsAsync(ctx) {
10
10
  const xcodeEnvLocalPath = path_1.default.join(ctx.getReactNativeProjectDirectory(), 'ios', '.xcode.env.local');
11
11
  if (await fs_extra_1.default.pathExists(xcodeEnvLocalPath)) {
@@ -14,4 +14,3 @@ async function deleteXcodeEnvLocalIfExistsAsync(ctx) {
14
14
  await fs_extra_1.default.remove(xcodeEnvLocalPath);
15
15
  }
16
16
  }
17
- //# sourceMappingURL=xcodeEnv.js.map
@@ -4,18 +4,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.XcodeBuildLogger = void 0;
7
- const assert_1 = __importDefault(require("assert"));
8
- const path_1 = __importDefault(require("path"));
9
- const fs_extra_1 = __importDefault(require("fs-extra"));
10
- const xcpretty_1 = require("@expo/xcpretty");
11
7
  const spawn_async_1 = __importDefault(require("@expo/spawn-async"));
8
+ const xcpretty_1 = require("@expo/xcpretty");
9
+ const assert_1 = __importDefault(require("assert"));
12
10
  const fast_glob_1 = __importDefault(require("fast-glob"));
11
+ const fs_extra_1 = __importDefault(require("fs-extra"));
12
+ const path_1 = __importDefault(require("path"));
13
13
  const CHECK_FILE_INTERVAL_MS = 1000;
14
14
  class XcodeBuildLogger {
15
+ logger;
16
+ projectRoot;
17
+ loggerError;
18
+ flushing = false;
19
+ logReaderPromise;
20
+ logsPath;
15
21
  constructor(logger, projectRoot) {
16
22
  this.logger = logger;
17
23
  this.projectRoot = projectRoot;
18
- this.flushing = false;
19
24
  }
20
25
  async watchLogFiles(logsDirectory) {
21
26
  while (!this.flushing) {
@@ -25,7 +30,7 @@ class XcodeBuildLogger {
25
30
  void this.startBuildLogger(this.logsPath);
26
31
  return;
27
32
  }
28
- await new Promise((res) => setTimeout(res, CHECK_FILE_INTERVAL_MS));
33
+ await new Promise(res => setTimeout(res, CHECK_FILE_INTERVAL_MS));
29
34
  }
30
35
  }
31
36
  async flush() {
@@ -85,4 +90,3 @@ class XcodeBuildLogger {
85
90
  }
86
91
  }
87
92
  exports.XcodeBuildLogger = XcodeBuildLogger;
88
- //# sourceMappingURL=xcpretty.js.map
@@ -10,4 +10,3 @@ function getEasFunctionGroups(ctx) {
10
10
  }
11
11
  return functionGroups;
12
12
  }
13
- //# sourceMappingURL=easFunctionGroups.js.map