@expo/build-tools 1.0.271 → 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 +72 -11
- 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
|
@@ -22,13 +22,12 @@ function eagerBundleBuildFunction() {
|
|
|
22
22
|
}),
|
|
23
23
|
],
|
|
24
24
|
fn: async (stepsCtx, { env, inputs }) => {
|
|
25
|
-
var _a, _b;
|
|
26
25
|
const job = stepsCtx.global.staticContext.job;
|
|
27
26
|
if (!job.platform) {
|
|
28
27
|
throw new Error('Custom build job must have platform set');
|
|
29
28
|
}
|
|
30
|
-
if (
|
|
31
|
-
!semver_1.default.satisfies(
|
|
29
|
+
if (stepsCtx.global.staticContext.metadata?.sdkVersion &&
|
|
30
|
+
!semver_1.default.satisfies(stepsCtx.global.staticContext.metadata?.sdkVersion, '>=52')) {
|
|
32
31
|
throw new Error('Eager bundle is not supported for SDK version < 52');
|
|
33
32
|
}
|
|
34
33
|
const packageManager = (0, packageManager_1.resolvePackageManager)(stepsCtx.workingDirectory);
|
|
@@ -51,4 +50,3 @@ function eagerBundleBuildFunction() {
|
|
|
51
50
|
},
|
|
52
51
|
});
|
|
53
52
|
}
|
|
54
|
-
//# sourceMappingURL=eagerBundle.js.map
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createFindAndUploadBuildArtifactsBuildFunction = createFindAndUploadBuildArtifactsBuildFunction;
|
|
4
4
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
5
5
|
const steps_1 = require("@expo/steps");
|
|
6
|
-
const artifacts_1 = require("../../utils/artifacts");
|
|
7
6
|
const xcodeBuildLogs_1 = require("../../ios/xcodeBuildLogs");
|
|
7
|
+
const artifacts_1 = require("../../utils/artifacts");
|
|
8
8
|
function createFindAndUploadBuildArtifactsBuildFunction(ctx) {
|
|
9
9
|
return new steps_1.BuildFunction({
|
|
10
10
|
namespace: 'eas',
|
|
@@ -24,14 +24,14 @@ function createFindAndUploadBuildArtifactsBuildFunction(ctx) {
|
|
|
24
24
|
}
|
|
25
25
|
catch (err) {
|
|
26
26
|
stepCtx.logger.error(`Failed to upload application archives.`, err);
|
|
27
|
-
firstError
|
|
27
|
+
firstError ||= err;
|
|
28
28
|
}
|
|
29
29
|
try {
|
|
30
30
|
await uploadBuildArtifacts({ ctx, stepCtx });
|
|
31
31
|
}
|
|
32
32
|
catch (err) {
|
|
33
33
|
stepCtx.logger.error(`Failed to upload build artifacts.`, err);
|
|
34
|
-
firstError
|
|
34
|
+
firstError ||= err;
|
|
35
35
|
}
|
|
36
36
|
if (ctx.job.platform === eas_build_job_1.Platform.IOS) {
|
|
37
37
|
try {
|
|
@@ -59,9 +59,8 @@ function resolveIosArtifactPath(job) {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
async function uploadApplicationArchivesAsync({ ctx, stepCtx: { workingDirectory, logger }, }) {
|
|
62
|
-
var _a;
|
|
63
62
|
const applicationArchivePatternOrPath = ctx.job.platform === eas_build_job_1.Platform.ANDROID
|
|
64
|
-
? (
|
|
63
|
+
? (ctx.job.applicationArchivePath ?? 'android/app/build/outputs/**/*.{apk,aab}')
|
|
65
64
|
: resolveIosArtifactPath(ctx.job);
|
|
66
65
|
const applicationArchives = await (0, artifacts_1.findArtifacts)({
|
|
67
66
|
rootDir: workingDirectory,
|
|
@@ -84,8 +83,7 @@ async function uploadApplicationArchivesAsync({ ctx, stepCtx: { workingDirectory
|
|
|
84
83
|
logger.info('Done.');
|
|
85
84
|
}
|
|
86
85
|
async function uploadBuildArtifacts({ ctx, stepCtx: { workingDirectory, logger }, }) {
|
|
87
|
-
|
|
88
|
-
const buildArtifacts = (await Promise.all(((_a = ctx.job.buildArtifactPaths) !== null && _a !== void 0 ? _a : []).map((path) => (0, artifacts_1.findArtifacts)({ rootDir: workingDirectory, patternOrPath: path, logger })))).flat();
|
|
86
|
+
const buildArtifacts = (await Promise.all((ctx.job.buildArtifactPaths ?? []).map(path => (0, artifacts_1.findArtifacts)({ rootDir: workingDirectory, patternOrPath: path, logger })))).flat();
|
|
89
87
|
if (buildArtifacts.length === 0) {
|
|
90
88
|
return;
|
|
91
89
|
}
|
|
@@ -116,4 +114,3 @@ async function uploadXcodeBuildLogs({ ctx, stepCtx: { logger, global }, }) {
|
|
|
116
114
|
});
|
|
117
115
|
logger.info('Done.');
|
|
118
116
|
}
|
|
119
|
-
//# sourceMappingURL=findAndUploadBuildArtifacts.js.map
|
|
@@ -4,13 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.generateGymfileFromTemplateFunction = generateGymfileFromTemplateFunction;
|
|
7
|
-
const assert_1 = __importDefault(require("assert"));
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
|
-
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
10
|
-
const steps_1 = require("@expo/steps");
|
|
11
7
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
12
8
|
const plist_1 = __importDefault(require("@expo/plist"));
|
|
9
|
+
const steps_1 = require("@expo/steps");
|
|
13
10
|
const template_file_1 = require("@expo/template-file");
|
|
11
|
+
const assert_1 = __importDefault(require("assert"));
|
|
12
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
13
|
+
const path_1 = __importDefault(require("path"));
|
|
14
14
|
const credentials_1 = require("../utils/ios/credentials/credentials");
|
|
15
15
|
const manager_1 = __importDefault(require("../utils/ios/credentials/manager"));
|
|
16
16
|
const resolve_1 = require("../utils/ios/resolve");
|
|
@@ -97,7 +97,6 @@ function generateGymfileFromTemplateFunction() {
|
|
|
97
97
|
}),
|
|
98
98
|
],
|
|
99
99
|
fn: async (stepCtx, { inputs }) => {
|
|
100
|
-
var _a;
|
|
101
100
|
let credentials = undefined;
|
|
102
101
|
const rawCredentialsInput = inputs.credentials.value;
|
|
103
102
|
if (rawCredentialsInput) {
|
|
@@ -112,7 +111,7 @@ function generateGymfileFromTemplateFunction() {
|
|
|
112
111
|
const credentialsManager = new manager_1.default(value);
|
|
113
112
|
credentials = await credentialsManager.prepare(stepCtx.logger);
|
|
114
113
|
}
|
|
115
|
-
const extra =
|
|
114
|
+
const extra = inputs.extra.value ?? {};
|
|
116
115
|
const templateInput = inputs.template.value;
|
|
117
116
|
let template;
|
|
118
117
|
if (templateInput) {
|
|
@@ -141,7 +140,7 @@ function generateGymfileFromTemplateFunction() {
|
|
|
141
140
|
});
|
|
142
141
|
}
|
|
143
142
|
}
|
|
144
|
-
const ICLOUD_CONTAINER_ENVIRONMENT = entitlements
|
|
143
|
+
const ICLOUD_CONTAINER_ENVIRONMENT = entitlements?.['com.apple.developer.icloud-container-environment'];
|
|
145
144
|
const isTV = await (0, tvos_1.isTVOS)({
|
|
146
145
|
scheme,
|
|
147
146
|
buildConfiguration,
|
|
@@ -194,4 +193,3 @@ async function maybeReadEntitlementsAsync(logger, workingDir, scheme, buildConfi
|
|
|
194
193
|
return null;
|
|
195
194
|
}
|
|
196
195
|
}
|
|
197
|
-
//# sourceMappingURL=generateGymfileFromTemplate.js.map
|
|
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.injectAndroidCredentialsFunction = injectAndroidCredentialsFunction;
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const uuid_1 = require("uuid");
|
|
9
7
|
const steps_1 = require("@expo/steps");
|
|
10
8
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
11
9
|
const joi_1 = __importDefault(require("joi"));
|
|
10
|
+
const path_1 = __importDefault(require("path"));
|
|
11
|
+
const uuid_1 = require("uuid");
|
|
12
12
|
const gradleConfig_1 = require("../utils/android/gradleConfig");
|
|
13
13
|
const KeystoreSchema = joi_1.default.object({
|
|
14
14
|
dataBase64: joi_1.default.string().required(),
|
|
@@ -52,7 +52,7 @@ function injectAndroidCredentialsFunction() {
|
|
|
52
52
|
async function restoreCredentials(stepsCtx, buildCredentials) {
|
|
53
53
|
stepsCtx.logger.info("Writing secrets to the project's directory");
|
|
54
54
|
const keystorePath = path_1.default.join(stepsCtx.global.projectTargetDirectory, `keystore-${(0, uuid_1.v4)()}`);
|
|
55
|
-
await fs_extra_1.default.writeFile(keystorePath, Buffer.from(buildCredentials.keystore.dataBase64, 'base64'));
|
|
55
|
+
await fs_extra_1.default.writeFile(keystorePath, new Uint8Array(Buffer.from(buildCredentials.keystore.dataBase64, 'base64')));
|
|
56
56
|
const credentialsJson = {
|
|
57
57
|
android: {
|
|
58
58
|
keystore: {
|
|
@@ -65,4 +65,3 @@ async function restoreCredentials(stepsCtx, buildCredentials) {
|
|
|
65
65
|
};
|
|
66
66
|
await fs_extra_1.default.writeFile(path_1.default.join(stepsCtx.global.projectTargetDirectory, 'credentials.json'), JSON.stringify(credentialsJson));
|
|
67
67
|
}
|
|
68
|
-
//# sourceMappingURL=injectAndroidCredentials.js.map
|
|
@@ -4,13 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.createInstallMaestroBuildFunction = createInstallMaestroBuildFunction;
|
|
7
|
+
const results_1 = require("@expo/results");
|
|
8
|
+
const steps_1 = require("@expo/steps");
|
|
9
|
+
const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
|
|
7
10
|
const assert_1 = __importDefault(require("assert"));
|
|
8
11
|
const fs_1 = __importDefault(require("fs"));
|
|
9
12
|
const os_1 = __importDefault(require("os"));
|
|
10
13
|
const path_1 = __importDefault(require("path"));
|
|
11
|
-
const steps_1 = require("@expo/steps");
|
|
12
|
-
const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
|
|
13
|
-
const results_1 = require("@expo/results");
|
|
14
14
|
function createInstallMaestroBuildFunction() {
|
|
15
15
|
return new steps_1.BuildFunction({
|
|
16
16
|
namespace: 'eas',
|
|
@@ -210,4 +210,3 @@ async function installJavaFromGcs({ logger, env, }) {
|
|
|
210
210
|
await fs_1.default.promises.rm(tempDirectory, { force: true, recursive: true });
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
|
-
//# sourceMappingURL=installMaestro.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { BuildFunction,
|
|
1
|
+
import { BuildFunction, BuildStepContext, BuildStepEnv } from '@expo/steps';
|
|
2
2
|
export declare function createInstallNodeModulesBuildFunction(): BuildFunction;
|
|
3
3
|
export declare function installNodeModules(stepCtx: BuildStepContext, env: BuildStepEnv): Promise<void>;
|
|
@@ -5,10 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.createInstallNodeModulesBuildFunction = createInstallNodeModulesBuildFunction;
|
|
7
7
|
exports.installNodeModules = installNodeModules;
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
8
|
const steps_1 = require("@expo/steps");
|
|
10
|
-
const
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
11
10
|
const installDependencies_1 = require("../../common/installDependencies");
|
|
11
|
+
const packageManager_1 = require("../../utils/packageManager");
|
|
12
12
|
const project_1 = require("../../utils/project");
|
|
13
13
|
function createInstallNodeModulesBuildFunction() {
|
|
14
14
|
return new steps_1.BuildFunction({
|
|
@@ -22,7 +22,6 @@ function createInstallNodeModulesBuildFunction() {
|
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
async function installNodeModules(stepCtx, env) {
|
|
25
|
-
var _a, _b, _c, _d;
|
|
26
25
|
const { logger } = stepCtx;
|
|
27
26
|
const packageManager = (0, packageManager_1.resolvePackageManager)(stepCtx.workingDirectory);
|
|
28
27
|
const packagerRunDir = (0, packageManager_1.findPackagerRootDir)(stepCtx.workingDirectory);
|
|
@@ -37,14 +36,16 @@ async function installNodeModules(stepCtx, env) {
|
|
|
37
36
|
catch {
|
|
38
37
|
logger.info(`Failed to read package.json, defaulting to installing dependencies with a frozen lockfile. You can use EAS_NO_FROZEN_LOCKFILE=1 to disable it.`);
|
|
39
38
|
}
|
|
40
|
-
const expoVersion =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
const expoVersion = stepCtx.global.staticContext.metadata?.sdkVersion ??
|
|
40
|
+
(0, packageManager_1.getPackageVersionFromPackageJson)({
|
|
41
|
+
packageJson,
|
|
42
|
+
packageName: 'expo',
|
|
43
|
+
});
|
|
44
|
+
const reactNativeVersion = stepCtx.global.staticContext.metadata?.reactNativeVersion ??
|
|
45
|
+
(0, packageManager_1.getPackageVersionFromPackageJson)({
|
|
46
|
+
packageJson,
|
|
47
|
+
packageName: 'react-native',
|
|
48
|
+
});
|
|
48
49
|
const { spawnPromise } = await (0, installDependencies_1.installDependenciesAsync)({
|
|
49
50
|
packageManager,
|
|
50
51
|
env,
|
|
@@ -58,4 +59,3 @@ async function installNodeModules(stepCtx, env) {
|
|
|
58
59
|
});
|
|
59
60
|
await spawnPromise;
|
|
60
61
|
}
|
|
61
|
-
//# sourceMappingURL=installNodeModules.js.map
|
|
@@ -5,20 +5,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.createInternalEasMaestroTestFunction = createInternalEasMaestroTestFunction;
|
|
7
7
|
exports.getMaestroTestCommand = getMaestroTestCommand;
|
|
8
|
+
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
9
|
+
const logger_1 = require("@expo/logger");
|
|
10
|
+
const results_1 = require("@expo/results");
|
|
11
|
+
const steps_1 = require("@expo/steps");
|
|
12
|
+
const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
|
|
8
13
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
9
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
10
14
|
const node_os_1 = __importDefault(require("node:os"));
|
|
15
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
11
16
|
const promises_1 = require("node:timers/promises");
|
|
12
|
-
const steps_1 = require("@expo/steps");
|
|
13
17
|
const zod_1 = require("zod");
|
|
14
|
-
const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
|
|
15
|
-
const logger_1 = require("@expo/logger");
|
|
16
|
-
const results_1 = require("@expo/results");
|
|
17
|
-
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
18
|
-
const IosSimulatorUtils_1 = require("../../utils/IosSimulatorUtils");
|
|
19
18
|
const AndroidEmulatorUtils_1 = require("../../utils/AndroidEmulatorUtils");
|
|
20
|
-
const
|
|
19
|
+
const IosSimulatorUtils_1 = require("../../utils/IosSimulatorUtils");
|
|
21
20
|
const findMaestroPathsFlowsToExecuteAsync_1 = require("../../utils/findMaestroPathsFlowsToExecuteAsync");
|
|
21
|
+
const strings_1 = require("../../utils/strings");
|
|
22
22
|
function createInternalEasMaestroTestFunction(ctx) {
|
|
23
23
|
return new steps_1.BuildFunction({
|
|
24
24
|
namespace: 'eas',
|
|
@@ -76,7 +76,6 @@ function createInternalEasMaestroTestFunction(ctx) {
|
|
|
76
76
|
}),
|
|
77
77
|
],
|
|
78
78
|
fn: async (stepCtx, { inputs: _inputs, env, outputs }) => {
|
|
79
|
-
var _a;
|
|
80
79
|
// inputs come in form of { value: unknown }. Here we parse them into a typed and validated object.
|
|
81
80
|
const { platform, flow_paths, retries, include_tags, exclude_tags, shards, output_format, record_screen, } = zod_1.z
|
|
82
81
|
.object({
|
|
@@ -103,7 +102,9 @@ function createInternalEasMaestroTestFunction(ctx) {
|
|
|
103
102
|
stepCtx.logger.warn(`No flows to execute found in "${flowPath}".`);
|
|
104
103
|
continue;
|
|
105
104
|
}
|
|
106
|
-
stepCtx.logger.info(`Marking for execution:\n- ${flowPaths
|
|
105
|
+
stepCtx.logger.info(`Marking for execution:\n- ${flowPaths
|
|
106
|
+
.map(flowPath => node_path_1.default.relative(stepCtx.workingDirectory, flowPath))
|
|
107
|
+
.join('\n- ')}`);
|
|
107
108
|
stepCtx.logger.info('');
|
|
108
109
|
flowPathsToExecute.push(...flowPaths);
|
|
109
110
|
}
|
|
@@ -173,8 +174,8 @@ function createInternalEasMaestroTestFunction(ctx) {
|
|
|
173
174
|
stepCtx.logger.info('');
|
|
174
175
|
// If output_format is empty or noop, we won't use this.
|
|
175
176
|
const outputPath = node_path_1.default.join(maestroReportsDir, [
|
|
176
|
-
`${
|
|
177
|
-
MaestroOutputFormatToExtensionMap[output_format
|
|
177
|
+
`${output_format ? output_format + '-' : ''}report-flow-${flowIndex + 1}`,
|
|
178
|
+
MaestroOutputFormatToExtensionMap[output_format ?? 'noop'],
|
|
178
179
|
]
|
|
179
180
|
.filter(Boolean)
|
|
180
181
|
.join('.'));
|
|
@@ -218,7 +219,7 @@ function createInternalEasMaestroTestFunction(ctx) {
|
|
|
218
219
|
},
|
|
219
220
|
});
|
|
220
221
|
// Move device logs to the device logs directory.
|
|
221
|
-
if (logsResult
|
|
222
|
+
if (logsResult?.ok) {
|
|
222
223
|
try {
|
|
223
224
|
const extension = node_path_1.default.extname(logsResult.value.outputPath);
|
|
224
225
|
const destinationPath = node_path_1.default.join(deviceLogsDir, `flow-${flowIndex}${extension}`);
|
|
@@ -232,7 +233,7 @@ function createInternalEasMaestroTestFunction(ctx) {
|
|
|
232
233
|
stepCtx.logger.warn({ err }, 'Failed to prepare device logs for upload.');
|
|
233
234
|
}
|
|
234
235
|
}
|
|
235
|
-
else if (logsResult
|
|
236
|
+
else if (logsResult?.reason) {
|
|
236
237
|
stepCtx.logger.error({ err: logsResult.reason }, 'Failed to collect device logs.');
|
|
237
238
|
}
|
|
238
239
|
const isLastAttempt = fnResult.ok || attemptCount === retries - 1;
|
|
@@ -316,7 +317,7 @@ function createInternalEasMaestroTestFunction(ctx) {
|
|
|
316
317
|
// If any tests failed, we throw an error to mark the step as failed.
|
|
317
318
|
if (failedFlows.length > 0) {
|
|
318
319
|
throw new Error(`Some Maestro tests failed:\n- ${failedFlows
|
|
319
|
-
.map(
|
|
320
|
+
.map(flowPath => node_path_1.default.relative(stepCtx.workingDirectory, flowPath))
|
|
320
321
|
.join('\n- ')}`);
|
|
321
322
|
}
|
|
322
323
|
else {
|
|
@@ -483,4 +484,3 @@ async function maybeWithScreenRecordingAsync({ shouldRecord, platform, deviceIde
|
|
|
483
484
|
return { fnResult, recordingResult: (0, results_1.result)(err) };
|
|
484
485
|
}
|
|
485
486
|
}
|
|
486
|
-
//# sourceMappingURL=internalMaestroTest.js.map
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.createPrebuildBuildFunction = createPrebuildBuildFunction;
|
|
7
7
|
const steps_1 = require("@expo/steps");
|
|
8
8
|
const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
|
|
9
|
-
const packageManager_1 = require("../../utils/packageManager");
|
|
10
9
|
const installNodeModules_1 = require("./installNodeModules");
|
|
10
|
+
const packageManager_1 = require("../../utils/packageManager");
|
|
11
11
|
function createPrebuildBuildFunction() {
|
|
12
12
|
return new steps_1.BuildFunction({
|
|
13
13
|
namespace: 'eas',
|
|
@@ -33,15 +33,14 @@ function createPrebuildBuildFunction() {
|
|
|
33
33
|
}),
|
|
34
34
|
],
|
|
35
35
|
fn: async (stepCtx, { inputs, env }) => {
|
|
36
|
-
var _a, _b;
|
|
37
36
|
const { logger } = stepCtx;
|
|
38
37
|
const appleTeamId = inputs.apple_team_id.value;
|
|
39
38
|
const packageManager = (0, packageManager_1.resolvePackageManager)(stepCtx.workingDirectory);
|
|
40
39
|
const defaultPlatform = process.platform === 'darwin' ? 'ios' : 'android';
|
|
41
40
|
const job = stepCtx.global.staticContext.job;
|
|
42
41
|
const prebuildCommandArgs = getPrebuildCommandArgs({
|
|
43
|
-
platform:
|
|
44
|
-
customPrebuildCommand: job.platform ?
|
|
42
|
+
platform: job.platform ?? defaultPlatform,
|
|
43
|
+
customPrebuildCommand: job.platform ? job.experimental?.prebuildCommand : undefined,
|
|
45
44
|
clean: inputs.clean.value,
|
|
46
45
|
});
|
|
47
46
|
const argsWithExpo = ['expo', ...prebuildCommandArgs];
|
|
@@ -106,4 +105,3 @@ function sanitizeUserDefinedPrebuildCommand({ customPrebuildCommand, platform, c
|
|
|
106
105
|
}
|
|
107
106
|
return prebuildCommand.split(' ');
|
|
108
107
|
}
|
|
109
|
-
//# sourceMappingURL=prebuild.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Job } from '@expo/eas-build-job';
|
|
2
2
|
import { type bunyan } from '@expo/logger';
|
|
3
|
-
import { BuildFunction } from '@expo/steps';
|
|
4
3
|
import { type AndroidSigningOptions, type IosSigningOptions } from '@expo/repack-app';
|
|
4
|
+
import { BuildFunction } from '@expo/steps';
|
|
5
5
|
export declare function createRepackBuildFunction(): BuildFunction;
|
|
6
6
|
/**
|
|
7
7
|
* Resolves Android signing options from the job secrets.
|
|
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.createRepackBuildFunction = createRepackBuildFunction;
|
|
7
7
|
exports.resolveAndroidSigningOptionsAsync = resolveAndroidSigningOptionsAsync;
|
|
8
8
|
exports.resolveIosSigningOptionsAsync = resolveIosSigningOptionsAsync;
|
|
9
|
+
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
10
|
+
const steps_1 = require("@expo/steps");
|
|
9
11
|
const node_crypto_1 = require("node:crypto");
|
|
10
12
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
11
13
|
const node_os_1 = __importDefault(require("node:os"));
|
|
12
14
|
const node_path_1 = __importDefault(require("node:path"));
|
|
13
15
|
const resolve_from_1 = __importDefault(require("resolve-from"));
|
|
14
|
-
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
15
|
-
const steps_1 = require("@expo/steps");
|
|
16
16
|
const fastlane_1 = require("../../common/fastlane");
|
|
17
17
|
const manager_1 = __importDefault(require("../utils/ios/credentials/manager"));
|
|
18
18
|
function createRepackBuildFunction() {
|
|
@@ -48,6 +48,12 @@ function createRepackBuildFunction() {
|
|
|
48
48
|
required: false,
|
|
49
49
|
defaultValue: 'latest',
|
|
50
50
|
}),
|
|
51
|
+
steps_1.BuildStepInput.createProvider({
|
|
52
|
+
id: 'repack_package',
|
|
53
|
+
allowedValueTypeName: steps_1.BuildStepInputValueTypeName.STRING,
|
|
54
|
+
required: false,
|
|
55
|
+
defaultValue: '@expo/repack-app',
|
|
56
|
+
}),
|
|
51
57
|
],
|
|
52
58
|
outputProviders: [
|
|
53
59
|
steps_1.BuildStepOutput.createProvider({
|
|
@@ -56,10 +62,9 @@ function createRepackBuildFunction() {
|
|
|
56
62
|
}),
|
|
57
63
|
],
|
|
58
64
|
fn: async (stepsCtx, { inputs, outputs, env }) => {
|
|
59
|
-
var _a, _b;
|
|
60
65
|
const projectRoot = stepsCtx.workingDirectory;
|
|
61
66
|
const verbose = stepsCtx.global.env['EAS_VERBOSE'] === '1';
|
|
62
|
-
const platform =
|
|
67
|
+
const platform = inputs.platform.value ?? stepsCtx.global.staticContext.job.platform;
|
|
63
68
|
if (![eas_build_job_1.Platform.ANDROID, eas_build_job_1.Platform.IOS].includes(platform)) {
|
|
64
69
|
throw new Error(`Unsupported platform: ${platform}. Platform must be "${eas_build_job_1.Platform.ANDROID}" or "${eas_build_job_1.Platform.IOS}"`);
|
|
65
70
|
}
|
|
@@ -69,14 +74,18 @@ function createRepackBuildFunction() {
|
|
|
69
74
|
await node_fs_1.default.promises.mkdir(workingDirectory);
|
|
70
75
|
stepsCtx.logger.info(`Created temporary working directory: ${workingDirectory}`);
|
|
71
76
|
const sourceAppPath = inputs.source_app_path.value;
|
|
72
|
-
const outputPath =
|
|
77
|
+
const outputPath = inputs.output_path.value ??
|
|
78
|
+
node_path_1.default.join(tmpDir, `repacked-${(0, node_crypto_1.randomUUID)()}${node_path_1.default.extname(sourceAppPath)}`);
|
|
73
79
|
const exportEmbedOptions = inputs.embed_bundle_assets.value
|
|
74
80
|
? {
|
|
75
81
|
sourcemapOutput: undefined,
|
|
76
82
|
}
|
|
77
83
|
: undefined;
|
|
78
|
-
stepsCtx.logger.info(`Using repack
|
|
79
|
-
const repackApp = await installAndImportRepackAsync(
|
|
84
|
+
stepsCtx.logger.info(`Using repack from: ${inputs.repack_package.value}@${inputs.repack_version.value}`);
|
|
85
|
+
const repackApp = await installAndImportRepackAsync({
|
|
86
|
+
packageName: inputs.repack_package.value,
|
|
87
|
+
version: inputs.repack_version.value,
|
|
88
|
+
});
|
|
80
89
|
const { repackAppIosAsync, repackAppAndroidAsync } = repackApp;
|
|
81
90
|
stepsCtx.logger.info('Repacking the app...');
|
|
82
91
|
switch (platform) {
|
|
@@ -123,7 +132,7 @@ function createRepackBuildFunction() {
|
|
|
123
132
|
});
|
|
124
133
|
}
|
|
125
134
|
finally {
|
|
126
|
-
const keyStorePath = androidSigningOptions
|
|
135
|
+
const keyStorePath = androidSigningOptions?.keyStorePath;
|
|
127
136
|
if (keyStorePath) {
|
|
128
137
|
await node_fs_1.default.promises.rm(keyStorePath, { force: true });
|
|
129
138
|
}
|
|
@@ -139,13 +148,13 @@ function createRepackBuildFunction() {
|
|
|
139
148
|
/**
|
|
140
149
|
* Install `@expo/repack-app` in a sandbox directory and import it.
|
|
141
150
|
*/
|
|
142
|
-
async function installAndImportRepackAsync(version
|
|
151
|
+
async function installAndImportRepackAsync({ packageName, version, }) {
|
|
143
152
|
const sandbox = await node_fs_1.default.promises.mkdtemp(node_path_1.default.join(node_os_1.default.tmpdir(), `repack-package-root-`));
|
|
144
|
-
await (0, steps_1.spawnAsync)('yarn', ['add',
|
|
153
|
+
await (0, steps_1.spawnAsync)('yarn', ['add', `${packageName}@${version}`], {
|
|
145
154
|
stdio: 'inherit',
|
|
146
155
|
cwd: sandbox,
|
|
147
156
|
});
|
|
148
|
-
return require((0, resolve_from_1.default)(sandbox,
|
|
157
|
+
return require((0, resolve_from_1.default)(sandbox, packageName));
|
|
149
158
|
}
|
|
150
159
|
/**
|
|
151
160
|
* Creates `@expo/steps` based spawnAsync for repack.
|
|
@@ -157,7 +166,7 @@ function createSpawnAsyncStepAdapter({ verbose, logger, }) {
|
|
|
157
166
|
...(verbose ? { logger, stdio: 'pipe' } : { logger: undefined }),
|
|
158
167
|
});
|
|
159
168
|
const child = promise.child;
|
|
160
|
-
const wrappedPromise = promise.catch(
|
|
169
|
+
const wrappedPromise = promise.catch(error => {
|
|
161
170
|
logger.error(`Error while running command: ${command} ${args.join(' ')}`);
|
|
162
171
|
logger.error(`stdout: ${error.stdout}`);
|
|
163
172
|
logger.error(`stderr: ${error.stderr}`);
|
|
@@ -171,14 +180,13 @@ function createSpawnAsyncStepAdapter({ verbose, logger, }) {
|
|
|
171
180
|
* Resolves Android signing options from the job secrets.
|
|
172
181
|
*/
|
|
173
182
|
async function resolveAndroidSigningOptionsAsync({ job, tmpDir, }) {
|
|
174
|
-
var _a;
|
|
175
183
|
const androidJob = job;
|
|
176
|
-
const buildCredentials =
|
|
177
|
-
if (
|
|
184
|
+
const buildCredentials = androidJob.secrets?.buildCredentials;
|
|
185
|
+
if (buildCredentials?.keystore.dataBase64 == null) {
|
|
178
186
|
return undefined;
|
|
179
187
|
}
|
|
180
188
|
const keyStorePath = node_path_1.default.join(tmpDir, `keystore-${(0, node_crypto_1.randomUUID)()}`);
|
|
181
|
-
await node_fs_1.default.promises.writeFile(keyStorePath, Buffer.from(buildCredentials.keystore.dataBase64, 'base64'));
|
|
189
|
+
await node_fs_1.default.promises.writeFile(keyStorePath, new Uint8Array(Buffer.from(buildCredentials.keystore.dataBase64, 'base64')));
|
|
182
190
|
const keyStorePassword = `pass:${buildCredentials.keystore.keystorePassword}`;
|
|
183
191
|
const keyAlias = buildCredentials.keystore.keyAlias;
|
|
184
192
|
const keyPassword = buildCredentials.keystore.keyPassword
|
|
@@ -195,9 +203,8 @@ async function resolveAndroidSigningOptionsAsync({ job, tmpDir, }) {
|
|
|
195
203
|
* Resolves iOS signing options from the job secrets.
|
|
196
204
|
*/
|
|
197
205
|
async function resolveIosSigningOptionsAsync({ job, logger, }) {
|
|
198
|
-
var _a;
|
|
199
206
|
const iosJob = job;
|
|
200
|
-
const buildCredentials =
|
|
207
|
+
const buildCredentials = iosJob.secrets?.buildCredentials;
|
|
201
208
|
if (iosJob.simulator || buildCredentials == null) {
|
|
202
209
|
return undefined;
|
|
203
210
|
}
|
|
@@ -213,4 +220,3 @@ async function resolveIosSigningOptionsAsync({ job, logger, }) {
|
|
|
213
220
|
signingIdentity: credentials.applicationTargetProvisioningProfile.data.certificateCommonName,
|
|
214
221
|
};
|
|
215
222
|
}
|
|
216
|
-
//# sourceMappingURL=repack.js.map
|
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.resolveAppleTeamIdFromCredentialsFunction = resolveAppleTeamIdFromCredentialsFunction;
|
|
7
7
|
const steps_1 = require("@expo/steps");
|
|
8
|
-
const manager_1 = __importDefault(require("../utils/ios/credentials/manager"));
|
|
9
8
|
const credentials_1 = require("../utils/ios/credentials/credentials");
|
|
9
|
+
const manager_1 = __importDefault(require("../utils/ios/credentials/manager"));
|
|
10
10
|
function resolveAppleTeamIdFromCredentialsFunction() {
|
|
11
11
|
return new steps_1.BuildFunction({
|
|
12
12
|
namespace: 'eas',
|
|
@@ -44,4 +44,3 @@ function resolveAppleTeamIdFromCredentialsFunction() {
|
|
|
44
44
|
},
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
//# sourceMappingURL=resolveAppleTeamIdFromCredentials.js.map
|
|
@@ -32,4 +32,3 @@ async function resolveBuildConfigAsync({ logger, workingDirectory, env, ctx, })
|
|
|
32
32
|
logger.info('Build config resolved:');
|
|
33
33
|
logger.info(JSON.stringify({ job: (0, lodash_1.omit)(ctx.job, 'secrets', 'projectArchive'), metadata: ctx.metadata }, null, 2));
|
|
34
34
|
}
|
|
35
|
-
//# sourceMappingURL=resolveBuildConfig.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BuildFunction } from '@expo/steps';
|
|
2
1
|
import { Platform } from '@expo/eas-build-job';
|
|
3
2
|
import { bunyan } from '@expo/logger';
|
|
3
|
+
import { BuildFunction } from '@expo/steps';
|
|
4
4
|
export declare function createRestoreBuildCacheFunction(): BuildFunction;
|
|
5
5
|
export declare function createCacheStatsBuildFunction(): BuildFunction;
|
|
6
6
|
export declare function restoreCcacheAsync({ logger, workingDirectory, platform, env, secrets, }: {
|
|
@@ -7,14 +7,14 @@ exports.createRestoreBuildCacheFunction = createRestoreBuildCacheFunction;
|
|
|
7
7
|
exports.createCacheStatsBuildFunction = createCacheStatsBuildFunction;
|
|
8
8
|
exports.restoreCcacheAsync = restoreCcacheAsync;
|
|
9
9
|
exports.cacheStatsAsync = cacheStatsAsync;
|
|
10
|
-
const steps_1 = require("@expo/steps");
|
|
11
10
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
12
11
|
const results_1 = require("@expo/results");
|
|
12
|
+
const steps_1 = require("@expo/steps");
|
|
13
13
|
const nullthrows_1 = __importDefault(require("nullthrows"));
|
|
14
|
+
const ccacheStats_1 = require("./ccacheStats");
|
|
15
|
+
const restoreCache_1 = require("./restoreCache");
|
|
14
16
|
const cacheKey_1 = require("../../utils/cacheKey");
|
|
15
17
|
const turtleFetch_1 = require("../../utils/turtleFetch");
|
|
16
|
-
const restoreCache_1 = require("./restoreCache");
|
|
17
|
-
const ccacheStats_1 = require("./ccacheStats");
|
|
18
18
|
function createRestoreBuildCacheFunction() {
|
|
19
19
|
return new steps_1.BuildFunction({
|
|
20
20
|
namespace: 'eas',
|
|
@@ -29,10 +29,10 @@ function createRestoreBuildCacheFunction() {
|
|
|
29
29
|
}),
|
|
30
30
|
],
|
|
31
31
|
fn: async (stepCtx, { env, inputs }) => {
|
|
32
|
-
var _a;
|
|
33
32
|
const { logger } = stepCtx;
|
|
34
33
|
const workingDirectory = stepCtx.workingDirectory;
|
|
35
|
-
const platform =
|
|
34
|
+
const platform = inputs.platform.value ??
|
|
35
|
+
stepCtx.global.staticContext.job.platform;
|
|
36
36
|
if (!platform || ![eas_build_job_1.Platform.ANDROID, eas_build_job_1.Platform.IOS].includes(platform)) {
|
|
37
37
|
throw new Error(`Unsupported platform: ${platform}. Platform must be "${eas_build_job_1.Platform.ANDROID}" or "${eas_build_job_1.Platform.IOS}"`);
|
|
38
38
|
}
|
|
@@ -67,12 +67,11 @@ function createCacheStatsBuildFunction() {
|
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
async function restoreCcacheAsync({ logger, workingDirectory, platform, env, secrets, }) {
|
|
70
|
-
var _a;
|
|
71
70
|
const enabled = env.EAS_RESTORE_CACHE === '1' || (env.EAS_USE_CACHE === '1' && env.EAS_RESTORE_CACHE !== '0');
|
|
72
71
|
if (!enabled) {
|
|
73
72
|
return;
|
|
74
73
|
}
|
|
75
|
-
const robotAccessToken = (0, nullthrows_1.default)(secrets
|
|
74
|
+
const robotAccessToken = (0, nullthrows_1.default)(secrets?.robotAccessToken, 'Robot access token is required for cache operations');
|
|
76
75
|
const expoApiServerURL = (0, nullthrows_1.default)(env.__API_SERVER_URL, '__API_SERVER_URL is not set');
|
|
77
76
|
const cachePath = (0, cacheKey_1.getCcachePath)(env);
|
|
78
77
|
// Check if ccache is installed before proceeding
|
|
@@ -112,7 +111,7 @@ async function restoreCcacheAsync({ logger, workingDirectory, platform, env, sec
|
|
|
112
111
|
logger.info(`Cache restored successfully ${matchedKey === cacheKey ? '(direct hit)' : '(prefix match)'}`);
|
|
113
112
|
}
|
|
114
113
|
catch (err) {
|
|
115
|
-
if (err instanceof turtleFetch_1.TurtleFetchError &&
|
|
114
|
+
if (err instanceof turtleFetch_1.TurtleFetchError && err.response?.status === 404) {
|
|
116
115
|
logger.info('No cache found for this key');
|
|
117
116
|
}
|
|
118
117
|
else {
|
|
@@ -160,7 +159,7 @@ async function cacheStatsAsync({ logger, env, secrets, }) {
|
|
|
160
159
|
logger,
|
|
161
160
|
stdio: 'pipe',
|
|
162
161
|
}));
|
|
163
|
-
const robotAccessToken = secrets
|
|
162
|
+
const robotAccessToken = secrets?.robotAccessToken;
|
|
164
163
|
const expoApiServerURL = env.__API_SERVER_URL;
|
|
165
164
|
const buildId = env.EAS_BUILD_ID;
|
|
166
165
|
if (robotAccessToken && expoApiServerURL && buildId) {
|
|
@@ -172,4 +171,3 @@ async function cacheStatsAsync({ logger, env, secrets, }) {
|
|
|
172
171
|
});
|
|
173
172
|
}
|
|
174
173
|
}
|
|
175
|
-
//# sourceMappingURL=restoreBuildCache.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Platform } from '@expo/eas-build-job';
|
|
1
2
|
import { bunyan } from '@expo/logger';
|
|
2
3
|
import { BuildFunction } from '@expo/steps';
|
|
3
|
-
import { Platform } from '@expo/eas-build-job';
|
|
4
4
|
export declare function createRestoreCacheFunction(): BuildFunction;
|
|
5
5
|
export declare function downloadCacheAsync({ logger, jobId, expoApiServerURL, robotAccessToken, paths, key, keyPrefixes, platform, }: {
|
|
6
6
|
logger: bunyan;
|