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