@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.
- package/LICENSE +21 -100
- package/README.md +1 -1
- package/dist/android/credentials.js +2 -3
- package/dist/android/expoUpdates.js +5 -8
- package/dist/android/gradle.js +6 -8
- package/dist/android/gradleConfig.js +2 -3
- package/dist/buildErrors/buildErrorHandlers.js +4 -3
- package/dist/buildErrors/detectError.js +11 -11
- package/dist/buildErrors/errors.types.js +0 -1
- package/dist/buildErrors/userErrorHandlers.js +2 -3
- package/dist/builders/android.js +19 -24
- package/dist/builders/common.js +0 -1
- package/dist/builders/custom.js +9 -11
- package/dist/builders/index.js +0 -1
- package/dist/builders/ios.js +24 -29
- package/dist/common/eagerBundle.js +3 -4
- package/dist/common/easBuildInternal.js +5 -7
- package/dist/common/fastlane.js +0 -1
- package/dist/common/git.js +0 -1
- package/dist/common/installDependencies.d.ts +1 -1
- package/dist/common/installDependencies.js +1 -2
- package/dist/common/prebuild.js +3 -5
- package/dist/common/projectSources.js +12 -16
- package/dist/common/setup.js +28 -33
- package/dist/context.d.ts +1 -1
- package/dist/context.js +33 -25
- package/dist/customBuildContext.d.ts +1 -1
- package/dist/customBuildContext.js +32 -10
- package/dist/gcs/LoggerStream.d.ts +1 -1
- package/dist/gcs/LoggerStream.js +22 -14
- package/dist/gcs/__unit__/gcs.test.js +5 -8
- package/dist/gcs/client.d.ts +1 -1
- package/dist/gcs/client.js +28 -19
- package/dist/gcs/retry.js +4 -5
- package/dist/generic.d.ts +1 -1
- package/dist/generic.js +5 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +19 -10
- package/dist/ios/configure.d.ts +1 -1
- package/dist/ios/configure.js +9 -11
- package/dist/ios/credentials/distributionCertificate.js +1 -3
- package/dist/ios/credentials/keychain.js +9 -8
- package/dist/ios/credentials/manager.d.ts +1 -1
- package/dist/ios/credentials/manager.js +24 -13
- package/dist/ios/credentials/provisioningProfile.js +12 -6
- package/dist/ios/expoUpdates.js +7 -11
- package/dist/ios/fastfile.d.ts +1 -1
- package/dist/ios/fastfile.js +0 -1
- package/dist/ios/fastlane.d.ts +1 -1
- package/dist/ios/fastlane.js +8 -9
- package/dist/ios/gymfile.d.ts +1 -1
- package/dist/ios/gymfile.js +1 -2
- package/dist/ios/pod.js +1 -2
- package/dist/ios/resign.js +3 -5
- package/dist/ios/resolve.js +1 -2
- package/dist/ios/tvos.js +1 -3
- package/dist/ios/xcodeBuildLogs.d.ts +1 -1
- package/dist/ios/xcodeBuildLogs.js +5 -7
- package/dist/ios/xcodeEnv.js +1 -2
- package/dist/ios/xcpretty.js +11 -7
- package/dist/steps/easFunctionGroups.js +0 -1
- package/dist/steps/easFunctions.js +26 -25
- package/dist/steps/functionGroups/build.d.ts +1 -1
- package/dist/steps/functionGroups/build.js +24 -26
- package/dist/steps/functionGroups/maestroTest.js +7 -9
- package/dist/steps/functions/calculateEASUpdateRuntimeVersion.js +6 -9
- package/dist/steps/functions/ccacheStats.js +4 -6
- package/dist/steps/functions/checkout.js +0 -1
- package/dist/steps/functions/configureAndroidVersion.js +3 -5
- package/dist/steps/functions/configureEASUpdateIfInstalled.js +4 -6
- package/dist/steps/functions/configureIosCredentials.js +3 -4
- package/dist/steps/functions/configureIosVersion.js +4 -6
- package/dist/steps/functions/createSubmissionEntity.js +2 -4
- package/dist/steps/functions/downloadArtifact.d.ts +1 -1
- package/dist/steps/functions/downloadArtifact.js +7 -9
- package/dist/steps/functions/downloadBuild.d.ts +1 -1
- package/dist/steps/functions/downloadBuild.js +10 -12
- package/dist/steps/functions/eagerBundle.js +2 -4
- package/dist/steps/functions/findAndUploadBuildArtifacts.js +5 -8
- package/dist/steps/functions/generateGymfileFromTemplate.js +6 -8
- package/dist/steps/functions/getCredentialsForBuildTriggeredByGitHubIntegration.js +0 -1
- package/dist/steps/functions/injectAndroidCredentials.js +3 -4
- package/dist/steps/functions/installMaestro.js +3 -4
- package/dist/steps/functions/installNodeModules.d.ts +1 -1
- package/dist/steps/functions/installNodeModules.js +12 -12
- package/dist/steps/functions/installPods.js +0 -1
- package/dist/steps/functions/internalMaestroTest.js +16 -16
- package/dist/steps/functions/prebuild.js +3 -5
- package/dist/steps/functions/repack.d.ts +1 -1
- package/dist/steps/functions/repack.js +25 -19
- package/dist/steps/functions/resolveAppleTeamIdFromCredentials.js +1 -2
- package/dist/steps/functions/resolveBuildConfig.js +0 -1
- package/dist/steps/functions/restoreBuildCache.d.ts +1 -1
- package/dist/steps/functions/restoreBuildCache.js +8 -10
- package/dist/steps/functions/restoreCache.d.ts +1 -1
- package/dist/steps/functions/restoreCache.js +34 -26
- package/dist/steps/functions/runFastlane.js +0 -1
- package/dist/steps/functions/runGradle.js +2 -3
- package/dist/steps/functions/saveBuildCache.d.ts +1 -1
- package/dist/steps/functions/saveBuildCache.js +6 -7
- package/dist/steps/functions/saveCache.d.ts +1 -1
- package/dist/steps/functions/saveCache.js +26 -18
- package/dist/steps/functions/sendSlackMessage.js +1 -3
- package/dist/steps/functions/startAndroidEmulator.js +5 -7
- package/dist/steps/functions/startCuttlefishDevice.js +32 -10
- package/dist/steps/functions/startIosSimulator.js +8 -11
- package/dist/steps/functions/uploadArtifact.js +4 -6
- package/dist/steps/functions/uploadToAsc.d.ts +2 -0
- package/dist/steps/functions/uploadToAsc.js +287 -0
- package/dist/steps/functions/useNpmToken.js +3 -4
- package/dist/steps/utils/android/expoUpdates.js +3 -5
- package/dist/steps/utils/android/gradle.d.ts +1 -1
- package/dist/steps/utils/android/gradle.js +6 -7
- package/dist/steps/utils/android/gradleConfig.js +4 -5
- package/dist/steps/utils/cache.js +0 -1
- package/dist/steps/utils/expoUpdates.d.ts +1 -1
- package/dist/steps/utils/expoUpdates.js +15 -18
- package/dist/steps/utils/ios/AscApiClient.d.ts +250 -0
- package/dist/steps/utils/ios/AscApiClient.js +299 -0
- package/dist/steps/utils/ios/configure.js +4 -5
- package/dist/steps/utils/ios/credentials/credentials.js +0 -1
- package/dist/steps/utils/ios/credentials/distributionCertificate.js +1 -3
- package/dist/steps/utils/ios/credentials/keychain.js +8 -8
- package/dist/steps/utils/ios/credentials/manager.js +24 -13
- package/dist/steps/utils/ios/credentials/provisioningProfile.js +11 -6
- package/dist/steps/utils/ios/expoUpdates.js +4 -7
- package/dist/steps/utils/ios/fastlane.d.ts +1 -1
- package/dist/steps/utils/ios/fastlane.js +3 -4
- package/dist/steps/utils/ios/resolve.js +1 -2
- package/dist/steps/utils/ios/tvos.js +1 -3
- package/dist/steps/utils/ios/xcpretty.js +11 -7
- package/dist/steps/utils/slackMessageDynamicFields.js +0 -1
- package/dist/templates/EasBuildConfigureVersionGradle.js +0 -1
- package/dist/templates/EasBuildGradle.js +0 -1
- package/dist/templates/EasBuildInjectAndroidCredentialsGradle.js +0 -1
- package/dist/templates/FastfileResign.js +0 -1
- package/dist/templates/GymfileArchive.js +0 -1
- package/dist/templates/GymfileSimulator.js +0 -1
- package/dist/templates/npmrc.js +0 -1
- package/dist/utils/AndroidEmulatorUtils.js +20 -22
- package/dist/utils/IosSimulatorUtils.js +9 -11
- package/dist/utils/appConfig.js +1 -2
- package/dist/utils/artifacts.d.ts +1 -1
- package/dist/utils/artifacts.js +7 -8
- package/dist/utils/cacheKey.js +21 -12
- package/dist/utils/diffFingerprintsAsync.d.ts +1 -1
- package/dist/utils/diffFingerprintsAsync.js +0 -1
- package/dist/utils/environmentSecrets.js +3 -4
- package/dist/utils/expoFingerprintCli.js +5 -6
- package/dist/utils/expoUpdates.d.ts +1 -2
- package/dist/utils/expoUpdates.js +19 -33
- package/dist/utils/expoUpdatesCli.js +20 -11
- package/dist/utils/files.js +23 -15
- package/dist/utils/findMaestroPathsFlowsToExecuteAsync.js +27 -21
- package/dist/utils/fingerprint.js +0 -1
- package/dist/utils/getExpoUpdatesPackageVersionIfInstalledAsync.js +0 -1
- package/dist/utils/hooks.js +1 -3
- package/dist/utils/isModernExpoUpdatesCLIWithRuntimeVersionCommandSupported.d.ts +1 -0
- package/dist/utils/isModernExpoUpdatesCLIWithRuntimeVersionCommandSupported.js +14 -0
- package/dist/utils/npmrc.js +2 -3
- package/dist/utils/outputs.d.ts +1 -1
- package/dist/utils/outputs.js +2 -5
- package/dist/utils/packageManager.js +22 -14
- package/dist/utils/prepareBuildExecutable.js +1 -2
- package/dist/utils/processes.js +2 -3
- package/dist/utils/project.js +1 -2
- package/dist/utils/promiseRetryWithCondition.js +0 -1
- package/dist/utils/resolveRuntimeVersionAsync.d.ts +1 -1
- package/dist/utils/resolveRuntimeVersionAsync.js +4 -6
- package/dist/utils/retry.js +2 -3
- package/dist/utils/retryOnDNSFailure.js +0 -1
- package/dist/utils/stepMetrics.d.ts +1 -1
- package/dist/utils/stepMetrics.js +0 -1
- package/dist/utils/strings.js +1 -3
- package/dist/utils/turtleFetch.d.ts +1 -1
- package/dist/utils/turtleFetch.js +2 -2
- package/package.json +25 -22
- package/dist/android/credentials.js.map +0 -1
- package/dist/android/expoUpdates.js.map +0 -1
- package/dist/android/gradle.js.map +0 -1
- package/dist/android/gradleConfig.js.map +0 -1
- package/dist/buildErrors/buildErrorHandlers.js.map +0 -1
- package/dist/buildErrors/detectError.js.map +0 -1
- package/dist/buildErrors/errors.types.js.map +0 -1
- package/dist/buildErrors/userErrorHandlers.js.map +0 -1
- package/dist/builders/android.js.map +0 -1
- package/dist/builders/common.js.map +0 -1
- package/dist/builders/custom.js.map +0 -1
- package/dist/builders/index.js.map +0 -1
- package/dist/builders/ios.js.map +0 -1
- package/dist/common/eagerBundle.js.map +0 -1
- package/dist/common/easBuildInternal.js.map +0 -1
- package/dist/common/fastlane.js.map +0 -1
- package/dist/common/git.js.map +0 -1
- package/dist/common/installDependencies.js.map +0 -1
- package/dist/common/prebuild.js.map +0 -1
- package/dist/common/projectSources.js.map +0 -1
- package/dist/common/setup.js.map +0 -1
- package/dist/context.js.map +0 -1
- package/dist/customBuildContext.js.map +0 -1
- package/dist/gcs/LoggerStream.js.map +0 -1
- package/dist/gcs/__unit__/gcs.test.js.map +0 -1
- package/dist/gcs/client.js.map +0 -1
- package/dist/gcs/retry.js.map +0 -1
- package/dist/generic.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/ios/configure.js.map +0 -1
- package/dist/ios/credentials/distributionCertificate.js.map +0 -1
- package/dist/ios/credentials/keychain.js.map +0 -1
- package/dist/ios/credentials/manager.js.map +0 -1
- package/dist/ios/credentials/provisioningProfile.js.map +0 -1
- package/dist/ios/expoUpdates.js.map +0 -1
- package/dist/ios/fastfile.js.map +0 -1
- package/dist/ios/fastlane.js.map +0 -1
- package/dist/ios/gymfile.js.map +0 -1
- package/dist/ios/pod.js.map +0 -1
- package/dist/ios/resign.js.map +0 -1
- package/dist/ios/resolve.js.map +0 -1
- package/dist/ios/tvos.js.map +0 -1
- package/dist/ios/xcodeBuildLogs.js.map +0 -1
- package/dist/ios/xcodeEnv.js.map +0 -1
- package/dist/ios/xcpretty.js.map +0 -1
- package/dist/steps/easFunctionGroups.js.map +0 -1
- package/dist/steps/easFunctions.js.map +0 -1
- package/dist/steps/functionGroups/build.js.map +0 -1
- package/dist/steps/functionGroups/maestroTest.js.map +0 -1
- package/dist/steps/functions/calculateEASUpdateRuntimeVersion.js.map +0 -1
- package/dist/steps/functions/ccacheStats.js.map +0 -1
- package/dist/steps/functions/checkout.js.map +0 -1
- package/dist/steps/functions/configureAndroidVersion.js.map +0 -1
- package/dist/steps/functions/configureEASUpdateIfInstalled.js.map +0 -1
- package/dist/steps/functions/configureIosCredentials.js.map +0 -1
- package/dist/steps/functions/configureIosVersion.js.map +0 -1
- package/dist/steps/functions/createSubmissionEntity.js.map +0 -1
- package/dist/steps/functions/downloadArtifact.js.map +0 -1
- package/dist/steps/functions/downloadBuild.js.map +0 -1
- package/dist/steps/functions/eagerBundle.js.map +0 -1
- package/dist/steps/functions/findAndUploadBuildArtifacts.js.map +0 -1
- package/dist/steps/functions/generateGymfileFromTemplate.js.map +0 -1
- package/dist/steps/functions/getCredentialsForBuildTriggeredByGitHubIntegration.js.map +0 -1
- package/dist/steps/functions/injectAndroidCredentials.js.map +0 -1
- package/dist/steps/functions/installMaestro.js.map +0 -1
- package/dist/steps/functions/installNodeModules.js.map +0 -1
- package/dist/steps/functions/installPods.js.map +0 -1
- package/dist/steps/functions/internalMaestroTest.js.map +0 -1
- package/dist/steps/functions/prebuild.js.map +0 -1
- package/dist/steps/functions/repack.js.map +0 -1
- package/dist/steps/functions/resolveAppleTeamIdFromCredentials.js.map +0 -1
- package/dist/steps/functions/resolveBuildConfig.js.map +0 -1
- package/dist/steps/functions/restoreBuildCache.js.map +0 -1
- package/dist/steps/functions/restoreCache.js.map +0 -1
- package/dist/steps/functions/runFastlane.js.map +0 -1
- package/dist/steps/functions/runGradle.js.map +0 -1
- package/dist/steps/functions/saveBuildCache.js.map +0 -1
- package/dist/steps/functions/saveCache.js.map +0 -1
- package/dist/steps/functions/sendSlackMessage.js.map +0 -1
- package/dist/steps/functions/startAndroidEmulator.js.map +0 -1
- package/dist/steps/functions/startCuttlefishDevice.js.map +0 -1
- package/dist/steps/functions/startIosSimulator.js.map +0 -1
- package/dist/steps/functions/uploadArtifact.js.map +0 -1
- package/dist/steps/functions/useNpmToken.js.map +0 -1
- package/dist/steps/utils/android/expoUpdates.js.map +0 -1
- package/dist/steps/utils/android/gradle.js.map +0 -1
- package/dist/steps/utils/android/gradleConfig.js.map +0 -1
- package/dist/steps/utils/cache.js.map +0 -1
- package/dist/steps/utils/expoUpdates.js.map +0 -1
- package/dist/steps/utils/ios/configure.js.map +0 -1
- package/dist/steps/utils/ios/credentials/credentials.js.map +0 -1
- package/dist/steps/utils/ios/credentials/distributionCertificate.js.map +0 -1
- package/dist/steps/utils/ios/credentials/keychain.js.map +0 -1
- package/dist/steps/utils/ios/credentials/manager.js.map +0 -1
- package/dist/steps/utils/ios/credentials/provisioningProfile.js.map +0 -1
- package/dist/steps/utils/ios/expoUpdates.js.map +0 -1
- package/dist/steps/utils/ios/fastlane.js.map +0 -1
- package/dist/steps/utils/ios/resolve.js.map +0 -1
- package/dist/steps/utils/ios/tvos.js.map +0 -1
- package/dist/steps/utils/ios/xcpretty.js.map +0 -1
- package/dist/steps/utils/slackMessageDynamicFields.js.map +0 -1
- package/dist/templates/EasBuildConfigureVersionGradle.js.map +0 -1
- package/dist/templates/EasBuildGradle.js.map +0 -1
- package/dist/templates/EasBuildInjectAndroidCredentialsGradle.js.map +0 -1
- package/dist/templates/FastfileResign.js.map +0 -1
- package/dist/templates/GymfileArchive.js.map +0 -1
- package/dist/templates/GymfileSimulator.js.map +0 -1
- package/dist/templates/npmrc.js.map +0 -1
- package/dist/utils/AndroidEmulatorUtils.js.map +0 -1
- package/dist/utils/IosSimulatorUtils.js.map +0 -1
- package/dist/utils/appConfig.js.map +0 -1
- package/dist/utils/artifacts.js.map +0 -1
- package/dist/utils/cacheKey.js.map +0 -1
- package/dist/utils/diffFingerprintsAsync.js.map +0 -1
- package/dist/utils/environmentSecrets.js.map +0 -1
- package/dist/utils/expoFingerprintCli.js.map +0 -1
- package/dist/utils/expoUpdates.js.map +0 -1
- package/dist/utils/expoUpdatesCli.js.map +0 -1
- package/dist/utils/files.js.map +0 -1
- package/dist/utils/findMaestroPathsFlowsToExecuteAsync.js.map +0 -1
- package/dist/utils/fingerprint.js.map +0 -1
- package/dist/utils/getExpoUpdatesPackageVersionIfInstalledAsync.js.map +0 -1
- package/dist/utils/hooks.js.map +0 -1
- package/dist/utils/npmrc.js.map +0 -1
- package/dist/utils/outputs.js.map +0 -1
- package/dist/utils/packageManager.js.map +0 -1
- package/dist/utils/prepareBuildExecutable.js.map +0 -1
- package/dist/utils/processes.js.map +0 -1
- package/dist/utils/project.js.map +0 -1
- package/dist/utils/promiseRetryWithCondition.js.map +0 -1
- package/dist/utils/resolveRuntimeVersionAsync.js.map +0 -1
- package/dist/utils/retry.js.map +0 -1
- package/dist/utils/retryOnDNSFailure.js.map +0 -1
- package/dist/utils/stepMetrics.js.map +0 -1
- package/dist/utils/strings.js.map +0 -1
- package/dist/utils/turtleFetch.js.map +0 -1
package/dist/builders/ios.js
CHANGED
|
@@ -4,29 +4,29 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.default = iosBuilder;
|
|
7
|
-
const plist_1 = __importDefault(require("@expo/plist"));
|
|
8
7
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
9
8
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
9
|
+
const plist_1 = __importDefault(require("@expo/plist"));
|
|
10
10
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
11
11
|
const nullthrows_1 = __importDefault(require("nullthrows"));
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
12
|
+
const common_1 = require("./common");
|
|
13
|
+
const custom_1 = require("./custom");
|
|
14
|
+
const eagerBundle_1 = require("../common/eagerBundle");
|
|
15
|
+
const prebuild_1 = require("../common/prebuild");
|
|
16
|
+
const setup_1 = require("../common/setup");
|
|
15
17
|
const configure_1 = require("../ios/configure");
|
|
16
18
|
const manager_1 = __importDefault(require("../ios/credentials/manager"));
|
|
17
19
|
const fastlane_1 = require("../ios/fastlane");
|
|
18
20
|
const pod_1 = require("../ios/pod");
|
|
19
21
|
const resign_1 = require("../ios/resign");
|
|
20
22
|
const resolve_1 = require("../ios/resolve");
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
+
const restoreBuildCache_1 = require("../steps/functions/restoreBuildCache");
|
|
24
|
+
const saveBuildCache_1 = require("../steps/functions/saveBuildCache");
|
|
25
|
+
const artifacts_1 = require("../utils/artifacts");
|
|
26
|
+
const expoUpdates_1 = require("../utils/expoUpdates");
|
|
27
|
+
const hooks_1 = require("../utils/hooks");
|
|
23
28
|
const prepareBuildExecutable_1 = require("../utils/prepareBuildExecutable");
|
|
24
29
|
const processes_1 = require("../utils/processes");
|
|
25
|
-
const eagerBundle_1 = require("../common/eagerBundle");
|
|
26
|
-
const saveBuildCache_1 = require("../steps/functions/saveBuildCache");
|
|
27
|
-
const restoreBuildCache_1 = require("../steps/functions/restoreBuildCache");
|
|
28
|
-
const common_1 = require("./common");
|
|
29
|
-
const custom_1 = require("./custom");
|
|
30
30
|
const INSTALL_PODS_WARN_TIMEOUT_MS = 15 * 60 * 1000; // 15 minutes
|
|
31
31
|
const INSTALL_PODS_KILL_TIMEOUT_MS = 30 * 60 * 1000; // 30 minutes
|
|
32
32
|
class InstallPodsTimeoutError extends Error {
|
|
@@ -62,7 +62,7 @@ async function buildAsync(ctx) {
|
|
|
62
62
|
ctx.logger.info('Skipped running "expo prebuild" because the "ios" directory already exists. Learn more about the build process: https://docs.expo.dev/build-reference/ios-builds/');
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
|
-
const extraEnvs =
|
|
65
|
+
const extraEnvs = credentials?.teamId
|
|
66
66
|
? { APPLE_TEAM_ID: credentials.teamId }
|
|
67
67
|
: {};
|
|
68
68
|
await (0, prebuild_1.prebuildAsync)(ctx, {
|
|
@@ -72,12 +72,11 @@ async function buildAsync(ctx) {
|
|
|
72
72
|
});
|
|
73
73
|
});
|
|
74
74
|
await ctx.runBuildPhase(eas_build_job_1.BuildPhase.RESTORE_CACHE, async () => {
|
|
75
|
-
var _a;
|
|
76
75
|
if (ctx.isLocal) {
|
|
77
76
|
ctx.logger.info('Local builds do not support restoring cache');
|
|
78
77
|
return;
|
|
79
78
|
}
|
|
80
|
-
await
|
|
79
|
+
await ctx.cacheManager?.restoreCache(ctx);
|
|
81
80
|
await (0, restoreBuildCache_1.restoreCcacheAsync)({
|
|
82
81
|
logger: ctx.logger,
|
|
83
82
|
workingDirectory,
|
|
@@ -109,10 +108,9 @@ async function buildAsync(ctx) {
|
|
|
109
108
|
});
|
|
110
109
|
}
|
|
111
110
|
await ctx.runBuildPhase(eas_build_job_1.BuildPhase.CONFIGURE_EXPO_UPDATES, async () => {
|
|
112
|
-
var _a, _b;
|
|
113
111
|
await (0, expoUpdates_1.configureExpoUpdatesIfInstalledAsync)(ctx, {
|
|
114
|
-
resolvedRuntimeVersion:
|
|
115
|
-
resolvedFingerprintSources:
|
|
112
|
+
resolvedRuntimeVersion: resolvedExpoUpdatesRuntimeVersion?.runtimeVersion ?? null,
|
|
113
|
+
resolvedFingerprintSources: resolvedExpoUpdatesRuntimeVersion?.fingerprintSources ?? null,
|
|
116
114
|
});
|
|
117
115
|
});
|
|
118
116
|
if (!ctx.env.EAS_BUILD_DISABLE_BUNDLE_JAVASCRIPT_STEP && (0, eagerBundle_1.shouldUseEagerBundle)(ctx.metadata)) {
|
|
@@ -123,9 +121,9 @@ async function buildAsync(ctx) {
|
|
|
123
121
|
logger: ctx.logger,
|
|
124
122
|
env: {
|
|
125
123
|
...ctx.env,
|
|
126
|
-
...(
|
|
124
|
+
...(resolvedExpoUpdatesRuntimeVersion?.runtimeVersion
|
|
127
125
|
? {
|
|
128
|
-
EXPO_UPDATES_FINGERPRINT_OVERRIDE: resolvedExpoUpdatesRuntimeVersion
|
|
126
|
+
EXPO_UPDATES_FINGERPRINT_OVERRIDE: resolvedExpoUpdatesRuntimeVersion?.runtimeVersion,
|
|
129
127
|
EXPO_UPDATES_WORKFLOW_OVERRIDE: ctx.job.type,
|
|
130
128
|
}
|
|
131
129
|
: null),
|
|
@@ -142,10 +140,10 @@ async function buildAsync(ctx) {
|
|
|
142
140
|
scheme,
|
|
143
141
|
buildConfiguration,
|
|
144
142
|
entitlements,
|
|
145
|
-
...(
|
|
143
|
+
...(resolvedExpoUpdatesRuntimeVersion?.runtimeVersion
|
|
146
144
|
? {
|
|
147
145
|
extraEnv: {
|
|
148
|
-
EXPO_UPDATES_FINGERPRINT_OVERRIDE: resolvedExpoUpdatesRuntimeVersion
|
|
146
|
+
EXPO_UPDATES_FINGERPRINT_OVERRIDE: resolvedExpoUpdatesRuntimeVersion?.runtimeVersion,
|
|
149
147
|
EXPO_UPDATES_WORKFLOW_OVERRIDE: ctx.job.type,
|
|
150
148
|
},
|
|
151
149
|
}
|
|
@@ -169,12 +167,11 @@ async function buildAsync(ctx) {
|
|
|
169
167
|
});
|
|
170
168
|
});
|
|
171
169
|
await ctx.runBuildPhase(eas_build_job_1.BuildPhase.SAVE_CACHE, async () => {
|
|
172
|
-
var _a;
|
|
173
170
|
if (ctx.isLocal) {
|
|
174
171
|
ctx.logger.info('Local builds do not support saving cache.');
|
|
175
172
|
return;
|
|
176
173
|
}
|
|
177
|
-
await
|
|
174
|
+
await ctx.cacheManager?.saveCache(ctx);
|
|
178
175
|
await (0, saveBuildCache_1.saveCcacheAsync)({
|
|
179
176
|
logger: ctx.logger,
|
|
180
177
|
workingDirectory,
|
|
@@ -251,23 +248,22 @@ async function runInstallPodsAsync(ctx) {
|
|
|
251
248
|
try {
|
|
252
249
|
const installPodsSpawnPromise = (await (0, pod_1.installPods)(ctx, {
|
|
253
250
|
infoCallbackFn: () => {
|
|
254
|
-
warnTimeout
|
|
255
|
-
killTimeout
|
|
251
|
+
warnTimeout?.refresh();
|
|
252
|
+
killTimeout?.refresh();
|
|
256
253
|
},
|
|
257
254
|
})).spawnPromise;
|
|
258
255
|
warnTimeout = setTimeout(() => {
|
|
259
256
|
ctx.logger.warn('"Install pods" phase takes longer then expected and it did not produce any logs in the past 15 minutes');
|
|
260
257
|
}, INSTALL_PODS_WARN_TIMEOUT_MS);
|
|
261
258
|
killTimeout = setTimeout(async () => {
|
|
262
|
-
var _a;
|
|
263
259
|
timedOutToKill = true;
|
|
264
260
|
ctx.logger.error('"Install pods" phase takes a very long time and it did not produce any logs in the past 30 minutes. Most likely an unexpected error happened which caused the process to hang and it will be terminated');
|
|
265
261
|
const ppid = (0, nullthrows_1.default)(installPodsSpawnPromise.child.pid);
|
|
266
262
|
const pids = await (0, processes_1.getParentAndDescendantProcessPidsAsync)(ppid);
|
|
267
|
-
pids.forEach(
|
|
263
|
+
pids.forEach(pid => {
|
|
268
264
|
process.kill(pid);
|
|
269
265
|
});
|
|
270
|
-
|
|
266
|
+
ctx.reportError?.('"Install pods" phase takes a very long time', undefined, {
|
|
271
267
|
extras: { buildId: ctx.env.EAS_BUILD_ID },
|
|
272
268
|
});
|
|
273
269
|
}, INSTALL_PODS_KILL_TIMEOUT_MS);
|
|
@@ -288,4 +284,3 @@ async function runInstallPodsAsync(ctx) {
|
|
|
288
284
|
}
|
|
289
285
|
}
|
|
290
286
|
}
|
|
291
|
-
//# sourceMappingURL=ios.js.map
|
|
@@ -19,8 +19,7 @@ async function eagerBundleAsync({ platform, workingDir, logger, env, packageMana
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
function shouldUseEagerBundle(metadata) {
|
|
22
|
-
return Boolean(!
|
|
23
|
-
|
|
24
|
-
semver_1.default.satisfies(metadata
|
|
22
|
+
return Boolean(!metadata?.developmentClient &&
|
|
23
|
+
metadata?.sdkVersion &&
|
|
24
|
+
semver_1.default.satisfies(metadata?.sdkVersion, '>=52'));
|
|
25
25
|
}
|
|
26
|
-
//# sourceMappingURL=eagerBundle.js.map
|
|
@@ -5,10 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.runEasBuildInternalAsync = runEasBuildInternalAsync;
|
|
7
7
|
exports.resolveEnvFromBuildProfileAsync = resolveEnvFromBuildProfileAsync;
|
|
8
|
-
const assert_1 = __importDefault(require("assert"));
|
|
9
8
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
10
9
|
const logger_1 = require("@expo/logger");
|
|
11
10
|
const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
|
|
11
|
+
const assert_1 = __importDefault(require("assert"));
|
|
12
12
|
const joi_1 = __importDefault(require("joi"));
|
|
13
13
|
const nullthrows_1 = __importDefault(require("nullthrows"));
|
|
14
14
|
const packageManager_1 = require("../utils/packageManager");
|
|
@@ -21,11 +21,11 @@ async function runEasBuildInternalAsync({ job, logger, env, cwd, projectRootOver
|
|
|
21
21
|
const { buildProfile, githubTriggerOptions } = job;
|
|
22
22
|
(0, assert_1.default)(buildProfile, 'build profile is missing in a build from git-based integration.');
|
|
23
23
|
const autoSubmitArgs = [];
|
|
24
|
-
if (githubTriggerOptions
|
|
24
|
+
if (githubTriggerOptions?.submitProfile) {
|
|
25
25
|
autoSubmitArgs.push('--auto-submit-with-profile');
|
|
26
26
|
autoSubmitArgs.push(githubTriggerOptions.submitProfile);
|
|
27
27
|
}
|
|
28
|
-
else if (githubTriggerOptions
|
|
28
|
+
else if (githubTriggerOptions?.autoSubmit) {
|
|
29
29
|
autoSubmitArgs.push('--auto-submit');
|
|
30
30
|
}
|
|
31
31
|
const result = await (0, turtle_spawn_1.default)(cmd, [
|
|
@@ -57,7 +57,6 @@ async function runEasBuildInternalAsync({ job, logger, env, cwd, projectRootOver
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
async function resolveEnvFromBuildProfileAsync(ctx, { cwd }) {
|
|
60
|
-
var _a;
|
|
61
60
|
const { cmd, args, extraEnv } = await resolveEasCommandPrefixAndEnvAsync();
|
|
62
61
|
const { buildProfile } = ctx.job;
|
|
63
62
|
(0, assert_1.default)(buildProfile, 'build profile is missing in a build from git-based integration.');
|
|
@@ -80,7 +79,7 @@ async function resolveEnvFromBuildProfileAsync(ctx, { cwd }) {
|
|
|
80
79
|
}
|
|
81
80
|
catch (err) {
|
|
82
81
|
ctx.logger.error(`Failed to the read build profile ${buildProfile} from eas.json.`);
|
|
83
|
-
ctx.logger.error(
|
|
82
|
+
ctx.logger.error(err.stderr?.toString());
|
|
84
83
|
throw Error(`Failed to read the build profile ${buildProfile} from eas.json.`);
|
|
85
84
|
}
|
|
86
85
|
const stdout = spawnResult.stdout.toString();
|
|
@@ -142,6 +141,5 @@ function validateEnvs(result) {
|
|
|
142
141
|
if (error) {
|
|
143
142
|
throw error;
|
|
144
143
|
}
|
|
145
|
-
return value
|
|
144
|
+
return value?.env;
|
|
146
145
|
}
|
|
147
|
-
//# sourceMappingURL=easBuildInternal.js.map
|
package/dist/common/fastlane.js
CHANGED
package/dist/common/git.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Job } from '@expo/eas-build-job';
|
|
2
|
-
import { SpawnPromise, SpawnResult
|
|
2
|
+
import { SpawnOptions, SpawnPromise, SpawnResult } from '@expo/turtle-spawn';
|
|
3
3
|
import { BuildContext } from '../context';
|
|
4
4
|
import { PackageManager } from '../utils/packageManager';
|
|
5
5
|
export declare function installDependenciesAsync({ packageManager, env, logger, infoCallbackFn, cwd, useFrozenLockfile, }: {
|
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.installDependenciesAsync = installDependenciesAsync;
|
|
7
7
|
exports.resolvePackagerDir = resolvePackagerDir;
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
8
|
const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
10
10
|
const packageManager_1 = require("../utils/packageManager");
|
|
11
11
|
const project_1 = require("../utils/project");
|
|
12
12
|
async function installDependenciesAsync({ packageManager, env, logger, infoCallbackFn, cwd, useFrozenLockfile, }) {
|
|
@@ -66,4 +66,3 @@ function resolvePackagerDir(ctx) {
|
|
|
66
66
|
}
|
|
67
67
|
return packagerRunDir;
|
|
68
68
|
}
|
|
69
|
-
//# sourceMappingURL=installDependencies.js.map
|
package/dist/common/prebuild.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.prebuildAsync = prebuildAsync;
|
|
4
|
-
const project_1 = require("../utils/project");
|
|
5
4
|
const installDependencies_1 = require("./installDependencies");
|
|
5
|
+
const project_1 = require("../utils/project");
|
|
6
6
|
async function prebuildAsync(ctx, { logger, workingDir, options }) {
|
|
7
7
|
const spawnOptions = {
|
|
8
8
|
cwd: workingDir,
|
|
9
9
|
logger,
|
|
10
10
|
env: {
|
|
11
11
|
EXPO_IMAGE_UTILS_NO_SHARP: '1',
|
|
12
|
-
...options
|
|
12
|
+
...options?.extraEnvs,
|
|
13
13
|
...ctx.env,
|
|
14
14
|
},
|
|
15
15
|
};
|
|
@@ -30,8 +30,7 @@ async function prebuildAsync(ctx, { logger, workingDir, options }) {
|
|
|
30
30
|
await installDependenciesSpawnPromise;
|
|
31
31
|
}
|
|
32
32
|
function getPrebuildCommandArgs(ctx) {
|
|
33
|
-
|
|
34
|
-
let prebuildCommand = (_b = (_a = ctx.job.experimental) === null || _a === void 0 ? void 0 : _a.prebuildCommand) !== null && _b !== void 0 ? _b : `prebuild --no-install --platform ${ctx.job.platform}`;
|
|
33
|
+
let prebuildCommand = ctx.job.experimental?.prebuildCommand ?? `prebuild --no-install --platform ${ctx.job.platform}`;
|
|
35
34
|
if (!prebuildCommand.match(/(?:--platform| -p)/)) {
|
|
36
35
|
prebuildCommand = `${prebuildCommand} --platform ${ctx.job.platform}`;
|
|
37
36
|
}
|
|
@@ -49,4 +48,3 @@ function getPrebuildCommandArgs(ctx) {
|
|
|
49
48
|
}
|
|
50
49
|
return prebuildCommand.split(' ');
|
|
51
50
|
}
|
|
52
|
-
//# sourceMappingURL=prebuild.js.map
|
|
@@ -5,20 +5,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.prepareProjectSourcesAsync = prepareProjectSourcesAsync;
|
|
7
7
|
exports.downloadAndUnpackProjectFromTarGzAsync = downloadAndUnpackProjectFromTarGzAsync;
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
|
-
const promises_1 = __importDefault(require("fs/promises"));
|
|
10
|
-
const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
|
|
11
|
-
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
12
|
-
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
13
8
|
const downloader_1 = __importDefault(require("@expo/downloader"));
|
|
14
|
-
const
|
|
9
|
+
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
15
10
|
const results_1 = require("@expo/results");
|
|
16
|
-
const
|
|
11
|
+
const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
|
|
12
|
+
const promises_1 = __importDefault(require("fs/promises"));
|
|
17
13
|
const gql_tada_1 = require("gql.tada");
|
|
18
|
-
const
|
|
14
|
+
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
15
|
+
const nullthrows_1 = __importDefault(require("nullthrows"));
|
|
16
|
+
const path_1 = __importDefault(require("path"));
|
|
17
|
+
const zod_1 = require("zod");
|
|
19
18
|
const git_1 = require("./git");
|
|
19
|
+
const turtleFetch_1 = require("../utils/turtleFetch");
|
|
20
20
|
async function prepareProjectSourcesAsync(ctx, destinationDirectory) {
|
|
21
|
-
var _a;
|
|
22
21
|
let projectArchive = ctx.job.projectArchive;
|
|
23
22
|
if (ctx.isLocal) {
|
|
24
23
|
console.warn('Local build, skipping project archive refresh');
|
|
@@ -28,7 +27,7 @@ async function prepareProjectSourcesAsync(ctx, destinationDirectory) {
|
|
|
28
27
|
if (!projectArchiveResult.ok) {
|
|
29
28
|
ctx.logger.error({ err: projectArchiveResult.reason }, 'Failed to refresh project archive, falling back to the original one');
|
|
30
29
|
}
|
|
31
|
-
projectArchive =
|
|
30
|
+
projectArchive = projectArchiveResult.value ?? ctx.job.projectArchive;
|
|
32
31
|
}
|
|
33
32
|
switch (projectArchive.type) {
|
|
34
33
|
case eas_build_job_1.ArchiveSourceType.R2:
|
|
@@ -60,13 +59,12 @@ async function prepareProjectSourcesAsync(ctx, destinationDirectory) {
|
|
|
60
59
|
}
|
|
61
60
|
}
|
|
62
61
|
async function downloadAndUnpackProjectFromTarGzAsync(ctx, projectArchiveUrl, destinationDirectory) {
|
|
63
|
-
var _a;
|
|
64
62
|
const projectTarball = path_1.default.join(ctx.workingdir, 'project.tar.gz');
|
|
65
63
|
try {
|
|
66
64
|
await (0, downloader_1.default)(projectArchiveUrl, projectTarball, { retry: 3 });
|
|
67
65
|
}
|
|
68
66
|
catch (err) {
|
|
69
|
-
|
|
67
|
+
ctx.reportError?.('Failed to download project archive', err, {
|
|
70
68
|
extras: { buildId: ctx.env.EAS_BUILD_ID },
|
|
71
69
|
});
|
|
72
70
|
throw err;
|
|
@@ -135,7 +133,7 @@ async function uploadProjectMetadataAsync(ctx, { projectDirectory }) {
|
|
|
135
133
|
const sortedFiles = files
|
|
136
134
|
.map(
|
|
137
135
|
// Prepend entries with "project/"
|
|
138
|
-
|
|
136
|
+
f => path_1.default.join('project', f))
|
|
139
137
|
.sort(); // Sort for consistent ordering
|
|
140
138
|
const result = await ctx.graphqlClient
|
|
141
139
|
.mutation((0, gql_tada_1.graphql)(`
|
|
@@ -183,10 +181,9 @@ async function uploadProjectMetadataAsync(ctx, { projectDirectory }) {
|
|
|
183
181
|
}
|
|
184
182
|
}
|
|
185
183
|
async function fetchProjectArchiveSourceAsync(ctx) {
|
|
186
|
-
var _a;
|
|
187
184
|
const taskId = (0, nullthrows_1.default)(ctx.env.EAS_BUILD_ID, 'EAS_BUILD_ID is not set');
|
|
188
185
|
const expoApiServerURL = (0, nullthrows_1.default)(ctx.env.__API_SERVER_URL, '__API_SERVER_URL is not set');
|
|
189
|
-
const robotAccessToken = (0, nullthrows_1.default)(
|
|
186
|
+
const robotAccessToken = (0, nullthrows_1.default)(ctx.job.secrets?.robotAccessToken, 'robot access token is not set');
|
|
190
187
|
const response = await (0, turtleFetch_1.turtleFetch)(new URL(ctx.job.platform
|
|
191
188
|
? `/v2/turtle-builds/${taskId}/download-project-archive`
|
|
192
189
|
: `/v2/turtle-job-runs/${taskId}/download-project-archive`, expoApiServerURL).toString(), 'POST', {
|
|
@@ -211,4 +208,3 @@ async function fetchProjectArchiveSourceAsync(ctx) {
|
|
|
211
208
|
}
|
|
212
209
|
return dataResult.data.data;
|
|
213
210
|
}
|
|
214
|
-
//# sourceMappingURL=projectSources.js.map
|
package/dist/common/setup.js
CHANGED
|
@@ -4,23 +4,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.setupAsync = setupAsync;
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
|
|
9
|
-
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
10
7
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
11
8
|
const common_1 = require("@expo/eas-build-job/dist/common");
|
|
12
|
-
const nullthrows_1 = __importDefault(require("nullthrows"));
|
|
13
9
|
const errors_1 = require("@expo/eas-build-job/dist/errors");
|
|
10
|
+
const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
|
|
11
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
12
|
+
const nullthrows_1 = __importDefault(require("nullthrows"));
|
|
13
|
+
const path_1 = __importDefault(require("path"));
|
|
14
|
+
const easBuildInternal_1 = require("./easBuildInternal");
|
|
15
|
+
const installDependencies_1 = require("./installDependencies");
|
|
16
|
+
const projectSources_1 = require("./projectSources");
|
|
14
17
|
const xcodeEnv_1 = require("../ios/xcodeEnv");
|
|
15
18
|
const hooks_1 = require("../utils/hooks");
|
|
16
19
|
const npmrc_1 = require("../utils/npmrc");
|
|
17
20
|
const packageManager_1 = require("../utils/packageManager");
|
|
18
|
-
const project_1 = require("../utils/project");
|
|
19
21
|
const processes_1 = require("../utils/processes");
|
|
22
|
+
const project_1 = require("../utils/project");
|
|
20
23
|
const retry_1 = require("../utils/retry");
|
|
21
|
-
const projectSources_1 = require("./projectSources");
|
|
22
|
-
const installDependencies_1 = require("./installDependencies");
|
|
23
|
-
const easBuildInternal_1 = require("./easBuildInternal");
|
|
24
24
|
const MAX_EXPO_DOCTOR_TIMEOUT_MS = 30 * 1000;
|
|
25
25
|
const INSTALL_DEPENDENCIES_WARN_TIMEOUT_MS = 15 * 60 * 1000;
|
|
26
26
|
const INSTALL_DEPENDENCIES_KILL_TIMEOUT_MS = 30 * 60 * 1000;
|
|
@@ -29,7 +29,6 @@ class DoctorTimeoutError extends Error {
|
|
|
29
29
|
class InstallDependenciesTimeoutError extends Error {
|
|
30
30
|
}
|
|
31
31
|
async function setupAsync(ctx) {
|
|
32
|
-
var _a;
|
|
33
32
|
await ctx.runBuildPhase(eas_build_job_1.BuildPhase.PREPARE_PROJECT, async () => {
|
|
34
33
|
await (0, retry_1.retryAsync)(async () => {
|
|
35
34
|
await fs_extra_1.default.rm(ctx.buildDirectory, { recursive: true, force: true });
|
|
@@ -38,7 +37,7 @@ async function setupAsync(ctx) {
|
|
|
38
37
|
}, {
|
|
39
38
|
retryOptions: {
|
|
40
39
|
retries: 3,
|
|
41
|
-
retryIntervalMs:
|
|
40
|
+
retryIntervalMs: 1_000,
|
|
42
41
|
},
|
|
43
42
|
});
|
|
44
43
|
await (0, npmrc_1.setUpNpmrcAsync)(ctx, ctx.logger);
|
|
@@ -74,15 +73,16 @@ async function setupAsync(ctx) {
|
|
|
74
73
|
return packageJson;
|
|
75
74
|
});
|
|
76
75
|
await ctx.runBuildPhase(eas_build_job_1.BuildPhase.INSTALL_DEPENDENCIES, async () => {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
const reactNativeVersion =
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
76
|
+
const expoVersion = ctx.metadata?.sdkVersion ??
|
|
77
|
+
(0, packageManager_1.getPackageVersionFromPackageJson)({
|
|
78
|
+
packageJson,
|
|
79
|
+
packageName: 'expo',
|
|
80
|
+
});
|
|
81
|
+
const reactNativeVersion = ctx.metadata?.reactNativeVersion ??
|
|
82
|
+
(0, packageManager_1.getPackageVersionFromPackageJson)({
|
|
83
|
+
packageJson,
|
|
84
|
+
packageName: 'react-native',
|
|
85
|
+
});
|
|
86
86
|
await runInstallDependenciesAsync(ctx, {
|
|
87
87
|
useFrozenLockfile: (0, packageManager_1.shouldUseFrozenLockfile)({
|
|
88
88
|
env: ctx.env,
|
|
@@ -99,11 +99,10 @@ async function setupAsync(ctx) {
|
|
|
99
99
|
});
|
|
100
100
|
if (ctx.job.triggeredBy === common_1.BuildTrigger.GIT_BASED_INTEGRATION) {
|
|
101
101
|
await ctx.runBuildPhase(eas_build_job_1.BuildPhase.EAS_BUILD_INTERNAL, async () => {
|
|
102
|
-
|
|
103
|
-
if (!((_a = ctx.appConfig.ios) === null || _a === void 0 ? void 0 : _a.bundleIdentifier) && ctx.job.platform === eas_build_job_1.Platform.IOS) {
|
|
102
|
+
if (!ctx.appConfig.ios?.bundleIdentifier && ctx.job.platform === eas_build_job_1.Platform.IOS) {
|
|
104
103
|
throw new Error('The "ios.bundleIdentifier" is required to be set in app config for builds triggered by GitHub integration. Learn more: https://docs.expo.dev/versions/latest/config/app/#bundleidentifier.');
|
|
105
104
|
}
|
|
106
|
-
if (!
|
|
105
|
+
if (!ctx.appConfig.android?.package && ctx.job.platform === eas_build_job_1.Platform.ANDROID) {
|
|
107
106
|
throw new Error('The "android.package" is required to be set in app config for builds triggered by GitHub integration. Learn more: https://docs.expo.dev/versions/latest/config/app/#package.');
|
|
108
107
|
}
|
|
109
108
|
const { newJob, newMetadata } = await (0, easBuildInternal_1.runEasBuildInternalAsync)({
|
|
@@ -116,7 +115,7 @@ async function setupAsync(ctx) {
|
|
|
116
115
|
ctx.updateJobInformation(newJob, newMetadata);
|
|
117
116
|
});
|
|
118
117
|
}
|
|
119
|
-
const hasExpoPackage = !!
|
|
118
|
+
const hasExpoPackage = !!packageJson.dependencies?.expo;
|
|
120
119
|
if (!ctx.env.EAS_BUILD_DISABLE_EXPO_DOCTOR_STEP && hasExpoPackage) {
|
|
121
120
|
await ctx.runBuildPhase(eas_build_job_1.BuildPhase.RUN_EXPO_DOCTOR, async () => {
|
|
122
121
|
try {
|
|
@@ -147,14 +146,13 @@ async function runExpoDoctor(ctx) {
|
|
|
147
146
|
env: ctx.env,
|
|
148
147
|
});
|
|
149
148
|
timeout = setTimeout(async () => {
|
|
150
|
-
var _a;
|
|
151
149
|
timedOut = true;
|
|
152
150
|
const ppid = (0, nullthrows_1.default)(promise.child.pid);
|
|
153
151
|
const pids = await (0, processes_1.getParentAndDescendantProcessPidsAsync)(ppid);
|
|
154
|
-
pids.forEach(
|
|
152
|
+
pids.forEach(pid => {
|
|
155
153
|
process.kill(pid);
|
|
156
154
|
});
|
|
157
|
-
|
|
155
|
+
ctx.reportError?.(`"expo doctor" timed out`, undefined, {
|
|
158
156
|
extras: { buildId: ctx.env.EAS_BUILD_ID },
|
|
159
157
|
});
|
|
160
158
|
}, MAX_EXPO_DOCTOR_TIMEOUT_MS);
|
|
@@ -196,15 +194,14 @@ async function runInstallDependenciesAsync(ctx, { useFrozenLockfile, }) {
|
|
|
196
194
|
ctx.logger.warn('"Install dependencies" phase takes longer then expected and it did not produce any logs in the past 15 minutes. Consider evaluating your package.json file for possible issues with dependencies');
|
|
197
195
|
}, INSTALL_DEPENDENCIES_WARN_TIMEOUT_MS);
|
|
198
196
|
killTimeout = setTimeout(async () => {
|
|
199
|
-
var _a;
|
|
200
197
|
killTimedOut = true;
|
|
201
198
|
ctx.logger.error('"Install dependencies" phase takes a very long time and it did not produce any logs in the past 30 minutes. Most likely an unexpected error happened with your dependencies which caused the process to hang and it will be terminated');
|
|
202
199
|
const ppid = (0, nullthrows_1.default)(installDependenciesSpawnPromise.child.pid);
|
|
203
200
|
const pids = await (0, processes_1.getParentAndDescendantProcessPidsAsync)(ppid);
|
|
204
|
-
pids.forEach(
|
|
201
|
+
pids.forEach(pid => {
|
|
205
202
|
process.kill(pid);
|
|
206
203
|
});
|
|
207
|
-
|
|
204
|
+
ctx.reportError?.('"Install dependencies" phase takes a very long time', undefined, {
|
|
208
205
|
extras: { buildId: ctx.env.EAS_BUILD_ID },
|
|
209
206
|
});
|
|
210
207
|
}, INSTALL_DEPENDENCIES_KILL_TIMEOUT_MS);
|
|
@@ -226,8 +223,7 @@ async function runInstallDependenciesAsync(ctx, { useFrozenLockfile, }) {
|
|
|
226
223
|
}
|
|
227
224
|
}
|
|
228
225
|
async function validateAppConfigAsync(ctx, appConfig) {
|
|
229
|
-
|
|
230
|
-
if (((_b = (_a = appConfig === null || appConfig === void 0 ? void 0 : appConfig.extra) === null || _a === void 0 ? void 0 : _a.eas) === null || _b === void 0 ? void 0 : _b.projectId) &&
|
|
226
|
+
if (appConfig?.extra?.eas?.projectId &&
|
|
231
227
|
ctx.env.EAS_BUILD_PROJECT_ID &&
|
|
232
228
|
appConfig.extra.eas.projectId !== ctx.env.EAS_BUILD_PROJECT_ID) {
|
|
233
229
|
const isUsingDynamicConfig = (await fs_extra_1.default.pathExists(path_1.default.join(ctx.getReactNativeProjectDirectory(), 'app.config.ts'))) ||
|
|
@@ -247,9 +243,8 @@ async function validateAppConfigAsync(ctx, appConfig) {
|
|
|
247
243
|
}
|
|
248
244
|
throw new errors_1.UserFacingError('EAS_BUILD_PROJECT_ID_MISMATCH', `The value of the "extra.eas.projectId" field (${appConfig.extra.eas.projectId}) in the app config does not match the current project id (${ctx.env.EAS_BUILD_PROJECT_ID}). ${extraMessage}Learn more: https://expo.fyi/eas-config-mismatch.`);
|
|
249
245
|
}
|
|
250
|
-
else if (ctx.env.EAS_BUILD_PROJECT_ID && !
|
|
246
|
+
else if (ctx.env.EAS_BUILD_PROJECT_ID && !appConfig?.extra?.eas?.projectId) {
|
|
251
247
|
ctx.logger.error(`The "extra.eas.projectId" field is missing from your app config.`);
|
|
252
248
|
ctx.markBuildPhaseHasWarnings();
|
|
253
249
|
}
|
|
254
250
|
}
|
|
255
|
-
//# sourceMappingURL=setup.js.map
|
package/dist/context.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ManagedArtifactType, BuildPhase, BuildPhaseStats, Job, Env, Metadata, GenericArtifactType } from '@expo/eas-build-job';
|
|
2
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
|
+
import { BuildPhase, BuildPhaseStats, Env, GenericArtifactType, Job, ManagedArtifactType, Metadata } from '@expo/eas-build-job';
|
|
3
3
|
import { bunyan } from '@expo/logger';
|
|
4
4
|
import { Client } from '@urql/core';
|
|
5
5
|
import { PackageManager } from './utils/packageManager';
|