eas-cli 21.8.0 → 22.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 +166 -156
- package/build/build/android/prepareJob.js +1 -0
- package/build/build/ios/prepareJob.js +1 -0
- package/build/build/metadata.js +0 -1
- package/build/build/runBuildAndSubmit.js +1 -1
- package/build/build/utils/formatBuild.js +2 -2
- package/build/build/utils/url.js +3 -5
- package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +10 -3
- package/build/commandUtils/new/configs.js +1 -1
- package/build/commands/account/view.js +1 -2
- package/build/commands/build/cancel.js +3 -3
- package/build/commands/build/download.js +1 -1
- package/build/commands/go.js +2 -45
- package/build/commands/project/icon/set.js +4 -40
- package/build/commands/project/init.d.ts +1 -0
- package/build/commands/project/init.js +13 -0
- package/build/commands/submit.d.ts +1 -0
- package/build/commands/submit.js +8 -1
- package/build/commands/update/index.js +1 -1
- package/build/commands/update/revert-update-rollout.js +1 -1
- package/build/commands/update/rollback.js +1 -1
- package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +20 -13
- package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.d.ts +14 -2
- package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +47 -7
- package/build/credentials/ios/appstore/ensureTestFlightGroup.d.ts +3 -1
- package/build/credentials/ios/appstore/ensureTestFlightGroup.js +14 -11
- package/build/graphql/generated.d.ts +596 -922
- package/build/graphql/generated.js +12 -2
- package/build/graphql/queries/ChannelInsightsQuery.js +4 -1
- package/build/graphql/types/Account.js +1 -4
- package/build/graphql/types/Build.js +13 -8
- package/build/graphql/types/Submission.js +0 -1
- package/build/graphql/types/Update.js +4 -1
- package/build/project/accountSelection.js +1 -3
- package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.js +3 -5
- package/build/project/projectIcon.d.ts +40 -0
- package/build/project/projectIcon.js +132 -0
- package/build/project/projectNotConfiguredError.d.ts +17 -0
- package/build/project/projectNotConfiguredError.js +24 -0
- package/build/submit/ArchiveSource.js +3 -3
- package/build/submit/context.d.ts +2 -0
- package/build/submit/context.js +1 -0
- package/build/submit/ios/AppProduce.js +1 -1
- package/build/submit/ios/IosSubmitCommand.js +2 -0
- package/build/submit/ios/ensureTestFlightSetup.d.ts +7 -0
- package/build/submit/ios/ensureTestFlightSetup.js +81 -0
- package/build/submit/status.js +1 -1
- package/build/submit/utils/formatSubmission.js +2 -2
- package/build/update/queries.js +1 -1
- package/build/update/republish.js +3 -3
- package/build/update/roll-back-to-embedded.js +1 -1
- package/build/update/utils.d.ts +2 -1
- package/build/update/utils.js +7 -7
- package/build/user/User.js +1 -1
- package/oclif.manifest.json +2323 -2311
- package/package.json +6 -6
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.BuildWorkflow = exports.BuildTrigger = exports.BuildStatus = exports.BuildRetryDisabledReason = exports.BuildResourceClass = exports.BuildPriority = exports.BuildPhase = exports.BuildMode = exports.BuildLimitThresholdExceededMetadataType = exports.BuildIosEnterpriseProvisioning = exports.BuildCredentialsSource = exports.BuildAnnotationType = exports.BackgroundJobState = exports.BackgroundJobResultType = exports.AuthProviderIdentifier = exports.AuthProtocolType = exports.AuditLogsExportFormat = exports.AssetMetadataStatus = exports.AssetMapSourceType = exports.AppleTeamType = exports.AppleDeviceClass = exports.AppUploadSessionType = exports.AppStoreConnectWorkflowConnectionStatus = exports.AppStoreConnectUserRole = exports.AppStoreConnectBuildUploadState = exports.AppStoreConnectBuildProcessingState = exports.AppProfileImageWidth = exports.AppPrivacy = exports.AppPlatform = exports.AppObserveUpdatesOrderByField = exports.AppObserveUpdatesOrderByDirection = exports.AppObservePropertyType = exports.AppObservePlatform = exports.AppObserveNavigationRoutesOrderByField = exports.AppObserveEventsOrderByField = exports.AppObserveEventsOrderByDirection = exports.AppObserveErrorSeverity = exports.AppObserveErrorGroupsOrderBy = exports.AppObserveErrorBreakdownDimension = exports.AppObserveCustomEventNamesOrderByField = exports.AppObserveCustomEventNamesOrderByDirection = exports.AppObserveCustomEventListOrderByField = exports.AppInternalDistributionBuildPrivacy = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AndroidBuildType = exports.ActivityTimelineProjectActivityType = exports.AccountUploadSessionType = exports.AccountMemberType = exports.AccountAppsSortByField = void 0;
|
|
10
10
|
exports.IosManagedBuildType = exports.IosDistributionType = exports.IosBuildType = exports.InvoiceDiscountType = exports.InsightsFilterType = exports.GitHubJobRunTriggerType = exports.GitHubJobRunTriggerRunStatus = exports.GitHubJobRunJobType = exports.GitHubBuildTriggerType = exports.GitHubBuildTriggerRunStatus = exports.GitHubBuildTriggerExecutionBehavior = exports.GitHubAppInstallationStatus = exports.GitHubAppInstallationAccountType = exports.GitHubAppEnvironment = exports.FingerprintSourceType = exports.Feature = exports.Experiment = exports.ExitInterviewOutcome = exports.ExitInterviewMessageRole = exports.EnvironmentVariableVisibility = exports.EnvironmentVariableScope = exports.EnvironmentSecretType = exports.EntityTypeName = exports.EchoVersionSource = exports.EchoTurnCompletionStatus = exports.EchoProjectVisibility = exports.EchoProjectUploadSessionType = exports.EchoProjectIconSource = exports.EchoMessageRole = exports.EchoMessagePartType = exports.EchoChatState = exports.EchoChangeType = exports.EchoBuildStatus = exports.EchoAgentType = exports.EasTotalPlanEnablementUnit = exports.EasServiceMetric = exports.EasService = exports.EasBuildWaiverType = exports.EasBuildDeprecationInfoType = exports.EasBuildBillingResourceClass = exports.DistributionType = exports.DeviceRunSessionType = exports.DeviceRunSessionStatus = exports.DashboardViewPin = exports.DashboardChatMessageStatus = exports.DashboardChatMessageRole = exports.CustomDomainStatus = exports.CustomDomainDnsRecordType = exports.CrashSampleFor = exports.ContinentCode = void 0;
|
|
11
|
-
exports.
|
|
12
|
-
exports.WorkflowsInsightsRunsOverTimeGranularity = exports.WorkflowsInsightsExportFormat = exports.WorkflowRunTriggerEventType = exports.WorkflowRunStatus = exports.WorkflowProjectSourceType = exports.WorkflowJobType = exports.WorkflowJobStatus = exports.WorkflowJobReviewDecision = exports.WorkflowDispatchInputType = exports.WorkflowDeviceTestCaseStatusFilter = exports.WorkflowDeviceTestCaseStatus = exports.WorkflowDeviceTestCaseStatSortField = exports.WorkflowDeviceTestCaseSortDirection = exports.WorkflowDeviceTestCaseInsightsTimeSeriesGranularity = exports.WorkflowArtifactStorageType = void 0;
|
|
11
|
+
exports.WorkerDeploymentCrashKind = exports.WebhookType = exports.UserSpecifiedAccountUsage = exports.UserEntityTypeName = exports.UserAgentPlatform = exports.UserAgentOs = exports.UserAgentBrowser = exports.UsageMetricsGranularity = exports.UsageMetricType = exports.UploadSessionType = exports.UpdatesTimelineItemType = exports.UpdateDiffReceiptStateValue = exports.UpdateDiffReceiptOrderByField = exports.UpdateDiffReceiptOrderByDirection = exports.TurtleSshTransportType = exports.TargetEntityMutationType = exports.SubmissionStatus = exports.SubmissionPriority = exports.SubmissionArchiveSourceType = exports.SubmissionAndroidReleaseStatus = exports.StatuspageServiceStatus = exports.StatuspageServiceName = exports.StatuspageIncidentStatus = exports.StatuspageIncidentImpact = exports.StandardOffer = exports.SecondFactorMethod = exports.Role = exports.ResponseType = exports.ResponseStatusType = exports.ResponseCacheStatus = exports.ResourceClassExperiment = exports.RequestsOrderByField = exports.RequestsOrderByDirection = exports.RequestMethod = exports.RealtimeLogsTargetType = exports.ProjectArchiveSourceType = exports.PostHogRegion = exports.PostHogDeepLinkPurpose = exports.Permission = exports.Order = exports.OnboardingEnvironment = exports.OnboardingDeviceType = exports.OfferType = exports.OAuthProvider = exports.NotificationType = exports.NotificationEvent = exports.LocalBuildArchiveSourceType = exports.JobRunStatus = exports.JobRunPriority = exports.IosSchemeBuildConfiguration = void 0;
|
|
12
|
+
exports.WorkflowsInsightsRunsOverTimeGranularity = exports.WorkflowsInsightsExportFormat = exports.WorkflowRunTriggerEventType = exports.WorkflowRunStatus = exports.WorkflowProjectSourceType = exports.WorkflowJobType = exports.WorkflowJobStatus = exports.WorkflowJobReviewDecision = exports.WorkflowDispatchInputType = exports.WorkflowDeviceTestCaseStatusFilter = exports.WorkflowDeviceTestCaseStatus = exports.WorkflowDeviceTestCaseStatSortField = exports.WorkflowDeviceTestCaseSortDirection = exports.WorkflowDeviceTestCaseInsightsTimeSeriesGranularity = exports.WorkflowArtifactStorageType = exports.WorkerLoggerLevel = exports.WorkerDeploymentLogLevel = void 0;
|
|
13
13
|
var AccountAppsSortByField;
|
|
14
14
|
(function (AccountAppsSortByField) {
|
|
15
15
|
AccountAppsSortByField["LatestActivityTime"] = "LATEST_ACTIVITY_TIME";
|
|
@@ -341,6 +341,7 @@ var BuildPhase;
|
|
|
341
341
|
BuildPhase["SaveCache"] = "SAVE_CACHE";
|
|
342
342
|
BuildPhase["SetUpBuildEnvironment"] = "SET_UP_BUILD_ENVIRONMENT";
|
|
343
343
|
BuildPhase["SpinUpBuilder"] = "SPIN_UP_BUILDER";
|
|
344
|
+
BuildPhase["SshSession"] = "SSH_SESSION";
|
|
344
345
|
BuildPhase["StartBuild"] = "START_BUILD";
|
|
345
346
|
BuildPhase["Unknown"] = "UNKNOWN";
|
|
346
347
|
BuildPhase["UploadApplicationArchive"] = "UPLOAD_APPLICATION_ARCHIVE";
|
|
@@ -848,6 +849,11 @@ var ProjectArchiveSourceType;
|
|
|
848
849
|
ProjectArchiveSourceType["None"] = "NONE";
|
|
849
850
|
ProjectArchiveSourceType["Url"] = "URL";
|
|
850
851
|
})(ProjectArchiveSourceType || (exports.ProjectArchiveSourceType = ProjectArchiveSourceType = {}));
|
|
852
|
+
var RealtimeLogsTargetType;
|
|
853
|
+
(function (RealtimeLogsTargetType) {
|
|
854
|
+
RealtimeLogsTargetType["Build"] = "BUILD";
|
|
855
|
+
RealtimeLogsTargetType["JobRun"] = "JOB_RUN";
|
|
856
|
+
})(RealtimeLogsTargetType || (exports.RealtimeLogsTargetType = RealtimeLogsTargetType = {}));
|
|
851
857
|
var RequestMethod;
|
|
852
858
|
(function (RequestMethod) {
|
|
853
859
|
RequestMethod["Delete"] = "DELETE";
|
|
@@ -1003,6 +1009,10 @@ var TargetEntityMutationType;
|
|
|
1003
1009
|
TargetEntityMutationType["Delete"] = "DELETE";
|
|
1004
1010
|
TargetEntityMutationType["Update"] = "UPDATE";
|
|
1005
1011
|
})(TargetEntityMutationType || (exports.TargetEntityMutationType = TargetEntityMutationType = {}));
|
|
1012
|
+
var TurtleSshTransportType;
|
|
1013
|
+
(function (TurtleSshTransportType) {
|
|
1014
|
+
TurtleSshTransportType["UptermV1"] = "UPTERM_V1";
|
|
1015
|
+
})(TurtleSshTransportType || (exports.TurtleSshTransportType = TurtleSshTransportType = {}));
|
|
1006
1016
|
var UpdateDiffReceiptOrderByDirection;
|
|
1007
1017
|
(function (UpdateDiffReceiptOrderByDirection) {
|
|
1008
1018
|
UpdateDiffReceiptOrderByDirection["Asc"] = "ASC";
|
|
@@ -32,26 +32,31 @@ exports.BuildFragmentNode = (0, graphql_tag_1.default) `
|
|
|
32
32
|
displayName
|
|
33
33
|
}
|
|
34
34
|
logFiles
|
|
35
|
-
|
|
35
|
+
app {
|
|
36
36
|
__typename
|
|
37
37
|
id
|
|
38
38
|
name
|
|
39
39
|
slug
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
name
|
|
44
|
-
}
|
|
40
|
+
ownerAccount {
|
|
41
|
+
id
|
|
42
|
+
name
|
|
45
43
|
}
|
|
46
44
|
}
|
|
47
|
-
|
|
45
|
+
updateChannel {
|
|
46
|
+
id
|
|
47
|
+
name
|
|
48
|
+
}
|
|
48
49
|
distribution
|
|
49
50
|
iosEnterpriseProvisioning
|
|
50
51
|
buildProfile
|
|
52
|
+
appIdentifier
|
|
51
53
|
sdkVersion
|
|
52
54
|
appVersion
|
|
53
55
|
appBuildVersion
|
|
54
|
-
|
|
56
|
+
runtime {
|
|
57
|
+
id
|
|
58
|
+
version
|
|
59
|
+
}
|
|
55
60
|
gitCommitHash
|
|
56
61
|
gitCommitMessage
|
|
57
62
|
initialQueuePosition
|
|
@@ -4,9 +4,7 @@ exports.getAccountNamesWhereUserHasSufficientPermissionsToCreateApp = getAccount
|
|
|
4
4
|
exports.getAccountChoices = getAccountChoices;
|
|
5
5
|
const generated_1 = require("../graphql/generated");
|
|
6
6
|
function getAccountNamesWhereUserHasSufficientPermissionsToCreateApp(actor) {
|
|
7
|
-
return new Set(actor.accounts
|
|
8
|
-
.filter(a => a.users.find(it => it.actor.id === actor.id)?.role !== generated_1.Role.ViewOnly)
|
|
9
|
-
.map(it => it.name));
|
|
7
|
+
return new Set(actor.accounts.filter(a => a.viewerUserPermission.role !== generated_1.Role.ViewOnly).map(it => it.name));
|
|
10
8
|
}
|
|
11
9
|
function getAccountChoices(actor, namesWithSufficientPermissions) {
|
|
12
10
|
const allAccounts = actor.accounts;
|
|
@@ -4,6 +4,7 @@ exports.fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync = fetchOrCre
|
|
|
4
4
|
exports.findProjectIdByAccountNameAndSlugNullableAsync = findProjectIdByAccountNameAndSlugNullableAsync;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
6
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
7
|
+
const projectNotConfiguredError_1 = require("./projectNotConfiguredError");
|
|
7
8
|
const url_1 = require("../build/utils/url");
|
|
8
9
|
const generated_1 = require("../graphql/generated");
|
|
9
10
|
const AppMutation_1 = require("../graphql/mutations/AppMutation");
|
|
@@ -11,7 +12,6 @@ const AppQuery_1 = require("../graphql/queries/AppQuery");
|
|
|
11
12
|
const log_1 = require("../log");
|
|
12
13
|
const ora_1 = require("../ora");
|
|
13
14
|
const prompts_1 = require("../prompts");
|
|
14
|
-
const User_1 = require("../user/User");
|
|
15
15
|
/**
|
|
16
16
|
* 1. Looks for an existing project on EAS servers. If found, ask the user whether this is the
|
|
17
17
|
* project they would like to link. If yes, return that. If not, throw.
|
|
@@ -22,11 +22,9 @@ async function fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync(graph
|
|
|
22
22
|
const { accountName, projectName } = projectInfo;
|
|
23
23
|
const projectFullName = `@${accountName}/${projectName}`;
|
|
24
24
|
const allAccounts = actor.accounts;
|
|
25
|
-
const accountNamesWhereUserHasSufficientPublishPermissions = new Set(allAccounts
|
|
26
|
-
.filter(a => a.users.find(it => it.actor.id === actor.id)?.role !== generated_1.Role.ViewOnly)
|
|
27
|
-
.map(it => it.name));
|
|
25
|
+
const accountNamesWhereUserHasSufficientPublishPermissions = new Set(allAccounts.filter(a => a.viewerUserPermission.role !== generated_1.Role.ViewOnly).map(it => it.name));
|
|
28
26
|
if (options.nonInteractive) {
|
|
29
|
-
throw
|
|
27
|
+
throw (0, projectNotConfiguredError_1.getUnconfiguredProjectError)({ actor, accountName });
|
|
30
28
|
}
|
|
31
29
|
const account = allAccounts.find(a => a.name === accountName);
|
|
32
30
|
if (!account) {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
+
/** An icon found in the app config, with the field it came from for display purposes. */
|
|
3
|
+
export interface AppConfigIcon {
|
|
4
|
+
field: string;
|
|
5
|
+
path: string;
|
|
6
|
+
}
|
|
7
|
+
export type SetProjectIconFromAppConfigResult = {
|
|
8
|
+
status: 'set';
|
|
9
|
+
icon: AppConfigIcon;
|
|
10
|
+
} | {
|
|
11
|
+
status: 'skipped';
|
|
12
|
+
reason: 'no-icon-in-app-config' | 'icon-already-set' | 'invalid-icon' | 'upload-failed';
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Set the project icon from the app config, but only when the project does not have one yet.
|
|
16
|
+
* Overwriting an icon picked on the dashboard would be surprising, and the app config is not the
|
|
17
|
+
* source of truth for it.
|
|
18
|
+
*
|
|
19
|
+
* Never throws. The project is already created or linked by the time this runs, so a failed icon
|
|
20
|
+
* upload must not fail the command that called it.
|
|
21
|
+
*/
|
|
22
|
+
export declare function maybeSetProjectIconFromAppConfigAsync(graphqlClient: ExpoGraphqlClient, { projectId, projectDir }: {
|
|
23
|
+
projectId: string;
|
|
24
|
+
projectDir: string;
|
|
25
|
+
}): Promise<SetProjectIconFromAppConfigResult>;
|
|
26
|
+
/**
|
|
27
|
+
* Find the app icon on disk. Falls through to the platform-specific icons so that a project that
|
|
28
|
+
* only sets `ios.icon` or an Android adaptive icon still gets one.
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveAppConfigIconAsync(projectDir: string): Promise<AppConfigIcon | null>;
|
|
31
|
+
export declare function validateIconAsync(imagePath: string): Promise<void>;
|
|
32
|
+
export declare function uploadProjectIconAsync(graphqlClient: ExpoGraphqlClient, { projectId, imagePath }: {
|
|
33
|
+
projectId: string;
|
|
34
|
+
imagePath: string;
|
|
35
|
+
}): Promise<void>;
|
|
36
|
+
export declare function pollForProfileImageChangeAsync(graphqlClient: ExpoGraphqlClient, { projectId, previousProfileImageUrl, projectDashboardUrl, }: {
|
|
37
|
+
projectId: string;
|
|
38
|
+
previousProfileImageUrl: string | null;
|
|
39
|
+
projectDashboardUrl: string;
|
|
40
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.maybeSetProjectIconFromAppConfigAsync = maybeSetProjectIconFromAppConfigAsync;
|
|
4
|
+
exports.resolveAppConfigIconAsync = resolveAppConfigIconAsync;
|
|
5
|
+
exports.validateIconAsync = validateIconAsync;
|
|
6
|
+
exports.uploadProjectIconAsync = uploadProjectIconAsync;
|
|
7
|
+
exports.pollForProfileImageChangeAsync = pollForProfileImageChangeAsync;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
9
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
10
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
11
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
12
|
+
const expoConfig_1 = require("./expoConfig");
|
|
13
|
+
const generated_1 = require("../graphql/generated");
|
|
14
|
+
const AppQuery_1 = require("../graphql/queries/AppQuery");
|
|
15
|
+
const log_1 = tslib_1.__importDefault(require("../log"));
|
|
16
|
+
const uploads_1 = require("../uploads");
|
|
17
|
+
const promise_1 = require("../utils/promise");
|
|
18
|
+
const ALLOWED_EXTENSIONS = ['.png', '.jpg', '.jpeg'];
|
|
19
|
+
const MAX_IMAGE_SIZE_BYTES = 10 * 1024 * 1024; // matches the upload session's GCS limit
|
|
20
|
+
const POLL_INTERVAL_MS = 2000;
|
|
21
|
+
const POLL_TIMEOUT_MS = 90_000;
|
|
22
|
+
/**
|
|
23
|
+
* Set the project icon from the app config, but only when the project does not have one yet.
|
|
24
|
+
* Overwriting an icon picked on the dashboard would be surprising, and the app config is not the
|
|
25
|
+
* source of truth for it.
|
|
26
|
+
*
|
|
27
|
+
* Never throws. The project is already created or linked by the time this runs, so a failed icon
|
|
28
|
+
* upload must not fail the command that called it.
|
|
29
|
+
*/
|
|
30
|
+
async function maybeSetProjectIconFromAppConfigAsync(graphqlClient, { projectId, projectDir }) {
|
|
31
|
+
const icon = await resolveAppConfigIconAsync(projectDir);
|
|
32
|
+
if (!icon) {
|
|
33
|
+
return { status: 'skipped', reason: 'no-icon-in-app-config' };
|
|
34
|
+
}
|
|
35
|
+
try {
|
|
36
|
+
await validateIconAsync(icon.path);
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
log_1.default.warn(`Did not set the project icon from "${icon.field}": ${error.message}`);
|
|
40
|
+
return { status: 'skipped', reason: 'invalid-icon' };
|
|
41
|
+
}
|
|
42
|
+
const existingIconUrl = await AppQuery_1.AppQuery.byIdProfileImageUrlAsync(graphqlClient, projectId);
|
|
43
|
+
if (existingIconUrl) {
|
|
44
|
+
log_1.default.debug('The project already has an icon, skipping the icon from the app config.');
|
|
45
|
+
return { status: 'skipped', reason: 'icon-already-set' };
|
|
46
|
+
}
|
|
47
|
+
try {
|
|
48
|
+
await uploadProjectIconAsync(graphqlClient, { projectId, imagePath: icon.path });
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
log_1.default.warn(`Failed to set the project icon from "${icon.field}": ${error.message}`);
|
|
52
|
+
return { status: 'skipped', reason: 'upload-failed' };
|
|
53
|
+
}
|
|
54
|
+
// The server resizes the image and assigns it to the project asynchronously. Callers that need
|
|
55
|
+
// the icon to be visible before they return should poll with pollForProfileImageChangeAsync.
|
|
56
|
+
log_1.default.withTick(`Set the project icon from ${chalk_1.default.bold(icon.field)} in your app config`);
|
|
57
|
+
return { status: 'set', icon };
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Find the app icon on disk. Falls through to the platform-specific icons so that a project that
|
|
61
|
+
* only sets `ios.icon` or an Android adaptive icon still gets one.
|
|
62
|
+
*/
|
|
63
|
+
async function resolveAppConfigIconAsync(projectDir) {
|
|
64
|
+
let exp;
|
|
65
|
+
try {
|
|
66
|
+
exp = await (0, expoConfig_1.getPrivateExpoConfigAsync)(projectDir);
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
log_1.default.debug(`Could not read the app config to resolve the project icon: ${error.message}`);
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
const candidates = [
|
|
73
|
+
['icon', exp.icon],
|
|
74
|
+
['ios.icon', exp.ios?.icon],
|
|
75
|
+
['android.adaptiveIcon.foregroundImage', exp.android?.adaptiveIcon?.foregroundImage],
|
|
76
|
+
];
|
|
77
|
+
for (const [field, value] of candidates) {
|
|
78
|
+
const iconPath = resolveLocalIconPath(projectDir, value);
|
|
79
|
+
if (iconPath && (await fs_extra_1.default.pathExists(iconPath))) {
|
|
80
|
+
return { field, path: iconPath };
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
function resolveLocalIconPath(projectDir, value) {
|
|
86
|
+
// SDK 52 and above allow `ios.icon` to be a per-appearance map. The light icon is the one shown
|
|
87
|
+
// in most places, so it is the closest match for a single project icon.
|
|
88
|
+
let rawPath = null;
|
|
89
|
+
if (typeof value === 'string') {
|
|
90
|
+
rawPath = value;
|
|
91
|
+
}
|
|
92
|
+
else if (value && typeof value === 'object' && typeof value.light === 'string') {
|
|
93
|
+
rawPath = value.light;
|
|
94
|
+
}
|
|
95
|
+
// Remote icons (http://, https://, data:) are not files we can upload. The scheme must be at
|
|
96
|
+
// least two characters so that a Windows drive letter is still treated as a path.
|
|
97
|
+
if (!rawPath || /^[a-z][a-z0-9+.-]+:/i.test(rawPath)) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
return path_1.default.resolve(projectDir, rawPath);
|
|
101
|
+
}
|
|
102
|
+
async function validateIconAsync(imagePath) {
|
|
103
|
+
if (!(await fs_extra_1.default.pathExists(imagePath))) {
|
|
104
|
+
throw new Error(`No file found at ${imagePath}`);
|
|
105
|
+
}
|
|
106
|
+
const extension = path_1.default.extname(imagePath).toLowerCase();
|
|
107
|
+
if (!ALLOWED_EXTENSIONS.includes(extension)) {
|
|
108
|
+
throw new Error(`Unsupported image format "${extension}". The icon must be a PNG or JPEG file.`);
|
|
109
|
+
}
|
|
110
|
+
const { size } = await fs_extra_1.default.stat(imagePath);
|
|
111
|
+
if (size > MAX_IMAGE_SIZE_BYTES) {
|
|
112
|
+
throw new Error(`The image is ${(size / 1024 / 1024).toFixed(1)} MB, but the maximum allowed size is 10 MB.`);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
async function uploadProjectIconAsync(graphqlClient, { projectId, imagePath }) {
|
|
116
|
+
await (0, uploads_1.uploadAppScopedFileAtPathToGCSAsync)(graphqlClient, {
|
|
117
|
+
type: generated_1.AppUploadSessionType.ProfileImageUpload,
|
|
118
|
+
appId: projectId,
|
|
119
|
+
path: imagePath,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
async function pollForProfileImageChangeAsync(graphqlClient, { projectId, previousProfileImageUrl, projectDashboardUrl, }) {
|
|
123
|
+
const startTime = Date.now();
|
|
124
|
+
while (Date.now() - startTime < POLL_TIMEOUT_MS) {
|
|
125
|
+
await (0, promise_1.sleepAsync)(POLL_INTERVAL_MS);
|
|
126
|
+
const profileImageUrl = await AppQuery_1.AppQuery.byIdProfileImageUrlAsync(graphqlClient, projectId);
|
|
127
|
+
if (profileImageUrl && profileImageUrl !== previousProfileImageUrl) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
throw new Error(`Timed out waiting for the icon to be processed. It may still appear on the project page shortly: ${chalk_1.default.underline(projectDashboardUrl)}`);
|
|
132
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Actor } from '../user/User';
|
|
2
|
+
/**
|
|
3
|
+
* Build the error shown when an EAS project is not configured and the CLI cannot configure it
|
|
4
|
+
* without more input. Lists the exact commands to run, because bare "eas init" also needs
|
|
5
|
+
* interaction and fails in the same situation.
|
|
6
|
+
*
|
|
7
|
+
* @param actor the logged-in actor
|
|
8
|
+
* @param accountName the account that should own the project, when it is already known
|
|
9
|
+
* @param reason why the CLI cannot configure the project here
|
|
10
|
+
* @param additionalFix an extra way to resolve the error, appended at the end
|
|
11
|
+
*/
|
|
12
|
+
export declare function getUnconfiguredProjectError({ actor, accountName, reason, additionalFix, }: {
|
|
13
|
+
actor: Actor;
|
|
14
|
+
accountName?: string;
|
|
15
|
+
reason?: string;
|
|
16
|
+
additionalFix?: string;
|
|
17
|
+
}): Error;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUnconfiguredProjectError = getUnconfiguredProjectError;
|
|
4
|
+
const User_1 = require("../user/User");
|
|
5
|
+
/**
|
|
6
|
+
* Build the error shown when an EAS project is not configured and the CLI cannot configure it
|
|
7
|
+
* without more input. Lists the exact commands to run, because bare "eas init" also needs
|
|
8
|
+
* interaction and fails in the same situation.
|
|
9
|
+
*
|
|
10
|
+
* @param actor the logged-in actor
|
|
11
|
+
* @param accountName the account that should own the project, when it is already known
|
|
12
|
+
* @param reason why the CLI cannot configure the project here
|
|
13
|
+
* @param additionalFix an extra way to resolve the error, appended at the end
|
|
14
|
+
*/
|
|
15
|
+
function getUnconfiguredProjectError({ actor, accountName, reason = 'This command cannot configure it in non-interactive mode.', additionalFix, }) {
|
|
16
|
+
return new Error(`EAS project not configured. ${reason} ` +
|
|
17
|
+
`Run one of the following, then re-run this command:\n\n` +
|
|
18
|
+
`To link an existing project:\n\n` +
|
|
19
|
+
` eas init --id <project-id> --non-interactive\n\n` +
|
|
20
|
+
`To create a new project:\n\n` +
|
|
21
|
+
` eas init --account ${accountName ?? '<account-name>'} --non-interactive\n\n` +
|
|
22
|
+
`Accounts you can create projects in: ${(0, User_1.getCreatableAccountNames)(actor).join(', ')}` +
|
|
23
|
+
(additionalFix ? `\n\n${additionalFix}` : ''));
|
|
24
|
+
}
|
|
@@ -211,7 +211,7 @@ async function handleBuildListSourceAsync(ctx) {
|
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
function formatBuildChoice(build) {
|
|
214
|
-
const { id, updatedAt,
|
|
214
|
+
const { id, updatedAt, runtime, buildProfile, gitCommitHash, gitCommitMessage, updateChannel, message, status, } = build;
|
|
215
215
|
const buildDate = new Date(updatedAt);
|
|
216
216
|
const splitCommitMessage = gitCommitMessage?.split('\n');
|
|
217
217
|
const formattedCommitData = gitCommitHash && splitCommitMessage && splitCommitMessage.length > 0
|
|
@@ -220,8 +220,8 @@ function formatBuildChoice(build) {
|
|
|
220
220
|
const title = `${chalk_1.default.bold(`ID:`)} ${id} (${chalk_1.default.bold(`${(0, date_1.fromNow)(buildDate)} ago`)})`;
|
|
221
221
|
const descriptionItems = [
|
|
222
222
|
{ name: 'Profile', value: buildProfile ? chalk_1.default.bold(buildProfile) : null },
|
|
223
|
-
{ name: 'Channel', value:
|
|
224
|
-
{ name: 'Runtime version', value:
|
|
223
|
+
{ name: 'Channel', value: updateChannel ? chalk_1.default.bold(updateChannel.name) : null },
|
|
224
|
+
{ name: 'Runtime version', value: runtime ? chalk_1.default.bold(runtime.version) : null },
|
|
225
225
|
{ name: 'Commit', value: formattedCommitData },
|
|
226
226
|
{
|
|
227
227
|
name: 'Message',
|
|
@@ -13,6 +13,7 @@ export interface SubmissionContext<T extends Platform> {
|
|
|
13
13
|
analyticsEventProperties: AnalyticsEventProperties;
|
|
14
14
|
exp: ExpoConfig;
|
|
15
15
|
nonInteractive: boolean;
|
|
16
|
+
autoTestFlightSetup: boolean;
|
|
16
17
|
isVerboseFastlaneEnabled: boolean;
|
|
17
18
|
groups: T extends Platform.IOS ? string[] : undefined;
|
|
18
19
|
platform: T;
|
|
@@ -39,6 +40,7 @@ export declare function createSubmissionContextAsync<T extends Platform>(params:
|
|
|
39
40
|
credentialsCtx?: CredentialsContext;
|
|
40
41
|
env?: Env;
|
|
41
42
|
nonInteractive: boolean;
|
|
43
|
+
autoTestFlightSetup?: boolean;
|
|
42
44
|
isVerboseFastlaneEnabled: boolean;
|
|
43
45
|
groups: string[] | undefined;
|
|
44
46
|
platform: T;
|
package/build/submit/context.js
CHANGED
|
@@ -42,6 +42,7 @@ async function createSubmissionContextAsync(params) {
|
|
|
42
42
|
rest.analytics.logEvent(AnalyticsManager_1.SubmissionEvent.SUBMIT_COMMAND, analyticsEventProperties);
|
|
43
43
|
return {
|
|
44
44
|
...rest,
|
|
45
|
+
autoTestFlightSetup: params.autoTestFlightSetup ?? true,
|
|
45
46
|
accountName: account.name,
|
|
46
47
|
credentialsCtx,
|
|
47
48
|
groups,
|
|
@@ -55,7 +55,7 @@ async function createAppStoreConnectAppAsync(ctx, options) {
|
|
|
55
55
|
sku,
|
|
56
56
|
});
|
|
57
57
|
try {
|
|
58
|
-
await (0, ensureTestFlightGroup_1.ensureTestFlightGroupExistsAsync)(app);
|
|
58
|
+
await (0, ensureTestFlightGroup_1.ensureTestFlightGroupExistsAsync)(app, { nonInteractive: ctx.nonInteractive });
|
|
59
59
|
}
|
|
60
60
|
catch (error) {
|
|
61
61
|
// This process is not critical to the app submission so we shouldn't let it fail the entire process.
|
|
@@ -10,6 +10,7 @@ const AppProduce_1 = require("./AppProduce");
|
|
|
10
10
|
const AppSpecificPasswordSource_1 = require("./AppSpecificPasswordSource");
|
|
11
11
|
const AscApiKeySource_1 = require("./AscApiKeySource");
|
|
12
12
|
const IosSubmitter_1 = tslib_1.__importDefault(require("./IosSubmitter"));
|
|
13
|
+
const ensureTestFlightSetup_1 = require("./ensureTestFlightSetup");
|
|
13
14
|
const errors_1 = require("../../credentials/errors");
|
|
14
15
|
const log_1 = tslib_1.__importStar(require("../../log"));
|
|
15
16
|
const ArchiveSource_1 = require("../ArchiveSource");
|
|
@@ -135,6 +136,7 @@ class IosSubmitCommand {
|
|
|
135
136
|
async resolveAscAppIdentifierAsync() {
|
|
136
137
|
const { ascAppId } = this.ctx.profile;
|
|
137
138
|
if (ascAppId) {
|
|
139
|
+
await (0, ensureTestFlightSetup_1.ensureTestFlightSetupForExistingAppAsync)(this.ctx, ascAppId);
|
|
138
140
|
return (0, results_1.result)(ascAppId);
|
|
139
141
|
}
|
|
140
142
|
else if (this.ctx.nonInteractive) {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Platform } from '@expo/eas-build-job';
|
|
2
|
+
import { SubmissionContext } from '../context';
|
|
3
|
+
/**
|
|
4
|
+
* Best-effort TestFlight internal group setup for an App Store Connect app
|
|
5
|
+
* that already exists with `ascAppId` provided.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ensureTestFlightSetupForExistingAppAsync(ctx: SubmissionContext<Platform.IOS>, ascAppIdentifier: string): Promise<void>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ensureTestFlightSetupForExistingAppAsync = ensureTestFlightSetupForExistingAppAsync;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const apple_utils_1 = require("@expo/apple-utils");
|
|
6
|
+
const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
|
|
7
|
+
const authenticateTypes_1 = require("../../credentials/ios/appstore/authenticateTypes");
|
|
8
|
+
const authenticate_1 = require("../../credentials/ios/appstore/authenticate");
|
|
9
|
+
const ensureTestFlightGroup_1 = require("../../credentials/ios/appstore/ensureTestFlightGroup");
|
|
10
|
+
const resolveCredentials_1 = require("../../credentials/ios/appstore/resolveCredentials");
|
|
11
|
+
const AscApiKeyUtils_1 = require("../../credentials/ios/actions/AscApiKeyUtils");
|
|
12
|
+
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
13
|
+
const bundleIdentifier_1 = require("../../project/ios/bundleIdentifier");
|
|
14
|
+
/**
|
|
15
|
+
* Best-effort TestFlight internal group setup for an App Store Connect app
|
|
16
|
+
* that already exists with `ascAppId` provided.
|
|
17
|
+
*/
|
|
18
|
+
async function ensureTestFlightSetupForExistingAppAsync(ctx, ascAppIdentifier) {
|
|
19
|
+
if (!ctx.autoTestFlightSetup) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
try {
|
|
23
|
+
const bundleIdentifier = ctx.applicationIdentifierOverride ??
|
|
24
|
+
ctx.profile.bundleIdentifier ??
|
|
25
|
+
(await (0, bundleIdentifier_1.getBundleIdentifierAsync)(ctx.projectDir, ctx.exp, ctx.vcsClient));
|
|
26
|
+
const appLookupParams = {
|
|
27
|
+
account: (0, nullthrows_1.default)(ctx.user.accounts.find(a => a.name === ctx.accountName), `You do not have access to account: ${ctx.accountName}`),
|
|
28
|
+
projectName: ctx.projectName,
|
|
29
|
+
bundleIdentifier,
|
|
30
|
+
};
|
|
31
|
+
if (!ctx.credentialsCtx.appStore.authCtx) {
|
|
32
|
+
const teamType = (0, resolveCredentials_1.resolveAppleTeamTypeFromEnvironment)() ?? authenticateTypes_1.AppleTeamType.COMPANY_OR_ORGANIZATION;
|
|
33
|
+
if ((0, resolveCredentials_1.hasAscEnvVars)()) {
|
|
34
|
+
const teamId = process.env.EXPO_APPLE_TEAM_ID;
|
|
35
|
+
if (!process.env.EXPO_ASC_API_KEY_PATH ||
|
|
36
|
+
!process.env.EXPO_ASC_KEY_ID ||
|
|
37
|
+
!process.env.EXPO_ASC_ISSUER_ID ||
|
|
38
|
+
!teamId) {
|
|
39
|
+
log_1.default.log('App Store Connect credentials are incomplete, skipping TestFlight setup');
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
await ctx.credentialsCtx.appStore.ensureAuthenticatedAsync({
|
|
43
|
+
mode: authenticateTypes_1.AuthenticationMode.API_KEY,
|
|
44
|
+
teamId,
|
|
45
|
+
teamType,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
const resolvedKey = await (0, AscApiKeyUtils_1.resolveAscApiKeyForAppCredentialsAsync)({
|
|
50
|
+
graphqlClient: ctx.graphqlClient,
|
|
51
|
+
app: appLookupParams,
|
|
52
|
+
});
|
|
53
|
+
const teamId = resolvedKey?.teamId ?? process.env.EXPO_APPLE_TEAM_ID;
|
|
54
|
+
if (!resolvedKey || !teamId) {
|
|
55
|
+
log_1.default.log('No complete App Store Connect credentials, skipping TestFlight setup');
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
log_1.default.log('Using App Store Connect API Key from EAS credentials service.');
|
|
59
|
+
await ctx.credentialsCtx.appStore.ensureAuthenticatedAsync({
|
|
60
|
+
mode: authenticateTypes_1.AuthenticationMode.API_KEY,
|
|
61
|
+
ascApiKey: resolvedKey.ascApiKey,
|
|
62
|
+
teamId,
|
|
63
|
+
teamName: resolvedKey.teamName,
|
|
64
|
+
teamType,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const authCtx = ctx.credentialsCtx.appStore.authCtx;
|
|
69
|
+
if (!authCtx) {
|
|
70
|
+
log_1.default.debug('No App Store Connect API key available, skipping TestFlight setup');
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const app = await apple_utils_1.App.infoAsync((0, authenticate_1.getRequestContext)(authCtx), { id: ascAppIdentifier });
|
|
74
|
+
await (0, ensureTestFlightGroup_1.ensureTestFlightGroupExistsAsync)(app, { nonInteractive: ctx.nonInteractive });
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
// Group setup is a convenience on top of the submission and must never
|
|
78
|
+
// block it.
|
|
79
|
+
log_1.default.warn('Skipping TestFlight group setup:', error);
|
|
80
|
+
}
|
|
81
|
+
}
|
package/build/submit/status.js
CHANGED
|
@@ -58,7 +58,7 @@ function toEasBuildLinkage(easSubmission) {
|
|
|
58
58
|
return {
|
|
59
59
|
easSubmissionId: easSubmission?.id ?? null,
|
|
60
60
|
easBuildId: easSubmission?.submittedBuild?.id ?? null,
|
|
61
|
-
runtimeVersion: easSubmission?.submittedBuild?.
|
|
61
|
+
runtimeVersion: easSubmission?.submittedBuild?.runtime?.version ?? null,
|
|
62
62
|
fingerprintHash: easSubmission?.submittedBuild?.fingerprint?.hash ?? null,
|
|
63
63
|
};
|
|
64
64
|
}
|
|
@@ -45,7 +45,7 @@ function formatGraphQLSubmission(submission) {
|
|
|
45
45
|
? [
|
|
46
46
|
{
|
|
47
47
|
label: 'Application Identifier',
|
|
48
|
-
value: sanitize(
|
|
48
|
+
value: sanitize(submittedBuild?.appIdentifier),
|
|
49
49
|
},
|
|
50
50
|
{ label: 'Track', value: sanitize(submission.androidConfig?.track)?.toLowerCase() },
|
|
51
51
|
{
|
|
@@ -61,7 +61,7 @@ function formatGraphQLSubmission(submission) {
|
|
|
61
61
|
label: submission.platform === generated_1.AppPlatform.Android ? 'Version code' : 'Build number',
|
|
62
62
|
value: sanitize(submittedBuild?.appBuildVersion),
|
|
63
63
|
},
|
|
64
|
-
{ label: 'Runtime Version', value: sanitize(submittedBuild?.
|
|
64
|
+
{ label: 'Runtime Version', value: sanitize(submittedBuild?.runtime?.version) },
|
|
65
65
|
{ label: 'Fingerprint', value: submittedBuild?.fingerprint?.hash },
|
|
66
66
|
{ label: 'Commit', value: sanitize(submittedBuild?.gitCommitHash) },
|
|
67
67
|
{ label: 'Error Code', value: sanitize(submission.error?.errorCode) },
|
package/build/update/queries.js
CHANGED
|
@@ -134,7 +134,7 @@ async function selectUpdateGroupOnBranchAsync(graphqlClient, { projectId, branch
|
|
|
134
134
|
.map(group => {
|
|
135
135
|
const first = group[0];
|
|
136
136
|
return first
|
|
137
|
-
? `${first.group} (runtime: ${first.
|
|
137
|
+
? `${first.group} (runtime: ${first.runtime.version}, message: ${first.message ?? 'N/A'})`
|
|
138
138
|
: 'unknown';
|
|
139
139
|
})
|
|
140
140
|
.join('\n ');
|
|
@@ -38,14 +38,14 @@ async function republishAsync({ graphqlClient, app, updatesToPublish, targetBran
|
|
|
38
38
|
const isSameGroup = (update) => update.groupId === arbitraryUpdate.groupId &&
|
|
39
39
|
update.branchId === arbitraryUpdate.branchId &&
|
|
40
40
|
update.branchName === arbitraryUpdate.branchName &&
|
|
41
|
-
update.
|
|
41
|
+
update.runtime.version === arbitraryUpdate.runtime.version &&
|
|
42
42
|
update.manifestHostOverride === arbitraryUpdate.manifestHostOverride &&
|
|
43
43
|
update.assetHostOverride === arbitraryUpdate.assetHostOverride;
|
|
44
44
|
(0, assert_1.default)(updatesToPublish.every(isSameGroup), 'All updates being republished must belong to the same update group');
|
|
45
45
|
(0, assert_1.default)(updatesToPublish.every(u => u.isRollBackToEmbedded) ||
|
|
46
46
|
updatesToPublish.every(u => !u.isRollBackToEmbedded), 'All updates must either be roll back to embedded updates or not');
|
|
47
47
|
(0, assert_1.default)(!updatesToPublish.some(u => !!u.rolloutControlUpdate), 'Cannot republish an update that is being rolled-out. Either complete the update rollout and then republish or publish a new rollout update.');
|
|
48
|
-
const
|
|
48
|
+
const runtimeVersion = arbitraryUpdate.runtime.version;
|
|
49
49
|
// If codesigning was created for the original update, we need to add it to the republish.
|
|
50
50
|
// If one wishes to not sign the republish or sign with a different key, a normal publish should
|
|
51
51
|
// be performed.
|
|
@@ -156,7 +156,7 @@ async function republishAsync({ graphqlClient, app, updatesToPublish, targetBran
|
|
|
156
156
|
log_1.default.addNewLineIfNone();
|
|
157
157
|
log_1.default.log((0, formatFields_1.default)([
|
|
158
158
|
{ label: 'Branch', value: targetBranchName },
|
|
159
|
-
{ label: 'Runtime version', value: arbitraryRepublishedUpdate.
|
|
159
|
+
{ label: 'Runtime version', value: arbitraryRepublishedUpdate.runtime.version },
|
|
160
160
|
{ label: 'Platform', value: updatesRepublished.map(update => update.platform).join(', ') },
|
|
161
161
|
{ label: 'Update group ID', value: arbitraryRepublishedUpdate.group },
|
|
162
162
|
...(updatesRepublishedByPlatform.android
|
|
@@ -47,7 +47,7 @@ async function publishRollBackToEmbeddedUpdateAsync({ graphqlClient, projectId,
|
|
|
47
47
|
else {
|
|
48
48
|
log_1.default.addNewLineIfNone();
|
|
49
49
|
for (const runtime of (0, uniqBy_1.default)(runtimeToPlatformsAndFingerprintInfoMapping, version => version.runtimeVersion)) {
|
|
50
|
-
const newUpdatesForRuntimeVersion = newUpdates.filter(update => update.
|
|
50
|
+
const newUpdatesForRuntimeVersion = newUpdates.filter(update => update.runtime.version === runtime.runtimeVersion);
|
|
51
51
|
if (newUpdatesForRuntimeVersion.length === 0) {
|
|
52
52
|
throw new Error(`Publish response is missing updates with runtime ${runtime.runtimeVersion}.`);
|
|
53
53
|
}
|