eas-cli 13.0.0 → 13.1.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.
Files changed (35) hide show
  1. package/README.md +63 -63
  2. package/build/build/build.js +50 -5
  3. package/build/build/metadata.d.ts +2 -1
  4. package/build/build/metadata.js +4 -3
  5. package/build/build/utils/url.d.ts +1 -0
  6. package/build/build/utils/url.js +5 -1
  7. package/build/commands/update/index.js +1 -1
  8. package/build/commands/workflow/run.d.ts +21 -0
  9. package/build/commands/workflow/run.js +91 -0
  10. package/build/commands/workflow/validate.d.ts +11 -0
  11. package/build/commands/workflow/validate.js +87 -0
  12. package/build/graphql/generated.d.ts +297 -44
  13. package/build/graphql/generated.js +72 -31
  14. package/build/graphql/mutations/UploadSessionMutation.d.ts +5 -1
  15. package/build/graphql/mutations/UploadSessionMutation.js +18 -0
  16. package/build/graphql/mutations/WorkflowRunMutation.d.ts +11 -0
  17. package/build/graphql/mutations/WorkflowRunMutation.js +36 -0
  18. package/build/metadata/apple/config/reader.js +6 -4
  19. package/build/metadata/apple/config/writer.d.ts +1 -1
  20. package/build/metadata/apple/config/writer.js +7 -4
  21. package/build/metadata/apple/types.d.ts +1 -1
  22. package/build/project/maybeUploadFingerprintAsync.d.ts +3 -3
  23. package/build/project/maybeUploadFingerprintAsync.js +5 -5
  24. package/build/project/uploadAccountScopedEasJsonAsync.d.ts +12 -0
  25. package/build/project/uploadAccountScopedEasJsonAsync.js +34 -0
  26. package/build/project/uploadAccountScopedProjectSourceAsync.d.ts +13 -0
  27. package/build/project/uploadAccountScopedProjectSourceAsync.js +48 -0
  28. package/build/uploads.d.ts +7 -1
  29. package/build/uploads.js +7 -1
  30. package/build/utils/fingerprintCli.d.ts +12 -0
  31. package/build/utils/fingerprintCli.js +26 -0
  32. package/build/utils/progress.js +2 -1
  33. package/oclif.manifest.json +51 -1
  34. package/package.json +4 -3
  35. package/schema/metadata-0.json +53 -18
@@ -6,9 +6,9 @@
6
6
  * For more info and docs, visit https://graphql-code-generator.com/
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.GitHubAppEnvironment = exports.FingerprintSourceType = exports.Feature = exports.Experiment = exports.EnvironmentVariableVisibility = exports.EnvironmentVariableScope = exports.EnvironmentVariableEnvironment = exports.EnvironmentSecretType = exports.EntityTypeName = exports.EasTotalPlanEnablementUnit = exports.EasServiceMetric = exports.EasService = exports.EasBuildWaiverType = exports.EasBuildDeprecationInfoType = exports.EasBuildBillingResourceClass = exports.DistributionType = exports.CustomDomainStatus = exports.CustomDomainDnsRecordType = exports.CrashSampleFor = exports.ContinentCode = exports.BuildWorkflow = exports.BuildTrigger = exports.BuildStatus = exports.BuildRetryDisabledReason = exports.BuildResourceClass = exports.BuildPriority = exports.BuildPhase = exports.BuildMode = exports.BuildLimitThresholdExceededMetadataType = exports.BuildIosEnterpriseProvisioning = exports.BuildCredentialsSource = exports.BackgroundJobState = exports.BackgroundJobResultType = exports.AuthProviderIdentifier = exports.AuthProtocolType = exports.AuditLogsExportFormat = exports.AssetMetadataStatus = exports.AppsFilter = exports.AppleTeamType = exports.AppleDeviceClass = exports.AppStoreConnectUserRole = exports.AppSort = exports.AppPrivacy = exports.AppPlatform = exports.AppInternalDistributionBuildPrivacy = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AndroidBuildType = exports.ActivityTimelineProjectActivityType = exports.AccountAppsSortByField = void 0;
10
- exports.UserAgentBrowser = exports.UsageMetricsGranularity = exports.UsageMetricType = exports.UploadSessionType = exports.TargetEntityMutationType = exports.SubmissionStatus = exports.SubmissionPriority = exports.SubmissionArchiveSourceType = exports.SubmissionAndroidTrack = exports.SubmissionAndroidReleaseStatus = exports.SubmissionAndroidArchiveType = 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.ProjectArchiveSourceType = exports.Permission = exports.Order = exports.OnboardingEnvironment = exports.OnboardingDeviceType = exports.OfferType = exports.NotificationType = exports.NotificationEvent = exports.MailchimpTag = exports.MailchimpAudience = exports.JobRunStatus = exports.JobRunPriority = exports.IosSchemeBuildConfiguration = exports.IosManagedBuildType = exports.IosDistributionType = exports.IosBuildType = exports.InvoiceDiscountType = exports.InsightsFilterType = exports.GitHubJobRunTriggerType = exports.GitHubJobRunTriggerRunStatus = exports.GitHubJobRunJobType = exports.GitHubBuildTriggerType = exports.GitHubBuildTriggerRunStatus = exports.GitHubBuildTriggerExecutionBehavior = exports.GitHubAppInstallationStatus = void 0;
11
- exports.WorkerLoggerLevel = exports.WorkerDeploymentLogLevel = exports.WebhookType = exports.UserEntityTypeName = exports.UserAgentOs = void 0;
9
+ exports.FingerprintSourceType = exports.Feature = exports.Experiment = exports.EnvironmentVariableVisibility = exports.EnvironmentVariableScope = exports.EnvironmentVariableEnvironment = exports.EnvironmentSecretType = exports.EntityTypeName = exports.EasTotalPlanEnablementUnit = exports.EasServiceMetric = exports.EasService = exports.EasBuildWaiverType = exports.EasBuildDeprecationInfoType = exports.EasBuildBillingResourceClass = exports.DistributionType = exports.CustomDomainStatus = exports.CustomDomainDnsRecordType = exports.CrashSampleFor = exports.ContinentCode = exports.BuildWorkflow = exports.BuildTrigger = exports.BuildStatus = exports.BuildRetryDisabledReason = exports.BuildResourceClass = exports.BuildPriority = exports.BuildPhase = exports.BuildMode = exports.BuildLimitThresholdExceededMetadataType = exports.BuildIosEnterpriseProvisioning = exports.BuildCredentialsSource = exports.BackgroundJobState = exports.BackgroundJobResultType = exports.AuthProviderIdentifier = exports.AuthProtocolType = exports.AuditLogsExportFormat = exports.AssetMetadataStatus = exports.AppsFilter = exports.AppleTeamType = exports.AppleDeviceClass = exports.AppStoreConnectUserRole = exports.AppSort = exports.AppPrivacy = exports.AppPlatform = exports.AppInternalDistributionBuildPrivacy = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AndroidBuildType = exports.ActivityTimelineProjectActivityType = exports.AccountUploadSessionType = exports.AccountAppsSortByField = void 0;
10
+ exports.UsageMetricsGranularity = exports.UsageMetricType = exports.UploadSessionType = exports.TargetEntityMutationType = exports.SubmissionStatus = exports.SubmissionPriority = exports.SubmissionArchiveSourceType = exports.SubmissionAndroidTrack = exports.SubmissionAndroidReleaseStatus = exports.SubmissionAndroidArchiveType = 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.ProjectArchiveSourceType = exports.Permission = exports.Order = exports.OnboardingEnvironment = exports.OnboardingDeviceType = exports.OfferType = exports.NotificationType = exports.NotificationEvent = exports.MailchimpTag = exports.MailchimpAudience = exports.JobRunStatus = exports.JobRunPriority = exports.IosSchemeBuildConfiguration = 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.GitHubAppEnvironment = void 0;
11
+ exports.WorkflowRunStatus = exports.WorkflowProjectSourceType = exports.WorkflowJobType = exports.WorkflowJobStatus = exports.WorkerLoggerLevel = exports.WorkerDeploymentLogLevel = exports.WebhookType = exports.UserEntityTypeName = exports.UserAgentOs = exports.UserAgentBrowser = void 0;
12
12
  var AccountAppsSortByField;
13
13
  (function (AccountAppsSortByField) {
14
14
  AccountAppsSortByField["LatestActivityTime"] = "LATEST_ACTIVITY_TIME";
@@ -18,6 +18,10 @@ var AccountAppsSortByField;
18
18
  */
19
19
  AccountAppsSortByField["Name"] = "NAME";
20
20
  })(AccountAppsSortByField || (exports.AccountAppsSortByField = AccountAppsSortByField = {}));
21
+ var AccountUploadSessionType;
22
+ (function (AccountUploadSessionType) {
23
+ AccountUploadSessionType["WorkflowsProjectSources"] = "WORKFLOWS_PROJECT_SOURCES";
24
+ })(AccountUploadSessionType || (exports.AccountUploadSessionType = AccountUploadSessionType = {}));
21
25
  var ActivityTimelineProjectActivityType;
22
26
  (function (ActivityTimelineProjectActivityType) {
23
27
  ActivityTimelineProjectActivityType["Build"] = "BUILD";
@@ -233,6 +237,8 @@ var BuildResourceClass;
233
237
  BuildResourceClass["IosMLarge"] = "IOS_M_LARGE";
234
238
  BuildResourceClass["IosMMedium"] = "IOS_M_MEDIUM";
235
239
  BuildResourceClass["Legacy"] = "LEGACY";
240
+ BuildResourceClass["LinuxLarge"] = "LINUX_LARGE";
241
+ BuildResourceClass["LinuxMedium"] = "LINUX_MEDIUM";
236
242
  })(BuildResourceClass || (exports.BuildResourceClass = BuildResourceClass = {}));
237
243
  var BuildRetryDisabledReason;
238
244
  (function (BuildRetryDisabledReason) {
@@ -340,25 +346,25 @@ var EasTotalPlanEnablementUnit;
340
346
  })(EasTotalPlanEnablementUnit || (exports.EasTotalPlanEnablementUnit = EasTotalPlanEnablementUnit = {}));
341
347
  var EntityTypeName;
342
348
  (function (EntityTypeName) {
343
- EntityTypeName["Account"] = "Account";
344
- EntityTypeName["AccountSsoConfiguration"] = "AccountSSOConfiguration";
345
- EntityTypeName["AndroidAppCredentials"] = "AndroidAppCredentials";
346
- EntityTypeName["AndroidKeystore"] = "AndroidKeystore";
347
- EntityTypeName["App"] = "App";
348
- EntityTypeName["AppStoreConnectApiKey"] = "AppStoreConnectApiKey";
349
- EntityTypeName["AppleDevice"] = "AppleDevice";
350
- EntityTypeName["AppleDistributionCertificate"] = "AppleDistributionCertificate";
351
- EntityTypeName["AppleProvisioningProfile"] = "AppleProvisioningProfile";
352
- EntityTypeName["AppleTeam"] = "AppleTeam";
353
- EntityTypeName["Branch"] = "Branch";
354
- EntityTypeName["Channel"] = "Channel";
355
- EntityTypeName["Customer"] = "Customer";
356
- EntityTypeName["GoogleServiceAccountKey"] = "GoogleServiceAccountKey";
357
- EntityTypeName["IosAppCredentials"] = "IosAppCredentials";
358
- EntityTypeName["UserInvitation"] = "UserInvitation";
359
- EntityTypeName["UserPermission"] = "UserPermission";
360
- EntityTypeName["Workflow"] = "Workflow";
361
- EntityTypeName["WorkflowRevision"] = "WorkflowRevision";
349
+ EntityTypeName["AccountEntity"] = "AccountEntity";
350
+ EntityTypeName["AccountSsoConfigurationEntity"] = "AccountSSOConfigurationEntity";
351
+ EntityTypeName["AndroidAppCredentialsEntity"] = "AndroidAppCredentialsEntity";
352
+ EntityTypeName["AndroidKeystoreEntity"] = "AndroidKeystoreEntity";
353
+ EntityTypeName["AppEntity"] = "AppEntity";
354
+ EntityTypeName["AppStoreConnectApiKeyEntity"] = "AppStoreConnectApiKeyEntity";
355
+ EntityTypeName["AppleDeviceEntity"] = "AppleDeviceEntity";
356
+ EntityTypeName["AppleDistributionCertificateEntity"] = "AppleDistributionCertificateEntity";
357
+ EntityTypeName["AppleProvisioningProfileEntity"] = "AppleProvisioningProfileEntity";
358
+ EntityTypeName["AppleTeamEntity"] = "AppleTeamEntity";
359
+ EntityTypeName["BranchEntity"] = "BranchEntity";
360
+ EntityTypeName["ChannelEntity"] = "ChannelEntity";
361
+ EntityTypeName["CustomerEntity"] = "CustomerEntity";
362
+ EntityTypeName["GoogleServiceAccountKeyEntity"] = "GoogleServiceAccountKeyEntity";
363
+ EntityTypeName["IosAppCredentialsEntity"] = "IosAppCredentialsEntity";
364
+ EntityTypeName["UserInvitationEntity"] = "UserInvitationEntity";
365
+ EntityTypeName["UserPermissionEntity"] = "UserPermissionEntity";
366
+ EntityTypeName["WorkflowEntity"] = "WorkflowEntity";
367
+ EntityTypeName["WorkflowRevisionEntity"] = "WorkflowRevisionEntity";
362
368
  })(EntityTypeName || (exports.EntityTypeName = EntityTypeName = {}));
363
369
  var EnvironmentSecretType;
364
370
  (function (EnvironmentSecretType) {
@@ -495,6 +501,8 @@ var MailchimpAudience;
495
501
  (function (MailchimpAudience) {
496
502
  MailchimpAudience["ExpoDevelopers"] = "EXPO_DEVELOPERS";
497
503
  MailchimpAudience["ExpoDeveloperOnboarding"] = "EXPO_DEVELOPER_ONBOARDING";
504
+ MailchimpAudience["LaunchParty_2024"] = "LAUNCH_PARTY_2024";
505
+ MailchimpAudience["NonprodExpoDevelopers"] = "NONPROD_EXPO_DEVELOPERS";
498
506
  })(MailchimpAudience || (exports.MailchimpAudience = MailchimpAudience = {}));
499
507
  var MailchimpTag;
500
508
  (function (MailchimpTag) {
@@ -776,15 +784,15 @@ var UserAgentOs;
776
784
  })(UserAgentOs || (exports.UserAgentOs = UserAgentOs = {}));
777
785
  var UserEntityTypeName;
778
786
  (function (UserEntityTypeName) {
779
- UserEntityTypeName["AccessToken"] = "AccessToken";
780
- UserEntityTypeName["DiscordUser"] = "DiscordUser";
781
- UserEntityTypeName["GitHubUser"] = "GitHubUser";
782
- UserEntityTypeName["Password"] = "Password";
783
- UserEntityTypeName["SsoUser"] = "SSOUser";
784
- UserEntityTypeName["User"] = "User";
785
- UserEntityTypeName["UserPermission"] = "UserPermission";
786
- UserEntityTypeName["UserSecondFactorBackupCodes"] = "UserSecondFactorBackupCodes";
787
- UserEntityTypeName["UserSecondFactorDevice"] = "UserSecondFactorDevice";
787
+ UserEntityTypeName["AccessTokenEntity"] = "AccessTokenEntity";
788
+ UserEntityTypeName["DiscordUserEntity"] = "DiscordUserEntity";
789
+ UserEntityTypeName["GitHubUserEntity"] = "GitHubUserEntity";
790
+ UserEntityTypeName["PasswordEntity"] = "PasswordEntity";
791
+ UserEntityTypeName["SsoUserEntity"] = "SSOUserEntity";
792
+ UserEntityTypeName["UserEntity"] = "UserEntity";
793
+ UserEntityTypeName["UserPermissionEntity"] = "UserPermissionEntity";
794
+ UserEntityTypeName["UserSecondFactorBackupCodesEntity"] = "UserSecondFactorBackupCodesEntity";
795
+ UserEntityTypeName["UserSecondFactorDeviceEntity"] = "UserSecondFactorDeviceEntity";
788
796
  })(UserEntityTypeName || (exports.UserEntityTypeName = UserEntityTypeName = {}));
789
797
  var WebhookType;
790
798
  (function (WebhookType) {
@@ -809,3 +817,36 @@ var WorkerLoggerLevel;
809
817
  WorkerLoggerLevel["Trace"] = "TRACE";
810
818
  WorkerLoggerLevel["Warn"] = "WARN";
811
819
  })(WorkerLoggerLevel || (exports.WorkerLoggerLevel = WorkerLoggerLevel = {}));
820
+ var WorkflowJobStatus;
821
+ (function (WorkflowJobStatus) {
822
+ WorkflowJobStatus["ActionRequired"] = "ACTION_REQUIRED";
823
+ WorkflowJobStatus["Canceled"] = "CANCELED";
824
+ WorkflowJobStatus["Failure"] = "FAILURE";
825
+ WorkflowJobStatus["InProgress"] = "IN_PROGRESS";
826
+ WorkflowJobStatus["New"] = "NEW";
827
+ WorkflowJobStatus["Skipped"] = "SKIPPED";
828
+ WorkflowJobStatus["Success"] = "SUCCESS";
829
+ })(WorkflowJobStatus || (exports.WorkflowJobStatus = WorkflowJobStatus = {}));
830
+ var WorkflowJobType;
831
+ (function (WorkflowJobType) {
832
+ WorkflowJobType["AppleDeviceRegistrationRequest"] = "APPLE_DEVICE_REGISTRATION_REQUEST";
833
+ WorkflowJobType["Build"] = "BUILD";
834
+ WorkflowJobType["Custom"] = "CUSTOM";
835
+ WorkflowJobType["MaestroTest"] = "MAESTRO_TEST";
836
+ WorkflowJobType["RequireApproval"] = "REQUIRE_APPROVAL";
837
+ WorkflowJobType["Submission"] = "SUBMISSION";
838
+ WorkflowJobType["Update"] = "UPDATE";
839
+ })(WorkflowJobType || (exports.WorkflowJobType = WorkflowJobType = {}));
840
+ var WorkflowProjectSourceType;
841
+ (function (WorkflowProjectSourceType) {
842
+ WorkflowProjectSourceType["Gcs"] = "GCS";
843
+ })(WorkflowProjectSourceType || (exports.WorkflowProjectSourceType = WorkflowProjectSourceType = {}));
844
+ var WorkflowRunStatus;
845
+ (function (WorkflowRunStatus) {
846
+ WorkflowRunStatus["ActionRequired"] = "ACTION_REQUIRED";
847
+ WorkflowRunStatus["Canceled"] = "CANCELED";
848
+ WorkflowRunStatus["Failure"] = "FAILURE";
849
+ WorkflowRunStatus["InProgress"] = "IN_PROGRESS";
850
+ WorkflowRunStatus["New"] = "NEW";
851
+ WorkflowRunStatus["Success"] = "SUCCESS";
852
+ })(WorkflowRunStatus || (exports.WorkflowRunStatus = WorkflowRunStatus = {}));
@@ -1,5 +1,5 @@
1
1
  import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
- import { UploadSessionType } from '../generated';
2
+ import { AccountUploadSessionType, UploadSessionType } from '../generated';
3
3
  export interface SignedUrl {
4
4
  url: string;
5
5
  headers: Record<string, string>;
@@ -7,4 +7,8 @@ export interface SignedUrl {
7
7
  }
8
8
  export declare const UploadSessionMutation: {
9
9
  createUploadSessionAsync(graphqlClient: ExpoGraphqlClient, type: UploadSessionType): Promise<SignedUrl>;
10
+ createAccountScopedUploadSessionAsync(graphqlClient: ExpoGraphqlClient, { type, accountID, }: {
11
+ type: AccountUploadSessionType;
12
+ accountID: string;
13
+ }): Promise<SignedUrl>;
10
14
  };
@@ -19,4 +19,22 @@ exports.UploadSessionMutation = {
19
19
  .toPromise());
20
20
  return data.uploadSession.createUploadSession;
21
21
  },
22
+ async createAccountScopedUploadSessionAsync(graphqlClient, { type, accountID, }) {
23
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
24
+ .mutation((0, graphql_tag_1.default) `
25
+ mutation CreateAccountScopedUploadSessionMutation(
26
+ $accountID: ID!
27
+ $type: AccountUploadSessionType!
28
+ ) {
29
+ uploadSession {
30
+ createAccountScopedUploadSession(accountID: $accountID, type: $type)
31
+ }
32
+ }
33
+ `, {
34
+ type,
35
+ accountID,
36
+ })
37
+ .toPromise());
38
+ return data.uploadSession.createAccountScopedUploadSession;
39
+ },
22
40
  };
@@ -0,0 +1,11 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
+ import { WorkflowRevisionInput, WorkflowRunInput } from '../generated';
3
+ export declare namespace WorkflowRunMutation {
4
+ function createWorkflowRunAsync(graphqlClient: ExpoGraphqlClient, { appId, workflowRevisionInput, workflowRunInput, }: {
5
+ appId: string;
6
+ workflowRevisionInput: WorkflowRevisionInput;
7
+ workflowRunInput: WorkflowRunInput;
8
+ }): Promise<{
9
+ id: string;
10
+ }>;
11
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WorkflowRunMutation = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
6
+ const client_1 = require("../client");
7
+ var WorkflowRunMutation;
8
+ (function (WorkflowRunMutation) {
9
+ async function createWorkflowRunAsync(graphqlClient, { appId, workflowRevisionInput, workflowRunInput, }) {
10
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
11
+ .mutation((0, graphql_tag_1.default) `
12
+ mutation CreateWorkflowRun(
13
+ $appId: ID!
14
+ $workflowRevisionInput: WorkflowRevisionInput!
15
+ $workflowRunInput: WorkflowRunInput!
16
+ ) {
17
+ workflowRun {
18
+ createWorkflowRun(
19
+ appId: $appId
20
+ workflowRevisionInput: $workflowRevisionInput
21
+ workflowRunInput: $workflowRunInput
22
+ ) {
23
+ id
24
+ }
25
+ }
26
+ }
27
+ `, {
28
+ appId,
29
+ workflowRevisionInput,
30
+ workflowRunInput,
31
+ })
32
+ .toPromise());
33
+ return { id: data.workflowRun.createWorkflowRun.id };
34
+ }
35
+ WorkflowRunMutation.createWorkflowRunAsync = createWorkflowRunAsync;
36
+ })(WorkflowRunMutation || (exports.WorkflowRunMutation = WorkflowRunMutation = {}));
@@ -21,22 +21,24 @@ class AppleConfigReader {
21
21
  return null;
22
22
  }
23
23
  return {
24
+ ageRatingOverride: attributes.ageRatingOverride ?? apple_utils_1.RatingOverride.NONE,
24
25
  alcoholTobaccoOrDrugUseOrReferences: attributes.alcoholTobaccoOrDrugUseOrReferences ?? apple_utils_1.Rating.NONE,
25
26
  contests: attributes.contests ?? apple_utils_1.Rating.NONE,
27
+ gambling: attributes.gambling ?? false,
26
28
  gamblingSimulated: attributes.gamblingSimulated ?? apple_utils_1.Rating.NONE,
27
29
  horrorOrFearThemes: attributes.horrorOrFearThemes ?? apple_utils_1.Rating.NONE,
30
+ kidsAgeBand: attributes.kidsAgeBand ?? null,
31
+ koreaAgeRatingOverride: attributes.koreaAgeRatingOverride ?? apple_utils_1.KoreaRatingOverride.NONE,
32
+ lootBox: attributes.lootBox ?? false,
28
33
  matureOrSuggestiveThemes: attributes.matureOrSuggestiveThemes ?? apple_utils_1.Rating.NONE,
29
34
  medicalOrTreatmentInformation: attributes.medicalOrTreatmentInformation ?? apple_utils_1.Rating.NONE,
30
35
  profanityOrCrudeHumor: attributes.profanityOrCrudeHumor ?? apple_utils_1.Rating.NONE,
31
36
  sexualContentGraphicAndNudity: attributes.sexualContentGraphicAndNudity ?? apple_utils_1.Rating.NONE,
32
37
  sexualContentOrNudity: attributes.sexualContentOrNudity ?? apple_utils_1.Rating.NONE,
38
+ unrestrictedWebAccess: attributes.unrestrictedWebAccess ?? false,
33
39
  violenceCartoonOrFantasy: attributes.violenceCartoonOrFantasy ?? apple_utils_1.Rating.NONE,
34
40
  violenceRealistic: attributes.violenceRealistic ?? apple_utils_1.Rating.NONE,
35
41
  violenceRealisticProlongedGraphicOrSadistic: attributes.violenceRealisticProlongedGraphicOrSadistic ?? apple_utils_1.Rating.NONE,
36
- gambling: attributes.gambling ?? false,
37
- unrestrictedWebAccess: attributes.unrestrictedWebAccess ?? false,
38
- kidsAgeBand: attributes.kidsAgeBand ?? null,
39
- seventeenPlus: attributes.seventeenPlus ?? false,
40
42
  };
41
43
  }
42
44
  getLocales() {
@@ -14,7 +14,7 @@ export declare class AppleConfigWriter {
14
14
  configVersion: number;
15
15
  apple: Partial<AppleMetadata>;
16
16
  };
17
- setAgeRating(attributes: AttributesOf<AgeRatingDeclaration>): void;
17
+ setAgeRating(attributes: Omit<AttributesOf<AgeRatingDeclaration>, 'seventeenPlus' | 'gamblingAndContests'>): void;
18
18
  setInfoLocale(attributes: AttributesOf<AppInfoLocalization>): void;
19
19
  setCategories(attributes: Pick<AttributesOf<AppInfo>, 'primaryCategory' | 'primarySubcategoryOne' | 'primarySubcategoryTwo' | 'secondaryCategory' | 'secondarySubcategoryOne' | 'secondarySubcategoryTwo'>): void;
20
20
  setVersion(attributes: Omit<AttributesOf<AppStoreVersion>, 'releaseType' | 'earliestReleaseDate'>): void;
@@ -17,24 +17,27 @@ class AppleConfigWriter {
17
17
  apple: this.schema,
18
18
  };
19
19
  }
20
+ // Note, both `seventeenPlus` and `gamlingAndContests` are deprecated
20
21
  setAgeRating(attributes) {
21
22
  this.schema.advisory = {
23
+ ageRatingOverride: attributes.ageRatingOverride ?? apple_utils_1.RatingOverride.NONE,
22
24
  alcoholTobaccoOrDrugUseOrReferences: attributes.alcoholTobaccoOrDrugUseOrReferences ?? apple_utils_1.Rating.NONE,
23
25
  contests: attributes.contests ?? apple_utils_1.Rating.NONE,
26
+ gambling: attributes.gambling ?? false,
24
27
  gamblingSimulated: attributes.gamblingSimulated ?? apple_utils_1.Rating.NONE,
25
28
  horrorOrFearThemes: attributes.horrorOrFearThemes ?? apple_utils_1.Rating.NONE,
29
+ kidsAgeBand: attributes.kidsAgeBand ?? null,
30
+ koreaAgeRatingOverride: attributes.koreaAgeRatingOverride ?? apple_utils_1.KoreaRatingOverride.NONE,
31
+ lootBox: attributes.lootBox ?? false,
26
32
  matureOrSuggestiveThemes: attributes.matureOrSuggestiveThemes ?? apple_utils_1.Rating.NONE,
27
33
  medicalOrTreatmentInformation: attributes.medicalOrTreatmentInformation ?? apple_utils_1.Rating.NONE,
28
34
  profanityOrCrudeHumor: attributes.profanityOrCrudeHumor ?? apple_utils_1.Rating.NONE,
29
35
  sexualContentGraphicAndNudity: attributes.sexualContentGraphicAndNudity ?? apple_utils_1.Rating.NONE,
30
36
  sexualContentOrNudity: attributes.sexualContentOrNudity ?? apple_utils_1.Rating.NONE,
37
+ unrestrictedWebAccess: attributes.unrestrictedWebAccess ?? false,
31
38
  violenceCartoonOrFantasy: attributes.violenceCartoonOrFantasy ?? apple_utils_1.Rating.NONE,
32
39
  violenceRealistic: attributes.violenceRealistic ?? apple_utils_1.Rating.NONE,
33
40
  violenceRealisticProlongedGraphicOrSadistic: attributes.violenceRealisticProlongedGraphicOrSadistic ?? apple_utils_1.Rating.NONE,
34
- gambling: attributes.gambling ?? false,
35
- unrestrictedWebAccess: attributes.unrestrictedWebAccess ?? false,
36
- kidsAgeBand: attributes.kidsAgeBand ?? null,
37
- seventeenPlus: attributes.seventeenPlus ?? false,
38
41
  };
39
42
  }
40
43
  setInfoLocale(attributes) {
@@ -11,7 +11,7 @@ export interface AppleMetadata {
11
11
  preview?: Record<string, string[]>;
12
12
  review?: AppleReview;
13
13
  }
14
- export type AppleAdvisory = Partial<AgeRatingDeclarationProps>;
14
+ export type AppleAdvisory = Omit<Partial<AgeRatingDeclarationProps>, 'seventeenPlus' | 'gamblingAndContests'>;
15
15
  /** Apps can define up to two categories, or categories with up to two subcategories */
16
16
  export type AppleCategory = (string | string[])[];
17
17
  export interface AppleRelease {
@@ -1,8 +1,8 @@
1
1
  import { FingerprintSource } from '@expo/eas-build-job';
2
2
  import { LocalBuildMode } from '../build/local';
3
3
  import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
4
- export declare function maybeUploadFingerprintAsync({ runtimeVersion, fingerprint, graphqlClient, localBuildMode, }: {
5
- runtimeVersion: string;
4
+ export declare function maybeUploadFingerprintAsync({ hash, fingerprint, graphqlClient, localBuildMode, }: {
5
+ hash: string;
6
6
  fingerprint: {
7
7
  fingerprintSources: object[];
8
8
  isDebugFingerprintSource: boolean;
@@ -10,6 +10,6 @@ export declare function maybeUploadFingerprintAsync({ runtimeVersion, fingerprin
10
10
  graphqlClient: ExpoGraphqlClient;
11
11
  localBuildMode?: LocalBuildMode;
12
12
  }): Promise<{
13
- runtimeVersion: string;
13
+ hash: string;
14
14
  fingerprintSource?: FingerprintSource;
15
15
  }>;
@@ -11,16 +11,16 @@ const generated_1 = require("../graphql/generated");
11
11
  const log_1 = tslib_1.__importDefault(require("../log"));
12
12
  const uploads_1 = require("../uploads");
13
13
  const paths_1 = require("../utils/paths");
14
- async function maybeUploadFingerprintAsync({ runtimeVersion, fingerprint, graphqlClient, localBuildMode, }) {
14
+ async function maybeUploadFingerprintAsync({ hash, fingerprint, graphqlClient, localBuildMode, }) {
15
15
  await fs_extra_1.default.mkdirp((0, paths_1.getTmpDirectory)());
16
16
  const fingerprintLocation = path_1.default.join((0, paths_1.getTmpDirectory)(), `${(0, uuid_1.v4)()}-runtime-fingerprint.json`);
17
17
  await fs_extra_1.default.writeJSON(fingerprintLocation, {
18
- hash: runtimeVersion,
18
+ hash,
19
19
  sources: fingerprint.fingerprintSources,
20
20
  });
21
21
  if (localBuildMode === local_1.LocalBuildMode.LOCAL_BUILD_PLUGIN) {
22
22
  return {
23
- runtimeVersion,
23
+ hash,
24
24
  fingerprintSource: {
25
25
  type: eas_build_job_1.FingerprintSourceType.PATH,
26
26
  path: fingerprintLocation,
@@ -39,14 +39,14 @@ async function maybeUploadFingerprintAsync({ runtimeVersion, fingerprint, graphq
39
39
  }
40
40
  log_1.default.warn(errMessage);
41
41
  return {
42
- runtimeVersion,
42
+ hash,
43
43
  };
44
44
  }
45
45
  finally {
46
46
  await fs_extra_1.default.remove(fingerprintLocation);
47
47
  }
48
48
  return {
49
- runtimeVersion,
49
+ hash,
50
50
  fingerprintSource: {
51
51
  type: eas_build_job_1.FingerprintSourceType.GCS,
52
52
  bucketKey: fingerprintGCSBucketKey,
@@ -0,0 +1,12 @@
1
+ import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
2
+ /**
3
+ * Uploads the `eas.json` file to GCS as account-scoped object.
4
+ * Used in workflows. Takes care of logging progress.
5
+ */
6
+ export declare function uploadAccountScopedEasJsonAsync({ graphqlClient, accountId, projectDir, }: {
7
+ graphqlClient: ExpoGraphqlClient;
8
+ accountId: string;
9
+ projectDir: string;
10
+ }): Promise<{
11
+ easJsonBucketKey: string;
12
+ }>;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.uploadAccountScopedEasJsonAsync = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
+ const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
7
+ const node_path_1 = tslib_1.__importDefault(require("node:path"));
8
+ const generated_1 = require("../graphql/generated");
9
+ const uploads_1 = require("../uploads");
10
+ const files_1 = require("../utils/files");
11
+ const progress_1 = require("../utils/progress");
12
+ /**
13
+ * Uploads the `eas.json` file to GCS as account-scoped object.
14
+ * Used in workflows. Takes care of logging progress.
15
+ */
16
+ async function uploadAccountScopedEasJsonAsync({ graphqlClient, accountId, projectDir, }) {
17
+ const easJsonFilePath = node_path_1.default.join(projectDir, 'eas.json');
18
+ const easJsonFileStat = await node_fs_1.default.promises.stat(easJsonFilePath);
19
+ if (easJsonFileStat.size > 1024 * 1024) {
20
+ throw new Error('eas.json is too big. Maximum allowed size is 1MB.');
21
+ }
22
+ const easJsonBucketKey = await (0, uploads_1.uploadAccountScopedFileAtPathToGCSAsync)(graphqlClient, {
23
+ accountId,
24
+ type: generated_1.AccountUploadSessionType.WorkflowsProjectSources,
25
+ path: easJsonFilePath,
26
+ handleProgressEvent: (0, progress_1.createProgressTracker)({
27
+ total: easJsonFileStat.size,
28
+ message: ratio => `Uploading eas.json to EAS (${(0, files_1.formatBytes)(easJsonFileStat.size * ratio)} / ${(0, files_1.formatBytes)(easJsonFileStat.size)})`,
29
+ completedMessage: (duration) => `Uploaded eas.json to EAS ${chalk_1.default.dim(duration)}`,
30
+ }),
31
+ });
32
+ return { easJsonBucketKey };
33
+ }
34
+ exports.uploadAccountScopedEasJsonAsync = uploadAccountScopedEasJsonAsync;
@@ -0,0 +1,13 @@
1
+ import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
2
+ import { Client } from '../vcs/vcs';
3
+ /**
4
+ * Archives the project and uploads it to GCS as account-scoped object.
5
+ * Used in workflows. Takes care of logging progress and cleaning up the tarball.
6
+ */
7
+ export declare function uploadAccountScopedProjectSourceAsync({ graphqlClient, vcsClient, accountId, }: {
8
+ graphqlClient: ExpoGraphqlClient;
9
+ vcsClient: Client;
10
+ accountId: string;
11
+ }): Promise<{
12
+ projectArchiveBucketKey: string;
13
+ }>;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.uploadAccountScopedProjectSourceAsync = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
+ const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
7
+ const repository_1 = require("../build/utils/repository");
8
+ const generated_1 = require("../graphql/generated");
9
+ const log_1 = tslib_1.__importStar(require("../log"));
10
+ const uploads_1 = require("../uploads");
11
+ const files_1 = require("../utils/files");
12
+ const progress_1 = require("../utils/progress");
13
+ /**
14
+ * Archives the project and uploads it to GCS as account-scoped object.
15
+ * Used in workflows. Takes care of logging progress and cleaning up the tarball.
16
+ */
17
+ async function uploadAccountScopedProjectSourceAsync({ graphqlClient, vcsClient, accountId, }) {
18
+ let projectTarballPath;
19
+ try {
20
+ log_1.default.newLine();
21
+ log_1.default.log(`Compressing project files and uploading to EAS. ${(0, log_1.learnMore)('https://expo.fyi/eas-build-archive')}`);
22
+ const projectTarball = await (0, repository_1.makeProjectTarballAsync)(vcsClient);
23
+ projectTarballPath = projectTarball.path;
24
+ if (projectTarball.size > 1024 * 1024 * 100) {
25
+ log_1.default.warn(`Your project archive is ${(0, files_1.formatBytes)(projectTarball.size)}. You can reduce its size and the time it takes to upload by excluding files that are unnecessary for the build process in ${chalk_1.default.bold('.easignore')} file. ${(0, log_1.learnMore)('https://expo.fyi/eas-build-archive')}`);
26
+ }
27
+ if (projectTarball.size > 2 * 1024 * 1024 * 1024) {
28
+ throw new Error('Project archive is too big. Maximum allowed size is 2GB.');
29
+ }
30
+ const projectArchiveBucketKey = await (0, uploads_1.uploadAccountScopedFileAtPathToGCSAsync)(graphqlClient, {
31
+ accountId,
32
+ type: generated_1.AccountUploadSessionType.WorkflowsProjectSources,
33
+ path: projectTarball.path,
34
+ handleProgressEvent: (0, progress_1.createProgressTracker)({
35
+ total: projectTarball.size,
36
+ message: ratio => `Uploading project archive to EAS (${(0, files_1.formatBytes)(projectTarball.size * ratio)} / ${(0, files_1.formatBytes)(projectTarball.size)})`,
37
+ completedMessage: (duration) => `Uploaded project archive to EAS ${chalk_1.default.dim(duration)}`,
38
+ }),
39
+ });
40
+ return { projectArchiveBucketKey };
41
+ }
42
+ finally {
43
+ if (projectTarballPath) {
44
+ await node_fs_1.default.promises.rm(projectTarballPath);
45
+ }
46
+ }
47
+ }
48
+ exports.uploadAccountScopedProjectSourceAsync = uploadAccountScopedProjectSourceAsync;
@@ -1,10 +1,16 @@
1
1
  import { Response } from 'node-fetch';
2
2
  import { ExpoGraphqlClient } from './commandUtils/context/contextUtils/createGraphqlClient';
3
- import { UploadSessionType } from './graphql/generated';
3
+ import { AccountUploadSessionType, UploadSessionType } from './graphql/generated';
4
4
  import { ProgressHandler } from './utils/progress';
5
5
  export interface PresignedPost {
6
6
  url: string;
7
7
  fields: Record<string, string>;
8
8
  }
9
9
  export declare function uploadFileAtPathToGCSAsync(graphqlClient: ExpoGraphqlClient, type: UploadSessionType, path: string, handleProgressEvent?: ProgressHandler): Promise<string>;
10
+ export declare function uploadAccountScopedFileAtPathToGCSAsync(graphqlClient: ExpoGraphqlClient, { type, accountId, path, handleProgressEvent, }: {
11
+ type: AccountUploadSessionType;
12
+ accountId: string;
13
+ path: string;
14
+ handleProgressEvent: ProgressHandler;
15
+ }): Promise<string>;
10
16
  export declare function uploadWithPresignedPostWithRetryAsync(file: string, presignedPost: PresignedPost, onAssetUploadBegin: () => void): Promise<Response>;
package/build/uploads.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.uploadWithPresignedPostWithRetryAsync = exports.uploadFileAtPathToGCSAsync = void 0;
3
+ exports.uploadWithPresignedPostWithRetryAsync = exports.uploadAccountScopedFileAtPathToGCSAsync = exports.uploadFileAtPathToGCSAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const form_data_1 = tslib_1.__importDefault(require("form-data"));
6
6
  const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
@@ -13,6 +13,12 @@ async function uploadFileAtPathToGCSAsync(graphqlClient, type, path, handleProgr
13
13
  return signedUrl.bucketKey;
14
14
  }
15
15
  exports.uploadFileAtPathToGCSAsync = uploadFileAtPathToGCSAsync;
16
+ async function uploadAccountScopedFileAtPathToGCSAsync(graphqlClient, { type, accountId, path, handleProgressEvent, }) {
17
+ const signedUrl = await UploadSessionMutation_1.UploadSessionMutation.createAccountScopedUploadSessionAsync(graphqlClient, { type, accountID: accountId });
18
+ await uploadWithSignedUrlWithProgressAsync(path, signedUrl, handleProgressEvent);
19
+ return signedUrl.bucketKey;
20
+ }
21
+ exports.uploadAccountScopedFileAtPathToGCSAsync = uploadAccountScopedFileAtPathToGCSAsync;
16
22
  async function uploadWithPresignedPostWithRetryAsync(file, presignedPost, onAssetUploadBegin) {
17
23
  return await (0, promise_retry_1.default)(async (retry) => {
18
24
  // retry fetch errors (usually connection or DNS errors)
@@ -0,0 +1,12 @@
1
+ import { Env, Workflow } from '@expo/eas-build-job';
2
+ export declare function createFingerprintAsync(projectDir: string, options: {
3
+ workflow: Workflow;
4
+ platform: string;
5
+ debug?: boolean;
6
+ env: Env | undefined;
7
+ cwd?: string;
8
+ }): Promise<{
9
+ hash: string;
10
+ sources: object[];
11
+ isDebugSource: boolean;
12
+ } | null>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createFingerprintAsync = void 0;
4
+ const eas_build_job_1 = require("@expo/eas-build-job");
5
+ const resolve_from_1 = require("resolve-from");
6
+ async function createFingerprintAsync(projectDir, options) {
7
+ // @expo/fingerprint is exported in the expo package for SDK 52+
8
+ const fingerprintPath = (0, resolve_from_1.silent)(projectDir, 'expo/fingerprint');
9
+ if (!fingerprintPath) {
10
+ return null;
11
+ }
12
+ const Fingerprint = require(fingerprintPath);
13
+ const fingerprintOptions = {};
14
+ if (options.platform) {
15
+ fingerprintOptions.platforms = [options.platform];
16
+ }
17
+ if (options.workflow === eas_build_job_1.Workflow.MANAGED) {
18
+ fingerprintOptions.ignorePaths = ['android/**/*', 'ios/**/*'];
19
+ }
20
+ if (options.debug) {
21
+ fingerprintOptions.debug = true;
22
+ }
23
+ // eslint-disable-next-line @typescript-eslint/return-await
24
+ return await Fingerprint.createFingerprintAsync(projectDir, fingerprintOptions);
25
+ }
26
+ exports.createFingerprintAsync = createFingerprintAsync;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createProgressTracker = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
+ const node_crypto_1 = require("node:crypto");
6
7
  const timer_1 = require("./timer");
7
8
  const ora_1 = require("../ora");
8
9
  function createProgressTracker({ total, message, completedMessage, }) {
@@ -10,7 +11,7 @@ function createProgressTracker({ total, message, completedMessage, }) {
10
11
  let calcTotal = total ?? 0;
11
12
  let transferredSoFar = 0;
12
13
  let current = 0;
13
- const timerLabel = String(Date.now());
14
+ const timerLabel = String((0, node_crypto_1.randomUUID)());
14
15
  const getMessage = (v, total) => {
15
16
  const ratio = Math.min(Math.max(v, 0), 1);
16
17
  const percent = Math.floor(ratio * 100);