eas-cli 10.2.4 → 11.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/README.md +63 -65
- package/build/branch/actions/SelectBranch.d.ts +1 -1
- package/build/branch/actions/SelectBranch.js +2 -2
- package/build/branch/queries.js +3 -1
- package/build/build/android/build.js +1 -1
- package/build/build/android/version.js +1 -1
- package/build/build/build.js +21 -10
- package/build/build/context.d.ts +1 -0
- package/build/build/createContext.d.ts +2 -1
- package/build/build/createContext.js +6 -3
- package/build/build/evaluateConfigWithEnvVarsAsync.d.ts +16 -0
- package/build/build/evaluateConfigWithEnvVarsAsync.js +44 -0
- package/build/build/ios/build.js +4 -4
- package/build/build/local.d.ts +1 -1
- package/build/build/local.js +2 -1
- package/build/build/queries.js +3 -1
- package/build/build/runBuildAndSubmit.d.ts +2 -0
- package/build/build/runBuildAndSubmit.js +14 -7
- package/build/build/utils/printBuildInfo.js +6 -2
- package/build/build/validate.js +2 -2
- package/build/channel/actions/SelectChannel.d.ts +1 -1
- package/build/channel/actions/SelectChannel.js +2 -2
- package/build/channel/queries.js +6 -2
- package/build/commandUtils/EasCommand.js +2 -2
- package/build/commandUtils/context/contextUtils/createGraphqlClient.js +1 -1
- package/build/commandUtils/flags.d.ts +3 -0
- package/build/commandUtils/flags.js +15 -1
- package/build/commandUtils/gating/FeatureGating.js +6 -2
- package/build/commands/analytics.js +1 -1
- package/build/commands/build/index.d.ts +4 -1
- package/build/commands/build/index.js +3 -0
- package/build/commands/build/resign.d.ts +4 -1
- package/build/commands/build/resign.js +12 -3
- package/build/commands/build/version/get.d.ts +1 -0
- package/build/commands/build/version/get.js +9 -2
- package/build/commands/build/version/set.d.ts +1 -0
- package/build/commands/build/version/set.js +11 -1
- package/build/commands/build/version/sync.d.ts +1 -0
- package/build/commands/build/version/sync.js +13 -5
- package/build/commands/config.d.ts +2 -0
- package/build/commands/config.js +17 -5
- package/build/commands/device/delete.js +1 -1
- package/build/commands/device/rename.js +1 -1
- package/build/commands/env/create.js +7 -2
- package/build/commands/env/delete.js +5 -2
- package/build/commands/env/get.js +12 -4
- package/build/commands/env/link.js +3 -1
- package/build/commands/env/list.d.ts +4 -2
- package/build/commands/env/list.js +31 -4
- package/build/commands/env/pull.d.ts +15 -0
- package/build/commands/env/pull.js +64 -0
- package/build/commands/env/push.d.ts +17 -0
- package/build/commands/env/push.js +148 -0
- package/build/commands/env/unlink.js +4 -1
- package/build/commands/env/update.js +7 -2
- package/build/commands/metadata/lint.js +4 -2
- package/build/commands/project/onboarding.js +1 -1
- package/build/commands/update/edit.d.ts +19 -0
- package/build/commands/update/edit.js +102 -0
- package/build/commands/update/index.d.ts +1 -2
- package/build/commands/update/index.js +53 -25
- package/build/commands/update/list.js +6 -3
- package/build/commands/update/roll-back-to-embedded.js +1 -1
- package/build/credentials/android/AndroidCredentialsProvider.d.ts +2 -2
- package/build/credentials/android/actions/AssignFcm.d.ts +1 -1
- package/build/credentials/android/actions/AssignGoogleServiceAccountKeyForFcmV1.d.ts +1 -1
- package/build/credentials/android/actions/AssignGoogleServiceAccountKeyForSubmissions.d.ts +1 -1
- package/build/credentials/android/actions/CreateFcm.d.ts +1 -1
- package/build/credentials/android/actions/CreateGoogleServiceAccountKey.d.ts +1 -1
- package/build/credentials/android/actions/CreateKeystore.d.ts +1 -1
- package/build/credentials/android/actions/DownloadKeystore.d.ts +2 -2
- package/build/credentials/android/actions/RemoveFcm.d.ts +1 -1
- package/build/credentials/android/actions/RemoveGoogleServiceAccountKey.d.ts +2 -2
- package/build/credentials/android/actions/RemoveKeystore.d.ts +1 -1
- package/build/credentials/android/actions/SetUpBuildCredentials.d.ts +1 -1
- package/build/credentials/android/actions/SetUpBuildCredentialsFromCredentialsJson.d.ts +1 -1
- package/build/credentials/android/actions/SetUpGoogleServiceAccountKeyForFcmV1.d.ts +1 -1
- package/build/credentials/android/actions/SetUpGoogleServiceAccountKeyForSubmissions.d.ts +1 -1
- package/build/credentials/android/actions/UseExistingGoogleServiceAccountKey.d.ts +1 -1
- package/build/credentials/android/api/GraphqlClient.js +3 -3
- package/build/credentials/context.d.ts +2 -2
- package/build/credentials/context.js +1 -1
- package/build/credentials/ios/IosCredentialsProvider.d.ts +2 -2
- package/build/credentials/ios/IosCredentialsProvider.js +1 -1
- package/build/credentials/ios/actions/AscApiKeyUtils.js +1 -1
- package/build/credentials/ios/actions/AssignAscApiKey.d.ts +1 -1
- package/build/credentials/ios/actions/AssignPushKey.d.ts +1 -1
- package/build/credentials/ios/actions/ConfigureProvisioningProfile.d.ts +4 -4
- package/build/credentials/ios/actions/CreateAscApiKey.d.ts +1 -1
- package/build/credentials/ios/actions/CreateDistributionCertificate.d.ts +1 -1
- package/build/credentials/ios/actions/CreateProvisioningProfile.d.ts +3 -3
- package/build/credentials/ios/actions/CreatePushKey.d.ts +1 -1
- package/build/credentials/ios/actions/DistributionCertificateUtils.js +5 -5
- package/build/credentials/ios/actions/ProvisioningProfileUtils.js +1 -1
- package/build/credentials/ios/actions/PushKeyUtils.js +2 -2
- package/build/credentials/ios/actions/RemoveAscApiKey.d.ts +2 -2
- package/build/credentials/ios/actions/RemoveDistributionCertificate.d.ts +3 -3
- package/build/credentials/ios/actions/RemoveProvisioningProfile.d.ts +2 -2
- package/build/credentials/ios/actions/RemovePushKey.d.ts +2 -2
- package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +1 -1
- package/build/credentials/ios/actions/SetUpAscApiKey.d.ts +2 -2
- package/build/credentials/ios/actions/SetUpBuildCredentials.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpBuildCredentialsFromCredentialsJson.d.ts +3 -3
- package/build/credentials/ios/actions/SetUpDistributionCertificate.d.ts +2 -2
- package/build/credentials/ios/actions/SetUpDistributionCertificate.js +1 -1
- package/build/credentials/ios/actions/SetUpInternalProvisioningProfile.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpProvisioningProfile.d.ts +3 -3
- package/build/credentials/ios/actions/SetUpProvisioningProfile.js +1 -1
- package/build/credentials/ios/actions/SetUpPushKey.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpTargetBuildCredentials.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.d.ts +3 -3
- package/build/credentials/ios/actions/UpdateCredentialsJson.d.ts +3 -3
- package/build/credentials/ios/api/GraphqlClient.js +4 -4
- package/build/credentials/ios/appstore/AppStoreApi.js +4 -4
- package/build/credentials/ios/appstore/authenticate.js +1 -1
- package/build/credentials/ios/appstore/bundleId.js +1 -1
- package/build/credentials/ios/appstore/bundleIdCapabilities.js +1 -1
- package/build/credentials/ios/appstore/ensureAppExists.js +1 -1
- package/build/credentials/ios/appstore/keychain.js +8 -6
- package/build/credentials/ios/appstore/provisioningProfile.js +1 -1
- package/build/credentials/ios/appstore/pushKey.js +1 -1
- package/build/credentials/ios/appstore/resolveCredentials.js +2 -2
- package/build/credentials/ios/credentials.js +1 -1
- package/build/credentials/ios/utils/convertHTMLToASCII.js +1 -1
- package/build/credentials/ios/validators/validateProvisioningProfile.js +2 -4
- package/build/credentials/manager/CheckBuildProfileFlagAgainstEasJson.d.ts +3 -3
- package/build/credentials/manager/CreateAndroidBuildCredentials.d.ts +1 -1
- package/build/credentials/manager/ManageAndroid.js +2 -1
- package/build/credentials/manager/ManageIos.js +3 -2
- package/build/credentials/manager/SelectAndroidBuildCredentials.d.ts +2 -2
- package/build/credentials/manager/SelectBuildProfileFromEasJson.d.ts +2 -2
- package/build/credentials/manager/SelectIosDistributionTypeGraphqlFromBuildProfile.d.ts +1 -1
- package/build/credentials/manager/SelectIosDistributionTypeGraphqlFromBuildProfile.js +1 -1
- package/build/credentials/manager/SelectPlatform.js +3 -2
- package/build/credentials/manager/SetDefaultAndroidKeystore.d.ts +1 -1
- package/build/credentials/manager/SetUpAndroidBuildCredentials.d.ts +1 -1
- package/build/credentials/manager/SetUpBuildCredentialsCommandAction.js +3 -2
- package/build/credentials/manager/SetUpIosBuildCredentials.d.ts +1 -1
- package/build/devices/actions/create/action.d.ts +4 -4
- package/build/devices/actions/create/registrationUrlMethod.js +3 -1
- package/build/devices/manager.d.ts +4 -4
- package/build/devices/queries.js +3 -1
- package/build/easMultiselect.js +6 -2
- package/build/graphql/generated.d.ts +342 -33
- package/build/graphql/generated.js +52 -2
- package/build/graphql/mutations/EnvironmentVariableMutation.d.ts +1 -0
- package/build/graphql/mutations/EnvironmentVariableMutation.js +20 -0
- package/build/graphql/mutations/PublishMutation.d.ts +1 -0
- package/build/graphql/mutations/PublishMutation.js +16 -0
- package/build/graphql/queries/BranchQuery.d.ts +7 -1
- package/build/graphql/queries/BranchQuery.js +42 -0
- package/build/graphql/queries/EnvironmentVariablesQuery.d.ts +16 -7
- package/build/graphql/queries/EnvironmentVariablesQuery.js +29 -6
- package/build/graphql/types/Update.js +4 -0
- package/build/metadata/apple/config/reader.js +1 -1
- package/build/metadata/apple/tasks/age-rating.js +1 -1
- package/build/metadata/apple/tasks/app-review-detail.js +2 -1
- package/build/metadata/apple/tasks/app-version.d.ts +1 -1
- package/build/metadata/config/resolve.js +2 -1
- package/build/metadata/errors.js +2 -1
- package/build/metadata/utils/log.js +1 -1
- package/build/metadata/utils/retry.js +1 -1
- package/build/onboarding/runCommand.js +1 -1
- package/build/ora.js +12 -4
- package/build/project/android/applicationId.js +1 -1
- package/build/project/applicationIdentifier.d.ts +3 -2
- package/build/project/applicationIdentifier.js +2 -2
- package/build/project/expoConfig.js +2 -2
- package/build/project/ios/entitlements.js +1 -1
- package/build/project/publish.d.ts +31 -18
- package/build/project/publish.js +61 -37
- package/build/project/resolveRuntimeVersionAsync.d.ts +4 -1
- package/build/project/resolveRuntimeVersionAsync.js +9 -3
- package/build/rollout/actions/CreateRollout.d.ts +2 -2
- package/build/rollout/actions/EditRollout.d.ts +2 -2
- package/build/rollout/actions/EndRollout.d.ts +2 -2
- package/build/rollout/actions/ManageRollout.d.ts +2 -2
- package/build/rollout/actions/NonInteractiveRollout.d.ts +1 -1
- package/build/rollout/actions/RolloutMainMenu.d.ts +1 -1
- package/build/rollout/actions/SelectRuntime.d.ts +3 -3
- package/build/run/android/adb.js +1 -1
- package/build/run/ios/simctl.js +1 -1
- package/build/run/ios/systemRequirements.js +1 -1
- package/build/submit/ArchiveSource.js +15 -15
- package/build/submit/BaseSubmitter.js +2 -2
- package/build/submit/submit.js +1 -1
- package/build/update/android/UpdatesModule.js +1 -1
- package/build/update/configure.d.ts +1 -1
- package/build/update/queries.js +8 -3
- package/build/update/republish.js +2 -1
- package/build/update/utils.d.ts +1 -0
- package/build/update/utils.js +7 -0
- package/build/user/expoSsoLauncher.js +1 -1
- package/build/utils/download.js +2 -2
- package/build/utils/filterAsync.js +1 -1
- package/build/utils/image.js +2 -2
- package/build/utils/progress.js +1 -1
- package/build/utils/promise.js +1 -1
- package/build/utils/queries.js +2 -2
- package/build/vcs/clients/git.d.ts +1 -1
- package/build/vcs/local.d.ts +1 -1
- package/oclif.manifest.json +218 -22
- package/package.json +14 -14
package/build/project/publish.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getRuntimeToUpdateRolloutInfoGroupMappingAsync = exports.updatePublishPlatformToAppPlatform = exports.platformDisplayNames = exports.getRuntimeToPlatformMappingFromRuntimeVersions = exports.getRuntimeVersionObjectAsync = exports.defaultPublishPlatforms = exports.getUpdateMessageForCommandAsync = exports.getBranchNameForCommandAsync = exports.isUploadedAssetCountAboveWarningThreshold = exports.uploadAssetsAsync = exports.filterOutAssetsThatAlreadyExistAsync = exports.collectAssetsAsync = exports.getOriginalPathFromAssetMap = exports.getAssetHashFromPath = exports.loadAssetMapAsync = exports.filterCollectedAssetsByRequestedPlatforms = exports.generateEasMetadataAsync = exports.loadMetadata = exports.resolveInputDirectoryAsync = exports.buildBundlesAsync = exports.buildUnsortedUpdateInfoGroupAsync = exports.convertAssetToUpdateInfoGroupFormatAsync = exports.getStorageKeyForAssetAsync = exports.getStorageKey = exports.getBase64URLEncoding = exports.guessContentTypeFromExtension = exports.MetadataJoi = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
6
6
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
@@ -19,6 +19,7 @@ const queries_1 = require("../branch/queries");
|
|
|
19
19
|
const utils_1 = require("../branch/utils");
|
|
20
20
|
const generated_1 = require("../graphql/generated");
|
|
21
21
|
const PublishMutation_1 = require("../graphql/mutations/PublishMutation");
|
|
22
|
+
const BranchQuery_1 = require("../graphql/queries/BranchQuery");
|
|
22
23
|
const PublishQuery_1 = require("../graphql/queries/PublishQuery");
|
|
23
24
|
const log_1 = tslib_1.__importStar(require("../log"));
|
|
24
25
|
const platform_1 = require("../platform");
|
|
@@ -70,10 +71,12 @@ function getStorageKey(contentType, contentHash) {
|
|
|
70
71
|
}
|
|
71
72
|
exports.getStorageKey = getStorageKey;
|
|
72
73
|
async function calculateFileHashAsync(filePath, algorithm) {
|
|
73
|
-
return new Promise((resolve, reject) => {
|
|
74
|
+
return await new Promise((resolve, reject) => {
|
|
74
75
|
const file = fs_extra_1.default.createReadStream(filePath).on('error', reject);
|
|
75
76
|
const hash = file.pipe(crypto_1.default.createHash(algorithm)).on('error', reject);
|
|
76
|
-
hash.on('finish', () =>
|
|
77
|
+
hash.on('finish', () => {
|
|
78
|
+
resolve(hash.read());
|
|
79
|
+
});
|
|
77
80
|
});
|
|
78
81
|
}
|
|
79
82
|
/**
|
|
@@ -123,7 +126,7 @@ async function buildBundlesAsync({ projectDir, inputDir, exp, platformFlag, clea
|
|
|
123
126
|
}
|
|
124
127
|
// Legacy global Expo CLI
|
|
125
128
|
if (!(0, expoCli_1.shouldUseVersionedExpoCLI)(projectDir, exp)) {
|
|
126
|
-
|
|
129
|
+
await (0, expoCli_1.expoCommandAsync)(projectDir, [
|
|
127
130
|
'export',
|
|
128
131
|
'--output-dir',
|
|
129
132
|
inputDir,
|
|
@@ -134,6 +137,7 @@ async function buildBundlesAsync({ projectDir, inputDir, exp, platformFlag, clea
|
|
|
134
137
|
`--platform=${platformFlag}`,
|
|
135
138
|
...(clearCache ? ['--clear'] : []),
|
|
136
139
|
]);
|
|
140
|
+
return;
|
|
137
141
|
}
|
|
138
142
|
// Versioned Expo CLI, with multiple platform flag support
|
|
139
143
|
if ((0, expoCli_1.shouldUseVersionedExpoCLIWithExplicitPlatforms)(projectDir)) {
|
|
@@ -141,7 +145,7 @@ async function buildBundlesAsync({ projectDir, inputDir, exp, platformFlag, clea
|
|
|
141
145
|
const platformArgs = platformFlag === 'all'
|
|
142
146
|
? ['--platform', 'ios', '--platform', 'android']
|
|
143
147
|
: ['--platform', platformFlag];
|
|
144
|
-
|
|
148
|
+
await (0, expoCli_1.expoCommandAsync)(projectDir, [
|
|
145
149
|
'export',
|
|
146
150
|
'--output-dir',
|
|
147
151
|
inputDir,
|
|
@@ -150,6 +154,7 @@ async function buildBundlesAsync({ projectDir, inputDir, exp, platformFlag, clea
|
|
|
150
154
|
...platformArgs,
|
|
151
155
|
...(clearCache ? ['--clear'] : []),
|
|
152
156
|
]);
|
|
157
|
+
return;
|
|
153
158
|
}
|
|
154
159
|
// Versioned Expo CLI, without multiple platform flag support
|
|
155
160
|
// Warn users about potential export issues when using Metro web
|
|
@@ -158,7 +163,7 @@ async function buildBundlesAsync({ projectDir, inputDir, exp, platformFlag, clea
|
|
|
158
163
|
log_1.default.warn('Exporting bundle for all platforms, including Metro web.');
|
|
159
164
|
log_1.default.warn('If your app is incompatible with web, remove the "expo.web.bundler" property from your app manifest, or upgrade to the latest Expo SDK.');
|
|
160
165
|
}
|
|
161
|
-
|
|
166
|
+
await (0, expoCli_1.expoCommandAsync)(projectDir, [
|
|
162
167
|
'export',
|
|
163
168
|
'--output-dir',
|
|
164
169
|
inputDir,
|
|
@@ -208,17 +213,22 @@ async function generateEasMetadataAsync(distRoot, metadata) {
|
|
|
208
213
|
await json_file_1.default.writeAsync(easMetadataPath, { updates: metadata });
|
|
209
214
|
}
|
|
210
215
|
exports.generateEasMetadataAsync = generateEasMetadataAsync;
|
|
211
|
-
function
|
|
212
|
-
if (
|
|
213
|
-
return
|
|
216
|
+
function filterCollectedAssetsByRequestedPlatforms(collectedAssets, requestedPlatform) {
|
|
217
|
+
if (requestedPlatform === platform_1.RequestedPlatform.All) {
|
|
218
|
+
return {
|
|
219
|
+
...('ios' in collectedAssets ? { [platform_1.RequestedPlatform.Ios]: collectedAssets['ios'] } : {}),
|
|
220
|
+
...('android' in collectedAssets
|
|
221
|
+
? { [platform_1.RequestedPlatform.Android]: collectedAssets['android'] }
|
|
222
|
+
: {}),
|
|
223
|
+
};
|
|
214
224
|
}
|
|
215
|
-
const
|
|
216
|
-
if (!
|
|
217
|
-
throw new Error(`--platform="${
|
|
225
|
+
const collectedAssetsKey = requestedPlatform === platform_1.RequestedPlatform.Android ? 'android' : 'ios';
|
|
226
|
+
if (!collectedAssets[collectedAssetsKey]) {
|
|
227
|
+
throw new Error(`--platform="${collectedAssetsKey}" not found in metadata.json. Available platform(s): ${Object.keys(collectedAssets).join(', ')}`);
|
|
218
228
|
}
|
|
219
|
-
return { [
|
|
229
|
+
return { [requestedPlatform]: collectedAssets[collectedAssetsKey] };
|
|
220
230
|
}
|
|
221
|
-
exports.
|
|
231
|
+
exports.filterCollectedAssetsByRequestedPlatforms = filterCollectedAssetsByRequestedPlatforms;
|
|
222
232
|
/** Try to load the asset map for logging the names of assets published */
|
|
223
233
|
async function loadAssetMapAsync(distRoot) {
|
|
224
234
|
const assetMapPath = path_1.default.join(distRoot, 'assetmap.json');
|
|
@@ -325,15 +335,15 @@ async function uploadAssetsAsync(graphqlClient, assetsForUpdateInfoGroup, projec
|
|
|
325
335
|
const assetUploadPromiseLimit = (0, promise_limit_1.default)(15);
|
|
326
336
|
const [assetLimitPerUpdateGroup] = await Promise.all([
|
|
327
337
|
PublishQuery_1.PublishQuery.getAssetLimitPerUpdateGroupAsync(graphqlClient, projectId),
|
|
328
|
-
missingAssets.map((missingAsset, i) => {
|
|
329
|
-
assetUploadPromiseLimit(async () => {
|
|
338
|
+
Promise.all(missingAssets.map((missingAsset, i) => {
|
|
339
|
+
return assetUploadPromiseLimit(async () => {
|
|
330
340
|
if (cancelationToken.isCanceledOrFinished) {
|
|
331
341
|
throw Error('Canceled upload');
|
|
332
342
|
}
|
|
333
343
|
const presignedPost = JSON.parse(specifications[i]);
|
|
334
344
|
await (0, uploads_1.uploadWithPresignedPostWithRetryAsync)(missingAsset.path, presignedPost, onAssetUploadBegin);
|
|
335
345
|
});
|
|
336
|
-
}),
|
|
346
|
+
})),
|
|
337
347
|
]);
|
|
338
348
|
let timeout = 1;
|
|
339
349
|
while (missingAssets.length > 0) {
|
|
@@ -445,22 +455,6 @@ async function getUpdateMessageForCommandAsync(vcsClient, { updateMessageArg, au
|
|
|
445
455
|
}
|
|
446
456
|
exports.getUpdateMessageForCommandAsync = getUpdateMessageForCommandAsync;
|
|
447
457
|
exports.defaultPublishPlatforms = ['android', 'ios'];
|
|
448
|
-
function getRequestedPlatform(platform) {
|
|
449
|
-
switch (platform) {
|
|
450
|
-
case 'android':
|
|
451
|
-
return platform_1.RequestedPlatform.Android;
|
|
452
|
-
case 'ios':
|
|
453
|
-
return platform_1.RequestedPlatform.Ios;
|
|
454
|
-
case 'web':
|
|
455
|
-
return null;
|
|
456
|
-
case 'all':
|
|
457
|
-
return platform_1.RequestedPlatform.All;
|
|
458
|
-
default:
|
|
459
|
-
throw new Error(`Unsupported platform: ${platform}`);
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
exports.getRequestedPlatform = getRequestedPlatform;
|
|
463
|
-
/** Get runtime versions grouped by platform. Runtime version is always `null` on web where the platform is always backwards compatible. */
|
|
464
458
|
async function getRuntimeVersionObjectAsync({ exp, platforms, workflows, projectDir, env, }) {
|
|
465
459
|
return await Promise.all(platforms.map(async (platform) => {
|
|
466
460
|
return {
|
|
@@ -477,9 +471,6 @@ async function getRuntimeVersionObjectAsync({ exp, platforms, workflows, project
|
|
|
477
471
|
}
|
|
478
472
|
exports.getRuntimeVersionObjectAsync = getRuntimeVersionObjectAsync;
|
|
479
473
|
async function getRuntimeVersionForPlatformAsync({ exp, platform, workflow, projectDir, env, }) {
|
|
480
|
-
if (platform === 'web') {
|
|
481
|
-
return 'UNVERSIONED';
|
|
482
|
-
}
|
|
483
474
|
if (await (0, projectUtils_1.isModernExpoUpdatesCLIWithRuntimeVersionCommandSupportedAsync)(projectDir)) {
|
|
484
475
|
try {
|
|
485
476
|
log_1.default.debug('Using expo-updates runtimeversion:resolve CLI for runtime version resolution');
|
|
@@ -526,5 +517,38 @@ exports.getRuntimeToPlatformMappingFromRuntimeVersions = getRuntimeToPlatformMap
|
|
|
526
517
|
exports.platformDisplayNames = {
|
|
527
518
|
android: 'Android',
|
|
528
519
|
ios: 'iOS',
|
|
529
|
-
web: 'Web',
|
|
530
520
|
};
|
|
521
|
+
exports.updatePublishPlatformToAppPlatform = {
|
|
522
|
+
android: generated_1.AppPlatform.Android,
|
|
523
|
+
ios: generated_1.AppPlatform.Ios,
|
|
524
|
+
};
|
|
525
|
+
const mapMapAsync = async function (map, mapper) {
|
|
526
|
+
const resultingMap = new Map();
|
|
527
|
+
await Promise.all(Array.from(map.keys()).map(async (k) => {
|
|
528
|
+
const initialValue = map.get(k);
|
|
529
|
+
const result = await mapper(initialValue, k);
|
|
530
|
+
resultingMap.set(k, result);
|
|
531
|
+
}));
|
|
532
|
+
return resultingMap;
|
|
533
|
+
};
|
|
534
|
+
async function getRuntimeToUpdateRolloutInfoGroupMappingAsync(graphqlClient, { appId, branchName, rolloutPercentage, runtimeToPlatformMapping, }) {
|
|
535
|
+
const runtimeToPlatformsMap = new Map(runtimeToPlatformMapping.map(r => [
|
|
536
|
+
r.runtimeVersion,
|
|
537
|
+
r.platforms,
|
|
538
|
+
]));
|
|
539
|
+
return await mapMapAsync(runtimeToPlatformsMap, async (platforms, runtimeVersion) => {
|
|
540
|
+
return Object.fromEntries(await Promise.all(platforms.map(async (platform) => {
|
|
541
|
+
const updateIdForPlatform = await BranchQuery_1.BranchQuery.getLatestUpdateIdOnBranchAsync(graphqlClient, {
|
|
542
|
+
appId,
|
|
543
|
+
branchName,
|
|
544
|
+
runtimeVersion,
|
|
545
|
+
platform: exports.updatePublishPlatformToAppPlatform[platform],
|
|
546
|
+
});
|
|
547
|
+
if (!updateIdForPlatform) {
|
|
548
|
+
throw new Error(`No updates on branch ${branchName} for platform ${platform} and runtimeVersion ${runtimeVersion} to roll out from.`);
|
|
549
|
+
}
|
|
550
|
+
return [platform, { rolloutPercentage, rolloutControlUpdateId: updateIdForPlatform }];
|
|
551
|
+
})));
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
exports.getRuntimeToUpdateRolloutInfoGroupMappingAsync = getRuntimeToUpdateRolloutInfoGroupMappingAsync;
|
|
@@ -9,5 +9,8 @@ export declare function resolveRuntimeVersionAsync({ exp, platform, workflow, pr
|
|
|
9
9
|
cwd?: string;
|
|
10
10
|
}): Promise<{
|
|
11
11
|
runtimeVersion: string | null;
|
|
12
|
-
|
|
12
|
+
fingerprint: {
|
|
13
|
+
fingerprintSources: object[];
|
|
14
|
+
isDebugFingerprintSource: boolean;
|
|
15
|
+
} | null;
|
|
13
16
|
} | null>;
|
|
@@ -12,19 +12,25 @@ async function resolveRuntimeVersionAsync({ exp, platform, workflow, projectDir,
|
|
|
12
12
|
// than the versioned @expo/config-plugins dependency in the project)
|
|
13
13
|
return {
|
|
14
14
|
runtimeVersion: await config_plugins_1.Updates.getRuntimeVersionNullableAsync(projectDir, exp, platform),
|
|
15
|
-
|
|
15
|
+
fingerprint: null,
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
try {
|
|
19
19
|
log_1.default.debug('Using expo-updates runtimeversion:resolve CLI for runtime version resolution');
|
|
20
|
-
const
|
|
20
|
+
const useDebugFingerprintSource = log_1.default.isDebug;
|
|
21
|
+
const extraArgs = useDebugFingerprintSource ? ['--debug'] : [];
|
|
21
22
|
const resolvedRuntimeVersionJSONResult = await (0, expoUpdatesCli_1.expoUpdatesCommandAsync)(projectDir, ['runtimeversion:resolve', '--platform', platform, '--workflow', workflow, ...extraArgs], { env, cwd });
|
|
22
23
|
const runtimeVersionResult = JSON.parse(resolvedRuntimeVersionJSONResult);
|
|
23
24
|
log_1.default.debug('runtimeversion:resolve output:');
|
|
24
25
|
log_1.default.debug(resolvedRuntimeVersionJSONResult);
|
|
25
26
|
return {
|
|
26
27
|
runtimeVersion: runtimeVersionResult.runtimeVersion ?? null,
|
|
27
|
-
|
|
28
|
+
fingerprint: runtimeVersionResult.fingerprintSources
|
|
29
|
+
? {
|
|
30
|
+
fingerprintSources: runtimeVersionResult.fingerprintSources,
|
|
31
|
+
isDebugFingerprintSource: useDebugFingerprintSource,
|
|
32
|
+
}
|
|
33
|
+
: null,
|
|
28
34
|
};
|
|
29
35
|
}
|
|
30
36
|
catch (e) {
|
|
@@ -10,8 +10,8 @@ export type NonInteractiveOptions = {
|
|
|
10
10
|
* Create a rollout for the project.
|
|
11
11
|
*/
|
|
12
12
|
export declare class CreateRollout implements EASUpdateAction<UpdateChannelBasicInfoFragment> {
|
|
13
|
-
private channelInfo;
|
|
14
|
-
private options;
|
|
13
|
+
private readonly channelInfo;
|
|
14
|
+
private readonly options;
|
|
15
15
|
constructor(channelInfo: UpdateChannelBasicInfoFragment, options?: Partial<NonInteractiveOptions>);
|
|
16
16
|
runAsync(ctx: EASUpdateContext): Promise<UpdateChannelBasicInfoFragment>;
|
|
17
17
|
confirmCreationAsync(ctx: EASUpdateContext): Promise<boolean>;
|
|
@@ -8,8 +8,8 @@ export type NonInteractiveOptions = {
|
|
|
8
8
|
* Edit an existing rollout for the project.
|
|
9
9
|
*/
|
|
10
10
|
export declare class EditRollout implements EASUpdateAction<UpdateChannelBasicInfoFragment> {
|
|
11
|
-
private channelInfo;
|
|
12
|
-
private options;
|
|
11
|
+
private readonly channelInfo;
|
|
12
|
+
private readonly options;
|
|
13
13
|
constructor(channelInfo: UpdateChannelBasicInfoFragment, options?: Partial<NonInteractiveOptions>);
|
|
14
14
|
runAsync(ctx: EASUpdateContext): Promise<UpdateChannelBasicInfoFragment>;
|
|
15
15
|
confirmEditAsync(ctx: EASUpdateContext): Promise<boolean>;
|
|
@@ -16,8 +16,8 @@ export type NonInteractiveOptions = {
|
|
|
16
16
|
* End an existing rollout for the project.
|
|
17
17
|
*/
|
|
18
18
|
export declare class EndRollout implements EASUpdateAction<UpdateChannelBasicInfoFragment> {
|
|
19
|
-
private channelInfo;
|
|
20
|
-
private options;
|
|
19
|
+
private readonly channelInfo;
|
|
20
|
+
private readonly options;
|
|
21
21
|
constructor(channelInfo: UpdateChannelBasicInfoFragment, options: Partial<NonInteractiveOptions> & GeneralOptions);
|
|
22
22
|
runAsync(ctx: EASUpdateContext): Promise<UpdateChannelBasicInfoFragment>;
|
|
23
23
|
getChannelObjectAsync(ctx: EASUpdateContext): Promise<UpdateChannelObject>;
|
|
@@ -13,8 +13,8 @@ export declare enum ManageRolloutActions {
|
|
|
13
13
|
* Manage a rollout for the project.
|
|
14
14
|
*/
|
|
15
15
|
export declare class ManageRollout implements EASUpdateAction<EASUpdateAction> {
|
|
16
|
-
private channelInfo;
|
|
17
|
-
private options;
|
|
16
|
+
private readonly channelInfo;
|
|
17
|
+
private readonly options;
|
|
18
18
|
constructor(channelInfo: UpdateChannelBasicInfoFragment, options: {
|
|
19
19
|
callingAction?: EASUpdateAction;
|
|
20
20
|
action?: ManageRolloutActions.EDIT | ManageRolloutActions.END | ManageRolloutActions.VIEW;
|
|
@@ -21,7 +21,7 @@ type JSONOutput = {
|
|
|
21
21
|
* Control a rollout in non interactive mode.
|
|
22
22
|
*/
|
|
23
23
|
export declare class NonInteractiveRollout implements EASUpdateAction<void> {
|
|
24
|
-
private options;
|
|
24
|
+
private readonly options;
|
|
25
25
|
constructor(options: {
|
|
26
26
|
channelName?: string;
|
|
27
27
|
json?: boolean;
|
|
@@ -13,7 +13,7 @@ export type RolloutActions = MainMenuActions.CREATE_NEW | ManageRolloutActions.E
|
|
|
13
13
|
* Manage a rollout for the project.
|
|
14
14
|
*/
|
|
15
15
|
export declare class RolloutMainMenu implements EASUpdateAction<void> {
|
|
16
|
-
private options;
|
|
16
|
+
private readonly options;
|
|
17
17
|
constructor(options: {
|
|
18
18
|
channelName?: string;
|
|
19
19
|
action?: RolloutActions;
|
|
@@ -6,9 +6,9 @@ import { Connection } from '../../utils/relay';
|
|
|
6
6
|
* Select a runtime from a branch
|
|
7
7
|
*/
|
|
8
8
|
export declare class SelectRuntime implements EASUpdateAction<string | null> {
|
|
9
|
-
private branchInfo;
|
|
10
|
-
private options;
|
|
11
|
-
private printedType;
|
|
9
|
+
private readonly branchInfo;
|
|
10
|
+
private readonly options;
|
|
11
|
+
private readonly printedType;
|
|
12
12
|
constructor(branchInfo: UpdateBranchBasicInfoFragment, options?: {
|
|
13
13
|
anotherBranchToIntersectRuntimesBy?: UpdateBranchBasicInfoFragment;
|
|
14
14
|
});
|
package/build/run/android/adb.js
CHANGED
|
@@ -75,7 +75,7 @@ async function getRunningEmulatorsAsync() {
|
|
|
75
75
|
name,
|
|
76
76
|
};
|
|
77
77
|
});
|
|
78
|
-
return Promise.all(devicePromises);
|
|
78
|
+
return await Promise.all(devicePromises);
|
|
79
79
|
}
|
|
80
80
|
exports.getRunningEmulatorsAsync = getRunningEmulatorsAsync;
|
|
81
81
|
async function getFirstRunningEmulatorAsync() {
|
package/build/run/ios/simctl.js
CHANGED
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.simctlAsync = void 0;
|
|
4
4
|
const xcrun_1 = require("./xcrun");
|
|
5
5
|
async function simctlAsync(args, options) {
|
|
6
|
-
return (0, xcrun_1.xcrunAsync)(['simctl', ...args], options);
|
|
6
|
+
return await (0, xcrun_1.xcrunAsync)(['simctl', ...args], options);
|
|
7
7
|
}
|
|
8
8
|
exports.simctlAsync = simctlAsync;
|
|
@@ -38,7 +38,7 @@ async function assertCorrectXcodeVersionInstalledAsync() {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
async function ensureXcrunInstalledAsync() {
|
|
41
|
-
if (!(0, xcrun_1.isXcrunInstalledAsync)()) {
|
|
41
|
+
if (!(await (0, xcrun_1.isXcrunInstalledAsync)())) {
|
|
42
42
|
const { installXcrun } = await (0, prompts_1.promptAsync)({
|
|
43
43
|
type: 'select',
|
|
44
44
|
message: 'Xcode Command Line Tools need to be installed, continue?',
|
|
@@ -59,14 +59,14 @@ async function handleUrlSourceAsync(ctx, source) {
|
|
|
59
59
|
const { url } = source;
|
|
60
60
|
if (!validateUrl(url)) {
|
|
61
61
|
log_1.default.error(chalk_1.default.bold(`The URL you provided is invalid: ${url}`));
|
|
62
|
-
return getArchiveAsync(ctx, {
|
|
62
|
+
return await getArchiveAsync(ctx, {
|
|
63
63
|
sourceType: ArchiveSourceType.prompt,
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
const maybeBuildId = isBuildDetailsPage(url);
|
|
67
67
|
if (maybeBuildId) {
|
|
68
68
|
if (await askIfUseBuildIdFromUrlAsync(ctx, source, maybeBuildId)) {
|
|
69
|
-
return getArchiveAsync(ctx, {
|
|
69
|
+
return await getArchiveAsync(ctx, {
|
|
70
70
|
sourceType: ArchiveSourceType.buildId,
|
|
71
71
|
id: maybeBuildId,
|
|
72
72
|
});
|
|
@@ -82,13 +82,13 @@ async function handleLatestSourceAsync(ctx) {
|
|
|
82
82
|
const [latestBuild] = await (0, builds_1.getRecentBuildsForSubmissionAsync)(ctx.graphqlClient, (0, AppPlatform_1.toAppPlatform)(ctx.platform), ctx.projectId);
|
|
83
83
|
if (!latestBuild) {
|
|
84
84
|
log_1.default.error(chalk_1.default.bold("Couldn't find any builds for this project on EAS servers. It looks like you haven't run 'eas build' yet."));
|
|
85
|
-
return getArchiveAsync(ctx, {
|
|
85
|
+
return await getArchiveAsync(ctx, {
|
|
86
86
|
sourceType: ArchiveSourceType.prompt,
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
if (new Date() >= new Date(latestBuild.expirationDate)) {
|
|
90
90
|
log_1.default.error(chalk_1.default.bold(`The latest build is expired. Run ${chalk_1.default.bold('eas build --auto-submit')} or choose another build.`));
|
|
91
|
-
return getArchiveAsync(ctx, {
|
|
91
|
+
return await getArchiveAsync(ctx, {
|
|
92
92
|
sourceType: ArchiveSourceType.prompt,
|
|
93
93
|
});
|
|
94
94
|
}
|
|
@@ -105,7 +105,7 @@ async function handleLatestSourceAsync(ctx) {
|
|
|
105
105
|
async function handlePathSourceAsync(ctx, source) {
|
|
106
106
|
if (!(await (0, files_1.isExistingFileAsync)(source.path))) {
|
|
107
107
|
log_1.default.error(chalk_1.default.bold(`${source.path} doesn't exist`));
|
|
108
|
-
return getArchiveAsync(ctx, {
|
|
108
|
+
return await getArchiveAsync(ctx, {
|
|
109
109
|
sourceType: ArchiveSourceType.prompt,
|
|
110
110
|
});
|
|
111
111
|
}
|
|
@@ -127,13 +127,13 @@ async function handleBuildIdSourceAsync(ctx, source) {
|
|
|
127
127
|
const expectedPlatformName = platform_1.appPlatformDisplayNames[(0, AppPlatform_1.toAppPlatform)(ctx.platform)];
|
|
128
128
|
const receivedPlatformName = platform_1.appPlatformDisplayNames[build.platform];
|
|
129
129
|
log_1.default.error(chalk_1.default.bold(`Build platform doesn't match! Expected ${expectedPlatformName} build but got ${receivedPlatformName}.`));
|
|
130
|
-
return getArchiveAsync(ctx, {
|
|
130
|
+
return await getArchiveAsync(ctx, {
|
|
131
131
|
sourceType: ArchiveSourceType.prompt,
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
if (new Date() >= new Date(build.expirationDate)) {
|
|
135
135
|
log_1.default.error(chalk_1.default.bold(`The build with ID ${build.id} is expired. Choose another build.`));
|
|
136
|
-
return getArchiveAsync(ctx, {
|
|
136
|
+
return await getArchiveAsync(ctx, {
|
|
137
137
|
sourceType: ArchiveSourceType.prompt,
|
|
138
138
|
});
|
|
139
139
|
}
|
|
@@ -147,7 +147,7 @@ async function handleBuildIdSourceAsync(ctx, source) {
|
|
|
147
147
|
log_1.default.warn('Are you sure that the given ID corresponds to a build from EAS Build?');
|
|
148
148
|
log_1.default.warn(`Build IDs from the classic build service (expo build:[android|ios]) are not supported. ${(0, log_1.learnMore)('https://docs.expo.dev/submit/classic-builds/')}`);
|
|
149
149
|
log_1.default.debug('Original error:', err);
|
|
150
|
-
return getArchiveAsync(ctx, {
|
|
150
|
+
return await getArchiveAsync(ctx, {
|
|
151
151
|
sourceType: ArchiveSourceType.prompt,
|
|
152
152
|
});
|
|
153
153
|
}
|
|
@@ -161,14 +161,14 @@ async function handleBuildListSourceAsync(ctx) {
|
|
|
161
161
|
if (recentBuilds.length < 1) {
|
|
162
162
|
log_1.default.error(chalk_1.default.bold(`Couldn't find any ${platform_1.appPlatformDisplayNames[appPlatform]} builds for this project on EAS servers. ` +
|
|
163
163
|
"It looks like you haven't run 'eas build' yet."));
|
|
164
|
-
return getArchiveAsync(ctx, {
|
|
164
|
+
return await getArchiveAsync(ctx, {
|
|
165
165
|
sourceType: ArchiveSourceType.prompt,
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
168
|
if (recentBuilds.every(it => new Date(it.expirationDate) <= new Date())) {
|
|
169
169
|
log_1.default.error(chalk_1.default.bold('It looks like all of your build artifacts have expired. ' +
|
|
170
170
|
'EAS keeps your build artifacts only for 30 days.'));
|
|
171
|
-
return getArchiveAsync(ctx, {
|
|
171
|
+
return await getArchiveAsync(ctx, {
|
|
172
172
|
sourceType: ArchiveSourceType.prompt,
|
|
173
173
|
});
|
|
174
174
|
}
|
|
@@ -185,7 +185,7 @@ async function handleBuildListSourceAsync(ctx) {
|
|
|
185
185
|
warn: 'This artifact has expired',
|
|
186
186
|
});
|
|
187
187
|
if (selectedBuild == null) {
|
|
188
|
-
return getArchiveAsync(ctx, {
|
|
188
|
+
return await getArchiveAsync(ctx, {
|
|
189
189
|
sourceType: ArchiveSourceType.prompt,
|
|
190
190
|
});
|
|
191
191
|
}
|
|
@@ -254,26 +254,26 @@ async function handlePromptSourceAsync(ctx) {
|
|
|
254
254
|
switch (sourceType) {
|
|
255
255
|
case ArchiveSourceType.url: {
|
|
256
256
|
const url = await askForArchiveUrlAsync(ctx.platform);
|
|
257
|
-
return getArchiveAsync(ctx, {
|
|
257
|
+
return await getArchiveAsync(ctx, {
|
|
258
258
|
sourceType: ArchiveSourceType.url,
|
|
259
259
|
url,
|
|
260
260
|
});
|
|
261
261
|
}
|
|
262
262
|
case ArchiveSourceType.path: {
|
|
263
263
|
const path = await askForArchivePathAsync(ctx.platform);
|
|
264
|
-
return getArchiveAsync(ctx, {
|
|
264
|
+
return await getArchiveAsync(ctx, {
|
|
265
265
|
sourceType: ArchiveSourceType.path,
|
|
266
266
|
path,
|
|
267
267
|
});
|
|
268
268
|
}
|
|
269
269
|
case ArchiveSourceType.buildList: {
|
|
270
|
-
return getArchiveAsync(ctx, {
|
|
270
|
+
return await getArchiveAsync(ctx, {
|
|
271
271
|
sourceType: ArchiveSourceType.buildList,
|
|
272
272
|
});
|
|
273
273
|
}
|
|
274
274
|
case ArchiveSourceType.buildId: {
|
|
275
275
|
const id = await askForBuildIdAsync();
|
|
276
|
-
return getArchiveAsync(ctx, {
|
|
276
|
+
return await getArchiveAsync(ctx, {
|
|
277
277
|
sourceType: ArchiveSourceType.buildId,
|
|
278
278
|
id,
|
|
279
279
|
});
|
|
@@ -60,7 +60,7 @@ class BaseSubmitter {
|
|
|
60
60
|
const platformDisplayName = platform_1.appPlatformDisplayNames[(0, AppPlatform_1.toAppPlatform)(this.ctx.platform)];
|
|
61
61
|
const scheduleSpinner = (0, ora_1.ora)(`Scheduling ${platformDisplayName} submission`).start();
|
|
62
62
|
try {
|
|
63
|
-
const submission = this.createPlatformSubmissionAsync(submissionInput);
|
|
63
|
+
const submission = await this.createPlatformSubmissionAsync(submissionInput);
|
|
64
64
|
scheduleSpinner.succeed(`Scheduled ${platformDisplayName} submission`);
|
|
65
65
|
return submission;
|
|
66
66
|
}
|
|
@@ -70,7 +70,7 @@ class BaseSubmitter {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
async createSubmissionWithAnalyticsAsync(submissionInput) {
|
|
73
|
-
return await (0, common_1.withAnalyticsAsync)(this.ctx.analytics, async () => this.createSubmissionAsync(submissionInput), {
|
|
73
|
+
return await (0, common_1.withAnalyticsAsync)(this.ctx.analytics, async () => await this.createSubmissionAsync(submissionInput), {
|
|
74
74
|
attemptEvent: AnalyticsManager_1.SubmissionEvent.SUBMIT_REQUEST_ATTEMPT,
|
|
75
75
|
successEvent: AnalyticsManager_1.SubmissionEvent.SUBMIT_REQUEST_SUCCESS,
|
|
76
76
|
failureEvent: AnalyticsManager_1.SubmissionEvent.SUBMIT_REQUEST_FAIL,
|
package/build/submit/submit.js
CHANGED
|
@@ -18,7 +18,7 @@ async function submitAsync(ctx) {
|
|
|
18
18
|
const command = ctx.platform === eas_build_job_1.Platform.ANDROID
|
|
19
19
|
? new AndroidSubmitCommand_1.default(ctx)
|
|
20
20
|
: new IosSubmitCommand_1.default(ctx);
|
|
21
|
-
return command.runAsync();
|
|
21
|
+
return await command.runAsync();
|
|
22
22
|
}, {
|
|
23
23
|
attemptEvent: AnalyticsManager_1.SubmissionEvent.SUBMIT_COMMAND_ATTEMPT,
|
|
24
24
|
successEvent: AnalyticsManager_1.SubmissionEvent.SUBMIT_COMMAND_SUCCESS,
|
|
@@ -49,5 +49,5 @@ async function getAndroidManifestAsync(projectDir) {
|
|
|
49
49
|
if (!androidManifestPath) {
|
|
50
50
|
throw new Error(`Could not find AndroidManifest.xml in project directory: "${projectDir}"`);
|
|
51
51
|
}
|
|
52
|
-
return config_plugins_1.AndroidConfig.Manifest.readAndroidManifestAsync(androidManifestPath);
|
|
52
|
+
return await config_plugins_1.AndroidConfig.Manifest.readAndroidManifestAsync(androidManifestPath);
|
|
53
53
|
}
|
|
@@ -8,7 +8,7 @@ export declare const DEFAULT_MANAGED_RUNTIME_VERSION_GTE_SDK_49: {
|
|
|
8
8
|
export declare const DEFAULT_MANAGED_RUNTIME_VERSION_LTE_SDK_48: {
|
|
9
9
|
readonly policy: "sdkVersion";
|
|
10
10
|
};
|
|
11
|
-
export declare const DEFAULT_BARE_RUNTIME_VERSION
|
|
11
|
+
export declare const DEFAULT_BARE_RUNTIME_VERSION = "1.0.0";
|
|
12
12
|
export declare function getDefaultRuntimeVersion(workflow: Workflow, sdkVersion: string | undefined): NonNullable<ExpoConfig['runtimeVersion']>;
|
|
13
13
|
/**
|
|
14
14
|
* Make sure EAS Build profiles are configured to work with EAS Update by adding channels to build profiles.
|
package/build/update/queries.js
CHANGED
|
@@ -28,7 +28,9 @@ async function listAndRenderUpdateGroupsOnAppAsync(graphqlClient, { projectId, p
|
|
|
28
28
|
queryToPerform: (limit, offset) => queryUpdateGroupsOnAppAsync(graphqlClient, { limit, offset, appId: projectId }),
|
|
29
29
|
promptOptions: {
|
|
30
30
|
title: 'Load more update groups?',
|
|
31
|
-
renderListItems: updateGroups =>
|
|
31
|
+
renderListItems: updateGroups => {
|
|
32
|
+
renderUpdateGroupsOnApp({ updateGroups, paginatedQueryOptions });
|
|
33
|
+
},
|
|
32
34
|
},
|
|
33
35
|
});
|
|
34
36
|
}
|
|
@@ -56,7 +58,9 @@ async function listAndRenderUpdateGroupsOnBranchAsync(graphqlClient, { projectId
|
|
|
56
58
|
}),
|
|
57
59
|
promptOptions: {
|
|
58
60
|
title: 'Load more update groups?',
|
|
59
|
-
renderListItems: updateGroups =>
|
|
61
|
+
renderListItems: updateGroups => {
|
|
62
|
+
renderUpdateGroupsOnBranch({ updateGroups, branchName, paginatedQueryOptions });
|
|
63
|
+
},
|
|
60
64
|
},
|
|
61
65
|
});
|
|
62
66
|
}
|
|
@@ -105,7 +109,8 @@ function renderUpdateGroupsOnBranch({ branchName, updateGroups, paginatedQueryOp
|
|
|
105
109
|
id: updateGroups[0]?.[0].branch.id ?? 'N/A',
|
|
106
110
|
};
|
|
107
111
|
if (json) {
|
|
108
|
-
|
|
112
|
+
(0, json_1.printJsonOnlyOutput)({ ...branch, currentPage: updateGroupDescriptions });
|
|
113
|
+
return;
|
|
109
114
|
}
|
|
110
115
|
log_1.default.addNewLineIfNone();
|
|
111
116
|
log_1.default.log(chalk_1.default.bold('Branch:'));
|
|
@@ -99,7 +99,8 @@ async function republishAsync({ graphqlClient, app, updatesToPublish, targetBran
|
|
|
99
99
|
throw error;
|
|
100
100
|
}
|
|
101
101
|
if (json) {
|
|
102
|
-
|
|
102
|
+
(0, json_1.printJsonOnlyOutput)(updatesRepublished);
|
|
103
|
+
return;
|
|
103
104
|
}
|
|
104
105
|
const updatesRepublishedByPlatform = Object.fromEntries(updatesRepublished.map(update => [update.platform, update]));
|
|
105
106
|
const arbitraryRepublishedUpdate = updatesRepublished[0];
|
package/build/update/utils.d.ts
CHANGED
package/build/update/utils.js
CHANGED
|
@@ -25,6 +25,10 @@ function formatUpdateGroup(update) {
|
|
|
25
25
|
{ label: 'Message', value: update.message },
|
|
26
26
|
{ label: 'Code Signing Key', value: update.codeSigningKey ?? 'N/A' },
|
|
27
27
|
{ label: 'Is Roll Back to Embedded', value: update.isRollBackToEmbedded ? 'Yes' : 'No' },
|
|
28
|
+
{
|
|
29
|
+
label: 'Rollout Percentage',
|
|
30
|
+
value: update.rolloutPercentage !== undefined ? `${update.rolloutPercentage}%` : 'N/A',
|
|
31
|
+
},
|
|
28
32
|
{ label: 'Group ID', value: update.group },
|
|
29
33
|
]);
|
|
30
34
|
}
|
|
@@ -127,6 +131,7 @@ function getUpdateGroupDescriptions(updateGroups) {
|
|
|
127
131
|
message: formatUpdateMessage(updateGroup[0]),
|
|
128
132
|
runtimeVersion: updateGroup[0].runtimeVersion,
|
|
129
133
|
isRollBackToEmbedded: updateGroup[0].isRollBackToEmbedded,
|
|
134
|
+
rolloutPercentage: updateGroup[0].rolloutPercentage ?? undefined,
|
|
130
135
|
codeSigningKey: updateGroup[0].codeSigningInfo?.keyid,
|
|
131
136
|
group: updateGroup[0].group,
|
|
132
137
|
platforms: formatPlatformForUpdateGroup(updateGroup),
|
|
@@ -139,6 +144,7 @@ function getUpdateGroupDescriptionsWithBranch(updateGroups) {
|
|
|
139
144
|
message: formatUpdateMessage(updateGroup[0]),
|
|
140
145
|
runtimeVersion: updateGroup[0].runtimeVersion,
|
|
141
146
|
isRollBackToEmbedded: updateGroup[0].isRollBackToEmbedded,
|
|
147
|
+
rolloutPercentage: updateGroup[0].rolloutPercentage ?? undefined,
|
|
142
148
|
codeSigningKey: updateGroup[0].codeSigningInfo?.keyid,
|
|
143
149
|
group: updateGroup[0].group,
|
|
144
150
|
platforms: formatPlatformForUpdateGroup(updateGroup),
|
|
@@ -156,6 +162,7 @@ function getBranchDescription(branch) {
|
|
|
156
162
|
message: formatUpdateMessage(latestUpdate),
|
|
157
163
|
runtimeVersion: latestUpdate.runtimeVersion,
|
|
158
164
|
isRollBackToEmbedded: latestUpdate.isRollBackToEmbedded,
|
|
165
|
+
rolloutPercentage: latestUpdate.rolloutPercentage ?? undefined,
|
|
159
166
|
codeSigningKey: latestUpdate.codeSigningInfo?.keyid,
|
|
160
167
|
group: latestUpdate.group,
|
|
161
168
|
platforms: getPlatformsForGroup({
|
|
@@ -83,7 +83,7 @@ async function getSessionUsingBrowserAuthFlowAsync({ expoWebsiteUrl, }) {
|
|
|
83
83
|
(0, assert_1.default)(address !== null && typeof address === 'object', 'Server address and port should be set after listening has begun');
|
|
84
84
|
const port = address.port;
|
|
85
85
|
const authorizeUrl = buildExpoSsoLoginUrl(port);
|
|
86
|
-
(0, better_opn_1.default)(authorizeUrl);
|
|
86
|
+
void (0, better_opn_1.default)(authorizeUrl);
|
|
87
87
|
});
|
|
88
88
|
server.on('connection', connection => {
|
|
89
89
|
connections.add(connection);
|
package/build/utils/download.js
CHANGED
|
@@ -90,7 +90,7 @@ async function downloadAndMaybeExtractAppAsync(url, platform, cachedAppPath) {
|
|
|
90
90
|
if (url.endsWith('apk')) {
|
|
91
91
|
const apkFilePath = path_1.default.join(outputDir, `${(0, uuid_1.v4)()}.apk`);
|
|
92
92
|
await downloadFileWithProgressTrackerAsync(url, apkFilePath, (ratio, total) => `Downloading app (${(0, files_1.formatBytes)(total * ratio)} / ${(0, files_1.formatBytes)(total)})`, 'Successfully downloaded app');
|
|
93
|
-
return maybeCacheAppAsync(apkFilePath, cachedAppPath);
|
|
93
|
+
return await maybeCacheAppAsync(apkFilePath, cachedAppPath);
|
|
94
94
|
}
|
|
95
95
|
else {
|
|
96
96
|
const tmpArchivePathDir = path_1.default.join((0, paths_1.getTmpDirectory)(), (0, uuid_1.v4)());
|
|
@@ -99,7 +99,7 @@ async function downloadAndMaybeExtractAppAsync(url, platform, cachedAppPath) {
|
|
|
99
99
|
await downloadFileWithProgressTrackerAsync(url, tmpArchivePath, (ratio, total) => `Downloading app archive (${(0, files_1.formatBytes)(total * ratio)} / ${(0, files_1.formatBytes)(total)})`, 'Successfully downloaded app archive');
|
|
100
100
|
await tarExtractAsync(tmpArchivePath, outputDir);
|
|
101
101
|
const appPath = await getAppPathAsync(outputDir, platform === generated_1.AppPlatform.Ios ? 'app' : 'apk');
|
|
102
|
-
return maybeCacheAppAsync(appPath, cachedAppPath);
|
|
102
|
+
return await maybeCacheAppAsync(appPath, cachedAppPath);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
exports.downloadAndMaybeExtractAppAsync = downloadAndMaybeExtractAppAsync;
|
|
@@ -7,5 +7,5 @@ exports.filterAsync = void 0;
|
|
|
7
7
|
* @param predicate a predicate function to run asynchronously
|
|
8
8
|
* @returns a promise resolving to a filtered array
|
|
9
9
|
*/
|
|
10
|
-
const filterAsync = async (arr, predicate) => Promise.all(arr.map(predicate)).then(results => arr.filter((_v, index) => results[index]));
|
|
10
|
+
const filterAsync = async (arr, predicate) => await Promise.all(arr.map(predicate)).then(results => arr.filter((_v, index) => results[index]));
|
|
11
11
|
exports.filterAsync = filterAsync;
|