@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
|
@@ -15,31 +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
39
|
const assert_1 = __importDefault(require("assert"));
|
|
30
|
-
const os_1 = __importDefault(require("os"));
|
|
31
|
-
const path_1 = __importDefault(require("path"));
|
|
32
40
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
33
41
|
const lodash_1 = require("lodash");
|
|
42
|
+
const os_1 = __importDefault(require("os"));
|
|
43
|
+
const path_1 = __importDefault(require("path"));
|
|
34
44
|
const uuid_1 = require("uuid");
|
|
35
45
|
const distributionCertificateUtils = __importStar(require("./distributionCertificate"));
|
|
36
46
|
const keychain_1 = __importDefault(require("./keychain"));
|
|
37
47
|
const provisioningProfile_1 = __importDefault(require("./provisioningProfile"));
|
|
38
48
|
class IosCredentialsManager {
|
|
49
|
+
buildCredentials;
|
|
50
|
+
keychain;
|
|
51
|
+
provisioningProfiles = [];
|
|
52
|
+
cleanedUp = false;
|
|
39
53
|
constructor(buildCredentials) {
|
|
40
54
|
this.buildCredentials = buildCredentials;
|
|
41
|
-
this.provisioningProfiles = [];
|
|
42
|
-
this.cleanedUp = false;
|
|
43
55
|
}
|
|
44
56
|
async prepare(logger) {
|
|
45
57
|
logger.info('Preparing credentials');
|
|
@@ -88,7 +100,7 @@ class IosCredentialsManager {
|
|
|
88
100
|
const certificateCommonName = distributionCertificateUtils.getCommonName(targetCredentials.distributionCertificate);
|
|
89
101
|
logger.info(`Fingerprint = "${certificateFingerprint}", common name = ${certificateCommonName}`);
|
|
90
102
|
logger.info(`Writing distribution certificate to ${distCertPath}`);
|
|
91
|
-
await fs_extra_1.default.writeFile(distCertPath, Buffer.from(targetCredentials.distributionCertificate.dataBase64, 'base64'));
|
|
103
|
+
await fs_extra_1.default.writeFile(distCertPath, new Uint8Array(Buffer.from(targetCredentials.distributionCertificate.dataBase64, 'base64')));
|
|
92
104
|
logger.info('Importing distribution certificate into the keychain');
|
|
93
105
|
await this.keychain.importCertificate(logger, distCertPath, targetCredentials.distributionCertificate.password);
|
|
94
106
|
logger.info('Initializing provisioning profile');
|
|
@@ -112,4 +124,3 @@ class IosCredentialsManager {
|
|
|
112
124
|
}
|
|
113
125
|
}
|
|
114
126
|
exports.default = IosCredentialsManager;
|
|
115
|
-
//# sourceMappingURL=manager.js.map
|
|
@@ -4,12 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.DistributionType = void 0;
|
|
7
|
-
const crypto_1 = __importDefault(require("crypto"));
|
|
8
|
-
const os_1 = __importDefault(require("os"));
|
|
9
|
-
const path_1 = __importDefault(require("path"));
|
|
10
7
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
11
8
|
const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
|
|
9
|
+
const crypto_1 = __importDefault(require("crypto"));
|
|
12
10
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
11
|
+
const os_1 = __importDefault(require("os"));
|
|
12
|
+
const path_1 = __importDefault(require("path"));
|
|
13
13
|
const plist_1 = __importDefault(require("plist"));
|
|
14
14
|
const uuid_1 = require("uuid");
|
|
15
15
|
var DistributionType;
|
|
@@ -20,6 +20,10 @@ var DistributionType;
|
|
|
20
20
|
})(DistributionType || (exports.DistributionType = DistributionType = {}));
|
|
21
21
|
const PROVISIONING_PROFILES_DIRECTORY = path_1.default.join(os_1.default.homedir(), 'Library/MobileDevice/Provisioning Profiles');
|
|
22
22
|
class ProvisioningProfile {
|
|
23
|
+
profile;
|
|
24
|
+
keychainPath;
|
|
25
|
+
target;
|
|
26
|
+
certificateCommonName;
|
|
23
27
|
get data() {
|
|
24
28
|
if (!this.profileData) {
|
|
25
29
|
throw new Error('You must init the profile first!');
|
|
@@ -28,6 +32,8 @@ class ProvisioningProfile {
|
|
|
28
32
|
return this.profileData;
|
|
29
33
|
}
|
|
30
34
|
}
|
|
35
|
+
profilePath;
|
|
36
|
+
profileData;
|
|
31
37
|
constructor(profile, keychainPath, target, certificateCommonName) {
|
|
32
38
|
this.profile = profile;
|
|
33
39
|
this.keychainPath = keychainPath;
|
|
@@ -39,7 +45,7 @@ class ProvisioningProfile {
|
|
|
39
45
|
logger.debug(`Making sure ${PROVISIONING_PROFILES_DIRECTORY} exits`);
|
|
40
46
|
await fs_extra_1.default.ensureDir(PROVISIONING_PROFILES_DIRECTORY);
|
|
41
47
|
logger.debug(`Writing provisioning profile to ${this.profilePath}`);
|
|
42
|
-
await fs_extra_1.default.writeFile(this.profilePath, this.profile);
|
|
48
|
+
await fs_extra_1.default.writeFile(this.profilePath, new Uint8Array(this.profile));
|
|
43
49
|
logger.debug('Loading provisioning profile');
|
|
44
50
|
await this.load();
|
|
45
51
|
}
|
|
@@ -105,10 +111,9 @@ Profile's certificate fingerprint = ${devCertFingerprint}, distribution certific
|
|
|
105
111
|
genDerCertFingerprint() {
|
|
106
112
|
return crypto_1.default
|
|
107
113
|
.createHash('sha1')
|
|
108
|
-
.update(this.data.developerCertificate)
|
|
114
|
+
.update(new Uint8Array(this.data.developerCertificate))
|
|
109
115
|
.digest('hex')
|
|
110
116
|
.toUpperCase();
|
|
111
117
|
}
|
|
112
118
|
}
|
|
113
119
|
exports.default = ProvisioningProfile;
|
|
114
|
-
//# sourceMappingURL=provisioningProfile.js.map
|
|
@@ -8,8 +8,8 @@ exports.iosSetChannelNativelyAsync = iosSetChannelNativelyAsync;
|
|
|
8
8
|
exports.iosSetRuntimeVersionNativelyAsync = iosSetRuntimeVersionNativelyAsync;
|
|
9
9
|
exports.iosGetNativelyDefinedChannelAsync = iosGetNativelyDefinedChannelAsync;
|
|
10
10
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
11
|
-
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
12
11
|
const plist_1 = __importDefault(require("@expo/plist"));
|
|
12
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
13
13
|
var IosMetadataName;
|
|
14
14
|
(function (IosMetadataName) {
|
|
15
15
|
IosMetadataName["UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY"] = "EXUpdatesRequestHeaders";
|
|
@@ -17,7 +17,6 @@ var IosMetadataName;
|
|
|
17
17
|
IosMetadataName["RUNTIME_VERSION"] = "EXUpdatesRuntimeVersion";
|
|
18
18
|
})(IosMetadataName || (exports.IosMetadataName = IosMetadataName = {}));
|
|
19
19
|
async function iosSetChannelNativelyAsync(channel, workingDirectory) {
|
|
20
|
-
var _a;
|
|
21
20
|
const expoPlistPath = config_plugins_1.IOSConfig.Paths.getExpoPlistPath(workingDirectory);
|
|
22
21
|
if (!(await fs_extra_1.default.pathExists(expoPlistPath))) {
|
|
23
22
|
throw new Error(`${expoPlistPath} does not exist`);
|
|
@@ -25,7 +24,7 @@ async function iosSetChannelNativelyAsync(channel, workingDirectory) {
|
|
|
25
24
|
const expoPlistContents = await fs_extra_1.default.readFile(expoPlistPath, 'utf8');
|
|
26
25
|
const items = plist_1.default.parse(expoPlistContents);
|
|
27
26
|
items[IosMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY] = {
|
|
28
|
-
...(
|
|
27
|
+
...(items[IosMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY] ?? {}),
|
|
29
28
|
'expo-channel-name': channel,
|
|
30
29
|
};
|
|
31
30
|
const updatedExpoPlistContents = plist_1.default.build(items);
|
|
@@ -43,7 +42,6 @@ async function iosSetRuntimeVersionNativelyAsync(runtimeVersion, workingDirector
|
|
|
43
42
|
await fs_extra_1.default.writeFile(expoPlistPath, updatedExpoPlistContents);
|
|
44
43
|
}
|
|
45
44
|
async function iosGetNativelyDefinedChannelAsync(workingDirectory) {
|
|
46
|
-
var _a, _b;
|
|
47
45
|
const expoPlistPath = config_plugins_1.IOSConfig.Paths.getExpoPlistPath(workingDirectory);
|
|
48
46
|
if (!(await fs_extra_1.default.pathExists(expoPlistPath))) {
|
|
49
47
|
return null;
|
|
@@ -51,11 +49,10 @@ async function iosGetNativelyDefinedChannelAsync(workingDirectory) {
|
|
|
51
49
|
const expoPlistContents = await fs_extra_1.default.readFile(expoPlistPath, 'utf8');
|
|
52
50
|
try {
|
|
53
51
|
const items = plist_1.default.parse(expoPlistContents);
|
|
54
|
-
const updatesRequestHeaders = (
|
|
55
|
-
return
|
|
52
|
+
const updatesRequestHeaders = (items[IosMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY] ?? {});
|
|
53
|
+
return updatesRequestHeaders['expo-channel-name'] ?? null;
|
|
56
54
|
}
|
|
57
55
|
catch (err) {
|
|
58
56
|
throw new Error(`Failed to parse ${IosMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY} from Expo.plist: ${err.message}`);
|
|
59
57
|
}
|
|
60
58
|
}
|
|
61
|
-
//# sourceMappingURL=expoUpdates.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { bunyan } from '@expo/logger';
|
|
2
|
-
import { SpawnResult } from '@expo/turtle-spawn';
|
|
3
2
|
import { BuildStepEnv } from '@expo/steps';
|
|
3
|
+
import { SpawnResult } from '@expo/turtle-spawn';
|
|
4
4
|
export declare function runFastlaneGym({ workingDir, logger, buildLogsDirectory, env, extraEnv, }: {
|
|
5
5
|
workingDir: string;
|
|
6
6
|
logger: bunyan;
|
|
@@ -5,10 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.runFastlaneGym = runFastlaneGym;
|
|
7
7
|
exports.runFastlane = runFastlane;
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
8
|
const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
|
|
10
|
-
const
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
11
10
|
const xcpretty_1 = require("./xcpretty");
|
|
11
|
+
const fastlane_1 = require("../../../common/fastlane");
|
|
12
12
|
async function runFastlaneGym({ workingDir, logger, buildLogsDirectory, env, extraEnv, }) {
|
|
13
13
|
const buildLogger = new xcpretty_1.XcodeBuildLogger(logger, workingDir);
|
|
14
14
|
void buildLogger.watchLogFiles(buildLogsDirectory);
|
|
@@ -28,11 +28,10 @@ async function runFastlane(fastlaneArgs, { logger, env, cwd, extraEnv, } = {}) {
|
|
|
28
28
|
return await (0, turtle_spawn_1.default)('fastlane', fastlaneArgs, {
|
|
29
29
|
env: {
|
|
30
30
|
...fastlane_1.COMMON_FASTLANE_ENV,
|
|
31
|
-
...(env
|
|
31
|
+
...(env ?? process.env),
|
|
32
32
|
...extraEnv,
|
|
33
33
|
},
|
|
34
34
|
logger,
|
|
35
35
|
cwd,
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
//# sourceMappingURL=fastlane.js.map
|
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.resolveScheme = resolveScheme;
|
|
7
7
|
exports.resolveBuildConfiguration = resolveBuildConfiguration;
|
|
8
|
-
const assert_1 = __importDefault(require("assert"));
|
|
9
8
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
9
|
+
const assert_1 = __importDefault(require("assert"));
|
|
10
10
|
function resolveScheme(workingDir, job, scheme) {
|
|
11
11
|
if (scheme) {
|
|
12
12
|
return scheme;
|
|
@@ -32,4 +32,3 @@ function resolveBuildConfiguration(job, buildConfiguration) {
|
|
|
32
32
|
return 'Release';
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
//# sourceMappingURL=resolve.js.map
|
|
@@ -3,13 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.isTVOS = isTVOS;
|
|
4
4
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
5
5
|
async function isTVOS({ scheme, buildConfiguration, workingDir, }) {
|
|
6
|
-
var _a, _b;
|
|
7
6
|
const project = config_plugins_1.IOSConfig.XcodeUtils.getPbxproj(workingDir);
|
|
8
7
|
const targetName = await config_plugins_1.IOSConfig.BuildScheme.getApplicationTargetNameForSchemeAsync(workingDir, scheme);
|
|
9
8
|
const xcBuildConfiguration = config_plugins_1.IOSConfig.Target.getXCBuildConfigurationFromPbxproj(project, {
|
|
10
9
|
targetName,
|
|
11
10
|
buildConfiguration,
|
|
12
11
|
});
|
|
13
|
-
return
|
|
12
|
+
return xcBuildConfiguration?.buildSettings?.SDKROOT?.includes('appletv');
|
|
14
13
|
}
|
|
15
|
-
//# sourceMappingURL=tvos.js.map
|
|
@@ -4,18 +4,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.XcodeBuildLogger = void 0;
|
|
7
|
-
const assert_1 = __importDefault(require("assert"));
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
|
-
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
10
|
-
const xcpretty_1 = require("@expo/xcpretty");
|
|
11
7
|
const spawn_async_1 = __importDefault(require("@expo/spawn-async"));
|
|
8
|
+
const xcpretty_1 = require("@expo/xcpretty");
|
|
9
|
+
const assert_1 = __importDefault(require("assert"));
|
|
12
10
|
const fast_glob_1 = __importDefault(require("fast-glob"));
|
|
11
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
12
|
+
const path_1 = __importDefault(require("path"));
|
|
13
13
|
const CHECK_FILE_INTERVAL_MS = 1000;
|
|
14
14
|
class XcodeBuildLogger {
|
|
15
|
+
logger;
|
|
16
|
+
projectRoot;
|
|
17
|
+
loggerError;
|
|
18
|
+
flushing = false;
|
|
19
|
+
logReaderPromise;
|
|
20
|
+
logsPath;
|
|
15
21
|
constructor(logger, projectRoot) {
|
|
16
22
|
this.logger = logger;
|
|
17
23
|
this.projectRoot = projectRoot;
|
|
18
|
-
this.flushing = false;
|
|
19
24
|
}
|
|
20
25
|
async watchLogFiles(logsDirectory) {
|
|
21
26
|
while (!this.flushing) {
|
|
@@ -25,7 +30,7 @@ class XcodeBuildLogger {
|
|
|
25
30
|
void this.startBuildLogger(this.logsPath);
|
|
26
31
|
return;
|
|
27
32
|
}
|
|
28
|
-
await new Promise(
|
|
33
|
+
await new Promise(res => setTimeout(res, CHECK_FILE_INTERVAL_MS));
|
|
29
34
|
}
|
|
30
35
|
}
|
|
31
36
|
async flush() {
|
|
@@ -85,4 +90,3 @@ class XcodeBuildLogger {
|
|
|
85
90
|
}
|
|
86
91
|
}
|
|
87
92
|
exports.XcodeBuildLogger = XcodeBuildLogger;
|
|
88
|
-
//# sourceMappingURL=xcpretty.js.map
|
package/dist/templates/npmrc.js
CHANGED
|
@@ -4,20 +4,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.AndroidEmulatorUtils = void 0;
|
|
7
|
+
const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
|
|
7
8
|
const assert_1 = __importDefault(require("assert"));
|
|
9
|
+
const fast_glob_1 = __importDefault(require("fast-glob"));
|
|
8
10
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
9
11
|
const node_os_1 = __importDefault(require("node:os"));
|
|
10
|
-
const promises_1 = require("node:timers/promises");
|
|
11
12
|
const node_path_1 = __importDefault(require("node:path"));
|
|
12
|
-
const
|
|
13
|
-
const fast_glob_1 = __importDefault(require("fast-glob"));
|
|
13
|
+
const promises_1 = require("node:timers/promises");
|
|
14
14
|
const retry_1 = require("./retry");
|
|
15
15
|
var AndroidEmulatorUtils;
|
|
16
16
|
(function (AndroidEmulatorUtils) {
|
|
17
17
|
AndroidEmulatorUtils.defaultSystemImagePackage = `system-images;android-30;default;${process.arch === 'arm64' ? 'arm64-v8a' : 'x86_64'}`;
|
|
18
18
|
async function getAvailableDevicesAsync({ env, }) {
|
|
19
19
|
const result = await (0, turtle_spawn_1.default)('avdmanager', ['list', 'device', '--compact', '--null'], { env });
|
|
20
|
-
return result.stdout.split('\0').filter(
|
|
20
|
+
return result.stdout.split('\0').filter(line => line !== '');
|
|
21
21
|
}
|
|
22
22
|
AndroidEmulatorUtils.getAvailableDevicesAsync = getAvailableDevicesAsync;
|
|
23
23
|
async function getAttachedDevicesAsync({ env, }) {
|
|
@@ -27,8 +27,8 @@ var AndroidEmulatorUtils;
|
|
|
27
27
|
return result.stdout
|
|
28
28
|
.replace(/\r\n/g, '\n')
|
|
29
29
|
.split('\n')
|
|
30
|
-
.filter(
|
|
31
|
-
.map(
|
|
30
|
+
.filter(line => line.startsWith('emulator'))
|
|
31
|
+
.map(line => {
|
|
32
32
|
const [serialId, state] = line.split(/\s+/);
|
|
33
33
|
return {
|
|
34
34
|
serialId,
|
|
@@ -63,7 +63,6 @@ var AndroidEmulatorUtils;
|
|
|
63
63
|
}
|
|
64
64
|
AndroidEmulatorUtils.getSerialIdAsync = getSerialIdAsync;
|
|
65
65
|
async function createAsync({ deviceName, systemImagePackage, deviceIdentifier, env, logger, }) {
|
|
66
|
-
var _a, _b, _c, _d, _e, _f;
|
|
67
66
|
const avdManager = (0, turtle_spawn_1.default)('avdmanager', [
|
|
68
67
|
'create',
|
|
69
68
|
'avd',
|
|
@@ -80,8 +79,8 @@ var AndroidEmulatorUtils;
|
|
|
80
79
|
// `avdmanager create` always asks about creating a custom hardware profile.
|
|
81
80
|
// > Do you wish to create a custom hardware profile? [no]
|
|
82
81
|
// We answer "no".
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
avdManager.child.stdin?.write('no');
|
|
83
|
+
avdManager.child.stdin?.end();
|
|
85
84
|
await avdManager;
|
|
86
85
|
// Add extra config to the device's ini file.
|
|
87
86
|
const configIniFile = `${env.HOME}/.android/avd/${deviceName}.avd/config.ini`;
|
|
@@ -91,13 +90,13 @@ var AndroidEmulatorUtils;
|
|
|
91
90
|
configIniFileContent = `${configIniFileContent}\nhw.ramSize=2048\n`;
|
|
92
91
|
const shouldResizeScreen = env.ANDROID_EMULATOR_ADJUST_SCREEN === 'true' || env.ANDROID_EMULATOR_ADJUST_SCREEN === '1';
|
|
93
92
|
if (shouldResizeScreen) {
|
|
94
|
-
const currentDensityString =
|
|
93
|
+
const currentDensityString = configIniFileContent.match(/hw.lcd.density=(\d+)/)?.[1];
|
|
95
94
|
const currentDensity = currentDensityString
|
|
96
95
|
? parseInt(currentDensityString, 10)
|
|
97
96
|
: undefined;
|
|
98
|
-
const currentHeightString =
|
|
97
|
+
const currentHeightString = configIniFileContent.match(/hw.lcd.height=(\d+)/)?.[1];
|
|
99
98
|
const currentHeight = currentHeightString ? parseInt(currentHeightString, 10) : undefined;
|
|
100
|
-
const currentWidthString =
|
|
99
|
+
const currentWidthString = configIniFileContent.match(/hw.lcd.width=(\d+)/)?.[1];
|
|
101
100
|
const currentWidth = currentWidthString ? parseInt(currentWidthString, 10) : undefined;
|
|
102
101
|
if (currentDensity && currentDensity > 220) {
|
|
103
102
|
logger.info(`Current density is ${currentDensity}, which we believe may impact performance.`);
|
|
@@ -119,7 +118,7 @@ var AndroidEmulatorUtils;
|
|
|
119
118
|
const shouldAdjustHeapSize = env.ANDROID_EMULATOR_ADJUST_HEAP_SIZE !== 'false' &&
|
|
120
119
|
env.ANDROID_EMULATOR_ADJUST_HEAP_SIZE !== '0';
|
|
121
120
|
if (shouldAdjustHeapSize) {
|
|
122
|
-
const heapSizeString =
|
|
121
|
+
const heapSizeString = configIniFileContent.match(/vm.heapSize=(\d\w+)/)?.[1];
|
|
123
122
|
if (!heapSizeString) {
|
|
124
123
|
logger.info('Setting vm.heapSize to 768 MB.');
|
|
125
124
|
configIniFileContent = `${configIniFileContent}\nvm.heapSize=768\n`;
|
|
@@ -166,7 +165,7 @@ var AndroidEmulatorUtils;
|
|
|
166
165
|
cwd: `${env.HOME}/.android/avd/${sourceDeviceName}.avd`,
|
|
167
166
|
absolute: true,
|
|
168
167
|
});
|
|
169
|
-
await Promise.all(sourceLockfiles.map(
|
|
168
|
+
await Promise.all(sourceLockfiles.map(lockfile => node_fs_1.default.promises.rm(lockfile, { force: true })));
|
|
170
169
|
}
|
|
171
170
|
catch (err) {
|
|
172
171
|
logger.warn({ err }, `Failed to remove lockfiles from source device ${sourceDeviceName}.`);
|
|
@@ -183,7 +182,7 @@ var AndroidEmulatorUtils;
|
|
|
183
182
|
cwd: `${env.HOME}/.android/avd/${destinationDeviceName}.avd`,
|
|
184
183
|
absolute: true,
|
|
185
184
|
});
|
|
186
|
-
await Promise.all(lockfiles.map(
|
|
185
|
+
await Promise.all(lockfiles.map(lockfile => node_fs_1.default.promises.rm(lockfile, { force: true })));
|
|
187
186
|
}
|
|
188
187
|
catch (err) {
|
|
189
188
|
logger.warn({ err }, `Failed to remove lockfiles from destination device ${destinationDeviceName}.`);
|
|
@@ -197,7 +196,7 @@ var AndroidEmulatorUtils;
|
|
|
197
196
|
`${env.HOME}/.android/avd/${destinationDeviceName}.avd`,
|
|
198
197
|
])).stdout
|
|
199
198
|
.split('\n')
|
|
200
|
-
.filter(
|
|
199
|
+
.filter(file => file !== '');
|
|
201
200
|
for (const file of [...filesToReplaceDeviceNameIn, cloneIniFile]) {
|
|
202
201
|
try {
|
|
203
202
|
const txtFile = await node_fs_1.default.promises.readFile(file, 'utf-8');
|
|
@@ -246,7 +245,7 @@ var AndroidEmulatorUtils;
|
|
|
246
245
|
}, {
|
|
247
246
|
retryOptions: {
|
|
248
247
|
retries: 3 * 60,
|
|
249
|
-
retryIntervalMs:
|
|
248
|
+
retryIntervalMs: 1_000,
|
|
250
249
|
},
|
|
251
250
|
});
|
|
252
251
|
// We don't want to await the SpawnPromise here.
|
|
@@ -264,7 +263,7 @@ var AndroidEmulatorUtils;
|
|
|
264
263
|
// Retry every second for 3 minutes.
|
|
265
264
|
retryOptions: {
|
|
266
265
|
retries: 3 * 60,
|
|
267
|
-
retryIntervalMs:
|
|
266
|
+
retryIntervalMs: 1_000,
|
|
268
267
|
},
|
|
269
268
|
});
|
|
270
269
|
}
|
|
@@ -287,7 +286,7 @@ var AndroidEmulatorUtils;
|
|
|
287
286
|
child.stdout.on('error', reject);
|
|
288
287
|
child.on('error', reject);
|
|
289
288
|
writeStream.on('error', reject);
|
|
290
|
-
child.on('close',
|
|
289
|
+
child.on('close', code => {
|
|
291
290
|
if (code === 0) {
|
|
292
291
|
resolve();
|
|
293
292
|
}
|
|
@@ -307,13 +306,13 @@ var AndroidEmulatorUtils;
|
|
|
307
306
|
await (0, turtle_spawn_1.default)('adb', ['-s', serialId, 'emu', 'kill'], { env });
|
|
308
307
|
await (0, retry_1.retryAsync)(async () => {
|
|
309
308
|
const devices = await getAttachedDevicesAsync({ env });
|
|
310
|
-
if (devices.some(
|
|
309
|
+
if (devices.some(device => device.serialId === serialId)) {
|
|
311
310
|
throw new Error(`Emulator (${serialId}) is still attached.`);
|
|
312
311
|
}
|
|
313
312
|
}, {
|
|
314
313
|
retryOptions: {
|
|
315
314
|
retries: 3 * 60,
|
|
316
|
-
retryIntervalMs:
|
|
315
|
+
retryIntervalMs: 1_000,
|
|
317
316
|
},
|
|
318
317
|
});
|
|
319
318
|
await (0, turtle_spawn_1.default)('avdmanager', ['delete', 'avd', '-n', deviceName], { env });
|
|
@@ -390,4 +389,3 @@ var AndroidEmulatorUtils;
|
|
|
390
389
|
}
|
|
391
390
|
AndroidEmulatorUtils.stopScreenRecordingAsync = stopScreenRecordingAsync;
|
|
392
391
|
})(AndroidEmulatorUtils || (exports.AndroidEmulatorUtils = AndroidEmulatorUtils = {}));
|
|
393
|
-
//# sourceMappingURL=AndroidEmulatorUtils.js.map
|
|
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.IosSimulatorUtils = void 0;
|
|
7
|
-
const
|
|
8
|
-
const node_os_1 = __importDefault(require("node:os"));
|
|
7
|
+
const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
|
|
9
8
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
9
|
+
const node_os_1 = __importDefault(require("node:os"));
|
|
10
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
10
11
|
const promises_1 = require("node:timers/promises");
|
|
11
|
-
const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
|
|
12
12
|
const retry_1 = require("./retry");
|
|
13
13
|
var IosSimulatorUtils;
|
|
14
14
|
(function (IosSimulatorUtils) {
|
|
@@ -17,7 +17,7 @@ var IosSimulatorUtils;
|
|
|
17
17
|
const xcrunData = JSON.parse(result.stdout);
|
|
18
18
|
const allAvailableDevices = [];
|
|
19
19
|
for (const [runtime, devices] of Object.entries(xcrunData.devices)) {
|
|
20
|
-
allAvailableDevices.push(...devices.map(
|
|
20
|
+
allAvailableDevices.push(...devices.map(device => ({
|
|
21
21
|
...device,
|
|
22
22
|
runtime,
|
|
23
23
|
displayName: `${device.name} (${device.udid}) on ${runtime}`,
|
|
@@ -27,9 +27,8 @@ var IosSimulatorUtils;
|
|
|
27
27
|
}
|
|
28
28
|
IosSimulatorUtils.getAvailableDevicesAsync = getAvailableDevicesAsync;
|
|
29
29
|
async function getDeviceAsync({ udid, env, }) {
|
|
30
|
-
var _a;
|
|
31
30
|
const devices = await getAvailableDevicesAsync({ env, filter: 'available' });
|
|
32
|
-
return
|
|
31
|
+
return devices.find(device => device.udid === udid) ?? null;
|
|
33
32
|
}
|
|
34
33
|
IosSimulatorUtils.getDeviceAsync = getDeviceAsync;
|
|
35
34
|
async function cloneAsync({ sourceDeviceIdentifier, destinationDeviceName, env, }) {
|
|
@@ -58,7 +57,7 @@ var IosSimulatorUtils;
|
|
|
58
57
|
retryOptions: {
|
|
59
58
|
// There's 30 * 60 seconds in 30 minutes, which is the timeout.
|
|
60
59
|
retries: 30 * 60,
|
|
61
|
-
retryIntervalMs:
|
|
60
|
+
retryIntervalMs: 1_000,
|
|
62
61
|
},
|
|
63
62
|
});
|
|
64
63
|
// Wait for data migration to complete before declaring the simulator ready
|
|
@@ -71,7 +70,7 @@ var IosSimulatorUtils;
|
|
|
71
70
|
}, {
|
|
72
71
|
retryOptions: {
|
|
73
72
|
retries: 30 * 60,
|
|
74
|
-
retryIntervalMs:
|
|
73
|
+
retryIntervalMs: 1_000,
|
|
75
74
|
},
|
|
76
75
|
});
|
|
77
76
|
}
|
|
@@ -105,11 +104,11 @@ var IosSimulatorUtils;
|
|
|
105
104
|
}
|
|
106
105
|
let outputAggregated = '';
|
|
107
106
|
// Listen to both stdout and stderr since "Recording started" might come from either
|
|
108
|
-
stdout.on('data',
|
|
107
|
+
stdout.on('data', data => {
|
|
109
108
|
const output = data.toString();
|
|
110
109
|
outputAggregated += output;
|
|
111
110
|
});
|
|
112
|
-
stderr.on('data',
|
|
111
|
+
stderr.on('data', data => {
|
|
113
112
|
const output = data.toString();
|
|
114
113
|
outputAggregated += output;
|
|
115
114
|
});
|
|
@@ -157,4 +156,3 @@ function parseUdidFromBootstatusStdout(stdout) {
|
|
|
157
156
|
}
|
|
158
157
|
return matches[1];
|
|
159
158
|
}
|
|
160
|
-
//# sourceMappingURL=IosSimulatorUtils.js.map
|
package/dist/utils/appConfig.js
CHANGED
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.readAppConfig = readAppConfig;
|
|
7
7
|
const config_1 = require("@expo/config");
|
|
8
|
-
const logger_1 = require("@expo/logger");
|
|
9
8
|
const env_1 = require("@expo/env");
|
|
9
|
+
const logger_1 = require("@expo/logger");
|
|
10
10
|
const semver_1 = __importDefault(require("semver"));
|
|
11
11
|
function readAppConfig({ projectDir, env, logger, sdkVersion, }) {
|
|
12
12
|
const originalProcessExit = process.exit;
|
|
@@ -53,4 +53,3 @@ function readAppConfig({ projectDir, env, logger, sdkVersion, }) {
|
|
|
53
53
|
process.stderr.write = originalStderrWrite;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
//# sourceMappingURL=appConfig.js.map
|
package/dist/utils/artifacts.js
CHANGED
|
@@ -8,10 +8,10 @@ exports.findArtifacts = findArtifacts;
|
|
|
8
8
|
exports.maybeFindAndUploadBuildArtifacts = maybeFindAndUploadBuildArtifacts;
|
|
9
9
|
exports.uploadApplicationArchive = uploadApplicationArchive;
|
|
10
10
|
exports.formatBytes = formatBytes;
|
|
11
|
-
const path_1 = __importDefault(require("path"));
|
|
12
|
-
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
13
|
-
const fast_glob_1 = __importDefault(require("fast-glob"));
|
|
14
11
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
12
|
+
const fast_glob_1 = __importDefault(require("fast-glob"));
|
|
13
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
14
|
+
const path_1 = __importDefault(require("path"));
|
|
15
15
|
const promise_limit_1 = __importDefault(require("promise-limit"));
|
|
16
16
|
class FindArtifactsError extends Error {
|
|
17
17
|
}
|
|
@@ -33,7 +33,7 @@ async function findArtifacts({ rootDir, patternOrPath, logger, }) {
|
|
|
33
33
|
throw new FindArtifactsError(`No such file or directory ${patternOrPath}`);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
return files.map(
|
|
36
|
+
return files.map(filePath => {
|
|
37
37
|
// User may provide an absolute path as input in which case
|
|
38
38
|
// fg will return an absolute path.
|
|
39
39
|
if (path_1.default.isAbsolute(filePath)) {
|
|
@@ -66,7 +66,7 @@ async function maybeFindAndUploadBuildArtifacts(ctx, { logger }) {
|
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
try {
|
|
69
|
-
const buildArtifacts = (await Promise.all(ctx.job.buildArtifactPaths.map(
|
|
69
|
+
const buildArtifacts = (await Promise.all(ctx.job.buildArtifactPaths.map(path => findArtifacts({
|
|
70
70
|
rootDir: ctx.getReactNativeProjectDirectory(),
|
|
71
71
|
patternOrPath: path,
|
|
72
72
|
logger,
|
|
@@ -122,11 +122,11 @@ async function getArtifactSize(artifact) {
|
|
|
122
122
|
}
|
|
123
123
|
else {
|
|
124
124
|
const files = await (0, fast_glob_1.default)('**/*', { cwd: artifact, onlyFiles: true });
|
|
125
|
-
if (files.length >
|
|
125
|
+
if (files.length > 100_000) {
|
|
126
126
|
return undefined;
|
|
127
127
|
}
|
|
128
128
|
const getFileSizePromiseLimit = (0, promise_limit_1.default)(100);
|
|
129
|
-
const sizes = await Promise.all(files.map(
|
|
129
|
+
const sizes = await Promise.all(files.map(file => getFileSizePromiseLimit(async () => (await fs_extra_1.default.stat(path_1.default.join(artifact, file))).size)));
|
|
130
130
|
return sizes.reduce((acc, size) => acc + size, 0);
|
|
131
131
|
}
|
|
132
132
|
}
|
|
@@ -164,4 +164,3 @@ function formatBytes(bytes) {
|
|
|
164
164
|
}
|
|
165
165
|
return `${Math.floor(bytes / 1024)} GB`;
|
|
166
166
|
}
|
|
167
|
-
//# sourceMappingURL=artifacts.js.map
|