eas-cli 24.7.0 → 24.9.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 (87) hide show
  1. package/README.md +505 -278
  2. package/build/build/createContext.js +1 -2
  3. package/build/build/runBuildAndSubmit.js +4 -1
  4. package/build/commandUtils/supabase.d.ts +6 -1
  5. package/build/commandUtils/supabase.js +53 -0
  6. package/build/commandUtils/workflow/validation.d.ts +1 -0
  7. package/build/commandUtils/workflow/validation.js +19 -5
  8. package/build/commands/account/view.js +12 -0
  9. package/build/commands/integrations/asc/connect.js +3 -0
  10. package/build/commands/integrations/supabase/advisors.d.ts +16 -0
  11. package/build/commands/integrations/supabase/advisors.js +153 -0
  12. package/build/commands/simulator/availability.d.ts +0 -1
  13. package/build/commands/simulator/availability.js +0 -1
  14. package/build/commands/simulator/egress.d.ts +0 -1
  15. package/build/commands/simulator/egress.js +0 -1
  16. package/build/commands/simulator/events.d.ts +0 -1
  17. package/build/commands/simulator/events.js +4 -3
  18. package/build/commands/simulator/exec.d.ts +0 -1
  19. package/build/commands/simulator/exec.js +0 -1
  20. package/build/commands/simulator/get.d.ts +0 -1
  21. package/build/commands/simulator/get.js +1 -1
  22. package/build/commands/simulator/index.d.ts +2 -1
  23. package/build/commands/simulator/index.js +40 -21
  24. package/build/commands/simulator/list.d.ts +0 -1
  25. package/build/commands/simulator/list.js +4 -3
  26. package/build/commands/simulator/stop.d.ts +0 -1
  27. package/build/commands/simulator/stop.js +0 -1
  28. package/build/commands/submit/internal.d.ts +10 -1
  29. package/build/commands/submit/internal.js +26 -4
  30. package/build/commands/update/index.d.ts +2 -0
  31. package/build/commands/update/index.js +45 -4
  32. package/build/commands/update/republish.d.ts +1 -0
  33. package/build/commands/update/republish.js +6 -0
  34. package/build/commands/update/roll-back-to-embedded.d.ts +1 -0
  35. package/build/commands/update/roll-back-to-embedded.js +7 -1
  36. package/build/commands/update/rollback.d.ts +1 -0
  37. package/build/commands/update/rollback.js +11 -3
  38. package/build/commands/workflow/validate.js +1 -0
  39. package/build/credentials/context.js +7 -0
  40. package/build/credentials/ios/actions/AscApiKeyUtils.d.ts +2 -1
  41. package/build/credentials/ios/actions/AscApiKeyUtils.js +43 -4
  42. package/build/credentials/ios/appstore/AppStoreApi.d.ts +5 -0
  43. package/build/credentials/ios/appstore/AppStoreApi.js +18 -9
  44. package/build/credentials/ios/appstore/authenticate.d.ts +6 -0
  45. package/build/credentials/ios/appstore/authenticate.js +22 -1
  46. package/build/credentials/ios/appstore/resolveCredentials.js +16 -4
  47. package/build/devices/actions/create/developerPortalMethod.js +1 -1
  48. package/build/env.d.ts +4 -0
  49. package/build/env.js +4 -0
  50. package/build/fetch.js +2 -2
  51. package/build/graphql/generated.d.ts +348 -26
  52. package/build/graphql/generated.js +42 -3
  53. package/build/graphql/queries/SupabaseQuery.d.ts +2 -1
  54. package/build/graphql/queries/SupabaseQuery.js +42 -0
  55. package/build/graphql/queries/WorkflowJobSshQuery.d.ts +1 -0
  56. package/build/graphql/queries/WorkflowJobSshQuery.js +43 -0
  57. package/build/graphql/types/SupabaseConnection.d.ts +9 -2
  58. package/build/graphql/types/SupabaseConnection.js +16 -1
  59. package/build/integrations/asc/ascApiKey.js +2 -1
  60. package/build/integrations/shared/envFile.js +5 -3
  61. package/build/integrations/supabase/provision.d.ts +2 -2
  62. package/build/integrations/supabase/provision.js +6 -4
  63. package/build/metadata/auth.js +4 -4
  64. package/build/ora.js +12 -2
  65. package/build/project/maybeUploadSourceMapsAsync.d.ts +34 -0
  66. package/build/project/maybeUploadSourceMapsAsync.js +156 -0
  67. package/build/simulator/egress.d.ts +11 -4
  68. package/build/simulator/egress.js +72 -10
  69. package/build/simulator/env.d.ts +1 -0
  70. package/build/simulator/env.js +4 -1
  71. package/build/simulator/utils.d.ts +15 -5
  72. package/build/simulator/utils.js +33 -11
  73. package/build/submit/ios/AscApiKeySource.js +1 -1
  74. package/build/submit/ios/IosSubmitCommand.js +2 -2
  75. package/build/submit/ios/ensureTestFlightSetup.js +1 -4
  76. package/build/update/active-rollout.d.ts +8 -0
  77. package/build/update/active-rollout.js +82 -0
  78. package/build/update/republish.d.ts +4 -1
  79. package/build/update/republish.js +13 -3
  80. package/build/update/roll-back-to-embedded.d.ts +4 -1
  81. package/build/update/roll-back-to-embedded.js +14 -3
  82. package/build/uploads.js +5 -1
  83. package/build/user/expoBrowserAuthFlowLauncher.js +0 -1
  84. package/build/worker/upload.js +2 -2
  85. package/oclif.manifest.json +828 -668
  86. package/package.json +9 -8
  87. package/build/commandUtils/new/templates/CLAUDE.md +0 -1
@@ -7,9 +7,9 @@
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
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.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.DeviceRunSessionResourceClass = 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.TurtleSshTargetType = exports.TargetEntityMutationType = exports.SupabaseAdvisorType = exports.SupabaseAdvisorLintLevel = exports.SubmissionStatus = exports.SubmissionPriority = exports.SubmissionArchiveSourceType = exports.SubmissionAndroidReleaseStatus = exports.StatuspageServiceStatus = exports.StatuspageServiceName = exports.StatuspageIncidentStatus = exports.StatuspageIncidentImpact = exports.StandardOffer = exports.SecondFactorMethod = exports.SandboxStatus = 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 = 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 = 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;
13
13
  var AccountAppsSortByField;
14
14
  (function (AccountAppsSortByField) {
15
15
  AccountAppsSortByField["LatestActivityTime"] = "LATEST_ACTIVITY_TIME";
@@ -524,6 +524,16 @@ var DeviceRunSessionEgress;
524
524
  */
525
525
  DeviceRunSessionEgress["Local"] = "LOCAL";
526
526
  })(DeviceRunSessionEgress || (exports.DeviceRunSessionEgress = DeviceRunSessionEgress = {}));
527
+ /**
528
+ * The client that sent a session creation request, as reported by that client. Recorded
529
+ * for analytics only and never used for authorization.
530
+ */
531
+ var DeviceRunSessionRequestOrigin;
532
+ (function (DeviceRunSessionRequestOrigin) {
533
+ DeviceRunSessionRequestOrigin["EasCli"] = "EAS_CLI";
534
+ DeviceRunSessionRequestOrigin["Mcp"] = "MCP";
535
+ DeviceRunSessionRequestOrigin["Website"] = "WEBSITE";
536
+ })(DeviceRunSessionRequestOrigin || (exports.DeviceRunSessionRequestOrigin = DeviceRunSessionRequestOrigin = {}));
527
537
  var DeviceRunSessionResourceClass;
528
538
  (function (DeviceRunSessionResourceClass) {
529
539
  DeviceRunSessionResourceClass["Large"] = "LARGE";
@@ -534,6 +544,10 @@ var DeviceRunSessionStatus;
534
544
  DeviceRunSessionStatus["Errored"] = "ERRORED";
535
545
  DeviceRunSessionStatus["InProgress"] = "IN_PROGRESS";
536
546
  DeviceRunSessionStatus["New"] = "NEW";
547
+ /** The session's job run waits in the queue for a worker. */
548
+ DeviceRunSessionStatus["Queued"] = "QUEUED";
549
+ /** A worker runs the session's job and prepares the virtual device. */
550
+ DeviceRunSessionStatus["Starting"] = "STARTING";
537
551
  DeviceRunSessionStatus["Stopped"] = "STOPPED";
538
552
  })(DeviceRunSessionStatus || (exports.DeviceRunSessionStatus = DeviceRunSessionStatus = {}));
539
553
  var DeviceRunSessionType;
@@ -909,6 +923,7 @@ var Permission;
909
923
  Permission["Admin"] = "ADMIN";
910
924
  Permission["Own"] = "OWN";
911
925
  Permission["Publish"] = "PUBLISH";
926
+ Permission["PublishProtected"] = "PUBLISH_PROTECTED";
912
927
  Permission["View"] = "VIEW";
913
928
  })(Permission || (exports.Permission = Permission = {}));
914
929
  /** Which EAS surface a deep link was opened from; PostHog records it as an analytics label. */
@@ -990,11 +1005,24 @@ var Role;
990
1005
  Role["Admin"] = "ADMIN";
991
1006
  Role["Custom"] = "CUSTOM";
992
1007
  Role["Developer"] = "DEVELOPER";
1008
+ /** @deprecated No longer supported */
993
1009
  Role["HasAdmin"] = "HAS_ADMIN";
1010
+ /** @deprecated No longer supported */
994
1011
  Role["NotAdmin"] = "NOT_ADMIN";
995
1012
  Role["Owner"] = "OWNER";
1013
+ Role["ReleaseManager"] = "RELEASE_MANAGER";
996
1014
  Role["ViewOnly"] = "VIEW_ONLY";
997
1015
  })(Role || (exports.Role = Role = {}));
1016
+ var SandboxOperatingSystem;
1017
+ (function (SandboxOperatingSystem) {
1018
+ SandboxOperatingSystem["Linux"] = "LINUX";
1019
+ SandboxOperatingSystem["Macos"] = "MACOS";
1020
+ })(SandboxOperatingSystem || (exports.SandboxOperatingSystem = SandboxOperatingSystem = {}));
1021
+ var SandboxResourceClass;
1022
+ (function (SandboxResourceClass) {
1023
+ SandboxResourceClass["Large"] = "LARGE";
1024
+ SandboxResourceClass["Medium"] = "MEDIUM";
1025
+ })(SandboxResourceClass || (exports.SandboxResourceClass = SandboxResourceClass = {}));
998
1026
  var SandboxStatus;
999
1027
  (function (SandboxStatus) {
1000
1028
  SandboxStatus["Errored"] = "ERRORED";
@@ -1012,6 +1040,10 @@ var SecondFactorMethod;
1012
1040
  */
1013
1041
  SecondFactorMethod["Sms"] = "SMS";
1014
1042
  })(SecondFactorMethod || (exports.SecondFactorMethod = SecondFactorMethod = {}));
1043
+ var SourceMapSourceType;
1044
+ (function (SourceMapSourceType) {
1045
+ SourceMapSourceType["Gcs"] = "GCS";
1046
+ })(SourceMapSourceType || (exports.SourceMapSourceType = SourceMapSourceType = {}));
1015
1047
  var StandardOffer;
1016
1048
  (function (StandardOffer) {
1017
1049
  /** $29 USD per month, 30 day trial */
@@ -1152,6 +1184,7 @@ var UploadSessionType;
1152
1184
  UploadSessionType["EasSubmitGcsAppArchive"] = "EAS_SUBMIT_GCS_APP_ARCHIVE";
1153
1185
  UploadSessionType["EasUpdateAssetsMetadata"] = "EAS_UPDATE_ASSETS_METADATA";
1154
1186
  UploadSessionType["EasUpdateFingerprint"] = "EAS_UPDATE_FINGERPRINT";
1187
+ UploadSessionType["EasUpdateSourceMaps"] = "EAS_UPDATE_SOURCE_MAPS";
1155
1188
  })(UploadSessionType || (exports.UploadSessionType = UploadSessionType = {}));
1156
1189
  var UsageMetricType;
1157
1190
  (function (UsageMetricType) {
@@ -1346,6 +1379,7 @@ var WorkflowJobType;
1346
1379
  WorkflowJobType["Testflight"] = "TESTFLIGHT";
1347
1380
  WorkflowJobType["Update"] = "UPDATE";
1348
1381
  WorkflowJobType["UpdateRollout"] = "UPDATE_ROLLOUT";
1382
+ WorkflowJobType["WorkflowCall"] = "WORKFLOW_CALL";
1349
1383
  })(WorkflowJobType || (exports.WorkflowJobType = WorkflowJobType = {}));
1350
1384
  var WorkflowProjectSourceType;
1351
1385
  (function (WorkflowProjectSourceType) {
@@ -1384,6 +1418,11 @@ var WorkflowRunTriggerEventType;
1384
1418
  WorkflowRunTriggerEventType["Manual"] = "MANUAL";
1385
1419
  WorkflowRunTriggerEventType["RepackExpoGo"] = "REPACK_EXPO_GO";
1386
1420
  WorkflowRunTriggerEventType["Schedule"] = "SCHEDULE";
1421
+ WorkflowRunTriggerEventType["SentryIssueArchived"] = "SENTRY_ISSUE_ARCHIVED";
1422
+ WorkflowRunTriggerEventType["SentryIssueAssigned"] = "SENTRY_ISSUE_ASSIGNED";
1423
+ WorkflowRunTriggerEventType["SentryIssueCreated"] = "SENTRY_ISSUE_CREATED";
1424
+ WorkflowRunTriggerEventType["SentryIssueResolved"] = "SENTRY_ISSUE_RESOLVED";
1425
+ WorkflowRunTriggerEventType["SentryIssueUnresolved"] = "SENTRY_ISSUE_UNRESOLVED";
1387
1426
  })(WorkflowRunTriggerEventType || (exports.WorkflowRunTriggerEventType = WorkflowRunTriggerEventType = {}));
1388
1427
  var WorkflowsInsightsExportFormat;
1389
1428
  (function (WorkflowsInsightsExportFormat) {
@@ -1,5 +1,5 @@
1
1
  import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
- import { SupabaseConnectionData, SupabaseProjectData } from '../types/SupabaseConnection';
2
+ import { SupabaseAdvisorLintsData, SupabaseAdvisorType, SupabaseConnectionData, SupabaseProjectData } from '../types/SupabaseConnection';
3
3
  export declare const SupabaseQuery: {
4
4
  getSupabaseConnectionByAccountIdAsync(graphqlClient: ExpoGraphqlClient, accountId: string, { useCache }?: {
5
5
  useCache?: boolean;
@@ -7,4 +7,5 @@ export declare const SupabaseQuery: {
7
7
  getSupabaseProjectByAppIdAsync(graphqlClient: ExpoGraphqlClient, appId: string, { useCache }?: {
8
8
  useCache?: boolean;
9
9
  }): Promise<SupabaseProjectData | null>;
10
+ getSupabaseAdvisorLintsByAppIdAsync(graphqlClient: ExpoGraphqlClient, appId: string, types?: readonly SupabaseAdvisorType[]): Promise<SupabaseAdvisorLintsData | null>;
10
11
  };
@@ -51,4 +51,46 @@ exports.SupabaseQuery = {
51
51
  .toPromise());
52
52
  return data.app.byId.supabaseProject ?? null;
53
53
  },
54
+ async getSupabaseAdvisorLintsByAppIdAsync(graphqlClient, appId, types = [
55
+ SupabaseConnection_1.SupabaseAdvisorType.Security,
56
+ SupabaseConnection_1.SupabaseAdvisorType.Performance,
57
+ ]) {
58
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
59
+ .query((0, graphql_tag_1.default) `
60
+ query SupabaseAdvisorLintsByAppId(
61
+ $appId: String!
62
+ $security: Boolean!
63
+ $performance: Boolean!
64
+ ) {
65
+ app {
66
+ byId(appId: $appId) {
67
+ id
68
+ supabaseProject {
69
+ id
70
+ ...SupabaseProjectFragment
71
+ security: advisorLints(type: SECURITY) @include(if: $security) {
72
+ ...SupabaseAdvisorLintFragment
73
+ }
74
+ performance: advisorLints(type: PERFORMANCE) @include(if: $performance) {
75
+ ...SupabaseAdvisorLintFragment
76
+ }
77
+ }
78
+ }
79
+ }
80
+ }
81
+ ${(0, graphql_1.print)(SupabaseConnection_1.SupabaseProjectFragmentNode)}
82
+ ${(0, graphql_1.print)(SupabaseConnection_1.SupabaseAdvisorLintFragmentNode)}
83
+ `, {
84
+ appId,
85
+ security: types.includes(SupabaseConnection_1.SupabaseAdvisorType.Security),
86
+ performance: types.includes(SupabaseConnection_1.SupabaseAdvisorType.Performance),
87
+ }, { additionalTypenames: ['App', 'SupabaseProject'], requestPolicy: 'network-only' })
88
+ .toPromise());
89
+ const project = data.app.byId.supabaseProject;
90
+ if (!project) {
91
+ return null;
92
+ }
93
+ const { security, performance, ...projectData } = project;
94
+ return { project: projectData, security: security ?? null, performance: performance ?? null };
95
+ },
54
96
  };
@@ -15,6 +15,7 @@ export type WorkflowJobSshConnectInfo = {
15
15
  };
16
16
  export declare const WorkflowJobSshQuery: {
17
17
  connectInfoForWorkflowJobAsync(graphqlClient: ExpoGraphqlClient, workflowJobId: string): Promise<WorkflowJobSshConnectInfo | null>;
18
+ connectInfoForBuildAsync(graphqlClient: ExpoGraphqlClient, buildId: string): Promise<WorkflowJobSshConnectInfo | null>;
18
19
  connectInfoForJobRunAsync(graphqlClient: ExpoGraphqlClient, jobRunId: string): Promise<WorkflowJobSshConnectInfo | null>;
19
20
  connectInfoForResourceIdAsync(graphqlClient: ExpoGraphqlClient, resourceId: string): Promise<WorkflowJobSshConnectInfo | null>;
20
21
  };
@@ -11,6 +11,11 @@ const FINAL_WORKFLOW_JOB_STATUSES = new Set([
11
11
  generated_1.WorkflowJobStatus.Canceled,
12
12
  generated_1.WorkflowJobStatus.Skipped,
13
13
  ]);
14
+ const FINAL_BUILD_STATUSES = new Set([
15
+ generated_1.BuildStatus.Errored,
16
+ generated_1.BuildStatus.Finished,
17
+ generated_1.BuildStatus.Canceled,
18
+ ]);
14
19
  const FINAL_JOB_RUN_STATUSES = new Set([
15
20
  generated_1.JobRunStatus.Errored,
16
21
  generated_1.JobRunStatus.Finished,
@@ -88,6 +93,43 @@ exports.WorkflowJobSshQuery = {
88
93
  }
89
94
  return toConnectInfo(data.workflowJobs.byId);
90
95
  },
96
+ async connectInfoForBuildAsync(graphqlClient, buildId) {
97
+ let data;
98
+ try {
99
+ data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
100
+ .query((0, graphql_tag_1.default) `
101
+ query BuildSshPoll($buildId: ID!) {
102
+ builds {
103
+ byId(buildId: $buildId) {
104
+ id
105
+ status
106
+ sshSession {
107
+ id
108
+ connectionConfig {
109
+ host
110
+ secret
111
+ reconnecting
112
+ }
113
+ }
114
+ }
115
+ }
116
+ }
117
+ `, { buildId }, { requestPolicy: 'network-only' })
118
+ .toPromise());
119
+ }
120
+ catch (error) {
121
+ if (isNotFoundError(error)) {
122
+ return null;
123
+ }
124
+ throw error;
125
+ }
126
+ const build = data.builds.byId;
127
+ return {
128
+ sshRequested: build.sshSession !== null,
129
+ jobCompleted: FINAL_BUILD_STATUSES.has(build.status),
130
+ session: build.sshSession,
131
+ };
132
+ },
91
133
  async connectInfoForJobRunAsync(graphqlClient, jobRunId) {
92
134
  let data;
93
135
  try {
@@ -128,6 +170,7 @@ exports.WorkflowJobSshQuery = {
128
170
  },
129
171
  async connectInfoForResourceIdAsync(graphqlClient, resourceId) {
130
172
  return ((await exports.WorkflowJobSshQuery.connectInfoForWorkflowJobAsync(graphqlClient, resourceId)) ??
173
+ (await exports.WorkflowJobSshQuery.connectInfoForBuildAsync(graphqlClient, resourceId)) ??
131
174
  (await exports.WorkflowJobSshQuery.connectInfoForJobRunAsync(graphqlClient, resourceId)));
132
175
  },
133
176
  };
@@ -1,8 +1,15 @@
1
- import { SupabaseConnection, SupabaseOAuthStart, SupabaseOrganization, SupabaseProject } from '../generated';
2
- export { BeginSupabaseOAuthInput, LinkSupabaseProjectInput, ProvisionAdditionalSupabaseProjectInput, ProvisionSupabaseProjectInput, SetSupabaseConnectionOrganizationInput, } from '../generated';
1
+ import { SupabaseAdvisorLint, SupabaseConnection, SupabaseOAuthStart, SupabaseOrganization, SupabaseProject } from '../generated';
2
+ export { SupabaseAdvisorLintLevel, SupabaseAdvisorType, BeginSupabaseOAuthInput, LinkSupabaseProjectInput, ProvisionAdditionalSupabaseProjectInput, ProvisionSupabaseProjectInput, SetSupabaseConnectionOrganizationInput, } from '../generated';
3
3
  export type SupabaseOrganizationData = Pick<SupabaseOrganization, 'id' | 'slug' | 'name'>;
4
4
  export type SupabaseConnectionData = Pick<SupabaseConnection, 'id' | 'supabaseOrganizationSlug' | 'supabaseOrganizationName' | 'createdAt' | 'updatedAt'>;
5
5
  export type SupabaseProjectData = Pick<SupabaseProject, 'id' | 'supabaseProjectRef' | 'supabaseProjectName' | 'supabaseProjectUrl' | 'supabaseRegion' | 'createdAt' | 'updatedAt'>;
6
6
  export type SupabaseOAuthStartData = Pick<SupabaseOAuthStart, 'url'>;
7
+ export type SupabaseAdvisorLintData = Pick<SupabaseAdvisorLint, 'name' | 'title' | 'level' | 'description' | 'detail' | 'entity' | 'remediation' | 'cacheKey'>;
8
+ export type SupabaseAdvisorLintsData = {
9
+ project: SupabaseProjectData;
10
+ security: SupabaseAdvisorLintData[] | null;
11
+ performance: SupabaseAdvisorLintData[] | null;
12
+ };
7
13
  export declare const SupabaseConnectionFragmentNode: import("graphql").DocumentNode;
8
14
  export declare const SupabaseProjectFragmentNode: import("graphql").DocumentNode;
15
+ export declare const SupabaseAdvisorLintFragmentNode: import("graphql").DocumentNode;
@@ -1,8 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SupabaseProjectFragmentNode = exports.SupabaseConnectionFragmentNode = void 0;
3
+ exports.SupabaseAdvisorLintFragmentNode = exports.SupabaseProjectFragmentNode = exports.SupabaseConnectionFragmentNode = exports.SupabaseAdvisorType = exports.SupabaseAdvisorLintLevel = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
6
+ var generated_1 = require("../generated");
7
+ Object.defineProperty(exports, "SupabaseAdvisorLintLevel", { enumerable: true, get: function () { return generated_1.SupabaseAdvisorLintLevel; } });
8
+ Object.defineProperty(exports, "SupabaseAdvisorType", { enumerable: true, get: function () { return generated_1.SupabaseAdvisorType; } });
6
9
  exports.SupabaseConnectionFragmentNode = (0, graphql_tag_1.default) `
7
10
  fragment SupabaseConnectionFragment on SupabaseConnection {
8
11
  id
@@ -23,3 +26,15 @@ exports.SupabaseProjectFragmentNode = (0, graphql_tag_1.default) `
23
26
  updatedAt
24
27
  }
25
28
  `;
29
+ exports.SupabaseAdvisorLintFragmentNode = (0, graphql_tag_1.default) `
30
+ fragment SupabaseAdvisorLintFragment on SupabaseAdvisorLint {
31
+ name
32
+ title
33
+ level
34
+ description
35
+ detail
36
+ entity
37
+ remediation
38
+ cacheKey
39
+ }
40
+ `;
@@ -4,7 +4,8 @@ exports.selectOrCreateAscApiKeyIdAsync = selectOrCreateAscApiKeyIdAsync;
4
4
  const prompts_1 = require("../../prompts");
5
5
  const AscApiKeyUtils_1 = require("../../credentials/ios/actions/AscApiKeyUtils");
6
6
  async function selectOrCreateAscApiKeyIdAsync({ credentialsContext, existingKeys, ownerAccount, }) {
7
- const sortedKeys = (0, AscApiKeyUtils_1.sortAscApiKeysByUpdatedAtDesc)(existingKeys);
7
+ // Individual API keys are not supported for the ASC connection yet.
8
+ const sortedKeys = (0, AscApiKeyUtils_1.sortAscApiKeysByUpdatedAtDesc)((0, AscApiKeyUtils_1.filterOutIndividualAscApiKeys)(existingKeys));
8
9
  const createKeyOption = {
9
10
  title: '[Create or upload a new API key]',
10
11
  value: '__create_new_key__',
@@ -54,12 +54,14 @@ function mergeEnvContent(rawContent, newVars) {
54
54
  let match;
55
55
  while ((match = regex.exec(rawContent)) !== null) {
56
56
  const key = match[1];
57
- if (!Object.hasOwn(newVars, key) || !match.indices) {
57
+ const indices = match.indices;
58
+ const keyRange = indices?.[1];
59
+ if (!Object.hasOwn(newVars, key) || !indices || !keyRange) {
58
60
  continue;
59
61
  }
60
62
  // match[0] runs past the value onto a following comment line, so spans come from the groups.
61
- const [keyStart, keyEnd] = match.indices[1];
62
- const valueRange = match.indices[2];
63
+ const [keyStart, keyEnd] = keyRange;
64
+ const valueRange = indices[2];
63
65
  const definitionEnd = valueRange
64
66
  ? valueRange[1] - (/\s+$/.exec(match[2])?.[0].length ?? 0)
65
67
  : keyEnd + (/^[ \t]*(?:=[ \t]*|:[ \t]+)/.exec(rawContent.slice(keyEnd))?.[0].length ?? 0);
@@ -24,9 +24,9 @@ export declare function pollProvisionReceiptAsync(graphqlClient: ExpoGraphqlClie
24
24
  export declare function authorizeViaBrowserAsync(graphqlClient: ExpoGraphqlClient, account: {
25
25
  id: string;
26
26
  name: string;
27
- }, nonInteractive: boolean): Promise<SupabaseConnectionData>;
27
+ }, nonInteractive: boolean, previousUpdatedAt?: string): Promise<SupabaseConnectionData>;
28
28
  export declare function loadOrganizationsBestEffortAsync(graphqlClient: ExpoGraphqlClient, accountId: string): Promise<SupabaseOrganizationData[] | null>;
29
- export declare function pollForConnectionAsync(graphqlClient: ExpoGraphqlClient, accountId: string): Promise<SupabaseConnectionData>;
29
+ export declare function pollForConnectionAsync(graphqlClient: ExpoGraphqlClient, accountId: string, previousUpdatedAt?: string): Promise<SupabaseConnectionData>;
30
30
  export declare function resolvePublishableKeyAsync(graphqlClient: ExpoGraphqlClient, appId: string, project: SupabaseProjectData): Promise<string>;
31
31
  export declare function resolveRegionAsync(flagValue: string | undefined, nonInteractive: boolean): Promise<string>;
32
32
  export declare function resolveOrganizationAsync(graphqlClient: ExpoGraphqlClient, accountId: string, connection: SupabaseConnectionData, organizationFlag: string | undefined, nonInteractive: boolean, preloadedOrganizations: SupabaseOrganizationData[] | null): Promise<SupabaseConnectionData>;
@@ -101,7 +101,7 @@ async function pollProvisionReceiptAsync(graphqlClient, receipt, { startMessage,
101
101
  throw toProvisionPollError(error, { hint: failureHint });
102
102
  }
103
103
  }
104
- async function authorizeViaBrowserAsync(graphqlClient, account, nonInteractive) {
104
+ async function authorizeViaBrowserAsync(graphqlClient, account, nonInteractive, previousUpdatedAt) {
105
105
  if (nonInteractive) {
106
106
  throw new Error(`Connecting Supabase requires approving access in a browser, which isn't possible in non-interactive mode. Re-run \`eas integrations:supabase:connect\` interactively.`);
107
107
  }
@@ -114,7 +114,7 @@ async function authorizeViaBrowserAsync(graphqlClient, account, nonInteractive)
114
114
  void (0, better_opn_1.default)(url).catch(() => false);
115
115
  const spinner = (0, ora_1.ora)('Waiting for you to authorize in Supabase (up to 15 minutes; press Ctrl-C to cancel)').start();
116
116
  try {
117
- const connection = await pollForConnectionAsync(graphqlClient, account.id);
117
+ const connection = await pollForConnectionAsync(graphqlClient, account.id, previousUpdatedAt);
118
118
  const organizations = await loadOrganizationsBestEffortAsync(graphqlClient, account.id);
119
119
  spinner.succeed(`Connected Supabase organization ${chalk_1.default.bold((0, supabase_1.formatSupabaseOrganization)(connection, organizations ?? undefined))}`);
120
120
  return connection;
@@ -132,7 +132,7 @@ async function loadOrganizationsBestEffortAsync(graphqlClient, accountId) {
132
132
  return null;
133
133
  }
134
134
  }
135
- async function pollForConnectionAsync(graphqlClient, accountId) {
135
+ async function pollForConnectionAsync(graphqlClient, accountId, previousUpdatedAt) {
136
136
  const deadline = Date.now() + CONNECTION_POLL_TIMEOUT_MS;
137
137
  let consecutiveErrors = 0;
138
138
  for (;;) {
@@ -150,7 +150,9 @@ async function pollForConnectionAsync(graphqlClient, accountId) {
150
150
  throw error;
151
151
  }
152
152
  }
153
- if (connection) {
153
+ // Reauthorization updates the existing connection; its presence alone is not completion.
154
+ if (connection &&
155
+ (previousUpdatedAt === undefined || connection.updatedAt !== previousUpdatedAt)) {
154
156
  return connection;
155
157
  }
156
158
  if (Date.now() >= deadline) {
@@ -28,9 +28,9 @@ async function resolveAppStoreBundleIdentifierAsync(projectDir, profile, exp, vc
28
28
  */
29
29
  async function tryResolveAscApiKeyAsync({ profile, graphqlClient, projectId, exp, bundleId, }) {
30
30
  // 1. Check submit profile for ASC API key fields
31
- if ('ascApiKeyPath' in profile && 'ascApiKeyIssuerId' in profile && 'ascApiKeyId' in profile) {
31
+ if ('ascApiKeyPath' in profile && 'ascApiKeyId' in profile) {
32
32
  const { ascApiKeyPath, ascApiKeyIssuerId, ascApiKeyId } = profile;
33
- if (ascApiKeyPath && ascApiKeyIssuerId && ascApiKeyId) {
33
+ if (ascApiKeyPath && ascApiKeyId) {
34
34
  const keyP8 = await fs_1.default.promises.readFile(ascApiKeyPath, 'utf-8');
35
35
  // Also try to get teamId from the profile if available
36
36
  const teamId = 'appleTeamId' in profile ? profile.appleTeamId : undefined;
@@ -112,8 +112,8 @@ async function getAppStoreAuthAsync({ projectDir, profile, exp, credentialsCtx,
112
112
  }
113
113
  if (nonInteractive) {
114
114
  throw new Error('No App Store Connect API Key found. In non-interactive mode, provide one via:\n' +
115
- ' - Environment variables: EXPO_ASC_API_KEY_PATH, EXPO_ASC_KEY_ID, EXPO_ASC_ISSUER_ID\n' +
116
- ' - eas.json submit profile: ascApiKeyPath, ascApiKeyId, ascApiKeyIssuerId\n' +
115
+ ' - Environment variables: EXPO_ASC_API_KEY_PATH, EXPO_ASC_KEY_ID, EXPO_ASC_ISSUER_ID (omit the issuer ID for individual API keys)\n' +
116
+ ' - eas.json submit profile: ascApiKeyPath, ascApiKeyId, ascApiKeyIssuerId (omit the issuer ID for individual API keys)\n' +
117
117
  ' - EAS credentials service: run `eas credentials` to set up an API key');
118
118
  }
119
119
  // Fall back to interactive cookie auth
package/build/ora.js CHANGED
@@ -29,13 +29,19 @@ function isSpinnerEnabled() {
29
29
  function ora(options) {
30
30
  const inputOptions = typeof options === 'string' ? { text: options } : (options ?? {});
31
31
  const disabled = !isSpinnerEnabled();
32
+ // In non-interactive mode, send the stream to stdout so it prevents looking like an error.
33
+ const stream = inputOptions.stream ?? (disabled ? process.stdout : process.stderr);
32
34
  const spinner = (0, ora_1.default)({
33
35
  // Ensure our non-interactive mode emulates CI mode.
34
36
  isEnabled: !disabled,
35
- // In non-interactive mode, send the stream to stdout so it prevents looking like an error.
36
- stream: disabled ? process.stdout : process.stderr,
37
37
  ...inputOptions,
38
+ stream,
38
39
  });
40
+ // ora only recounts the wrapped lines of its text when the text changes. After the
41
+ // terminal gets narrower, it clears too few lines and every frame leaves a copy behind.
42
+ const onResize = () => {
43
+ spinner.text = spinner.text;
44
+ };
39
45
  const oraStart = spinner.start.bind(spinner);
40
46
  const oraStop = spinner.stop.bind(spinner);
41
47
  const oraStopAndPersist = spinner.stopAndPersist.bind(spinner);
@@ -89,17 +95,21 @@ function ora(options) {
89
95
  // Skipping wrapping native logs removes the repeated interleaved "Exporting..." messages.
90
96
  if (!disabled) {
91
97
  wrapNativeLogs();
98
+ stream.off('resize', onResize);
99
+ stream.on('resize', onResize);
92
100
  }
93
101
  return oraStart(text);
94
102
  };
95
103
  spinner.stopAndPersist = (options) => {
96
104
  const result = oraStopAndPersist(options);
97
105
  resetNativeLogs();
106
+ stream.off('resize', onResize);
98
107
  return result;
99
108
  };
100
109
  spinner.stop = () => {
101
110
  const result = oraStop();
102
111
  resetNativeLogs();
112
+ stream.off('resize', onResize);
103
113
  return result;
104
114
  };
105
115
  return spinner;
@@ -0,0 +1,34 @@
1
+ import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
2
+ import { SourceMapSourceInput } from '../graphql/generated';
3
+ /** Platforms for which EAS stores a source map. The GraphQL SourceMapGroup input has no `web`. */
4
+ export declare const SOURCE_MAP_PLATFORMS: readonly ["android", "ios"];
5
+ export type SourceMapPlatform = (typeof SOURCE_MAP_PLATFORMS)[number];
6
+ export type SourceMapSources = Partial<Record<SourceMapPlatform, SourceMapSourceInput>>;
7
+ /**
8
+ * Maximum size the EAS upload session accepts for a source map. Mirrors `maxSizeBytes` for
9
+ * `GCS_EAS_UPDATE_SOURCE_MAPS` in the server's upload configuration.
10
+ */
11
+ export declare const MAX_SOURCE_MAP_SIZE_BYTES: number;
12
+ export declare function isSourceMapPlatform(platform: string): platform is SourceMapPlatform;
13
+ /**
14
+ * Upload the source map that `expo export` emitted for each native platform.
15
+ *
16
+ * Publishing must never fail because of a source map, so every failure path warns and yields no
17
+ * entry for that platform.
18
+ */
19
+ export declare function maybeUploadSourceMapsAsync(distRoot: string, graphqlClient: ExpoGraphqlClient): Promise<SourceMapSources | null>;
20
+ /**
21
+ * Find the source map for each native platform in the export directory.
22
+ *
23
+ * The maps are not listed in metadata.json, so they are located relative to the bundle that
24
+ * metadata.json does name. That ties each map to the bundle actually being published.
25
+ */
26
+ export declare function resolveSourceMapPathsAsync(distRoot: string): Promise<Partial<Record<SourceMapPlatform, string>>>;
27
+ /**
28
+ * Write a copy of the source map with every `sourcesContent` removed.
29
+ *
30
+ * Symbolication needs `mappings`, `sources` and `names`; `sourcesContent` only supplies the source
31
+ * text shown around a frame, and it is the bulk of a Hermes source map. The copy goes to a temporary
32
+ * directory so the export directory is left untouched.
33
+ */
34
+ export declare function stripSourcesContentAsync(sourceMapPath: string, platform: SourceMapPlatform): Promise<string>;