@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
@@ -15,13 +15,23 @@ 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
  };
@@ -29,12 +39,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.PUBLIC_CACHE_KEY_PREFIX_BY_PLATFORM = exports.CACHE_KEY_PREFIX_BY_PLATFORM = void 0;
30
40
  exports.getCcachePath = getCcachePath;
31
41
  exports.generateDefaultBuildCacheKeyAsync = generateDefaultBuildCacheKeyAsync;
32
- const path_1 = __importDefault(require("path"));
33
- const os_1 = __importDefault(require("os"));
34
- const assert_1 = __importDefault(require("assert"));
42
+ const eas_build_job_1 = require("@expo/eas-build-job");
35
43
  const PackageManagerUtils = __importStar(require("@expo/package-manager"));
36
44
  const steps_1 = require("@expo/steps");
37
- const eas_build_job_1 = require("@expo/eas-build-job");
45
+ const assert_1 = __importDefault(require("assert"));
46
+ const os_1 = __importDefault(require("os"));
47
+ const path_1 = __importDefault(require("path"));
38
48
  const packageManager_1 = require("./packageManager");
39
49
  const IOS_CACHE_KEY_PREFIX = 'ios-ccache-';
40
50
  const ANDROID_CACHE_KEY_PREFIX = 'android-ccache-';
@@ -71,4 +81,3 @@ async function generateDefaultBuildCacheKeyAsync(workingDirectory, platform) {
71
81
  throw new Error(`Failed to read lockfile for cache key generation: ${err.message}`);
72
82
  }
73
83
  }
74
- //# sourceMappingURL=cacheKey.js.map
@@ -1,5 +1,5 @@
1
- import { BuildStepEnv } from '@expo/steps';
2
1
  import { bunyan } from '@expo/logger';
2
+ import { BuildStepEnv } from '@expo/steps';
3
3
  export declare function diffFingerprintsAsync(projectDir: string, fingerprint1File: string, fingerprint2File: string, { env, logger }: {
4
4
  env: BuildStepEnv;
5
5
  logger: bunyan;
@@ -22,4 +22,3 @@ async function diffFingerprintsAsync(projectDir, fingerprint1File, fingerprint2F
22
22
  throw e;
23
23
  }
24
24
  }
25
- //# sourceMappingURL=diffFingerprintsAsync.js.map
@@ -4,17 +4,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.createTemporaryEnvironmentSecretFile = createTemporaryEnvironmentSecretFile;
7
+ const crypto_1 = __importDefault(require("crypto"));
7
8
  const fs_1 = __importDefault(require("fs"));
8
9
  const path_1 = __importDefault(require("path"));
9
- const crypto_1 = __importDefault(require("crypto"));
10
10
  function createTemporaryEnvironmentSecretFile({ secretsDir, name, contents_base64, }) {
11
11
  const contentsBuffer = Buffer.from(contents_base64, 'base64');
12
12
  const hash = crypto_1.default.createHash('sha256');
13
13
  hash.update(`${name}:`);
14
- hash.update(contentsBuffer);
14
+ hash.update(new Uint8Array(contentsBuffer));
15
15
  const key = hash.digest('hex');
16
16
  const randomFilePath = path_1.default.join(secretsDir, key);
17
- fs_1.default.writeFileSync(randomFilePath, contentsBuffer);
17
+ fs_1.default.writeFileSync(randomFilePath, new Uint8Array(contentsBuffer));
18
18
  return randomFilePath;
19
19
  }
20
- //# sourceMappingURL=environmentSecrets.js.map
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ExpoFingerprintCLICommandFailedError = exports.ExpoFingerprintCLIInvalidCommandError = exports.ExpoFingerprintCLIModuleNotFoundError = void 0;
7
7
  exports.expoFingerprintCommandAsync = expoFingerprintCommandAsync;
8
8
  exports.isModernExpoFingerprintCLISupportedAsync = isModernExpoFingerprintCLISupportedAsync;
9
- const resolve_from_1 = __importDefault(require("resolve-from"));
10
9
  const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
11
10
  const fs_extra_1 = __importDefault(require("fs-extra"));
11
+ const resolve_from_1 = __importDefault(require("resolve-from"));
12
12
  const semver_1 = __importDefault(require("semver"));
13
13
  class ExpoFingerprintCLIModuleNotFoundError extends Error {
14
14
  }
@@ -20,10 +20,10 @@ class ExpoFingerprintCLICommandFailedError extends Error {
20
20
  }
21
21
  exports.ExpoFingerprintCLICommandFailedError = ExpoFingerprintCLICommandFailedError;
22
22
  function resolveExpoFingerprintCLI(projectRoot) {
23
- var _a;
24
23
  const expoPackageRoot = resolve_from_1.default.silent(projectRoot, 'expo/package.json');
25
24
  try {
26
- return ((_a = resolve_from_1.default.silent(expoPackageRoot !== null && expoPackageRoot !== void 0 ? expoPackageRoot : projectRoot, '@expo/fingerprint/bin/cli')) !== null && _a !== void 0 ? _a : (0, resolve_from_1.default)(expoPackageRoot !== null && expoPackageRoot !== void 0 ? expoPackageRoot : projectRoot, '@expo/fingerprint/bin/cli.js'));
25
+ return (resolve_from_1.default.silent(expoPackageRoot ?? projectRoot, '@expo/fingerprint/bin/cli') ??
26
+ (0, resolve_from_1.default)(expoPackageRoot ?? projectRoot, '@expo/fingerprint/bin/cli.js'));
27
27
  }
28
28
  catch (e) {
29
29
  if (e.code === 'MODULE_NOT_FOUND') {
@@ -56,12 +56,12 @@ async function expoFingerprintCommandAsync(projectDir, args, { env }) {
56
56
  }
57
57
  async function getExpoFingerprintPackageVersionIfInstalledAsync(projectDir) {
58
58
  const expoPackageRoot = resolve_from_1.default.silent(projectDir, 'expo/package.json');
59
- const maybePackageJson = resolve_from_1.default.silent(expoPackageRoot !== null && expoPackageRoot !== void 0 ? expoPackageRoot : projectDir, '@expo/fingerprint/package.json');
59
+ const maybePackageJson = resolve_from_1.default.silent(expoPackageRoot ?? projectDir, '@expo/fingerprint/package.json');
60
60
  if (!maybePackageJson) {
61
61
  return null;
62
62
  }
63
63
  const { version } = await fs_extra_1.default.readJson(maybePackageJson);
64
- return version !== null && version !== void 0 ? version : null;
64
+ return version ?? null;
65
65
  }
66
66
  async function isModernExpoFingerprintCLISupportedAsync(projectDir) {
67
67
  const expoFingerprintPackageVersion = await getExpoFingerprintPackageVersionIfInstalledAsync(projectDir);
@@ -73,4 +73,3 @@ async function isModernExpoFingerprintCLISupportedAsync(projectDir) {
73
73
  }
74
74
  return semver_1.default.gte(expoFingerprintPackageVersion, '0.11.2');
75
75
  }
76
- //# sourceMappingURL=expoFingerprintCli.js.map
@@ -1,5 +1,5 @@
1
- import { Platform, Job, BuildJob, Workflow } from '@expo/eas-build-job';
2
1
  import { ExpoConfig } from '@expo/config';
2
+ import { BuildJob, Job, Platform, Workflow } from '@expo/eas-build-job';
3
3
  import { bunyan } from '@expo/logger';
4
4
  import { BuildStepEnv } from '@expo/steps';
5
5
  import { BuildContext } from '../context';
@@ -28,5 +28,4 @@ export declare function resolveRuntimeVersionForExpoUpdatesIfConfiguredAsync({ c
28
28
  export declare function getChannelAsync(ctx: BuildContext<Job>): Promise<string | null>;
29
29
  export declare function getRuntimeVersionAsync(ctx: BuildContext<Job>): Promise<string | null>;
30
30
  export declare function isEASUpdateConfigured(ctx: BuildContext<Job>): boolean;
31
- export declare function isModernExpoUpdatesCLIWithRuntimeVersionCommandSupported(expoUpdatesPackageVersion: string): boolean;
32
31
  export {};
@@ -11,22 +11,20 @@ exports.resolveRuntimeVersionForExpoUpdatesIfConfiguredAsync = resolveRuntimeVer
11
11
  exports.getChannelAsync = getChannelAsync;
12
12
  exports.getRuntimeVersionAsync = getRuntimeVersionAsync;
13
13
  exports.isEASUpdateConfigured = isEASUpdateConfigured;
14
- exports.isModernExpoUpdatesCLIWithRuntimeVersionCommandSupported = isModernExpoUpdatesCLIWithRuntimeVersionCommandSupported;
14
+ const eas_build_job_1 = require("@expo/eas-build-job");
15
15
  const assert_1 = __importDefault(require("assert"));
16
+ const fs_extra_1 = __importDefault(require("fs-extra"));
17
+ const gql_tada_1 = require("gql.tada");
18
+ const node_fetch_1 = __importDefault(require("node-fetch"));
16
19
  const os_1 = __importDefault(require("os"));
17
20
  const path_1 = __importDefault(require("path"));
18
21
  const uuid_1 = require("uuid");
19
- const eas_build_job_1 = require("@expo/eas-build-job");
20
- const semver_1 = __importDefault(require("semver"));
21
- const node_fetch_1 = __importDefault(require("node-fetch"));
22
- const fs_extra_1 = __importDefault(require("fs-extra"));
23
- const gql_tada_1 = require("gql.tada");
24
- const expoUpdates_1 = require("../android/expoUpdates");
25
- const expoUpdates_2 = require("../ios/expoUpdates");
26
- const getExpoUpdatesPackageVersionIfInstalledAsync_1 = __importDefault(require("./getExpoUpdatesPackageVersionIfInstalledAsync"));
27
- const resolveRuntimeVersionAsync_1 = require("./resolveRuntimeVersionAsync");
28
22
  const diffFingerprintsAsync_1 = require("./diffFingerprintsAsync");
29
23
  const fingerprint_1 = require("./fingerprint");
24
+ const getExpoUpdatesPackageVersionIfInstalledAsync_1 = __importDefault(require("./getExpoUpdatesPackageVersionIfInstalledAsync"));
25
+ const resolveRuntimeVersionAsync_1 = require("./resolveRuntimeVersionAsync");
26
+ const expoUpdates_1 = require("../android/expoUpdates");
27
+ const expoUpdates_2 = require("../ios/expoUpdates");
30
28
  async function setRuntimeVersionNativelyAsync(ctx, runtimeVersion) {
31
29
  switch (ctx.job.platform) {
32
30
  case eas_build_job_1.Platform.ANDROID: {
@@ -45,8 +43,7 @@ async function setRuntimeVersionNativelyAsync(ctx, runtimeVersion) {
45
43
  * Used for when Expo Updates is pointed at an EAS server.
46
44
  */
47
45
  async function setChannelNativelyAsync(ctx) {
48
- var _a;
49
- (0, assert_1.default)((_a = ctx.job.updates) === null || _a === void 0 ? void 0 : _a.channel, 'updates.channel must be defined');
46
+ (0, assert_1.default)(ctx.job.updates?.channel, 'updates.channel must be defined');
50
47
  const newUpdateRequestHeaders = {
51
48
  'expo-channel-name': ctx.job.updates.channel,
52
49
  };
@@ -69,13 +66,12 @@ async function configureEASExpoUpdatesAsync(ctx) {
69
66
  await setChannelNativelyAsync(ctx);
70
67
  }
71
68
  async function configureExpoUpdatesIfInstalledAsync(ctx, resolvedRuntime) {
72
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
73
69
  const expoUpdatesPackageVersion = await (0, getExpoUpdatesPackageVersionIfInstalledAsync_1.default)(ctx.getReactNativeProjectDirectory(), ctx.logger);
74
70
  if (expoUpdatesPackageVersion === null) {
75
71
  return;
76
72
  }
77
- const appConfigRuntimeVersion = (_b = (_a = ctx.job.version) === null || _a === void 0 ? void 0 : _a.runtimeVersion) !== null && _b !== void 0 ? _b : resolvedRuntime.resolvedRuntimeVersion;
78
- if (((_c = ctx.metadata) === null || _c === void 0 ? void 0 : _c.runtimeVersion) && ctx.metadata.runtimeVersion !== appConfigRuntimeVersion) {
73
+ const appConfigRuntimeVersion = ctx.job.version?.runtimeVersion ?? resolvedRuntime.resolvedRuntimeVersion;
74
+ if (ctx.metadata?.runtimeVersion && ctx.metadata.runtimeVersion !== appConfigRuntimeVersion) {
79
75
  ctx.logger.warn(`
80
76
  Runtime version mismatch:
81
77
  - Runtime version calculated on local machine: ${ctx.metadata.runtimeVersion}
@@ -91,12 +87,12 @@ This would cause any updates published on the local machine to not be compatible
91
87
  throw new Error('Runtime version calculated on local machine not equal to runtime version calculated during build.');
92
88
  }
93
89
  if (isEASUpdateConfigured(ctx)) {
94
- if (((_d = ctx.job.updates) === null || _d === void 0 ? void 0 : _d.channel) !== undefined) {
90
+ if (ctx.job.updates?.channel !== undefined) {
95
91
  await configureEASExpoUpdatesAsync(ctx);
96
92
  }
97
93
  else {
98
94
  const channel = await getChannelAsync(ctx);
99
- const isDevelopmentClient = (_e = ctx.job.developmentClient) !== null && _e !== void 0 ? _e : false;
95
+ const isDevelopmentClient = ctx.job.developmentClient ?? false;
100
96
  if (channel !== null) {
101
97
  const configFile = ctx.job.platform === eas_build_job_1.Platform.ANDROID ? 'AndroidManifest.xml' : 'Expo.plist';
102
98
  ctx.logger.info(`The channel name for EAS Update in ${configFile} is set to "${channel}"`);
@@ -105,8 +101,8 @@ This would cause any updates published on the local machine to not be compatible
105
101
  // NO-OP: Development clients don't need to have a channel set
106
102
  }
107
103
  else {
108
- const easUpdateUrl = (_g = (_f = ctx.appConfig.updates) === null || _f === void 0 ? void 0 : _f.url) !== null && _g !== void 0 ? _g : null;
109
- const jobProfile = (_h = ctx.job.buildProfile) !== null && _h !== void 0 ? _h : null;
104
+ const easUpdateUrl = ctx.appConfig.updates?.url ?? null;
105
+ const jobProfile = ctx.job.buildProfile ?? null;
110
106
  ctx.logger.warn(`This build has an invalid EAS Update configuration: update.url is set to "${easUpdateUrl}" in app config, but a channel is not specified${jobProfile ? '' : ` for the current build profile "${jobProfile}" in eas.json`}.`);
111
107
  ctx.logger.warn(`- No channel will be set and EAS Update will be disabled for the build.`);
112
108
  ctx.logger.warn(`- Run \`eas update:configure\` to set your channel in eas.json. For more details, see https://docs.expo.dev/eas-update/getting-started/#configure-your-project`);
@@ -114,7 +110,7 @@ This would cause any updates published on the local machine to not be compatible
114
110
  }
115
111
  }
116
112
  }
117
- if ((_j = ctx.job.version) === null || _j === void 0 ? void 0 : _j.runtimeVersion) {
113
+ if (ctx.job.version?.runtimeVersion) {
118
114
  ctx.logger.info('Updating runtimeVersion in Expo.plist');
119
115
  await setRuntimeVersionNativelyAsync(ctx, ctx.job.version.runtimeVersion);
120
116
  }
@@ -133,7 +129,7 @@ async function resolveRuntimeVersionForExpoUpdatesIfConfiguredAsync({ cwd, appCo
133
129
  expoUpdatesPackageVersion,
134
130
  env,
135
131
  });
136
- logger.info(`Resolved runtime version: ${resolvedRuntimeVersion === null || resolvedRuntimeVersion === void 0 ? void 0 : resolvedRuntimeVersion.runtimeVersion}`);
132
+ logger.info(`Resolved runtime version: ${resolvedRuntimeVersion?.runtimeVersion}`);
137
133
  return resolvedRuntimeVersion;
138
134
  }
139
135
  async function getChannelAsync(ctx) {
@@ -161,8 +157,7 @@ async function getRuntimeVersionAsync(ctx) {
161
157
  }
162
158
  }
163
159
  function isEASUpdateConfigured(ctx) {
164
- var _a;
165
- const rawUrl = (_a = ctx.appConfig.updates) === null || _a === void 0 ? void 0 : _a.url;
160
+ const rawUrl = ctx.appConfig.updates?.url;
166
161
  if (!rawUrl) {
167
162
  return false;
168
163
  }
@@ -176,15 +171,7 @@ function isEASUpdateConfigured(ctx) {
176
171
  return false;
177
172
  }
178
173
  }
179
- function isModernExpoUpdatesCLIWithRuntimeVersionCommandSupported(expoUpdatesPackageVersion) {
180
- if (expoUpdatesPackageVersion.includes('canary')) {
181
- return true;
182
- }
183
- // Anything SDK 51 or greater uses the expo-updates CLI
184
- return semver_1.default.gte(expoUpdatesPackageVersion, '0.25.4');
185
- }
186
174
  async function logDiffFingerprints({ resolvedRuntime, ctx, }) {
187
- var _a, _b, _c;
188
175
  const { resolvedRuntimeVersion, resolvedFingerprintSources } = resolvedRuntime;
189
176
  const fingerprintInfo = await ctx.graphqlClient
190
177
  .query((0, gql_tada_1.graphql)(`
@@ -203,7 +190,7 @@ async function logDiffFingerprints({ resolvedRuntime, ctx, }) {
203
190
  ctx.logger.warn('Failed to fetch current fingerprint info', fingerprintInfo.error);
204
191
  return;
205
192
  }
206
- if (((_c = (_b = (_a = fingerprintInfo.data) === null || _a === void 0 ? void 0 : _a.builds.byId) === null || _b === void 0 ? void 0 : _b.fingerprint) === null || _c === void 0 ? void 0 : _c.debugInfoUrl) &&
193
+ if (fingerprintInfo.data?.builds.byId?.fingerprint?.debugInfoUrl &&
207
194
  resolvedFingerprintSources &&
208
195
  resolvedRuntimeVersion) {
209
196
  try {
@@ -231,4 +218,3 @@ async function logDiffFingerprints({ resolvedRuntime, ctx, }) {
231
218
  }
232
219
  }
233
220
  }
234
- //# sourceMappingURL=expoUpdates.js.map
@@ -15,21 +15,31 @@ 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
  exports.ExpoUpdatesCLICommandFailedError = exports.ExpoUpdatesCLIInvalidCommandError = exports.ExpoUpdatesCLIModuleNotFoundError = void 0;
30
40
  exports.expoUpdatesCommandAsync = expoUpdatesCommandAsync;
31
- const resolve_from_1 = __importStar(require("resolve-from"));
32
41
  const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
42
+ const resolve_from_1 = __importStar(require("resolve-from"));
33
43
  class ExpoUpdatesCLIModuleNotFoundError extends Error {
34
44
  }
35
45
  exports.ExpoUpdatesCLIModuleNotFoundError = ExpoUpdatesCLIModuleNotFoundError;
@@ -40,11 +50,11 @@ class ExpoUpdatesCLICommandFailedError extends Error {
40
50
  }
41
51
  exports.ExpoUpdatesCLICommandFailedError = ExpoUpdatesCLICommandFailedError;
42
52
  async function expoUpdatesCommandAsync(projectDir, args, { env }) {
43
- var _a;
44
53
  let expoUpdatesCli;
45
54
  try {
46
55
  expoUpdatesCli =
47
- (_a = (0, resolve_from_1.silent)(projectDir, 'expo-updates/bin/cli')) !== null && _a !== void 0 ? _a : (0, resolve_from_1.default)(projectDir, 'expo-updates/bin/cli.js');
56
+ (0, resolve_from_1.silent)(projectDir, 'expo-updates/bin/cli') ??
57
+ (0, resolve_from_1.default)(projectDir, 'expo-updates/bin/cli.js');
48
58
  }
49
59
  catch (e) {
50
60
  if (e.code === 'MODULE_NOT_FOUND') {
@@ -72,4 +82,3 @@ async function expoUpdatesCommandAsync(projectDir, args, { env }) {
72
82
  throw e;
73
83
  }
74
84
  }
75
- //# sourceMappingURL=expoUpdatesCli.js.map
@@ -15,28 +15,36 @@ 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
  exports.decompressTarAsync = decompressTarAsync;
30
40
  exports.isFileTarGzAsync = isFileTarGzAsync;
31
- // import fs from 'node:fs';
32
41
  const promises_1 = __importDefault(require("node:fs/promises"));
33
- const node_stream_1 = __importDefault(require("node:stream"));
34
- const node_util_1 = require("node:util");
35
42
  const tar = __importStar(require("tar"));
36
- const streamPipeline = (0, node_util_1.promisify)(node_stream_1.default.pipeline);
37
43
  async function decompressTarAsync({ archivePath, destinationDirectory, }) {
38
- const fileHandle = await promises_1.default.open(archivePath, 'r');
39
- await streamPipeline(fileHandle.createReadStream(), tar.extract({ cwd: destinationDirectory }, []));
44
+ await tar.extract({
45
+ file: archivePath,
46
+ cwd: destinationDirectory,
47
+ });
40
48
  }
41
49
  async function isFileTarGzAsync(path) {
42
50
  if (path.endsWith('tar.gz') || path.endsWith('.tgz')) {
@@ -44,7 +52,8 @@ async function isFileTarGzAsync(path) {
44
52
  }
45
53
  // read only first 3 bytes to check if it's gzip
46
54
  const fd = await promises_1.default.open(path, 'r');
47
- const { buffer } = await fd.read(Buffer.alloc(3), 0, 3, 0);
55
+ const buffer = new Uint8Array(3);
56
+ await fd.read(buffer, 0, 3, 0);
48
57
  await fd.close();
49
58
  if (buffer.length < 3) {
50
59
  return false;
@@ -54,4 +63,3 @@ async function isFileTarGzAsync(path) {
54
63
  // Source: https://en.wikipedia.org/wiki/Gzip#File_format
55
64
  return buffer[0] === 0x1f && buffer[1] === 0x8b && buffer[2] === 0x08;
56
65
  }
57
- //# sourceMappingURL=files.js.map
@@ -15,24 +15,34 @@ 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
  exports.findMaestroPathsFlowsToExecuteAsync = findMaestroPathsFlowsToExecuteAsync;
40
+ const results_1 = require("@expo/results");
41
+ const fast_glob_1 = __importDefault(require("fast-glob"));
30
42
  const node_fs_1 = require("node:fs");
31
43
  const path = __importStar(require("node:path"));
32
44
  const yaml = __importStar(require("yaml"));
33
45
  const zod_1 = require("zod");
34
- const results_1 = require("@expo/results");
35
- const fast_glob_1 = __importDefault(require("fast-glob"));
36
46
  const FlowConfigSchema = zod_1.z.object({
37
47
  name: zod_1.z.string().optional(),
38
48
  tags: zod_1.z.array(zod_1.z.string()).optional(),
@@ -44,7 +54,6 @@ const WorkspaceConfigSchema = zod_1.z.object({
44
54
  excludeTags: zod_1.z.array(zod_1.z.string()).optional(),
45
55
  });
46
56
  async function findMaestroPathsFlowsToExecuteAsync({ workingDirectory, flowPath, includeTags: _includeTags, excludeTags: _excludeTags, logger, }) {
47
- var _a, _b, _c;
48
57
  const absoluteFlowPath = path.resolve(workingDirectory, flowPath);
49
58
  // If it's a file, just return it (no validation needed)
50
59
  const stat = await node_fs_1.promises.stat(absoluteFlowPath);
@@ -62,7 +71,7 @@ async function findMaestroPathsFlowsToExecuteAsync({ workingDirectory, flowPath,
62
71
  logger,
63
72
  });
64
73
  logger.info(`Using workspace config: ${JSON.stringify(workspaceConfig)}`);
65
- if (workspaceConfig === null || workspaceConfig === void 0 ? void 0 : workspaceConfig.executionOrder) {
74
+ if (workspaceConfig?.executionOrder) {
66
75
  logger.warn(`Execution order is not supported yet. Ignoring.`);
67
76
  }
68
77
  logger.info(`Searching for flow files...`);
@@ -76,18 +85,17 @@ async function findMaestroPathsFlowsToExecuteAsync({ workingDirectory, flowPath,
76
85
  logger.info(`No valid flow files found in: ${path.relative(workingDirectory, absoluteFlowPath)}`);
77
86
  return [];
78
87
  }
79
- const includeTags = [...(_includeTags !== null && _includeTags !== void 0 ? _includeTags : []), ...((_a = workspaceConfig === null || workspaceConfig === void 0 ? void 0 : workspaceConfig.includeTags) !== null && _a !== void 0 ? _a : [])];
80
- const excludeTags = [...(_excludeTags !== null && _excludeTags !== void 0 ? _excludeTags : []), ...((_b = workspaceConfig === null || workspaceConfig === void 0 ? void 0 : workspaceConfig.excludeTags) !== null && _b !== void 0 ? _b : [])];
88
+ const includeTags = [...(_includeTags ?? []), ...(workspaceConfig?.includeTags ?? [])];
89
+ const excludeTags = [...(_excludeTags ?? []), ...(workspaceConfig?.excludeTags ?? [])];
81
90
  if (includeTags.length === 0 && excludeTags.length === 0) {
82
91
  logger.info(`No tags provided, returning all flows.`);
83
92
  return flows.map(({ path }) => path);
84
93
  }
85
- logger.info(`Filtering flows by tags. Tags to include: ${JSON.stringify(includeTags)}. Tags to exclude: ${(_c = JSON.stringify(excludeTags)) !== null && _c !== void 0 ? _c : 'none'}.`);
94
+ logger.info(`Filtering flows by tags. Tags to include: ${JSON.stringify(includeTags)}. Tags to exclude: ${JSON.stringify(excludeTags) ?? 'none'}.`);
86
95
  return flows
87
96
  .filter(({ config, path: flowPath }) => {
88
- var _a;
89
97
  const shouldInclude = matchesTags({
90
- flowTags: (_a = config === null || config === void 0 ? void 0 : config.tags) !== null && _a !== void 0 ? _a : [],
98
+ flowTags: config?.tags ?? [],
91
99
  includeTags,
92
100
  excludeTags,
93
101
  });
@@ -127,10 +135,9 @@ async function findAndParseWorkspaceConfigAsync({ dirPath, workingDirectory, log
127
135
  return null;
128
136
  }
129
137
  async function findAndParseFlowFilesAsync({ workingDirectory, dirPath, workspaceConfig, logger, }) {
130
- var _a;
131
138
  const flows = [];
132
139
  // Determine flow patterns from config or use default
133
- const flowPatterns = (_a = workspaceConfig === null || workspaceConfig === void 0 ? void 0 : workspaceConfig.flows) !== null && _a !== void 0 ? _a : ['*'];
140
+ const flowPatterns = workspaceConfig?.flows ?? ['*'];
134
141
  logger.info(`Using flow patterns: ${JSON.stringify(flowPatterns)}`);
135
142
  // Use fast-glob to find matching files
136
143
  const matchedFiles = await (0, fast_glob_1.default)(flowPatterns, {
@@ -170,9 +177,8 @@ async function parseFlowFile(filePath) {
170
177
  }
171
178
  function matchesTags({ flowTags, includeTags, excludeTags, }) {
172
179
  // Include logic: if includeTags is empty OR flow has any of the include tags
173
- const includeMatch = includeTags.length === 0 || includeTags.some((tag) => flowTags.includes(tag));
180
+ const includeMatch = includeTags.length === 0 || includeTags.some(tag => flowTags.includes(tag));
174
181
  // Exclude logic: if excludeTags is empty OR flow has none of the exclude tags
175
- const excludeMatch = excludeTags.length === 0 || !excludeTags.some((tag) => flowTags.includes(tag));
182
+ const excludeMatch = excludeTags.length === 0 || !excludeTags.some(tag => flowTags.includes(tag));
176
183
  return includeMatch && excludeMatch;
177
184
  }
178
- //# sourceMappingURL=findMaestroPathsFlowsToExecuteAsync.js.map
@@ -15,4 +15,3 @@ function stringifyFingerprintDiff(fingerprintDiff) {
15
15
  return value;
16
16
  }, ' ');
17
17
  }
18
- //# sourceMappingURL=fingerprint.js.map
@@ -16,4 +16,3 @@ async function getExpoUpdatesPackageVersionIfInstalledAsync(reactNativeProjectDi
16
16
  logger.debug(`Resolved expo-updates package version: ${versionOuter}`);
17
17
  return versionOuter;
18
18
  }
19
- //# sourceMappingURL=getExpoUpdatesPackageVersionIfInstalledAsync.js.map
@@ -22,10 +22,9 @@ var Hook;
22
22
  Hook["ON_BUILD_CANCEL"] = "eas-build-on-cancel";
23
23
  })(Hook || (exports.Hook = Hook = {}));
24
24
  async function runHookIfPresent(ctx, hook, { extraEnvs } = {}) {
25
- var _a;
26
25
  const projectDir = ctx.getReactNativeProjectDirectory();
27
26
  const packageJson = (0, project_1.readPackageJson)(projectDir);
28
- if ((_a = packageJson.scripts) === null || _a === void 0 ? void 0 : _a[hook]) {
27
+ if (packageJson.scripts?.[hook]) {
29
28
  ctx.logger.info(`Script '${hook}' is present in package.json, running it...`);
30
29
  // both yarn v2+ and yarn v1 seem to have issues with running preinstall script in some cases
31
30
  // like doing corepack enable
@@ -43,4 +42,3 @@ async function runHookIfPresent(ctx, hook, { extraEnvs } = {}) {
43
42
  });
44
43
  }
45
44
  }
46
- //# sourceMappingURL=hooks.js.map
@@ -0,0 +1 @@
1
+ export declare function isModernExpoUpdatesCLIWithRuntimeVersionCommandSupported(expoUpdatesPackageVersion: string): boolean;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.isModernExpoUpdatesCLIWithRuntimeVersionCommandSupported = isModernExpoUpdatesCLIWithRuntimeVersionCommandSupported;
7
+ const semver_1 = __importDefault(require("semver"));
8
+ function isModernExpoUpdatesCLIWithRuntimeVersionCommandSupported(expoUpdatesPackageVersion) {
9
+ if (expoUpdatesPackageVersion.includes('canary')) {
10
+ return true;
11
+ }
12
+ // Anything SDK 51 or greater uses the expo-updates CLI
13
+ return semver_1.default.gte(expoUpdatesPackageVersion, '0.25.4');
14
+ }
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.setUpNpmrcAsync = setUpNpmrcAsync;
7
- const path_1 = __importDefault(require("path"));
8
7
  const fs_extra_1 = __importDefault(require("fs-extra"));
9
- const npmrc_1 = require("../templates/npmrc");
8
+ const path_1 = __importDefault(require("path"));
10
9
  const packageManager_1 = require("./packageManager");
10
+ const npmrc_1 = require("../templates/npmrc");
11
11
  async function setUpNpmrcAsync(ctx, logger) {
12
12
  if (ctx.env.NPM_TOKEN) {
13
13
  await createNpmrcIfNotExistsAsync(ctx, logger);
@@ -34,4 +34,3 @@ async function logIfNpmrcExistsAsync(ctx, logger) {
34
34
  logger.info(`.npmrc found at ${path_1.default.relative(ctx.buildDirectory, projectNpmrcPath)}`);
35
35
  }
36
36
  }
37
- //# sourceMappingURL=npmrc.js.map
@@ -1,6 +1,6 @@
1
1
  import { JobInterpolationContext } from '@expo/eas-build-job';
2
- import { BuildStepGlobalContext } from '@expo/steps';
3
2
  import { bunyan } from '@expo/logger';
3
+ import { BuildStepGlobalContext } from '@expo/steps';
4
4
  export declare function uploadJobOutputsToWwwAsync(ctx: BuildStepGlobalContext, { logger, expoApiV2BaseUrl }: {
5
5
  logger: bunyan;
6
6
  expoApiV2BaseUrl: string;
@@ -9,14 +9,13 @@ const steps_1 = require("@expo/steps");
9
9
  const nullthrows_1 = __importDefault(require("nullthrows"));
10
10
  const turtleFetch_1 = require("./turtleFetch");
11
11
  async function uploadJobOutputsToWwwAsync(ctx, { logger, expoApiV2BaseUrl }) {
12
- var _a;
13
12
  if (!ctx.staticContext.job.outputs) {
14
13
  logger.info('Job defines no outputs, skipping upload');
15
14
  return;
16
15
  }
17
16
  try {
18
17
  const workflowJobId = (0, nullthrows_1.default)(ctx.env.__WORKFLOW_JOB_ID);
19
- const robotAccessToken = (0, nullthrows_1.default)((_a = ctx.staticContext.job.secrets) === null || _a === void 0 ? void 0 : _a.robotAccessToken);
18
+ const robotAccessToken = (0, nullthrows_1.default)(ctx.staticContext.job.secrets?.robotAccessToken);
20
19
  const interpolationContext = ctx.getInterpolationContext();
21
20
  logger.debug({ dynamicValues: interpolationContext }, 'Using dynamic values');
22
21
  const outputs = collectJobOutputs({
@@ -43,11 +42,9 @@ function collectJobOutputs({ jobOutputDefinitions, interpolationContext, }) {
43
42
  const jobOutputs = {};
44
43
  for (const [outputKey, outputDefinition] of Object.entries(jobOutputDefinitions)) {
45
44
  const outputValue = outputDefinition.replace(/\$\{\{(.+?)\}\}/g, (_match, expression) => {
46
- var _a;
47
- return `${(_a = (0, steps_1.jsepEval)(expression, interpolationContext)) !== null && _a !== void 0 ? _a : ''}`;
45
+ return `${(0, steps_1.jsepEval)(expression, interpolationContext) ?? ''}`;
48
46
  });
49
47
  jobOutputs[outputKey] = outputValue;
50
48
  }
51
49
  return jobOutputs;
52
50
  }
53
- //# sourceMappingURL=outputs.js.map