@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/context.js
CHANGED
|
@@ -4,24 +4,39 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.BuildContext = exports.SkipNativeBuildError = void 0;
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
9
7
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
10
8
|
const common_1 = require("@expo/eas-build-job/dist/common");
|
|
11
9
|
const core_1 = require("@urql/core");
|
|
12
|
-
const
|
|
10
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
11
|
+
const path_1 = __importDefault(require("path"));
|
|
13
12
|
const detectError_1 = require("./buildErrors/detectError");
|
|
14
13
|
const appConfig_1 = require("./utils/appConfig");
|
|
15
14
|
const environmentSecrets_1 = require("./utils/environmentSecrets");
|
|
15
|
+
const packageManager_1 = require("./utils/packageManager");
|
|
16
16
|
class SkipNativeBuildError extends Error {
|
|
17
17
|
}
|
|
18
18
|
exports.SkipNativeBuildError = SkipNativeBuildError;
|
|
19
19
|
class BuildContext {
|
|
20
|
+
workingdir;
|
|
21
|
+
logger;
|
|
22
|
+
logBuffer;
|
|
23
|
+
cacheManager;
|
|
24
|
+
reportError;
|
|
25
|
+
skipNativeBuild;
|
|
26
|
+
artifacts = {};
|
|
27
|
+
_isLocal;
|
|
28
|
+
_env;
|
|
29
|
+
_job;
|
|
30
|
+
_metadata;
|
|
31
|
+
defaultLogger;
|
|
32
|
+
_uploadArtifact;
|
|
33
|
+
buildPhase;
|
|
34
|
+
buildPhaseSkipped = false;
|
|
35
|
+
buildPhaseHasWarnings = false;
|
|
36
|
+
_appConfig;
|
|
37
|
+
reportBuildPhaseStats;
|
|
38
|
+
graphqlClient;
|
|
20
39
|
constructor(job, options) {
|
|
21
|
-
var _a, _b;
|
|
22
|
-
this.artifacts = {};
|
|
23
|
-
this.buildPhaseSkipped = false;
|
|
24
|
-
this.buildPhaseHasWarnings = false;
|
|
25
40
|
this.workingdir = options.workingdir;
|
|
26
41
|
this.defaultLogger = options.logger;
|
|
27
42
|
this.logger = this.defaultLogger;
|
|
@@ -36,7 +51,7 @@ class BuildContext {
|
|
|
36
51
|
const environmentSecrets = this.getEnvironmentSecrets(job);
|
|
37
52
|
this._env = {
|
|
38
53
|
...options.env,
|
|
39
|
-
...
|
|
54
|
+
...job?.builderEnvironment?.env,
|
|
40
55
|
...environmentSecrets,
|
|
41
56
|
__EAS_BUILD_ENVS_DIR: this.buildEnvsDirectory,
|
|
42
57
|
};
|
|
@@ -50,7 +65,7 @@ class BuildContext {
|
|
|
50
65
|
preferGetMethod: false,
|
|
51
66
|
fetchOptions: {
|
|
52
67
|
headers: {
|
|
53
|
-
Authorization: `Bearer ${
|
|
68
|
+
Authorization: `Bearer ${job.secrets?.robotAccessToken}`,
|
|
54
69
|
},
|
|
55
70
|
},
|
|
56
71
|
});
|
|
@@ -90,13 +105,12 @@ class BuildContext {
|
|
|
90
105
|
return (0, packageManager_1.resolvePackageManager)(this.getReactNativeProjectDirectory());
|
|
91
106
|
}
|
|
92
107
|
get appConfig() {
|
|
93
|
-
var _a;
|
|
94
108
|
if (!this._appConfig) {
|
|
95
109
|
this._appConfig = (0, appConfig_1.readAppConfig)({
|
|
96
110
|
projectDir: this.getReactNativeProjectDirectory(),
|
|
97
111
|
env: this.env,
|
|
98
112
|
logger: this.logger,
|
|
99
|
-
sdkVersion:
|
|
113
|
+
sdkVersion: this.metadata?.sdkVersion,
|
|
100
114
|
}).exp;
|
|
101
115
|
}
|
|
102
116
|
return this._appConfig;
|
|
@@ -130,12 +144,11 @@ class BuildContext {
|
|
|
130
144
|
this.buildPhaseHasWarnings = true;
|
|
131
145
|
}
|
|
132
146
|
async uploadArtifact({ artifact, logger, }) {
|
|
133
|
-
var _a;
|
|
134
147
|
const result = await this._uploadArtifact({ artifact, logger });
|
|
135
148
|
if (result.filename && !(0, eas_build_job_1.isGenericArtifact)(artifact)) {
|
|
136
149
|
this.artifacts[artifact.type] = result.filename;
|
|
137
150
|
}
|
|
138
|
-
return { artifactId:
|
|
151
|
+
return { artifactId: result.artifactId ?? null };
|
|
139
152
|
}
|
|
140
153
|
updateEnv(env) {
|
|
141
154
|
if (this._job.triggeredBy !== common_1.BuildTrigger.GIT_BASED_INTEGRATION) {
|
|
@@ -151,23 +164,22 @@ class BuildContext {
|
|
|
151
164
|
: this.buildExecutablesDirectory;
|
|
152
165
|
}
|
|
153
166
|
updateJobInformation(job, metadata) {
|
|
154
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
155
167
|
if (this._job.triggeredBy !== common_1.BuildTrigger.GIT_BASED_INTEGRATION) {
|
|
156
168
|
throw new Error('Updating job information is only allowed when build was triggered by a git-based integration.');
|
|
157
169
|
}
|
|
158
170
|
this._job = {
|
|
159
171
|
...this._job,
|
|
160
172
|
...job,
|
|
161
|
-
workflowInterpolationContext:
|
|
173
|
+
workflowInterpolationContext: job.workflowInterpolationContext ?? this.job.workflowInterpolationContext,
|
|
162
174
|
triggeredBy: this._job.triggeredBy,
|
|
163
175
|
secrets: {
|
|
164
176
|
...this.job.secrets,
|
|
165
177
|
...job.secrets,
|
|
166
|
-
robotAccessToken:
|
|
178
|
+
robotAccessToken: job.secrets?.robotAccessToken ?? this.job.secrets?.robotAccessToken,
|
|
167
179
|
environmentSecrets: [
|
|
168
180
|
// Latter secrets override former ones.
|
|
169
|
-
...(
|
|
170
|
-
...(
|
|
181
|
+
...(this.job.secrets?.environmentSecrets ?? []),
|
|
182
|
+
...(job.secrets?.environmentSecrets ?? []),
|
|
171
183
|
],
|
|
172
184
|
},
|
|
173
185
|
...(this._job.platform ? { expoBuildUrl: this._job.expoBuildUrl } : null),
|
|
@@ -190,13 +202,12 @@ class BuildContext {
|
|
|
190
202
|
return buildError;
|
|
191
203
|
}
|
|
192
204
|
getReactNativeProjectDirectory(baseDirectory = this.buildDirectory) {
|
|
193
|
-
var _a;
|
|
194
205
|
if (!this.job.platform) {
|
|
195
206
|
return path_1.default.join(baseDirectory,
|
|
196
207
|
// NOTE: We may want to add projectRootDirectory to generic jobs in the future.
|
|
197
208
|
this.job.builderEnvironment.env.__EXPO_RELATIVE_BASE_DIRECTORY || '.');
|
|
198
209
|
}
|
|
199
|
-
return path_1.default.join(baseDirectory,
|
|
210
|
+
return path_1.default.join(baseDirectory, this.job.projectRootDirectory ?? '.');
|
|
200
211
|
}
|
|
201
212
|
setBuildPhase(buildPhase, { doNotMarkStart = false } = {}) {
|
|
202
213
|
if (this.buildPhase) {
|
|
@@ -215,12 +226,11 @@ class BuildContext {
|
|
|
215
226
|
}
|
|
216
227
|
}
|
|
217
228
|
async endCurrentBuildPhaseAsync({ result, doNotMarkEnd = false, durationMs, }) {
|
|
218
|
-
var _a;
|
|
219
229
|
if (!this.buildPhase) {
|
|
220
230
|
return;
|
|
221
231
|
}
|
|
222
232
|
await this.collectAndUpdateEnvVariablesAsync();
|
|
223
|
-
|
|
233
|
+
this.reportBuildPhaseStats?.({ buildPhase: this.buildPhase, result, durationMs });
|
|
224
234
|
if (!doNotMarkEnd) {
|
|
225
235
|
this.logger.info({ marker: eas_build_job_1.LogMarker.END_PHASE, result, durationMs }, `End phase: ${this.buildPhase}`);
|
|
226
236
|
}
|
|
@@ -244,8 +254,7 @@ class BuildContext {
|
|
|
244
254
|
};
|
|
245
255
|
}
|
|
246
256
|
getEnvironmentSecrets(job) {
|
|
247
|
-
|
|
248
|
-
if (!((_a = job === null || job === void 0 ? void 0 : job.secrets) === null || _a === void 0 ? void 0 : _a.environmentSecrets)) {
|
|
257
|
+
if (!job?.secrets?.environmentSecrets) {
|
|
249
258
|
return {};
|
|
250
259
|
}
|
|
251
260
|
const environmentSecretsDirectory = path_1.default.join(this.workingdir, 'eas-environment-secrets');
|
|
@@ -266,4 +275,3 @@ class BuildContext {
|
|
|
266
275
|
}
|
|
267
276
|
}
|
|
268
277
|
exports.BuildContext = BuildContext;
|
|
269
|
-
//# sourceMappingURL=context.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BuildJob, Env, Job, Metadata, StaticJobInterpolationContext } from '@expo/eas-build-job';
|
|
2
2
|
import { bunyan } from '@expo/logger';
|
|
3
|
-
import {
|
|
3
|
+
import { BuildRuntimePlatform, ExternalBuildContextProvider } from '@expo/steps';
|
|
4
4
|
import { ArtifactToUpload, BuildContext } from './context';
|
|
5
5
|
export interface BuilderRuntimeApi {
|
|
6
6
|
uploadArtifact: (spec: {
|
|
@@ -4,15 +4,40 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CustomBuildContext = void 0;
|
|
7
|
-
const assert_1 = __importDefault(require("assert"));
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
7
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
10
8
|
const steps_1 = require("@expo/steps");
|
|
9
|
+
const assert_1 = __importDefault(require("assert"));
|
|
10
|
+
const path_1 = __importDefault(require("path"));
|
|
11
11
|
const platformToBuildRuntimePlatform = {
|
|
12
12
|
[eas_build_job_1.Platform.ANDROID]: steps_1.BuildRuntimePlatform.LINUX,
|
|
13
13
|
[eas_build_job_1.Platform.IOS]: steps_1.BuildRuntimePlatform.DARWIN,
|
|
14
14
|
};
|
|
15
15
|
class CustomBuildContext {
|
|
16
|
+
/*
|
|
17
|
+
* Directory that contains project sources before eas/checkout.
|
|
18
|
+
*/
|
|
19
|
+
projectSourceDirectory;
|
|
20
|
+
/*
|
|
21
|
+
* Directory where build is executed. eas/checkout will copy sources here.
|
|
22
|
+
*/
|
|
23
|
+
projectTargetDirectory;
|
|
24
|
+
/*
|
|
25
|
+
* Directory where all build steps will be executed unless configured otherwise.
|
|
26
|
+
*/
|
|
27
|
+
defaultWorkingDirectory;
|
|
28
|
+
/*
|
|
29
|
+
* Directory where build logs will be stored unless configure otherwise.
|
|
30
|
+
*/
|
|
31
|
+
buildLogsDirectory;
|
|
32
|
+
/**
|
|
33
|
+
* Time of the start of the build.
|
|
34
|
+
*/
|
|
35
|
+
startTime;
|
|
36
|
+
logger;
|
|
37
|
+
runtimeApi;
|
|
38
|
+
job;
|
|
39
|
+
metadata;
|
|
40
|
+
_env;
|
|
16
41
|
constructor(buildCtx) {
|
|
17
42
|
this._env = buildCtx.env;
|
|
18
43
|
this.job = buildCtx.job;
|
|
@@ -46,35 +71,33 @@ class CustomBuildContext {
|
|
|
46
71
|
}
|
|
47
72
|
// We omit steps, because CustomBuildContext does not have steps.
|
|
48
73
|
staticContext() {
|
|
49
|
-
var _a;
|
|
50
74
|
return {
|
|
51
75
|
...this.job.workflowInterpolationContext,
|
|
52
76
|
expoApiServerURL: this.env.__API_SERVER_URL,
|
|
53
77
|
job: this.job,
|
|
54
|
-
metadata:
|
|
78
|
+
metadata: this.metadata ?? null,
|
|
55
79
|
};
|
|
56
80
|
}
|
|
57
81
|
updateEnv(env) {
|
|
58
82
|
this._env = env;
|
|
59
83
|
}
|
|
60
84
|
updateJobInformation(job, metadata) {
|
|
61
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
62
85
|
if (this.job.triggeredBy !== eas_build_job_1.BuildTrigger.GIT_BASED_INTEGRATION) {
|
|
63
86
|
throw new Error('Updating job information is only allowed when build was triggered by a git-based integration.');
|
|
64
87
|
}
|
|
65
88
|
this.job = {
|
|
66
89
|
...this.job,
|
|
67
90
|
...job,
|
|
68
|
-
workflowInterpolationContext:
|
|
91
|
+
workflowInterpolationContext: job.workflowInterpolationContext ?? this.job.workflowInterpolationContext,
|
|
69
92
|
triggeredBy: this.job.triggeredBy,
|
|
70
93
|
secrets: {
|
|
71
94
|
...this.job.secrets,
|
|
72
95
|
...job.secrets,
|
|
73
|
-
robotAccessToken:
|
|
96
|
+
robotAccessToken: job.secrets?.robotAccessToken ?? this.job.secrets?.robotAccessToken,
|
|
74
97
|
environmentSecrets: [
|
|
75
98
|
// Latter secrets override former ones.
|
|
76
|
-
...(
|
|
77
|
-
...(
|
|
99
|
+
...(this.job.secrets?.environmentSecrets ?? []),
|
|
100
|
+
...(job.secrets?.environmentSecrets ?? []),
|
|
78
101
|
],
|
|
79
102
|
},
|
|
80
103
|
...(this.job.platform ? { expoBuildUrl: this.job.expoBuildUrl } : null),
|
|
@@ -83,4 +106,3 @@ class CustomBuildContext {
|
|
|
83
106
|
}
|
|
84
107
|
}
|
|
85
108
|
exports.CustomBuildContext = CustomBuildContext;
|
|
86
|
-
//# sourceMappingURL=customBuildContext.js.map
|
package/dist/gcs/LoggerStream.js
CHANGED
|
@@ -3,28 +3,37 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const assert_1 = __importDefault(require("assert"));
|
|
6
7
|
const crypto_1 = require("crypto");
|
|
8
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
7
9
|
const os_1 = __importDefault(require("os"));
|
|
8
10
|
const path_1 = __importDefault(require("path"));
|
|
9
|
-
const zlib_1 = __importDefault(require("zlib"));
|
|
10
11
|
const stream_1 = require("stream");
|
|
11
|
-
const assert_1 = __importDefault(require("assert"));
|
|
12
12
|
const util_1 = require("util");
|
|
13
|
-
const
|
|
13
|
+
const zlib_1 = __importDefault(require("zlib"));
|
|
14
14
|
const client_1 = __importDefault(require("./client"));
|
|
15
15
|
const pipe = (0, util_1.promisify)(stream_1.pipeline);
|
|
16
16
|
class GCSLoggerStream extends stream_1.Writable {
|
|
17
|
+
writable = true;
|
|
18
|
+
logger;
|
|
19
|
+
uploadMethod;
|
|
20
|
+
options;
|
|
21
|
+
temporaryLogsPath;
|
|
22
|
+
temporaryCompressedLogsPath;
|
|
23
|
+
compress;
|
|
24
|
+
fileHandle;
|
|
25
|
+
uploadingPromise;
|
|
26
|
+
hasChangesToUpload = false;
|
|
27
|
+
flushInterval;
|
|
28
|
+
buffer = [];
|
|
29
|
+
writePromise;
|
|
30
|
+
cleanUpCalled = false;
|
|
17
31
|
constructor({ logger, uploadMethod, options }) {
|
|
18
|
-
var _a;
|
|
19
32
|
super();
|
|
20
|
-
this.writable = true;
|
|
21
|
-
this.hasChangesToUpload = false;
|
|
22
|
-
this.buffer = [];
|
|
23
|
-
this.cleanUpCalled = false;
|
|
24
33
|
this.logger = logger;
|
|
25
34
|
this.uploadMethod = uploadMethod;
|
|
26
35
|
this.options = options;
|
|
27
|
-
this.compress =
|
|
36
|
+
this.compress = options?.compress ?? this.findNormalizedHeader('contentencoding');
|
|
28
37
|
this.temporaryLogsPath = path_1.default.join(os_1.default.tmpdir(), `logs-${(0, crypto_1.randomUUID)()}`);
|
|
29
38
|
this.temporaryCompressedLogsPath = `${this.temporaryLogsPath}.compressed`;
|
|
30
39
|
}
|
|
@@ -112,17 +121,17 @@ class GCSLoggerStream extends stream_1.Writable {
|
|
|
112
121
|
await this.safeWriteToFile();
|
|
113
122
|
let resolveFn;
|
|
114
123
|
this.hasChangesToUpload = false;
|
|
115
|
-
this.uploadingPromise = new Promise(
|
|
124
|
+
this.uploadingPromise = new Promise(res => {
|
|
116
125
|
resolveFn = res;
|
|
117
126
|
});
|
|
118
127
|
return await this.upload()
|
|
119
|
-
.then(
|
|
128
|
+
.then(result => {
|
|
120
129
|
return result;
|
|
121
130
|
})
|
|
122
|
-
.catch(
|
|
131
|
+
.catch(err => {
|
|
123
132
|
this.logger.error({ err }, 'Failed to upload logs file to GCS');
|
|
124
133
|
})
|
|
125
|
-
.then(
|
|
134
|
+
.then(result => {
|
|
126
135
|
this.uploadingPromise = undefined;
|
|
127
136
|
resolveFn();
|
|
128
137
|
return result;
|
|
@@ -183,4 +192,3 @@ class GCSLoggerStream extends stream_1.Writable {
|
|
|
183
192
|
})(CompressionMethod = GCSLoggerStream.CompressionMethod || (GCSLoggerStream.CompressionMethod = {}));
|
|
184
193
|
})(GCSLoggerStream || (GCSLoggerStream = {}));
|
|
185
194
|
exports.default = GCSLoggerStream;
|
|
186
|
-
//# sourceMappingURL=LoggerStream.js.map
|
|
@@ -3,14 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const path_1 = __importDefault(require("path"));
|
|
7
6
|
const crypto_1 = require("crypto");
|
|
8
|
-
const stream_1 = require("stream");
|
|
9
|
-
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
10
7
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
8
|
+
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
10
|
+
const stream_1 = require("stream");
|
|
11
11
|
const client_1 = __importDefault(require("../client"));
|
|
12
12
|
jest.mock('node-fetch');
|
|
13
13
|
class ErrorWithCode extends Error {
|
|
14
|
+
_code;
|
|
14
15
|
constructor(message, code) {
|
|
15
16
|
super(message);
|
|
16
17
|
if (code) {
|
|
@@ -22,10 +23,7 @@ class ErrorWithCode extends Error {
|
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
class DNSError extends ErrorWithCode {
|
|
25
|
-
|
|
26
|
-
super(...arguments);
|
|
27
|
-
this._code = 'ENOTFOUND';
|
|
28
|
-
}
|
|
26
|
+
_code = 'ENOTFOUND';
|
|
29
27
|
}
|
|
30
28
|
const TEST_BUCKET = 'turtle-v2-test';
|
|
31
29
|
let googleApplicationCredentials;
|
|
@@ -335,4 +333,3 @@ describe('GCS client', () => {
|
|
|
335
333
|
});
|
|
336
334
|
});
|
|
337
335
|
});
|
|
338
|
-
//# sourceMappingURL=gcs.test.js.map
|
package/dist/gcs/client.d.ts
CHANGED
package/dist/gcs/client.js
CHANGED
|
@@ -15,32 +15,43 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const node_util_1 = require("node:util");
|
|
30
|
-
const node_stream_1 = __importDefault(require("node:stream"));
|
|
31
|
-
const url_1 = require("url");
|
|
32
|
-
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
33
39
|
const storage_1 = require("@google-cloud/storage");
|
|
40
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
34
41
|
const node_fetch_1 = __importStar(require("node-fetch"));
|
|
42
|
+
const node_stream_1 = __importDefault(require("node:stream"));
|
|
43
|
+
const node_util_1 = require("node:util");
|
|
44
|
+
const url_1 = require("url");
|
|
35
45
|
const retry_1 = require("./retry");
|
|
36
46
|
const pipeline = (0, node_util_1.promisify)(node_stream_1.default.pipeline);
|
|
37
47
|
class GCS {
|
|
48
|
+
bucket;
|
|
49
|
+
client = new storage_1.Storage();
|
|
38
50
|
constructor(bucket) {
|
|
39
51
|
this.bucket = bucket;
|
|
40
|
-
this.client = new storage_1.Storage();
|
|
41
52
|
this.bucket = bucket;
|
|
42
53
|
}
|
|
43
|
-
static async uploadWithSignedUrl({ signedUrl, srcGeneratorAsync, retries = 2, retryIntervalMs =
|
|
54
|
+
static async uploadWithSignedUrl({ signedUrl, srcGeneratorAsync, retries = 2, retryIntervalMs = 30_000, }) {
|
|
44
55
|
let resp;
|
|
45
56
|
try {
|
|
46
57
|
resp = await (0, retry_1.retryOnGCSUploadFailure)(async () => {
|
|
@@ -82,7 +93,7 @@ class GCS {
|
|
|
82
93
|
await new Promise((res, rej) => {
|
|
83
94
|
src.pipe(file
|
|
84
95
|
.createWriteStream(streamOptions)
|
|
85
|
-
.on('error',
|
|
96
|
+
.on('error', err => {
|
|
86
97
|
rej(err);
|
|
87
98
|
})
|
|
88
99
|
.on('finish', () => {
|
|
@@ -92,12 +103,11 @@ class GCS {
|
|
|
92
103
|
return { Location: file.publicUrl() };
|
|
93
104
|
}
|
|
94
105
|
async deleteFile(key) {
|
|
95
|
-
var _a;
|
|
96
106
|
try {
|
|
97
107
|
await this.client.bucket(this.bucket).file(key).delete();
|
|
98
108
|
}
|
|
99
109
|
catch (err) {
|
|
100
|
-
if (
|
|
110
|
+
if (err.response?.statusCode === 404) {
|
|
101
111
|
return;
|
|
102
112
|
}
|
|
103
113
|
throw err;
|
|
@@ -144,13 +154,13 @@ class GCS {
|
|
|
144
154
|
}
|
|
145
155
|
async listDirectory(prefix) {
|
|
146
156
|
const [files] = await this.client.bucket(this.bucket).getFiles({ prefix });
|
|
147
|
-
return files.map(
|
|
157
|
+
return files.map(x => this.formatHttpUrl(x.name));
|
|
148
158
|
}
|
|
149
159
|
async moveFile(src, dest) {
|
|
150
160
|
await this.client.bucket(this.bucket).file(src).move(dest);
|
|
151
161
|
}
|
|
152
162
|
async deleteFiles(keys) {
|
|
153
|
-
await Promise.all(keys.map(
|
|
163
|
+
await Promise.all(keys.map(key => this.deleteFile(key)));
|
|
154
164
|
}
|
|
155
165
|
async downloadFile(key, destinationPath) {
|
|
156
166
|
const stream = this.client.bucket(this.bucket).file(key).createReadStream();
|
|
@@ -161,4 +171,3 @@ class GCS {
|
|
|
161
171
|
}
|
|
162
172
|
}
|
|
163
173
|
exports.default = GCS;
|
|
164
|
-
//# sourceMappingURL=client.js.map
|
package/dist/gcs/retry.js
CHANGED
|
@@ -6,14 +6,14 @@ async function retryOnGCSUploadFailure(fn, { retries, retryIntervalMs, }) {
|
|
|
6
6
|
return await retry(fn, {
|
|
7
7
|
retries,
|
|
8
8
|
retryIntervalMs,
|
|
9
|
-
shouldRetryOnError:
|
|
9
|
+
shouldRetryOnError: e => {
|
|
10
10
|
return (e.code === 'ENOTFOUND' ||
|
|
11
11
|
e.code === 'EAI_AGAIN' ||
|
|
12
12
|
e.code === 'ECONNRESET' ||
|
|
13
13
|
e.code === 'ETIMEDOUT' ||
|
|
14
14
|
e.code === 'EPIPE');
|
|
15
15
|
},
|
|
16
|
-
shouldRetryOnResponse:
|
|
16
|
+
shouldRetryOnResponse: resp => {
|
|
17
17
|
return [408, 429, 500, 502, 503, 504].includes(resp.status);
|
|
18
18
|
},
|
|
19
19
|
});
|
|
@@ -33,7 +33,7 @@ async function retry(fn, { retries, retryIntervalMs, shouldRetryOnError, shouldR
|
|
|
33
33
|
attemptCount += 1;
|
|
34
34
|
const resp = await fn(attemptCount);
|
|
35
35
|
if (attemptCount < retries && shouldRetryOnResponse(resp)) {
|
|
36
|
-
await new Promise(
|
|
36
|
+
await new Promise(res => setTimeout(res, retryIntervalMs));
|
|
37
37
|
}
|
|
38
38
|
else {
|
|
39
39
|
return resp;
|
|
@@ -43,8 +43,7 @@ async function retry(fn, { retries, retryIntervalMs, shouldRetryOnError, shouldR
|
|
|
43
43
|
if (attemptCount === retries || !shouldRetryOnError(err)) {
|
|
44
44
|
throw err;
|
|
45
45
|
}
|
|
46
|
-
await new Promise(
|
|
46
|
+
await new Promise(res => setTimeout(res, retryIntervalMs));
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
//# sourceMappingURL=retry.js.map
|
package/dist/generic.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Generic } from '@expo/eas-build-job';
|
|
2
|
-
import { BuildWorkflow } from '@expo/steps';
|
|
3
2
|
import { Result } from '@expo/results';
|
|
3
|
+
import { BuildWorkflow } from '@expo/steps';
|
|
4
4
|
import { BuildContext } from './context';
|
|
5
5
|
export declare function runGenericJobAsync(ctx: BuildContext<Generic.Job>, { expoApiV2BaseUrl }: {
|
|
6
6
|
expoApiV2BaseUrl: string;
|
package/dist/generic.js
CHANGED
|
@@ -4,14 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.runGenericJobAsync = runGenericJobAsync;
|
|
7
|
-
const promises_1 = __importDefault(require("fs/promises"));
|
|
8
7
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
9
|
-
const steps_1 = require("@expo/steps");
|
|
10
8
|
const results_1 = require("@expo/results");
|
|
9
|
+
const steps_1 = require("@expo/steps");
|
|
10
|
+
const promises_1 = __importDefault(require("fs/promises"));
|
|
11
11
|
const projectSources_1 = require("./common/projectSources");
|
|
12
|
-
const easFunctions_1 = require("./steps/easFunctions");
|
|
13
12
|
const customBuildContext_1 = require("./customBuildContext");
|
|
14
13
|
const easFunctionGroups_1 = require("./steps/easFunctionGroups");
|
|
14
|
+
const easFunctions_1 = require("./steps/easFunctions");
|
|
15
15
|
const outputs_1 = require("./utils/outputs");
|
|
16
16
|
const retry_1 = require("./utils/retry");
|
|
17
17
|
const stepMetrics_1 = require("./utils/stepMetrics");
|
|
@@ -25,7 +25,7 @@ async function runGenericJobAsync(ctx, { expoApiV2BaseUrl }) {
|
|
|
25
25
|
}, {
|
|
26
26
|
retryOptions: {
|
|
27
27
|
retries: 3,
|
|
28
|
-
retryIntervalMs:
|
|
28
|
+
retryIntervalMs: 1_000,
|
|
29
29
|
},
|
|
30
30
|
});
|
|
31
31
|
});
|
|
@@ -51,13 +51,12 @@ async function runGenericJobAsync(ctx, { expoApiV2BaseUrl }) {
|
|
|
51
51
|
});
|
|
52
52
|
const runResult = await (0, results_1.asyncResult)(workflow.executeAsync());
|
|
53
53
|
await ctx.runBuildPhase(eas_build_job_1.BuildPhase.COMPLETE_JOB, async () => {
|
|
54
|
-
var _a;
|
|
55
54
|
await (0, outputs_1.uploadJobOutputsToWwwAsync)(globalContext, {
|
|
56
55
|
logger: ctx.logger,
|
|
57
56
|
expoApiV2BaseUrl,
|
|
58
57
|
});
|
|
59
58
|
const workflowJobId = globalContext.env.__WORKFLOW_JOB_ID;
|
|
60
|
-
const robotAccessToken =
|
|
59
|
+
const robotAccessToken = ctx.job.secrets?.robotAccessToken;
|
|
61
60
|
if (workflowJobId && robotAccessToken) {
|
|
62
61
|
await (0, stepMetrics_1.uploadStepMetricsToWwwAsync)({
|
|
63
62
|
workflowJobId,
|
|
@@ -70,4 +69,3 @@ async function runGenericJobAsync(ctx, { expoApiV2BaseUrl }) {
|
|
|
70
69
|
});
|
|
71
70
|
return { runResult, buildWorkflow: workflow };
|
|
72
71
|
}
|
|
73
|
-
//# sourceMappingURL=generic.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Builders from './builders';
|
|
2
|
-
import GCS from './gcs/client';
|
|
3
2
|
import GCSLoggerStream from './gcs/LoggerStream';
|
|
3
|
+
import GCS from './gcs/client';
|
|
4
4
|
export { Builders, GCS, GCSLoggerStream };
|
|
5
5
|
export { ArtifactToUpload, Artifacts, BuildContext, BuildContextOptions, CacheManager, LogBuffer, SkipNativeBuildError, } from './context';
|
|
6
6
|
export { PackageManager } from './utils/packageManager';
|
package/dist/index.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
37
|
};
|
|
@@ -32,10 +42,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
32
42
|
exports.runHookIfPresent = exports.Hook = exports.findAndUploadXcodeBuildLogsAsync = exports.PackageManager = exports.SkipNativeBuildError = exports.BuildContext = exports.GCSLoggerStream = exports.GCS = exports.Builders = void 0;
|
|
33
43
|
const Builders = __importStar(require("./builders"));
|
|
34
44
|
exports.Builders = Builders;
|
|
35
|
-
const client_1 = __importDefault(require("./gcs/client"));
|
|
36
|
-
exports.GCS = client_1.default;
|
|
37
45
|
const LoggerStream_1 = __importDefault(require("./gcs/LoggerStream"));
|
|
38
46
|
exports.GCSLoggerStream = LoggerStream_1.default;
|
|
47
|
+
const client_1 = __importDefault(require("./gcs/client"));
|
|
48
|
+
exports.GCS = client_1.default;
|
|
39
49
|
var context_1 = require("./context");
|
|
40
50
|
Object.defineProperty(exports, "BuildContext", { enumerable: true, get: function () { return context_1.BuildContext; } });
|
|
41
51
|
Object.defineProperty(exports, "SkipNativeBuildError", { enumerable: true, get: function () { return context_1.SkipNativeBuildError; } });
|
|
@@ -47,4 +57,3 @@ var hooks_1 = require("./utils/hooks");
|
|
|
47
57
|
Object.defineProperty(exports, "Hook", { enumerable: true, get: function () { return hooks_1.Hook; } });
|
|
48
58
|
Object.defineProperty(exports, "runHookIfPresent", { enumerable: true, get: function () { return hooks_1.runHookIfPresent; } });
|
|
49
59
|
__exportStar(require("./generic"), exports);
|
|
50
|
-
//# sourceMappingURL=index.js.map
|
package/dist/ios/configure.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ios } from '@expo/eas-build-job';
|
|
2
|
-
import { BuildContext } from '../context';
|
|
3
2
|
import { Credentials } from './credentials/manager';
|
|
3
|
+
import { BuildContext } from '../context';
|
|
4
4
|
declare function configureXcodeProject(ctx: BuildContext<Ios.Job>, { credentials, buildConfiguration, }: {
|
|
5
5
|
credentials: Credentials;
|
|
6
6
|
buildConfiguration: string;
|