eas-cli 24.11.0 → 24.12.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.
@@ -6,10 +6,20 @@
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.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.AppObserveUserEventNamesOrderByField = exports.AppObserveUserEventListOrderByField = exports.AppObserveUserEventBreakdownDimension = exports.AppObserveUpdatesOrderByField = exports.AppObserveUpdatesOrderByDirection = exports.AppObservePropertyType = exports.AppObservePlatform = exports.AppObserveOrderDirection = exports.AppObserveNavigationRoutesOrderByField = exports.AppObserveMetricsListOrderByField = exports.AppObserveLogsOrderByField = exports.AppObserveEventsOrderByField = exports.AppObserveEventsOrderByDirection = exports.AppObserveErrorSeverity = exports.AppObserveErrorOccurrencesOrderByField = exports.AppObserveErrorKind = exports.AppObserveErrorGroupsOrderBy = exports.AppObserveErrorBreakdownDimension = exports.AppObserveCustomEventNamesOrderByField = exports.AppObserveCustomEventNamesOrderByDirection = exports.AppObserveCustomEventListOrderByField = exports.AppInternalDistributionBuildPrivacy = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AndroidBuildType = exports.AgentProviderConnectionStatus = exports.AgentProviderConnectionAuthorizationStatus = exports.AgentProvider = exports.ActivityTimelineProjectActivityType = exports.AccountUploadSessionType = exports.AccountMemberType = exports.AccountAppsSortByField = void 0;
10
- 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.DeviceRunSessionResourceClass = exports.DeviceRunSessionRequestOrigin = exports.DeviceRunSessionEgress = exports.DashboardViewPin = 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 = void 0;
11
- exports.SubmissionStatus = exports.SubmissionPriority = exports.SubmissionArchiveSourceType = exports.SubmissionAndroidReleaseStatus = exports.StatuspageServiceStatus = exports.StatuspageServiceName = exports.StatuspageIncidentStatus = exports.StatuspageIncidentImpact = exports.StandardOffer = exports.SourceMapSourceType = exports.SecondFactorMethod = exports.SandboxStatus = exports.SandboxResourceClass = exports.SandboxOperatingSystem = 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 = 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;
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 = 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.TurtleSshTargetType = exports.TargetEntityMutationType = exports.SupabaseAdvisorType = exports.SupabaseAdvisorLintLevel = void 0;
9
+ 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.AppObserveUserEventNamesOrderByField = exports.AppObserveUserEventListOrderByField = exports.AppObserveUserEventBreakdownDimension = exports.AppObserveUpdatesOrderByField = exports.AppObserveUpdatesOrderByDirection = exports.AppObservePropertyType = exports.AppObservePlatform = exports.AppObserveOrderDirection = exports.AppObserveNavigationRoutesOrderByField = exports.AppObserveMetricsListOrderByField = exports.AppObserveLogsOrderByField = exports.AppObserveEventsOrderByField = exports.AppObserveEventsOrderByDirection = exports.AppObserveErrorSeverity = exports.AppObserveErrorOccurrencesOrderByField = exports.AppObserveErrorKind = exports.AppObserveErrorGroupsOrderBy = exports.AppObserveErrorBreakdownDimension = exports.AppObserveCustomEventNamesOrderByField = exports.AppObserveCustomEventNamesOrderByDirection = exports.AppObserveCustomEventListOrderByField = exports.AppInternalDistributionBuildPrivacy = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AndroidBuildType = exports.AgentProviderConnectionStatus = exports.AgentProviderConnectionAuthorizationStatus = exports.AgentProvider = exports.ActivityTimelineProjectActivityType = exports.AccountUploadSessionType = exports.AccountMemberType = exports.AccountAppsSortByField = exports.AccessTokenScopeType = void 0;
10
+ 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.DeviceRunSessionResourceClass = exports.DeviceRunSessionRequestOrigin = exports.DeviceRunSessionEgress = exports.DashboardViewPin = 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.BuildAnnotationType = void 0;
11
+ exports.SubmissionPriority = exports.SubmissionArchiveSourceType = exports.SubmissionAndroidReleaseStatus = exports.StatuspageServiceStatus = exports.StatuspageServiceName = exports.StatuspageIncidentStatus = exports.StatuspageIncidentImpact = exports.StandardOffer = exports.SourceMapSourceType = exports.SecondFactorMethod = exports.SandboxStatus = exports.SandboxResourceClass = exports.SandboxOperatingSystem = 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 = 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 = 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 = 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.TurtleSshTargetType = exports.TargetEntityMutationType = exports.SupabaseAdvisorType = exports.SupabaseAdvisorLintLevel = exports.SubmissionStatus = void 0;
13
+ var AccessTokenScopeType;
14
+ (function (AccessTokenScopeType) {
15
+ /** One account, named by accountID, narrowed to the scope's permissions. */
16
+ AccessTokenScopeType["Account"] = "ACCOUNT";
17
+ /**
18
+ * Every account the token's owner has permissions on at request time, narrowed to the
19
+ * scope's permissions.
20
+ */
21
+ AccessTokenScopeType["AllAccounts"] = "ALL_ACCOUNTS";
22
+ })(AccessTokenScopeType || (exports.AccessTokenScopeType = AccessTokenScopeType = {}));
13
23
  var AccountAppsSortByField;
14
24
  (function (AccountAppsSortByField) {
15
25
  AccountAppsSortByField["LatestActivityTime"] = "LATEST_ACTIVITY_TIME";
@@ -583,7 +593,6 @@ var EasBuildWaiverType;
583
593
  })(EasBuildWaiverType || (exports.EasBuildWaiverType = EasBuildWaiverType = {}));
584
594
  var EasService;
585
595
  (function (EasService) {
586
- EasService["Agent"] = "AGENT";
587
596
  EasService["Builds"] = "BUILDS";
588
597
  EasService["Jobs"] = "JOBS";
589
598
  EasService["Mcp"] = "MCP";
@@ -595,7 +604,6 @@ var EasServiceMetric;
595
604
  EasServiceMetric["AssetsRequests"] = "ASSETS_REQUESTS";
596
605
  EasServiceMetric["BandwidthUsage"] = "BANDWIDTH_USAGE";
597
606
  EasServiceMetric["Builds"] = "BUILDS";
598
- EasServiceMetric["CreditUsage"] = "CREDIT_USAGE";
599
607
  EasServiceMetric["LocalBuilds"] = "LOCAL_BUILDS";
600
608
  EasServiceMetric["ManifestRequests"] = "MANIFEST_REQUESTS";
601
609
  EasServiceMetric["McpRequests"] = "MCP_REQUESTS";
@@ -1104,7 +1112,9 @@ var SubmissionAndroidReleaseStatus;
1104
1112
  })(SubmissionAndroidReleaseStatus || (exports.SubmissionAndroidReleaseStatus = SubmissionAndroidReleaseStatus = {}));
1105
1113
  var SubmissionArchiveSourceType;
1106
1114
  (function (SubmissionArchiveSourceType) {
1115
+ /** @deprecated Submit with the build ID instead. */
1107
1116
  SubmissionArchiveSourceType["GcsBuildApplicationArchive"] = "GCS_BUILD_APPLICATION_ARCHIVE";
1117
+ /** @deprecated Submit with the build ID instead. */
1108
1118
  SubmissionArchiveSourceType["GcsBuildApplicationArchiveOrchestrator"] = "GCS_BUILD_APPLICATION_ARCHIVE_ORCHESTRATOR";
1109
1119
  SubmissionArchiveSourceType["GcsSubmitArchive"] = "GCS_SUBMIT_ARCHIVE";
1110
1120
  SubmissionArchiveSourceType["Url"] = "URL";
@@ -1190,7 +1200,6 @@ var UsageMetricType;
1190
1200
  (function (UsageMetricType) {
1191
1201
  UsageMetricType["Bandwidth"] = "BANDWIDTH";
1192
1202
  UsageMetricType["Build"] = "BUILD";
1193
- UsageMetricType["Credit"] = "CREDIT";
1194
1203
  UsageMetricType["Event"] = "EVENT";
1195
1204
  UsageMetricType["Minute"] = "MINUTE";
1196
1205
  UsageMetricType["Request"] = "REQUEST";
@@ -1,7 +1,12 @@
1
1
  import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
- import { UpdateByIdQueryVariables, UpdateFragment, ViewUpdateGroupsOnAppQueryVariables, ViewUpdateGroupsOnBranchQueryVariables, ViewUpdateGroupsPaginatedOnBranchQueryVariables, ViewUpdatesByGroupQueryVariables } from '../generated';
2
+ import { UpdateByIdQueryVariables, UpdateFragment, UpdateWithFileUrlsFragment, ViewUpdateGroupsOnAppQueryVariables, ViewUpdateGroupsOnBranchQueryVariables, ViewUpdateGroupsPaginatedOnBranchQueryVariables, ViewUpdatesByGroupQueryVariables, ViewUpdatesByGroupWithFileUrlsQueryVariables } from '../generated';
3
3
  export declare const UpdateQuery: {
4
4
  viewUpdateGroupAsync(graphqlClient: ExpoGraphqlClient, { groupId }: ViewUpdatesByGroupQueryVariables): Promise<UpdateFragment[]>;
5
+ /**
6
+ * Same as viewUpdateGroupAsync, but also fetches the signed asset map and source map URLs.
7
+ * Those are signed per request on the server, so only use this when the URLs are shown.
8
+ */
9
+ viewUpdateGroupWithFileUrlsAsync(graphqlClient: ExpoGraphqlClient, { groupId }: ViewUpdatesByGroupWithFileUrlsQueryVariables): Promise<UpdateWithFileUrlsFragment[]>;
5
10
  viewUpdateGroupsOnBranchAsync(graphqlClient: ExpoGraphqlClient, { limit, offset, appId, branchName, filter }: ViewUpdateGroupsOnBranchQueryVariables): Promise<UpdateFragment[][]>;
6
11
  viewUpdateGroupsPaginatedOnBranchAsync(graphqlClient: ExpoGraphqlClient, { appId, branchName, first, last, after, before, filter, }: ViewUpdateGroupsPaginatedOnBranchQueryVariables): Promise<UpdateFragment[][]>;
7
12
  viewUpdateGroupsOnAppAsync(graphqlClient: ExpoGraphqlClient, { limit, offset, appId, filter }: ViewUpdateGroupsOnAppQueryVariables): Promise<UpdateFragment[][]>;
@@ -26,6 +26,29 @@ exports.UpdateQuery = {
26
26
  }
27
27
  return updatesByGroup;
28
28
  },
29
+ /**
30
+ * Same as viewUpdateGroupAsync, but also fetches the signed asset map and source map URLs.
31
+ * Those are signed per request on the server, so only use this when the URLs are shown.
32
+ */
33
+ async viewUpdateGroupWithFileUrlsAsync(graphqlClient, { groupId }) {
34
+ const { updatesByGroup } = await (0, client_1.withErrorHandlingAsync)(graphqlClient
35
+ .query((0, graphql_tag_1.default) `
36
+ query ViewUpdatesByGroupWithFileUrls($groupId: ID!) {
37
+ updatesByGroup(group: $groupId) {
38
+ id
39
+ ...UpdateWithFileUrlsFragment
40
+ }
41
+ }
42
+ ${(0, graphql_1.print)(Update_1.UpdateWithFileUrlsFragmentNode)}
43
+ `, {
44
+ groupId,
45
+ }, { additionalTypenames: ['Update'] })
46
+ .toPromise());
47
+ if (updatesByGroup.length === 0) {
48
+ throw new Error(`Could not find any updates with group ID: "${groupId}"`);
49
+ }
50
+ return updatesByGroup;
51
+ },
29
52
  async viewUpdateGroupsOnBranchAsync(graphqlClient, { limit, offset, appId, branchName, filter }) {
30
53
  const response = await (0, client_1.withErrorHandlingAsync)(graphqlClient
31
54
  .query((0, graphql_tag_1.default) `
@@ -36,6 +36,8 @@ function isNotFoundError(error) {
36
36
  return error.graphQLErrors.some(e => {
37
37
  const code = e?.extensions?.errorCode ?? e?.extensions?.code;
38
38
  return (code === 'ENTITY_NOT_FOUND' ||
39
+ code === 'BUILD_NOT_FOUND' ||
40
+ code === 'NOT_FOUND_ERROR' ||
39
41
  /Entity not found/i.test(e?.message ?? '') ||
40
42
  /not found/i.test(e?.message ?? ''));
41
43
  });
@@ -1 +1,8 @@
1
1
  export declare const UpdateFragmentNode: import("graphql").DocumentNode;
2
+ /**
3
+ * UpdateFragment plus the stored file URLs.
4
+ *
5
+ * Each URL is signed on demand by the server, which is not free, so only query this where the
6
+ * URLs are actually shown. List queries should use UpdateFragment.
7
+ */
8
+ export declare const UpdateWithFileUrlsFragmentNode: import("graphql").DocumentNode;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpdateFragmentNode = void 0;
3
+ exports.UpdateWithFileUrlsFragmentNode = exports.UpdateFragmentNode = void 0;
4
4
  const tslib_1 = require("tslib");
5
+ const graphql_1 = require("graphql");
5
6
  const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
6
7
  exports.UpdateFragmentNode = (0, graphql_tag_1.default) `
7
8
  fragment UpdateFragment on Update {
@@ -61,3 +62,18 @@ exports.UpdateFragmentNode = (0, graphql_tag_1.default) `
61
62
  assetHostOverride
62
63
  }
63
64
  `;
65
+ /**
66
+ * UpdateFragment plus the stored file URLs.
67
+ *
68
+ * Each URL is signed on demand by the server, which is not free, so only query this where the
69
+ * URLs are actually shown. List queries should use UpdateFragment.
70
+ */
71
+ exports.UpdateWithFileUrlsFragmentNode = (0, graphql_tag_1.default) `
72
+ fragment UpdateWithFileUrlsFragment on Update {
73
+ id
74
+ ...UpdateFragment
75
+ assetMapUrl
76
+ sourceMapUrl
77
+ }
78
+ ${(0, graphql_1.print)(exports.UpdateFragmentNode)}
79
+ `;
@@ -0,0 +1,20 @@
1
+ import { AnalyticsEventProperties } from '../analytics/AnalyticsManager';
2
+ /** Matches www's `request_origin` value for eas-cli, though this CLI does not send it to www yet. */
3
+ export declare const SIMULATOR_REQUEST_ORIGIN = "eas-cli";
4
+ export type SimulatorRequestFailureReason = 'network_error' | 'timeout';
5
+ export declare function simulatorRequestProperties({ projectId, type, platform, hasBuildId, hasArchiveUrl, expoGo, packageVersion, nonInteractive, }: {
6
+ projectId: string;
7
+ type: string;
8
+ platform: string;
9
+ hasBuildId: boolean;
10
+ hasArchiveUrl: boolean;
11
+ expoGo: boolean;
12
+ packageVersion?: string;
13
+ nonInteractive: boolean;
14
+ }): AnalyticsEventProperties;
15
+ /**
16
+ * Why the create request got no answer, or null when the server answered. A server refusal is
17
+ * not a client failure: www reports it as an admission denial, so counting it here would count
18
+ * the same attempt twice.
19
+ */
20
+ export declare function simulatorRequestFailureReason(error: unknown): SimulatorRequestFailureReason | null;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SIMULATOR_REQUEST_ORIGIN = void 0;
4
+ exports.simulatorRequestProperties = simulatorRequestProperties;
5
+ exports.simulatorRequestFailureReason = simulatorRequestFailureReason;
6
+ const core_1 = require("@urql/core");
7
+ /** Matches www's `request_origin` value for eas-cli, though this CLI does not send it to www yet. */
8
+ exports.SIMULATOR_REQUEST_ORIGIN = 'eas-cli';
9
+ const TIMEOUT_CODES = new Set([
10
+ 'ETIMEDOUT',
11
+ 'ESOCKETTIMEDOUT',
12
+ 'UND_ERR_CONNECT_TIMEOUT',
13
+ 'UND_ERR_HEADERS_TIMEOUT',
14
+ ]);
15
+ function simulatorRequestProperties({ projectId, type, platform, hasBuildId, hasArchiveUrl, expoGo, packageVersion, nonInteractive, }) {
16
+ return {
17
+ project_id: projectId,
18
+ origin: exports.SIMULATOR_REQUEST_ORIGIN,
19
+ type,
20
+ platform: platform.toLowerCase(),
21
+ has_build_id: hasBuildId,
22
+ has_archive_url: hasArchiveUrl,
23
+ expo_go: expoGo,
24
+ ...(packageVersion ? { requested_package_version: packageVersion } : {}),
25
+ non_interactive: nonInteractive,
26
+ };
27
+ }
28
+ /**
29
+ * Why the create request got no answer, or null when the server answered. A server refusal is
30
+ * not a client failure: www reports it as an admission denial, so counting it here would count
31
+ * the same attempt twice.
32
+ */
33
+ function simulatorRequestFailureReason(error) {
34
+ if (!(error instanceof core_1.CombinedError) || !error.networkError || error.graphQLErrors.length > 0) {
35
+ return null;
36
+ }
37
+ // urql attaches the HTTP response to non-2xx answers too, such as a 504 from the load balancer.
38
+ // An answer arrived, so www may have seen the request already.
39
+ if (error.response) {
40
+ return null;
41
+ }
42
+ const networkError = error.networkError;
43
+ const code = networkError.code ?? networkError.cause?.code;
44
+ if ((code && TIMEOUT_CODES.has(code)) ||
45
+ networkError.name === 'AbortError' ||
46
+ networkError.name === 'TimeoutError') {
47
+ return 'timeout';
48
+ }
49
+ return 'network_error';
50
+ }
@@ -1,6 +1,6 @@
1
1
  import { ExpoConfig } from '@expo/config';
2
2
  import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
3
- import { AppPlatform, PartnerActor, Robot, SsoUser, Update, UpdateBranchFragment, UpdateFragment, UpdatePublishMutation, User } from '../graphql/generated';
3
+ import { AppPlatform, PartnerActor, Robot, SsoUser, Update, UpdateBranchFragment, UpdateFragment, UpdatePublishMutation, UpdateWithFileUrlsFragment, User } from '../graphql/generated';
4
4
  import { RequestedPlatform } from '../platform';
5
5
  export type FormatUpdateParameter = Pick<Update, 'id' | 'createdAt' | 'message'> & {
6
6
  actor?: Pick<Robot, '__typename' | 'firstName'> | Pick<User, '__typename' | 'username'> | Pick<SsoUser, '__typename' | 'username'> | Pick<PartnerActor, '__typename' | 'username'> | null;
@@ -9,6 +9,7 @@ export type UpdateJsonInfo = {
9
9
  branch: string;
10
10
  runtimeVersion: string;
11
11
  } & Pick<UpdateFragment, 'id' | 'createdAt' | 'group' | 'message' | 'platform' | 'manifestPermalink' | 'gitCommitHash'>;
12
+ export type UpdateWithFileUrlsJsonInfo = UpdateJsonInfo & Pick<UpdateWithFileUrlsFragment, 'assetMapUrl' | 'sourceMapUrl'>;
12
13
  export type UpdateGroupDescription = FormatUpdateParameter & {
13
14
  branch: string;
14
15
  group: string;
@@ -52,6 +53,11 @@ export declare function formatUpdateMessage(update: FormatUpdateParameter): stri
52
53
  export declare function ensureValidVersions(exp: ExpoConfig, platform: RequestedPlatform): void;
53
54
  export declare function formatUpdateTitle(update: UpdateFragment): string;
54
55
  export declare function getUpdateJsonInfosForUpdates(updates: UpdateFragment[]): UpdateJsonInfo[];
56
+ /**
57
+ * Same as getUpdateJsonInfosForUpdates, with the stored file URLs. Only `eas update:view` queries
58
+ * those, because the server signs each one per request.
59
+ */
60
+ export declare function getUpdateWithFileUrlsJsonInfosForUpdates(updates: UpdateWithFileUrlsFragment[]): UpdateWithFileUrlsJsonInfo[];
55
61
  export declare function getUpdateGroupDescriptions(updateGroups: UpdateFragment[][]): FormattedUpdateGroupDescription[];
56
62
  export declare function getUpdateGroupDescriptionsWithBranch(updateGroups: UpdateFragment[][]): FormattedUpdateGroupDescriptionWithBranch[];
57
63
  export declare function getBranchDescription(branch: UpdateBranchFragment): FormattedBranchDescription;
@@ -10,6 +10,7 @@ exports.formatUpdateMessage = formatUpdateMessage;
10
10
  exports.ensureValidVersions = ensureValidVersions;
11
11
  exports.formatUpdateTitle = formatUpdateTitle;
12
12
  exports.getUpdateJsonInfosForUpdates = getUpdateJsonInfosForUpdates;
13
+ exports.getUpdateWithFileUrlsJsonInfosForUpdates = getUpdateWithFileUrlsJsonInfosForUpdates;
13
14
  exports.getUpdateGroupDescriptions = getUpdateGroupDescriptions;
14
15
  exports.getUpdateGroupDescriptionsWithBranch = getUpdateGroupDescriptionsWithBranch;
15
16
  exports.getBranchDescription = getBranchDescription;
@@ -140,6 +141,19 @@ function getUpdateJsonInfosForUpdates(updates) {
140
141
  gitCommitHash: update.gitCommitHash,
141
142
  }));
142
143
  }
144
+ /**
145
+ * Same as getUpdateJsonInfosForUpdates, with the stored file URLs. Only `eas update:view` queries
146
+ * those, because the server signs each one per request.
147
+ */
148
+ function getUpdateWithFileUrlsJsonInfosForUpdates(updates) {
149
+ return getUpdateJsonInfosForUpdates(updates).map((info, index) => ({
150
+ ...info,
151
+ // Null unless the update was published with an asset map. The URL is signed and expires.
152
+ assetMapUrl: updates[index].assetMapUrl ?? null,
153
+ // Null unless published with `--upload-source-maps`. The URL is signed and expires.
154
+ sourceMapUrl: updates[index].sourceMapUrl ?? null,
155
+ }));
156
+ }
143
157
  function getUpdateGroupDescriptions(updateGroups) {
144
158
  return updateGroups.map(updateGroup => ({
145
159
  message: formatUpdateMessage(updateGroup[0]),
@@ -118,8 +118,10 @@ async function getAppPathAsync(outputDir, applicationExtension) {
118
118
  if (appFilePaths.length === 0) {
119
119
  throw Error('Did not find any installable apps inside tarball.');
120
120
  }
121
- if (appFilePaths.length === 1) {
122
- return path_1.default.join(outputDir, appFilePaths[0]);
121
+ // App Clips are nested inside their containing iOS app and cannot be run independently.
122
+ const installableAppPaths = appFilePaths.filter(filePath => !appFilePaths.some(parentPath => filePath.startsWith(`${parentPath}/`)));
123
+ if (installableAppPaths.length === 1) {
124
+ return path_1.default.join(outputDir, installableAppPaths[0]);
123
125
  }
124
126
  log_1.default.newLine();
125
127
  log_1.default.log('Detected multiple apps in the tarball:');
@@ -129,7 +131,7 @@ async function getAppPathAsync(outputDir, applicationExtension) {
129
131
  message: 'Select the app to run:',
130
132
  name: 'selectedFile',
131
133
  choices: [
132
- ...appFilePaths.map(filePath => ({
134
+ ...installableAppPaths.map(filePath => ({
133
135
  title: filePath,
134
136
  value: filePath,
135
137
  })),