eas-cli 10.2.3 → 11.0.0
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 +3 -2
- 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 +16 -0
- package/build/commandUtils/flags.js +61 -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 +10 -3
- package/build/commands/device/delete.js +1 -1
- package/build/commands/device/rename.js +1 -1
- package/build/commands/env/create.d.ts +23 -0
- package/build/commands/env/create.js +169 -0
- package/build/commands/env/delete.d.ts +18 -0
- package/build/commands/env/delete.js +95 -0
- package/build/commands/env/get.d.ts +19 -0
- package/build/commands/env/get.js +100 -0
- package/build/commands/env/link.d.ts +15 -0
- package/build/commands/env/link.js +59 -0
- package/build/commands/env/list.d.ts +18 -0
- package/build/commands/env/list.js +82 -0
- 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.d.ts +15 -0
- package/build/commands/env/unlink.js +65 -0
- package/build/commands/env/update.d.ts +21 -0
- package/build/commands/env/update.js +135 -0
- 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 +874 -62
- package/build/graphql/generated.js +92 -2
- package/build/graphql/mutations/EnvironmentVariableMutation.d.ts +39 -0
- package/build/graphql/mutations/EnvironmentVariableMutation.js +133 -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 +22 -0
- package/build/graphql/queries/EnvironmentVariablesQuery.js +106 -0
- package/build/graphql/types/EnvironmentVariable.d.ts +1 -0
- package/build/graphql/types/EnvironmentVariable.js +16 -0
- 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/formatVariable.d.ts +2 -0
- package/build/utils/formatVariable.js +16 -0
- package/build/utils/image.js +2 -2
- package/build/utils/progress.js +1 -1
- package/build/utils/promise.js +1 -1
- package/build/utils/prompts.d.ts +9 -0
- package/build/utils/prompts.js +68 -0
- 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 +627 -22
- package/package.json +15 -15
|
@@ -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;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatVariable = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const dateformat_1 = tslib_1.__importDefault(require("dateformat"));
|
|
6
|
+
const formatFields_1 = tslib_1.__importDefault(require("./formatFields"));
|
|
7
|
+
function formatVariable(variable) {
|
|
8
|
+
return (0, formatFields_1.default)([
|
|
9
|
+
{ label: 'ID', value: variable.id },
|
|
10
|
+
{ label: 'Name', value: variable.name },
|
|
11
|
+
{ label: 'Value', value: variable.value ?? '(secret)' },
|
|
12
|
+
{ label: 'Scope', value: variable.scope },
|
|
13
|
+
{ label: 'Created at', value: (0, dateformat_1.default)(variable.createdAt, 'mmm dd HH:MM:ss') },
|
|
14
|
+
]);
|
|
15
|
+
}
|
|
16
|
+
exports.formatVariable = formatVariable;
|
package/build/utils/image.js
CHANGED
|
@@ -15,7 +15,7 @@ async function ensurePNGIsNotTransparentAsync(imagePathOrURL) {
|
|
|
15
15
|
let hasAlreadyResolved = false;
|
|
16
16
|
const stream = await getImageStreamAsync(imagePathOrURL);
|
|
17
17
|
let metadata;
|
|
18
|
-
|
|
18
|
+
await new Promise((res, rej) => {
|
|
19
19
|
stream
|
|
20
20
|
.pipe(new pngjs_1.PNG({ filterType: 4 }))
|
|
21
21
|
.on('error', err => {
|
|
@@ -59,7 +59,7 @@ async function ensurePNGIsNotTransparentAsync(imagePathOrURL) {
|
|
|
59
59
|
exports.ensurePNGIsNotTransparentAsync = ensurePNGIsNotTransparentAsync;
|
|
60
60
|
async function isPNGAsync(imagePathOrURL) {
|
|
61
61
|
const stream = await getImageStreamAsync(imagePathOrURL);
|
|
62
|
-
return new Promise((res, rej) => {
|
|
62
|
+
return await new Promise((res, rej) => {
|
|
63
63
|
stream
|
|
64
64
|
.pipe(new pngjs_1.PNG({ filterType: 4 }))
|
|
65
65
|
.on('error', err => {
|
package/build/utils/progress.js
CHANGED
|
@@ -21,7 +21,7 @@ function createProgressTracker({ total, message, completedMessage, }) {
|
|
|
21
21
|
return ({ progress, isComplete, error }) => {
|
|
22
22
|
if (progress) {
|
|
23
23
|
if (!bar && (progress.total !== undefined || total !== undefined)) {
|
|
24
|
-
calcTotal =
|
|
24
|
+
calcTotal = total ?? progress.total;
|
|
25
25
|
bar = (0, ora_1.ora)(getMessage(0, calcTotal)).start();
|
|
26
26
|
(0, timer_1.startTimer)(timerLabel);
|
|
27
27
|
}
|
package/build/utils/promise.js
CHANGED
|
@@ -8,6 +8,6 @@ exports.sleepAsync = void 0;
|
|
|
8
8
|
* @returns A promise that resolves after the provided number of milliseconds.
|
|
9
9
|
*/
|
|
10
10
|
async function sleepAsync(ms) {
|
|
11
|
-
|
|
11
|
+
await new Promise(res => setTimeout(res, ms));
|
|
12
12
|
}
|
|
13
13
|
exports.sleepAsync = sleepAsync;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EnvironmentVariableEnvironment } from '../graphql/generated';
|
|
2
|
+
export declare function promptVariableEnvironmentAsync(nonInteractive: boolean): Promise<EnvironmentVariableEnvironment>;
|
|
3
|
+
export declare function promptVariableValueAsync({ nonInteractive, required, hidden, initial, }: {
|
|
4
|
+
nonInteractive: boolean;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
initial?: string | null;
|
|
7
|
+
hidden?: boolean;
|
|
8
|
+
}): Promise<string>;
|
|
9
|
+
export declare function promptVariableNameAsync(nonInteractive: boolean): Promise<string>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.promptVariableNameAsync = exports.promptVariableValueAsync = exports.promptVariableEnvironmentAsync = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
|
+
const generated_1 = require("../graphql/generated");
|
|
7
|
+
const prompts_1 = require("../prompts");
|
|
8
|
+
async function promptVariableEnvironmentAsync(nonInteractive) {
|
|
9
|
+
if (nonInteractive) {
|
|
10
|
+
throw new Error('The `--environment` flag must be set when running in `--non-interactive` mode.');
|
|
11
|
+
}
|
|
12
|
+
return await (0, prompts_1.selectAsync)('Select environment:', [
|
|
13
|
+
{ title: 'Development', value: generated_1.EnvironmentVariableEnvironment.Development },
|
|
14
|
+
{ title: 'Preview', value: generated_1.EnvironmentVariableEnvironment.Preview },
|
|
15
|
+
{ title: 'Production', value: generated_1.EnvironmentVariableEnvironment.Production },
|
|
16
|
+
]);
|
|
17
|
+
}
|
|
18
|
+
exports.promptVariableEnvironmentAsync = promptVariableEnvironmentAsync;
|
|
19
|
+
async function promptVariableValueAsync({ nonInteractive, required = true, hidden = false, initial, }) {
|
|
20
|
+
if (nonInteractive && required) {
|
|
21
|
+
throw new Error(`Environment variable needs 'value' to be specified when running in non-interactive mode. Run the command with ${chalk_1.default.bold('--value VARIABLE_VALUE')} flag to fix the issue`);
|
|
22
|
+
}
|
|
23
|
+
const { variableValue } = await (0, prompts_1.promptAsync)({
|
|
24
|
+
type: hidden ? 'password' : 'text',
|
|
25
|
+
name: 'variableValue',
|
|
26
|
+
message: 'Variable value:',
|
|
27
|
+
initial: initial ?? '',
|
|
28
|
+
validate: variableValue => {
|
|
29
|
+
if (!required) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
if (!variableValue || variableValue.trim() === '') {
|
|
33
|
+
return "Environment variable value can't be empty";
|
|
34
|
+
}
|
|
35
|
+
return true;
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
if (!variableValue && required) {
|
|
39
|
+
throw new Error(`Environment variable needs 'value' to be specifed. Run the command again with ${chalk_1.default.bold('--value VARIABLE_VALUE')} flag or provide it interactively to fix the issue.`);
|
|
40
|
+
}
|
|
41
|
+
return variableValue;
|
|
42
|
+
}
|
|
43
|
+
exports.promptVariableValueAsync = promptVariableValueAsync;
|
|
44
|
+
async function promptVariableNameAsync(nonInteractive) {
|
|
45
|
+
const validationMessage = 'Variable name may not be empty.';
|
|
46
|
+
if (nonInteractive) {
|
|
47
|
+
throw new Error(validationMessage);
|
|
48
|
+
}
|
|
49
|
+
const { name } = await (0, prompts_1.promptAsync)({
|
|
50
|
+
type: 'text',
|
|
51
|
+
name: 'name',
|
|
52
|
+
message: `Variable name:`,
|
|
53
|
+
validate: value => {
|
|
54
|
+
if (!value) {
|
|
55
|
+
return validationMessage;
|
|
56
|
+
}
|
|
57
|
+
if (!value.match(/^\w+$/)) {
|
|
58
|
+
return 'Names may contain only letters, numbers, and underscores.';
|
|
59
|
+
}
|
|
60
|
+
return true;
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
if (!name) {
|
|
64
|
+
throw new Error(validationMessage);
|
|
65
|
+
}
|
|
66
|
+
return name;
|
|
67
|
+
}
|
|
68
|
+
exports.promptVariableNameAsync = promptVariableNameAsync;
|
package/build/utils/queries.js
CHANGED
|
@@ -6,7 +6,7 @@ const uniqBy_1 = tslib_1.__importDefault(require("./expodash/uniqBy"));
|
|
|
6
6
|
const prompts_1 = require("../prompts");
|
|
7
7
|
const fetchMoreValue = '_fetchMore';
|
|
8
8
|
async function paginatedQueryWithConfirmPromptAsync(queryArgs) {
|
|
9
|
-
|
|
9
|
+
await paginatedQueryWithConfirmPromptInternalAsync(queryArgs, []);
|
|
10
10
|
}
|
|
11
11
|
exports.paginatedQueryWithConfirmPromptAsync = paginatedQueryWithConfirmPromptAsync;
|
|
12
12
|
async function paginatedQueryWithConfirmPromptInternalAsync({ limit, offset, queryToPerform, promptOptions, }, accumulator) {
|
|
@@ -21,7 +21,7 @@ async function paginatedQueryWithConfirmPromptInternalAsync({ limit, offset, que
|
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
23
|
if (await (0, prompts_1.confirmAsync)({ message: promptOptions.title })) {
|
|
24
|
-
|
|
24
|
+
await paginatedQueryWithConfirmPromptInternalAsync({
|
|
25
25
|
limit,
|
|
26
26
|
offset: offset + limit,
|
|
27
27
|
queryToPerform,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Client } from '../vcs';
|
|
2
2
|
export default class GitClient extends Client {
|
|
3
|
-
private maybeCwdOverride?;
|
|
3
|
+
private readonly maybeCwdOverride?;
|
|
4
4
|
constructor(maybeCwdOverride?: string | undefined);
|
|
5
5
|
ensureRepoExistsAsync(): Promise<void>;
|
|
6
6
|
commitAsync({ commitMessage, commitAllFiles, nonInteractive, }: {
|
package/build/vcs/local.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare function getRootPath(): string;
|
|
|
10
10
|
* - if .easignore exists, .gitignore files are not used.
|
|
11
11
|
*/
|
|
12
12
|
export declare class Ignore {
|
|
13
|
-
private rootDir;
|
|
13
|
+
private readonly rootDir;
|
|
14
14
|
private ignoreMapping;
|
|
15
15
|
constructor(rootDir: string);
|
|
16
16
|
initIgnoreAsync(): Promise<void>;
|