From b36194cf11b17ccd6ceac830d196065f6315ad85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Chmiela?= Date: Fri, 20 Dec 2024 22:16:34 +0100 Subject: [PATCH 1/4] Regenerate GraphQL code --- packages/eas-cli/graphql.schema.json | 955 +++++++++++++++++----- packages/eas-cli/src/graphql/generated.ts | 75 +- 2 files changed, 831 insertions(+), 199 deletions(-) diff --git a/packages/eas-cli/graphql.schema.json b/packages/eas-cli/graphql.schema.json index e99613d5ff..10b70b4d43 100644 --- a/packages/eas-cli/graphql.schema.json +++ b/packages/eas-cli/graphql.schema.json @@ -1777,6 +1777,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "isFreeAppDevDomainTier", + "description": "Whether an Account plan falls into AppDevDomainName's free or paid tier", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "isSSOEnabled", "description": "Whether this account has SSO enabled. Can be queried by all members.", @@ -1865,6 +1881,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "profileImageUrl", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "pushSecurityEnabled", "description": null, @@ -10309,6 +10341,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "usageMetrics", + "description": "Project query object for querying EAS usage metrics", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppUsageMetrics", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "username", "description": null, @@ -13404,6 +13452,321 @@ ], "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "AppUsageMetric", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metricType", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "UsageMetricType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "serviceMetric", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "EASServiceMetric", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "timestamp", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "value", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppUsageMetricTotal", + "description": null, + "fields": [ + { + "name": "billingPeriod", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "BillingPeriod", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "planMetrics", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EstimatedUsage", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCost", + "description": "Total cost of overages, in cents", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppUsageMetrics", + "description": null, + "fields": [ + { + "name": "byBillingPeriod", + "description": null, + "args": [ + { + "name": "date", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "service", + "description": null, + "type": { + "kind": "ENUM", + "name": "EASService", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppUsageMetricTotal", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metricsForServiceMetric", + "description": null, + "args": [ + { + "name": "filterParams", + "description": null, + "type": { + "kind": "SCALAR", + "name": "JSONObject", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "granularity", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "UsageMetricsGranularity", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "serviceMetric", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "EASServiceMetric", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "timespan", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UsageMetricsTimespan", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppUsageMetric", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "AppVersion", @@ -22289,6 +22652,26 @@ "description": null, "fields": null, "inputFields": [ + { + "name": "crashKind", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "WorkerDeploymentCrashKind", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "name", "description": null, @@ -38120,6 +38503,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "environment", + "description": null, + "type": { + "kind": "ENUM", + "name": "EnvironmentVariableEnvironment", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "excludedAssets", "description": null, @@ -38404,6 +38799,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "isLimitExceeded", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "isVerifiedBot", "description": null, @@ -38955,6 +39362,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "githubAppInstallations", + "description": "GitHub App Installations that manage this actor", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GitHubAppInstallation", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "id", "description": null, @@ -38987,6 +39418,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "isManagedByGitHubApp", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "lastDeletionAttemptTime", "description": null, @@ -44251,7 +44698,7 @@ "inputFields": [ { "name": "bucketKey", - "description": "Required if the archive source type is GCS_BUILD_APPLICATION_ARCHIVE or GCS_SUBMIT_ARCHIVE", + "description": "Required if the archive source type is GCS_BUILD_APPLICATION_ARCHIVE, GCS_BUILD_APPLICATION_ARCHIVE_ORCHESTRATOR or GCS_SUBMIT_ARCHIVE", "type": { "kind": "SCALAR", "name": "String", @@ -44308,6 +44755,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "GCS_BUILD_APPLICATION_ARCHIVE_ORCHESTRATOR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "GCS_SUBMIT_ARCHIVE", "description": null, @@ -45454,6 +45907,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "environment", + "description": null, + "args": [], + "type": { + "kind": "ENUM", + "name": "EnvironmentVariableEnvironment", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "expoGoSDKVersion", "description": null, @@ -53034,120 +53499,15 @@ "deprecationReason": null }, { - "name": "crashes", - "description": null, - "args": [ - { - "name": "filters", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "CrashesFilters", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "timespan", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "DatasetTimespan", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "WorkerDeploymentCrashes", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "createdAt", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "deploymentDomain", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "deploymentIdentifier", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "WorkerDeploymentIdentifier", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "devDomainName", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "DevDomainName", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", + "name": "app", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", + "kind": "OBJECT", + "name": "App", "ofType": null } }, @@ -53155,60 +53515,7 @@ "deprecationReason": null }, { - "name": "initiatingActor", - "description": null, - "args": [], - "type": { - "kind": "INTERFACE", - "name": "Actor", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "logs", - "description": null, - "args": [ - { - "name": "limit", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "500", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "timespan", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "LogsTimespan", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "WorkerDeploymentLogs", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "requests", + "name": "crashes", "description": null, "args": [ { @@ -53216,7 +53523,7 @@ "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "RequestsFilters", + "name": "CrashesFilters", "ofType": null }, "defaultValue": null, @@ -53242,14 +53549,30 @@ ], "type": { "kind": "OBJECT", - "name": "WorkerDeploymentRequests", + "name": "WorkerDeploymentCrashes", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "subdomain", + "name": "createdAt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deploymentDomain", "description": null, "args": [], "type": { @@ -53265,17 +53588,163 @@ "deprecationReason": null }, { - "name": "tier", + "name": "deploymentIdentifier", "description": null, "args": [], "type": { - "kind": "ENUM", - "name": "WorkerDeploymentTier", + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "WorkerDeploymentIdentifier", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "devDomainName", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DevDomainName", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "initiatingActor", + "description": null, + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "logs", + "description": null, + "args": [ + { + "name": "limit", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": "500", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "timespan", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "LogsTimespan", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "WorkerDeploymentLogs", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, + { + "name": "requests", + "description": null, + "args": [ + { + "name": "filters", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "RequestsFilters", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "timespan", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DatasetTimespan", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "WorkerDeploymentRequests", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subdomain", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "url", "description": null, @@ -53612,6 +54081,53 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "ENUM", + "name": "WorkerDeploymentCrashKind", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "EXCEEDED_CPU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EXCEEDED_MEMORY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EXCEEDED_SUBREQUESTS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GENERIC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INTERNAL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RESPONSE_STREAM_DISCONNECTED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, { "kind": "OBJECT", "name": "WorkerDeploymentCrashNode", @@ -53633,6 +54149,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "crashKind", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "WorkerDeploymentCrashKind", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "crashTimestamp", "description": null, @@ -54700,6 +55232,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "isLimitExceeded", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "isRejected", "description": null, @@ -55838,6 +56386,34 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "limitExceededPerMs", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "limitExceededSum", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "requestsPerMs", "description": null, @@ -56559,29 +57135,6 @@ "enumValues": null, "possibleTypes": null }, - { - "kind": "ENUM", - "name": "WorkerDeploymentTier", - "description": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "FREE", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "PAID", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, { "kind": "OBJECT", "name": "WorkerDeploymentsConnection", @@ -57380,6 +57933,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "DEPLOY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "GET_BUILD", "description": null, @@ -57435,6 +57994,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "packageJsonBucketKey", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "projectArchiveBucketKey", "description": null, diff --git a/packages/eas-cli/src/graphql/generated.ts b/packages/eas-cli/src/graphql/generated.ts index f19fa907df..1b7d092fd5 100644 --- a/packages/eas-cli/src/graphql/generated.ts +++ b/packages/eas-cli/src/graphql/generated.ts @@ -133,6 +133,8 @@ export type Account = { id: Scalars['ID']['output']; isCurrent: Scalars['Boolean']['output']; isDisabled: Scalars['Boolean']['output']; + /** Whether an Account plan falls into AppDevDomainName's free or paid tier */ + isFreeAppDevDomainTier: Scalars['Boolean']['output']; /** Whether this account has SSO enabled. Can be queried by all members. */ isSSOEnabled: Scalars['Boolean']['output']; lastDeletionAttemptTime?: Maybe; @@ -143,6 +145,7 @@ export type Account = { owner?: Maybe; /** Owning UserActor of this account if personal account */ ownerUserActor?: Maybe; + profileImageUrl: Scalars['String']['output']; pushSecurityEnabled: Scalars['Boolean']['output']; /** @deprecated Legacy access tokens are deprecated */ requiresAccessTokenForPushSecurity: Scalars['Boolean']['output']; @@ -1366,6 +1369,8 @@ export type App = Project & { /** EAS updates owned by an app */ updates: Array; updatesPaginated: AppUpdatesConnection; + /** Project query object for querying EAS usage metrics */ + usageMetrics: AppUsageMetrics; /** @deprecated Use ownerAccount.name instead */ username: Scalars['String']['output']; /** @deprecated No longer supported */ @@ -2053,6 +2058,44 @@ export enum AppUploadSessionType { ProfileImageUpload = 'PROFILE_IMAGE_UPLOAD' } +export type AppUsageMetric = { + __typename?: 'AppUsageMetric'; + id: Scalars['ID']['output']; + metricType: UsageMetricType; + serviceMetric: EasServiceMetric; + timestamp: Scalars['DateTime']['output']; + value: Scalars['Float']['output']; +}; + +export type AppUsageMetricTotal = { + __typename?: 'AppUsageMetricTotal'; + billingPeriod: BillingPeriod; + id: Scalars['ID']['output']; + planMetrics: Array; + /** Total cost of overages, in cents */ + totalCost: Scalars['Float']['output']; +}; + +export type AppUsageMetrics = { + __typename?: 'AppUsageMetrics'; + byBillingPeriod: AppUsageMetricTotal; + metricsForServiceMetric: Array; +}; + + +export type AppUsageMetricsByBillingPeriodArgs = { + date: Scalars['DateTime']['input']; + service?: InputMaybe; +}; + + +export type AppUsageMetricsMetricsForServiceMetricArgs = { + filterParams?: InputMaybe; + granularity: UsageMetricsGranularity; + serviceMetric: EasServiceMetric; + timespan: UsageMetricsTimespan; +}; + /** Represents Play Store/App Store version of an application */ export type AppVersion = { __typename?: 'AppVersion'; @@ -3294,6 +3337,7 @@ export enum CrashSampleFor { } export type CrashesFilters = { + crashKind?: InputMaybe>; name?: InputMaybe>; }; @@ -5512,6 +5556,7 @@ export type PublicArtifacts = { export type PublishUpdateGroupInput = { awaitingCodeSigningInfo?: InputMaybe; branchId: Scalars['String']['input']; + environment?: InputMaybe; excludedAssets?: InputMaybe>; fingerprintInfoGroup?: InputMaybe; gitCommitHash?: InputMaybe; @@ -5541,6 +5586,7 @@ export type RequestsFilters = { hasCustomDomainOrigin?: InputMaybe; isAsset?: InputMaybe; isCrash?: InputMaybe; + isLimitExceeded?: InputMaybe; isVerifiedBot?: InputMaybe; method?: InputMaybe>; os?: InputMaybe>; @@ -5617,8 +5663,11 @@ export type Robot = Actor & { */ featureGates: Scalars['JSONObject']['output']; firstName?: Maybe; + /** GitHub App Installations that manage this actor */ + githubAppInstallations: Array; id: Scalars['ID']['output']; isExpoAdmin: Scalars['Boolean']['output']; + isManagedByGitHubApp: Scalars['Boolean']['output']; lastDeletionAttemptTime?: Maybe; }; @@ -6383,7 +6432,7 @@ export enum SubmissionAndroidTrack { } export type SubmissionArchiveSourceInput = { - /** Required if the archive source type is GCS_BUILD_APPLICATION_ARCHIVE or GCS_SUBMIT_ARCHIVE */ + /** Required if the archive source type is GCS_BUILD_APPLICATION_ARCHIVE, GCS_BUILD_APPLICATION_ARCHIVE_ORCHESTRATOR or GCS_SUBMIT_ARCHIVE */ bucketKey?: InputMaybe; type: SubmissionArchiveSourceType; /** Required if the archive source type is URL */ @@ -6392,6 +6441,7 @@ export type SubmissionArchiveSourceInput = { export enum SubmissionArchiveSourceType { GcsBuildApplicationArchive = 'GCS_BUILD_APPLICATION_ARCHIVE', + GcsBuildApplicationArchiveOrchestrator = 'GCS_BUILD_APPLICATION_ARCHIVE_ORCHESTRATOR', GcsSubmitArchive = 'GCS_SUBMIT_ARCHIVE', Url = 'URL' } @@ -6549,6 +6599,7 @@ export type Update = ActivityTimelineProjectActivity & { codeSigningInfo?: Maybe; createdAt: Scalars['DateTime']['output']; deployments: DeploymentResult; + environment?: Maybe; expoGoSDKVersion?: Maybe; fingerprint?: Maybe; gitCommitHash?: Maybe; @@ -7641,6 +7692,7 @@ export type WorkerDeployment = ActivityTimelineProjectActivity & { activityTimestamp: Scalars['DateTime']['output']; actor?: Maybe; aliases?: Maybe>; + app: App; crashes?: Maybe; createdAt: Scalars['DateTime']['output']; deploymentDomain: Scalars['String']['output']; @@ -7651,7 +7703,6 @@ export type WorkerDeployment = ActivityTimelineProjectActivity & { logs?: Maybe; requests?: Maybe; subdomain: Scalars['String']['output']; - tier?: Maybe; url: Scalars['String']['output']; }; @@ -7705,9 +7756,19 @@ export type WorkerDeploymentCrashEdge = { request?: Maybe; }; +export enum WorkerDeploymentCrashKind { + ExceededCpu = 'EXCEEDED_CPU', + ExceededMemory = 'EXCEEDED_MEMORY', + ExceededSubrequests = 'EXCEEDED_SUBREQUESTS', + Generic = 'GENERIC', + Internal = 'INTERNAL', + ResponseStreamDisconnected = 'RESPONSE_STREAM_DISCONNECTED' +} + export type WorkerDeploymentCrashNode = { __typename?: 'WorkerDeploymentCrashNode'; crashHash: Scalars['ID']['output']; + crashKind: WorkerDeploymentCrashKind; crashTimestamp: Scalars['DateTime']['output']; deploymentIdentifier: Scalars['String']['output']; firstStackLine?: Maybe; @@ -7819,6 +7880,7 @@ export type WorkerDeploymentRequestNode = { hasCustomDomainOrigin: Scalars['Boolean']['output']; isAsset: Scalars['Boolean']['output']; isCrash: Scalars['Boolean']['output']; + isLimitExceeded: Scalars['Boolean']['output']; isRejected: Scalars['Boolean']['output']; isStaleIfError: Scalars['Boolean']['output']; isStaleWhileRevalidate: Scalars['Boolean']['output']; @@ -7929,6 +7991,8 @@ export type WorkerDeploymentRequestsAggregationNode = { durationP50: Scalars['Float']['output']; durationP90: Scalars['Float']['output']; durationP99: Scalars['Float']['output']; + limitExceededPerMs?: Maybe; + limitExceededSum: Scalars['Int']['output']; requestsPerMs?: Maybe; requestsSum: Scalars['Int']['output']; sampleRate?: Maybe; @@ -8004,11 +8068,6 @@ export type WorkerDeploymentRequestsTimeseriesEdge = { timestamp: Scalars['DateTime']['output']; }; -export enum WorkerDeploymentTier { - Free = 'FREE', - Paid = 'PAID' -} - export type WorkerDeploymentsConnection = { __typename?: 'WorkerDeploymentsConnection'; edges: Array; @@ -8112,6 +8171,7 @@ export enum WorkflowJobType { AppleDeviceRegistrationRequest = 'APPLE_DEVICE_REGISTRATION_REQUEST', Build = 'BUILD', Custom = 'CUSTOM', + Deploy = 'DEPLOY', GetBuild = 'GET_BUILD', MaestroTest = 'MAESTRO_TEST', RequireApproval = 'REQUIRE_APPROVAL', @@ -8121,6 +8181,7 @@ export enum WorkflowJobType { export type WorkflowProjectSourceInput = { easJsonBucketKey: Scalars['String']['input']; + packageJsonBucketKey?: InputMaybe; projectArchiveBucketKey: Scalars['String']['input']; type: WorkflowProjectSourceType; }; From 1873a63f946b05b21e4f168e15dc3c52bda209f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Chmiela?= Date: Fri, 20 Dec 2024 22:18:48 +0100 Subject: [PATCH 2/4] Replace `uploadAccountScopedEasJsonAsync` with `uploadAccountScopedFileAsync` --- packages/eas-cli/src/commands/workflow/run.ts | 7 +-- .../uploadAccountScopedEasJsonAsync.ts | 47 ------------------ .../project/uploadAccountScopedFileAsync.ts | 49 +++++++++++++++++++ 3 files changed, 53 insertions(+), 50 deletions(-) delete mode 100644 packages/eas-cli/src/project/uploadAccountScopedEasJsonAsync.ts create mode 100644 packages/eas-cli/src/project/uploadAccountScopedFileAsync.ts diff --git a/packages/eas-cli/src/commands/workflow/run.ts b/packages/eas-cli/src/commands/workflow/run.ts index fb8f97041f..0637eb0621 100644 --- a/packages/eas-cli/src/commands/workflow/run.ts +++ b/packages/eas-cli/src/commands/workflow/run.ts @@ -9,7 +9,7 @@ import { WorkflowRevisionMutation } from '../../graphql/mutations/WorkflowRevisi import { WorkflowRunMutation } from '../../graphql/mutations/WorkflowRunMutation'; import Log, { link } from '../../log'; import { getOwnerAccountForProjectIdAsync } from '../../project/projectUtils'; -import { uploadAccountScopedEasJsonAsync } from '../../project/uploadAccountScopedEasJsonAsync'; +import { uploadAccountScopedFileAsync } from '../../project/uploadAccountScopedFileAsync'; import { uploadAccountScopedProjectSourceAsync } from '../../project/uploadAccountScopedProjectSourceAsync'; import { WorkflowFile } from '../../utils/workflowFile'; @@ -88,10 +88,11 @@ export default class WorkflowRun extends EasCommand { vcsClient, accountId: account.id, })); - ({ easJsonBucketKey } = await uploadAccountScopedEasJsonAsync({ + ({ fileBucketKey: easJsonBucketKey } = await uploadAccountScopedFileAsync({ graphqlClient, accountId: account.id, - projectDir, + filePath: path.join(projectDir, 'eas.json'), + maxSizeBytes: 1024 * 1024, })); } catch (err) { Log.error('Failed to upload project sources.'); diff --git a/packages/eas-cli/src/project/uploadAccountScopedEasJsonAsync.ts b/packages/eas-cli/src/project/uploadAccountScopedEasJsonAsync.ts deleted file mode 100644 index 4770ea918b..0000000000 --- a/packages/eas-cli/src/project/uploadAccountScopedEasJsonAsync.ts +++ /dev/null @@ -1,47 +0,0 @@ -import chalk from 'chalk'; -import fs from 'node:fs'; -import path from 'node:path'; - -import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient'; -import { AccountUploadSessionType } from '../graphql/generated'; -import { uploadAccountScopedFileAtPathToGCSAsync } from '../uploads'; -import { formatBytes } from '../utils/files'; -import { createProgressTracker } from '../utils/progress'; - -/** - * Uploads the `eas.json` file to GCS as account-scoped object. - * Used in workflows. Takes care of logging progress. - */ -export async function uploadAccountScopedEasJsonAsync({ - graphqlClient, - accountId, - projectDir, -}: { - graphqlClient: ExpoGraphqlClient; - accountId: string; - projectDir: string; -}): Promise<{ easJsonBucketKey: string }> { - const easJsonFilePath = path.join(projectDir, 'eas.json'); - - const easJsonFileStat = await fs.promises.stat(easJsonFilePath); - - if (easJsonFileStat.size > 1024 * 1024) { - throw new Error('eas.json is too big. Maximum allowed size is 1MB.'); - } - - const easJsonBucketKey = await uploadAccountScopedFileAtPathToGCSAsync(graphqlClient, { - accountId, - type: AccountUploadSessionType.WorkflowsProjectSources, - path: easJsonFilePath, - handleProgressEvent: createProgressTracker({ - total: easJsonFileStat.size, - message: ratio => - `Uploading eas.json to EAS (${formatBytes(easJsonFileStat.size * ratio)} / ${formatBytes( - easJsonFileStat.size - )})`, - completedMessage: (duration: string) => `Uploaded eas.json to EAS ${chalk.dim(duration)}`, - }), - }); - - return { easJsonBucketKey }; -} diff --git a/packages/eas-cli/src/project/uploadAccountScopedFileAsync.ts b/packages/eas-cli/src/project/uploadAccountScopedFileAsync.ts new file mode 100644 index 0000000000..0d4921a814 --- /dev/null +++ b/packages/eas-cli/src/project/uploadAccountScopedFileAsync.ts @@ -0,0 +1,49 @@ +import chalk from 'chalk'; +import fs from 'node:fs'; +import path from 'node:path'; + +import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient'; +import { AccountUploadSessionType } from '../graphql/generated'; +import { uploadAccountScopedFileAtPathToGCSAsync } from '../uploads'; +import { formatBytes } from '../utils/files'; +import { createProgressTracker } from '../utils/progress'; + +/** + * Uploads a file to GCS as account-scoped object. + * Used in workflows. Takes care of logging progress. + * (Uses file name when mentioning file in logs.) + */ +export async function uploadAccountScopedFileAsync({ + graphqlClient, + accountId, + filePath, + maxSizeBytes, +}: { + graphqlClient: ExpoGraphqlClient; + accountId: string; + filePath: string; + maxSizeBytes: number; +}): Promise<{ fileBucketKey: string }> { + const fileName = path.basename(filePath); + const fileStat = await fs.promises.stat(filePath); + + if (fileStat.size > maxSizeBytes) { + throw new Error(`File is too big. Maximum allowed size is ${formatBytes(maxSizeBytes)}.`); + } + + const fileBucketKey = await uploadAccountScopedFileAtPathToGCSAsync(graphqlClient, { + accountId, + type: AccountUploadSessionType.WorkflowsProjectSources, + path: filePath, + handleProgressEvent: createProgressTracker({ + total: fileStat.size, + message: ratio => + `Uploading ${fileName} to EAS (${formatBytes(fileStat.size * ratio)} / ${formatBytes( + fileStat.size + )})`, + completedMessage: (duration: string) => `Uploaded ${fileName} to EAS ${chalk.dim(duration)}`, + }), + }); + + return { fileBucketKey }; +} From 178816f25e0f8d69eb66377f984182c3ebb7a8c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Chmiela?= Date: Fri, 20 Dec 2024 22:19:10 +0100 Subject: [PATCH 3/4] Upload `package.json` along with `eas.json` and project archive --- packages/eas-cli/src/commands/workflow/run.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/eas-cli/src/commands/workflow/run.ts b/packages/eas-cli/src/commands/workflow/run.ts index 0637eb0621..ad8f8419c5 100644 --- a/packages/eas-cli/src/commands/workflow/run.ts +++ b/packages/eas-cli/src/commands/workflow/run.ts @@ -81,6 +81,7 @@ export default class WorkflowRun extends EasCommand { let projectArchiveBucketKey: string; let easJsonBucketKey: string; + let packageJsonBucketKey: string; try { ({ projectArchiveBucketKey } = await uploadAccountScopedProjectSourceAsync({ @@ -94,6 +95,12 @@ export default class WorkflowRun extends EasCommand { filePath: path.join(projectDir, 'eas.json'), maxSizeBytes: 1024 * 1024, })); + ({ fileBucketKey: packageJsonBucketKey } = await uploadAccountScopedFileAsync({ + graphqlClient, + accountId: account.id, + filePath: path.join(projectDir, 'package.json'), + maxSizeBytes: 1024 * 1024, + })); } catch (err) { Log.error('Failed to upload project sources.'); @@ -114,6 +121,7 @@ export default class WorkflowRun extends EasCommand { type: WorkflowProjectSourceType.Gcs, projectArchiveBucketKey, easJsonBucketKey, + packageJsonBucketKey, }, }, } From ca6b5388c268977dfa308494de17685e44ede85c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Chmiela?= Date: Fri, 20 Dec 2024 22:29:29 +0100 Subject: [PATCH 4/4] Add changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16d4bc734c..cdb15ffe28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ This is the log of notable changes to EAS CLI and related packages. ### 🎉 New features +- Upload `package.json` when uploading workflow sources. ([#2786](https://github.com/expo/eas-cli/pull/2786) by [@sjchmiela](https://github.com/sjchmiela)) + ### 🐛 Bug fixes - Show `eas deploy` upload error messages. ([#2771](https://github.com/expo/eas-cli/pull/2771) by [@kadikraman](https://github.com/kadikraman))