diff --git a/CHANGELOG.md b/CHANGELOG.md index a67f12426d..e6fb764108 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ This is the log of notable changes to EAS CLI and related packages. ### ๐ŸŽ‰ New features +- Save local fingeprint sources during build. ([#2422](https://github.com/expo/eas-cli/pull/2422) by [@kadikraman](https://github.com/kadikraman)) + + ### ๐Ÿ› Bug fixes ### ๐Ÿงน Chores diff --git a/packages/eas-cli/graphql.schema.json b/packages/eas-cli/graphql.schema.json index d03567f264..7a6c3dc45f 100644 --- a/packages/eas-cli/graphql.schema.json +++ b/packages/eas-cli/graphql.schema.json @@ -1425,6 +1425,51 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "environmentVariables", + "description": "Environment variables for an account", + "args": [ + { + "name": "filterNames", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "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": "EnvironmentVariable", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "githubAppInstallations", "description": "GitHub App installations for an account", @@ -1602,6 +1647,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "lastDeletionAttemptTime", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "name", "description": null, @@ -4749,6 +4806,18 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "lastDeletionAttemptTime", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -8663,6 +8732,67 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "environmentVariables", + "description": "Environment variables for an app", + "args": [ + { + "name": "environment", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "EnvironmentVariableEnvironment", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filterNames", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "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": "EnvironmentVariable", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "fullName", "description": null, @@ -10138,50 +10268,66 @@ }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [ - { - "kind": "INTERFACE", - "name": "Project", - "ofType": null - } - ], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "AppBranchEdge", - "description": null, - "fields": [ - { - "name": "cursor", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null }, { - "name": "node", + "name": "workerDeployments", "description": null, - "args": [], + "args": [ + { + "name": "after", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "OBJECT", - "name": "UpdateBranch", + "name": "WorkerDeploymentsConnection", "ofType": null } }, @@ -10190,64 +10336,113 @@ } ], "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "AppBranchesConnection", - "description": null, - "fields": [ - { - "name": "edges", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "AppBranchEdge", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, + "interfaces": [ { - "name": "pageInfo", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "PageInfo", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null + "kind": "INTERFACE", + "name": "Project", + "ofType": null } ], - "inputFields": null, - "interfaces": [], "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "AppBuildEdge", + "name": "AppBranchEdge", + "description": null, + "fields": [ + { + "name": "cursor", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "UpdateBranch", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppBranchesConnection", + "description": null, + "fields": [ + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppBranchEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppBuildEdge", "description": null, "fields": [ { @@ -15834,6 +16029,125 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "INPUT_OBJECT", + "name": "AuditLogExportInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "accountId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAfter", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdBefore", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "format", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AuditLogsExportFormat", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AuditLogMutation", + "description": null, + "fields": [ + { + "name": "exportAuditLogs", + "description": "Exports Audit Logs for an account. Returns the ID of the background job receipt. Use BackgroundJobReceiptQuery to get the status of the job.", + "args": [ + { + "name": "exportInput", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AuditLogExportInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "BackgroundJobReceipt", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "AuditLogQuery", @@ -15951,6 +16265,35 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "ENUM", + "name": "AuditLogsExportFormat", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CSV", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "JSON", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "JSONL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, { "kind": "ENUM", "name": "AuthProtocolType", @@ -16080,6 +16423,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "resultData", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONObject", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "resultId", "description": null, @@ -16230,6 +16585,12 @@ "inputFields": null, "interfaces": null, "enumValues": [ + { + "name": "AUDIT_LOGS_EXPORT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "GITHUB_BUILD", "description": null, @@ -18552,6 +18913,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "fingerprintSource", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "FingerprintSourceInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "gitCommitHash", "description": null, @@ -21023,6 +21396,81 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "INPUT_OBJECT", + "name": "CreateEnvironmentVariableInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "environment", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "EnvironmentVariableEnvironment", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sensitive", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "value", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "CreateGitHubAppInstallationInput", @@ -21556,6 +22004,65 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "INPUT_OBJECT", + "name": "CreateSharedEnvironmentVariableInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sensitive", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "value", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "CreateSubmissionResult", @@ -21917,6 +22424,33 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "DeleteEnvironmentVariableResult", + "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 + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "DeleteGitHubUserResult", @@ -22756,7 +23290,23 @@ "description": null, "fields": [ { - "name": "deploymentId", + "name": "deploymentIdentifier", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pendingWorkerDeploymentId", "description": null, "args": [], "type": { @@ -22870,7 +23420,7 @@ "deprecationReason": null }, { - "name": "deploymentId", + "name": "deploymentIdentifier", "description": null, "type": { "kind": "SCALAR", @@ -23554,7 +24104,275 @@ "deprecationReason": null }, { - "name": "type", + "name": "type", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "EnvironmentSecretType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "EnvironmentSecretMutation", + "description": null, + "fields": [ + { + "name": "createEnvironmentSecretForAccount", + "description": "Create an environment secret for an Account", + "args": [ + { + "name": "accountId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "environmentSecretData", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CreateEnvironmentSecretInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EnvironmentSecret", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createEnvironmentSecretForApp", + "description": "Create an environment secret for an App", + "args": [ + { + "name": "appId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "environmentSecretData", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CreateEnvironmentSecretInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EnvironmentSecret", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deleteEnvironmentSecret", + "description": "Delete an environment secret", + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DeleteEnvironmentSecretResult", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "EnvironmentSecretType", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "FILE_BASE64", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "STRING", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "EnvironmentVariable", + "description": null, + "fields": [ + { + "name": "createdAt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "environment", + "description": null, + "args": [], + "type": { + "kind": "ENUM", + "name": "EnvironmentVariableEnvironment", + "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": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "scope", "description": null, "args": [], "type": { @@ -23562,7 +24380,7 @@ "name": null, "ofType": { "kind": "ENUM", - "name": "EnvironmentSecretType", + "name": "EnvironmentVariableScope", "ofType": null } }, @@ -23584,6 +24402,18 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "value", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -23591,14 +24421,43 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "ENUM", + "name": "EnvironmentVariableEnvironment", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "DEVELOPMENT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PREVIEW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCTION", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, { "kind": "OBJECT", - "name": "EnvironmentSecretMutation", + "name": "EnvironmentVariableMutation", "description": null, "fields": [ { - "name": "createEnvironmentSecretForAccount", - "description": "Create an environment secret for an Account", + "name": "createEnvironmentVariableForAccount", + "description": "Create an environment variable for an Account", "args": [ { "name": "accountId", @@ -23608,7 +24467,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "ID", "ofType": null } }, @@ -23617,14 +24476,14 @@ "deprecationReason": null }, { - "name": "environmentSecretData", + "name": "environmentVariableData", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "INPUT_OBJECT", - "name": "CreateEnvironmentSecretInput", + "name": "CreateSharedEnvironmentVariableInput", "ofType": null } }, @@ -23638,7 +24497,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "EnvironmentSecret", + "name": "EnvironmentVariable", "ofType": null } }, @@ -23646,8 +24505,8 @@ "deprecationReason": null }, { - "name": "createEnvironmentSecretForApp", - "description": "Create an environment secret for an App", + "name": "createEnvironmentVariableForApp", + "description": "Create an environment variable for an App", "args": [ { "name": "appId", @@ -23657,7 +24516,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "ID", "ofType": null } }, @@ -23666,14 +24525,14 @@ "deprecationReason": null }, { - "name": "environmentSecretData", + "name": "environmentVariableData", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "INPUT_OBJECT", - "name": "CreateEnvironmentSecretInput", + "name": "CreateEnvironmentVariableInput", "ofType": null } }, @@ -23687,7 +24546,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "EnvironmentSecret", + "name": "EnvironmentVariable", "ofType": null } }, @@ -23695,8 +24554,8 @@ "deprecationReason": null }, { - "name": "deleteEnvironmentSecret", - "description": "Delete an environment secret", + "name": "deleteEnvironmentVariable", + "description": "Delete an environment variable", "args": [ { "name": "id", @@ -23706,7 +24565,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "ID", "ofType": null } }, @@ -23720,7 +24579,137 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "DeleteEnvironmentSecretResult", + "name": "DeleteEnvironmentVariableResult", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "linkSharedEnvironmentVariable", + "description": "Link shared environment variable", + "args": [ + { + "name": "appId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "environment", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "EnvironmentVariableEnvironment", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "environmentVariableId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EnvironmentVariable", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "unlinkSharedEnvironmentVariable", + "description": "Unlink shared environment variable", + "args": [ + { + "name": "appId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "environment", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "EnvironmentVariableEnvironment", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "environmentVariableId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EnvironmentVariable", "ofType": null } }, @@ -23735,20 +24724,20 @@ }, { "kind": "ENUM", - "name": "EnvironmentSecretType", + "name": "EnvironmentVariableScope", "description": null, "fields": null, "inputFields": null, "interfaces": null, "enumValues": [ { - "name": "FILE_BASE64", + "name": "PROJECT", "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "STRING", + "name": "SHARED", "description": null, "isDeprecated": false, "deprecationReason": null @@ -24244,6 +25233,58 @@ ], "possibleTypes": null }, + { + "kind": "INPUT_OBJECT", + "name": "FingerprintSourceInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "bucketKey", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": null, + "type": { + "kind": "ENUM", + "name": "FingerprintSourceType", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "FingerprintSourceType", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "GCS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, { "kind": "SCALAR", "name": "Float", @@ -29792,6 +30833,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "childJobRun", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "JobRun", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "createdAt", "description": null, @@ -29952,6 +31005,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "priority", "description": null, @@ -30034,6 +31103,83 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "JobRunMutation", + "description": null, + "fields": [ + { + "name": "cancelJobRun", + "description": "Cancel an EAS Job Run", + "args": [ + { + "name": "jobRunId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "JobRun", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "retryJobRun", + "description": "Retry an EAS Job Run", + "args": [ + { + "name": "jobRunId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "JobRun", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "ENUM", "name": "JobRunPriority", @@ -33337,6 +34483,18 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "lastDeletionAttemptTime", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -33931,6 +35089,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "auditLog", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AuditLogMutation", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "build", "description": "Mutations that modify an EAS Build", @@ -34056,6 +35230,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "environmentVariable", + "description": "Mutations that create and delete EnvironmentVariables", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EnvironmentVariableMutation", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "githubApp", "description": "Mutations that utilize services facilitated by the GitHub App", @@ -34216,6 +35406,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "jobRun", + "description": "Mutations that modify an EAS Build", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "JobRunMutation", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "keystoreGenerationUrl", "description": null, @@ -35742,6 +36948,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "lastDeletionAttemptTime", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "lastName", "description": null, @@ -40692,6 +41910,12 @@ "description": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "EAS_UPDATE_FINGERPRINT", + "description": null, + "isDeprecated": false, + "deprecationReason": null } ], "possibleTypes": null @@ -41440,6 +42664,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "lastDeletionAttemptTime", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "lastName", "description": null, @@ -42220,6 +43456,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "lastDeletionAttemptTime", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "lastName", "description": null, @@ -44688,6 +45936,127 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "WorkerDeployment", + "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 + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "WorkerDeploymentEdge", + "description": null, + "fields": [ + { + "name": "cursor", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WorkerDeployment", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "WorkerDeploymentsConnection", + "description": null, + "fields": [ + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WorkerDeploymentEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "ENUM", "name": "WorkerLoggerLevel", diff --git a/packages/eas-cli/src/build/build.ts b/packages/eas-cli/src/build/build.ts index 1615564302..6580c7ce19 100644 --- a/packages/eas-cli/src/build/build.ts +++ b/packages/eas-cli/src/build/build.ts @@ -2,6 +2,7 @@ import { ArchiveSource, ArchiveSourceType, BuildJob, + FingerprintSourceType, Metadata, Platform, } from '@expo/eas-build-job'; @@ -12,6 +13,8 @@ import cliProgress from 'cli-progress'; import fs from 'fs-extra'; import { GraphQLError } from 'graphql/error'; import nullthrows from 'nullthrows'; +import path from 'path'; +import { v4 as uuidv4 } from 'uuid'; import { BuildContext } from './context'; import { @@ -60,9 +63,11 @@ import { appPlatformEmojis, requestedPlatformDisplayNames, } from '../platform'; +import { resolveRuntimeVersionAsync } from '../project/resolveRuntimeVersionAsync'; import { uploadFileAtPathToGCSAsync } from '../uploads'; import { formatBytes } from '../utils/files'; import { printJsonOnlyOutput } from '../utils/json'; +import { getTmpDirectory } from '../utils/paths'; import { createProgressTracker } from '../utils/progress'; import { sleepAsync } from '../utils/promise'; @@ -162,7 +167,8 @@ export async function prepareBuildRequestForPlatformAsync< } assert(projectArchive); - const metadata = await collectMetadataAsync(ctx); + const runtimeMetadata = await createAndMaybeUploadFingerprintAsync(ctx); + const metadata = await collectMetadataAsync(ctx, runtimeMetadata); const buildParams = resolveBuildParamsInput(ctx, metadata); const job = await builder.prepareJobAsync(ctx, { projectArchive, @@ -649,3 +655,77 @@ function formatAccountSubscriptionsUrl(accountName: string): string { getExpoWebsiteBaseUrl() ).toString(); } + +async function createAndMaybeUploadFingerprintAsync( + ctx: BuildContext +): Promise<{ + runtimeVersion?: string; + fingerprintSource?: Metadata['fingerprintSource']; +}> { + const resolvedRuntimeVersion = await resolveRuntimeVersionAsync({ + exp: ctx.exp, + platform: ctx.platform, + workflow: ctx.workflow, + projectDir: ctx.projectDir, + env: ctx.buildProfile.env, + cwd: ctx.projectDir, + }); + + /** + * It's ok for fingerprintSources to be empty + * fingerprintSources only exist if the project is using runtimeVersion.policy: fingerprint + */ + if (!resolvedRuntimeVersion?.fingerprintSources) { + return { + runtimeVersion: resolvedRuntimeVersion?.runtimeVersion ?? undefined, + }; + } + + await fs.mkdirp(getTmpDirectory()); + const fingerprintLocation = path.join(getTmpDirectory(), `${uuidv4()}-runtime-fingerprint.json`); + + await fs.writeJSON(fingerprintLocation, { + hash: resolvedRuntimeVersion.runtimeVersion, + sources: resolvedRuntimeVersion.fingerprintSources, + }); + + if (ctx.localBuildOptions.localBuildMode === LocalBuildMode.LOCAL_BUILD_PLUGIN) { + return { + runtimeVersion: resolvedRuntimeVersion?.runtimeVersion ?? undefined, + fingerprintSource: { + type: FingerprintSourceType.PATH, + path: fingerprintLocation, + }, + }; + } + + let fingerprintGCSBucketKey = undefined; + try { + fingerprintGCSBucketKey = await uploadFileAtPathToGCSAsync( + ctx.graphqlClient, + UploadSessionType.EasUpdateFingerprint, + fingerprintLocation + ); + } catch (err: any) { + let errMessage = 'Failed to upload fingerprint to EAS'; + + if (err.message) { + errMessage += `\n\nReason: ${err.message}`; + } + + Log.warn(errMessage); + return { + runtimeVersion: resolvedRuntimeVersion?.runtimeVersion ?? undefined, + }; + } finally { + await fs.remove(fingerprintLocation); + } + + return { + runtimeVersion: resolvedRuntimeVersion?.runtimeVersion ?? undefined, + fingerprintSource: { + type: FingerprintSourceType.GCS, + bucketKey: fingerprintGCSBucketKey, + }, + }; +} diff --git a/packages/eas-cli/src/build/graphql.ts b/packages/eas-cli/src/build/graphql.ts index a3ece7ba4e..cd57832ec9 100644 --- a/packages/eas-cli/src/build/graphql.ts +++ b/packages/eas-cli/src/build/graphql.ts @@ -42,6 +42,7 @@ export function transformProjectArchive(archiveSource: ArchiveSource): ProjectAr export function transformMetadata(metadata: Metadata): BuildMetadataInput { return { ...metadata, + fingerprintSource: metadata.fingerprintSource as BuildMetadataInput['fingerprintSource'], credentialsSource: metadata.credentialsSource && transformCredentialsSource(metadata.credentialsSource), distribution: metadata.distribution && transformDistribution(metadata.distribution), diff --git a/packages/eas-cli/src/build/metadata.ts b/packages/eas-cli/src/build/metadata.ts index 4a4c86963a..5576ffb316 100644 --- a/packages/eas-cli/src/build/metadata.ts +++ b/packages/eas-cli/src/build/metadata.ts @@ -1,4 +1,4 @@ -import { Metadata, Platform, sanitizeMetadata } from '@expo/eas-build-job'; +import { FingerprintSource, Metadata, Platform, sanitizeMetadata } from '@expo/eas-build-job'; import { IosEnterpriseProvisioning } from '@expo/eas-json'; import fs from 'fs-extra'; import resolveFrom from 'resolve-from'; @@ -10,13 +10,16 @@ import { LocalBuildMode } from './local'; import { BuildDistributionType } from './types'; import Log from '../log'; import { getUsername, isExpoUpdatesInstalled } from '../project/projectUtils'; -import { resolveRuntimeVersionAsync } from '../project/resolveRuntimeVersionAsync'; import { readChannelSafelyAsync as readAndroidChannelSafelyAsync } from '../update/android/UpdatesModule'; import { readChannelSafelyAsync as readIosChannelSafelyAsync } from '../update/ios/UpdatesModule'; import { easCliVersion } from '../utils/easCli'; export async function collectMetadataAsync( - ctx: BuildContext + ctx: BuildContext, + runtimeMetadata: { + runtimeVersion?: string | undefined; + fingerprintSource?: FingerprintSource | undefined; + } ): Promise { const channelObject = await resolveChannelAsync(ctx); const distribution = ctx.buildProfile.distribution ?? BuildDistributionType.STORE; @@ -27,15 +30,8 @@ export async function collectMetadataAsync( workflow: ctx.workflow, credentialsSource: ctx.buildProfile.credentialsSource, sdkVersion: ctx.exp.sdkVersion, - runtimeVersion: - (await resolveRuntimeVersionAsync({ - exp: ctx.exp, - platform: ctx.platform, - workflow: ctx.workflow, - projectDir: ctx.projectDir, - env: ctx.buildProfile.env, - cwd: ctx.projectDir, - })) ?? undefined, + runtimeVersion: runtimeMetadata?.runtimeVersion, + fingerprintSource: runtimeMetadata?.fingerprintSource, reactNativeVersion: await getReactNativeVersionAsync(ctx.projectDir), ...channelObject, distribution, diff --git a/packages/eas-cli/src/build/utils/repository.ts b/packages/eas-cli/src/build/utils/repository.ts index 2765b93ebb..74b39bf0a0 100644 --- a/packages/eas-cli/src/build/utils/repository.ts +++ b/packages/eas-cli/src/build/utils/repository.ts @@ -100,6 +100,7 @@ export type LocalFile = { }; export async function makeProjectMetadataFileAsync(archivePath: string): Promise { + await fs.mkdirp(getTmpDirectory()); const metadataLocation = path.join(getTmpDirectory(), `${uuidv4()}-eas-build-metadata.json`); const archiveContent: string[] = []; diff --git a/packages/eas-cli/src/graphql/generated.ts b/packages/eas-cli/src/graphql/generated.ts index ce7627a546..d6e02198bf 100644 --- a/packages/eas-cli/src/graphql/generated.ts +++ b/packages/eas-cli/src/graphql/generated.ts @@ -117,6 +117,8 @@ export type Account = { createdAt: Scalars['DateTime']['output']; /** Environment secrets for an account */ environmentSecrets: Array; + /** Environment variables for an account */ + environmentVariables: Array; /** GitHub App installations for an account */ githubAppInstallations: Array; /** @deprecated Use googleServiceAccountKeysPaginated */ @@ -128,6 +130,7 @@ export type Account = { isDisabled: Scalars['Boolean']['output']; /** Whether this account has SSO enabled. Can be queried by all members. */ isSSOEnabled: Scalars['Boolean']['output']; + lastDeletionAttemptTime?: Maybe; name: Scalars['String']['output']; /** Offers set on this account */ offers?: Maybe>; @@ -348,6 +351,15 @@ export type AccountEnvironmentSecretsArgs = { }; +/** + * An account is a container owning projects, credentials, billing and other organization + * data and settings. Actors may own and be members of accounts. + */ +export type AccountEnvironmentVariablesArgs = { + filterNames?: InputMaybe>; +}; + + /** * An account is a container owning projects, credentials, billing and other organization * data and settings. Actors may own and be members of accounts. @@ -777,6 +789,7 @@ export type Actor = { firstName?: Maybe; id: Scalars['ID']['output']; isExpoAdmin: Scalars['Boolean']['output']; + lastDeletionAttemptTime?: Maybe; }; @@ -1228,6 +1241,8 @@ export type App = Project & { devDomainName?: Maybe; /** Environment secrets for an app */ environmentSecrets: Array; + /** Environment variables for an app */ + environmentVariables: Array; fullName: Scalars['String']['output']; githubBuildTriggers: Array; githubJobRunTriggers: Array; @@ -1346,6 +1361,7 @@ export type App = Project & { users?: Maybe>>; /** Webhooks for an app */ webhooks: Array; + workerDeployments: WorkerDeploymentsConnection; }; @@ -1429,6 +1445,13 @@ export type AppEnvironmentSecretsArgs = { }; +/** Represents an Exponent App (or Experience in legacy terms) */ +export type AppEnvironmentVariablesArgs = { + environment: EnvironmentVariableEnvironment; + filterNames?: InputMaybe>; +}; + + /** Represents an Exponent App (or Experience in legacy terms) */ export type AppIosAppCredentialsArgs = { filter?: InputMaybe; @@ -1547,6 +1570,15 @@ export type AppWebhooksArgs = { filter?: InputMaybe; }; + +/** Represents an Exponent App (or Experience in legacy terms) */ +export type AppWorkerDeploymentsArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + export type AppBranchEdge = { __typename?: 'AppBranchEdge'; cursor: Scalars['String']['output']; @@ -2365,6 +2397,24 @@ export type AuditLog = { websiteMessage: Scalars['String']['output']; }; +export type AuditLogExportInput = { + accountId: Scalars['ID']['input']; + createdAfter: Scalars['Int']['input']; + createdBefore: Scalars['Int']['input']; + format: AuditLogsExportFormat; +}; + +export type AuditLogMutation = { + __typename?: 'AuditLogMutation'; + /** Exports Audit Logs for an account. Returns the ID of the background job receipt. Use BackgroundJobReceiptQuery to get the status of the job. */ + exportAuditLogs: BackgroundJobReceipt; +}; + + +export type AuditLogMutationExportAuditLogsArgs = { + exportInput: AuditLogExportInput; +}; + export type AuditLogQuery = { __typename?: 'AuditLogQuery'; /** Query Audit Logs by account ID */ @@ -2385,6 +2435,12 @@ export type AuditLogQueryByIdArgs = { auditLogId: Scalars['ID']['input']; }; +export enum AuditLogsExportFormat { + Csv = 'CSV', + Json = 'JSON', + Jsonl = 'JSONL' +} + export enum AuthProtocolType { Oidc = 'OIDC' } @@ -2403,6 +2459,7 @@ export type BackgroundJobReceipt = { errorCode?: Maybe; errorMessage?: Maybe; id: Scalars['ID']['output']; + resultData?: Maybe; resultId?: Maybe; resultType: BackgroundJobResultType; state: BackgroundJobState; @@ -2423,6 +2480,7 @@ export type BackgroundJobReceiptQueryByIdArgs = { }; export enum BackgroundJobResultType { + AuditLogsExport = 'AUDIT_LOGS_EXPORT', GithubBuild = 'GITHUB_BUILD', Void = 'VOID' } @@ -2698,6 +2756,7 @@ export type BuildMetadataInput = { customWorkflowName?: InputMaybe; developmentClient?: InputMaybe; distribution?: InputMaybe; + fingerprintSource?: InputMaybe; gitCommitHash?: InputMaybe; gitCommitMessage?: InputMaybe; iosEnterpriseProvisioning?: InputMaybe; @@ -3079,6 +3138,13 @@ export type CreateEnvironmentSecretInput = { value: Scalars['String']['input']; }; +export type CreateEnvironmentVariableInput = { + environment: EnvironmentVariableEnvironment; + name: Scalars['String']['input']; + sensitive: Scalars['Boolean']['input']; + value: Scalars['String']['input']; +}; + export type CreateGitHubAppInstallationInput = { accountId: Scalars['ID']['input']; installationIdentifier: Scalars['Int']['input']; @@ -3134,6 +3200,12 @@ export type CreateServerlessFunctionUploadUrlResult = { url: Scalars['String']['output']; }; +export type CreateSharedEnvironmentVariableInput = { + name: Scalars['String']['input']; + sensitive: Scalars['Boolean']['input']; + value: Scalars['String']['input']; +}; + export type CreateSubmissionResult = { __typename?: 'CreateSubmissionResult'; /** Created submission */ @@ -3199,6 +3271,11 @@ export type DeleteEnvironmentSecretResult = { id: Scalars['ID']['output']; }; +export type DeleteEnvironmentVariableResult = { + __typename?: 'DeleteEnvironmentVariableResult'; + id: Scalars['ID']['output']; +}; + export type DeleteGitHubUserResult = { __typename?: 'DeleteGitHubUserResult'; id: Scalars['ID']['output']; @@ -3338,7 +3415,8 @@ export type DeploymentInsightsUniqueUsersOverTimeArgs = { export type DeploymentSignedUrlResult = { __typename?: 'DeploymentSignedUrlResult'; - deploymentId: Scalars['ID']['output']; + deploymentIdentifier: Scalars['ID']['output']; + pendingWorkerDeploymentId: Scalars['ID']['output']; url: Scalars['String']['output']; }; @@ -3358,7 +3436,7 @@ export type DeploymentsMutation = { export type DeploymentsMutationCreateSignedDeploymentUrlArgs = { appId: Scalars['ID']['input']; - deploymentId?: InputMaybe; + deploymentIdentifier?: InputMaybe; }; export type DiscordUser = { @@ -3503,6 +3581,73 @@ export enum EnvironmentSecretType { String = 'STRING' } +export type EnvironmentVariable = { + __typename?: 'EnvironmentVariable'; + createdAt: Scalars['DateTime']['output']; + environment?: Maybe; + id: Scalars['ID']['output']; + name: Scalars['String']['output']; + scope: EnvironmentVariableScope; + updatedAt: Scalars['DateTime']['output']; + value?: Maybe; +}; + +export enum EnvironmentVariableEnvironment { + Development = 'DEVELOPMENT', + Preview = 'PREVIEW', + Production = 'PRODUCTION' +} + +export type EnvironmentVariableMutation = { + __typename?: 'EnvironmentVariableMutation'; + /** Create an environment variable for an Account */ + createEnvironmentVariableForAccount: EnvironmentVariable; + /** Create an environment variable for an App */ + createEnvironmentVariableForApp: EnvironmentVariable; + /** Delete an environment variable */ + deleteEnvironmentVariable: DeleteEnvironmentVariableResult; + /** Link shared environment variable */ + linkSharedEnvironmentVariable: EnvironmentVariable; + /** Unlink shared environment variable */ + unlinkSharedEnvironmentVariable: EnvironmentVariable; +}; + + +export type EnvironmentVariableMutationCreateEnvironmentVariableForAccountArgs = { + accountId: Scalars['ID']['input']; + environmentVariableData: CreateSharedEnvironmentVariableInput; +}; + + +export type EnvironmentVariableMutationCreateEnvironmentVariableForAppArgs = { + appId: Scalars['ID']['input']; + environmentVariableData: CreateEnvironmentVariableInput; +}; + + +export type EnvironmentVariableMutationDeleteEnvironmentVariableArgs = { + id: Scalars['ID']['input']; +}; + + +export type EnvironmentVariableMutationLinkSharedEnvironmentVariableArgs = { + appId: Scalars['ID']['input']; + environment: EnvironmentVariableEnvironment; + environmentVariableId: Scalars['ID']['input']; +}; + + +export type EnvironmentVariableMutationUnlinkSharedEnvironmentVariableArgs = { + appId: Scalars['ID']['input']; + environment: EnvironmentVariableEnvironment; + environmentVariableId: Scalars['ID']['input']; +}; + +export enum EnvironmentVariableScope { + Project = 'PROJECT', + Shared = 'SHARED' +} + export type EstimatedOverageAndCost = { __typename?: 'EstimatedOverageAndCost'; id: Scalars['ID']['output']; @@ -3568,6 +3713,15 @@ export enum Feature { Teams = 'TEAMS' } +export type FingerprintSourceInput = { + bucketKey?: InputMaybe; + type?: InputMaybe; +}; + +export enum FingerprintSourceType { + Gcs = 'GCS' +} + export type FutureSubscription = { __typename?: 'FutureSubscription'; createdAt: Scalars['DateTime']['output']; @@ -4298,6 +4452,7 @@ export type IosSubmissionConfigInput = { export type JobRun = { __typename?: 'JobRun'; app: App; + childJobRun?: Maybe; createdAt: Scalars['DateTime']['output']; displayName?: Maybe; endedAt?: Maybe; @@ -4309,12 +4464,31 @@ export type JobRun = { initiatingActor?: Maybe; isWaived: Scalars['Boolean']['output']; logFileUrls: Array; + name: Scalars['String']['output']; priority: JobRunPriority; startedAt?: Maybe; status: JobRunStatus; updateGroups: Array>; }; +export type JobRunMutation = { + __typename?: 'JobRunMutation'; + /** Cancel an EAS Job Run */ + cancelJobRun: JobRun; + /** Retry an EAS Job Run */ + retryJobRun: JobRun; +}; + + +export type JobRunMutationCancelJobRunArgs = { + jobRunId: Scalars['ID']['input']; +}; + + +export type JobRunMutationRetryJobRunArgs = { + jobRunId: Scalars['ID']['input']; +}; + export enum JobRunPriority { High = 'HIGH', Normal = 'NORMAL' @@ -4807,6 +4981,7 @@ export type Robot = Actor & { firstName?: Maybe; id: Scalars['ID']['output']; isExpoAdmin: Scalars['Boolean']['output']; + lastDeletionAttemptTime?: Maybe; }; @@ -4901,6 +5076,7 @@ export type RootMutation = { /** Mutations that modify an Apple Team */ appleTeam: AppleTeamMutation; asset: AssetMutation; + auditLog: AuditLogMutation; /** Mutations that modify an EAS Build */ build: BuildMutation; /** Mutations that create, update, and delete Build Annotations */ @@ -4914,6 +5090,8 @@ export type RootMutation = { emailSubscription: EmailSubscriptionMutation; /** Mutations that create and delete EnvironmentSecrets */ environmentSecret: EnvironmentSecretMutation; + /** Mutations that create and delete EnvironmentVariables */ + environmentVariable: EnvironmentVariableMutation; /** Mutations that utilize services facilitated by the GitHub App */ githubApp: GitHubAppMutation; /** Mutations for GitHub App installations */ @@ -4933,6 +5111,8 @@ export type RootMutation = { iosAppBuildCredentials: IosAppBuildCredentialsMutation; /** Mutations that modify the credentials for an iOS app */ iosAppCredentials: IosAppCredentialsMutation; + /** Mutations that modify an EAS Build */ + jobRun: JobRunMutation; keystoreGenerationUrl: KeystoreGenerationUrlMutation; /** Mutations that modify the currently authenticated User */ me: MeMutation; @@ -5158,6 +5338,7 @@ export type SsoUser = Actor & UserActor & { /** @deprecated No longer supported */ industry?: Maybe; isExpoAdmin: Scalars['Boolean']['output']; + lastDeletionAttemptTime?: Maybe; lastName?: Maybe; /** @deprecated No longer supported */ location?: Maybe; @@ -5889,7 +6070,8 @@ export enum UploadSessionType { EasBuildProjectSources = 'EAS_BUILD_PROJECT_SOURCES', /** @deprecated Use EAS_SUBMIT_GCS_APP_ARCHIVE instead. */ EasSubmitAppArchive = 'EAS_SUBMIT_APP_ARCHIVE', - EasSubmitGcsAppArchive = 'EAS_SUBMIT_GCS_APP_ARCHIVE' + EasSubmitGcsAppArchive = 'EAS_SUBMIT_GCS_APP_ARCHIVE', + EasUpdateFingerprint = 'EAS_UPDATE_FINGERPRINT' } export type UsageMetricTotal = { @@ -5965,6 +6147,7 @@ export type User = Actor & UserActor & { /** @deprecated No longer supported */ isLegacy: Scalars['Boolean']['output']; isSecondFactorAuthenticationEnabled: Scalars['Boolean']['output']; + lastDeletionAttemptTime?: Maybe; lastName?: Maybe; /** @deprecated No longer supported */ location?: Maybe; @@ -6071,6 +6254,7 @@ export type UserActor = { /** @deprecated No longer supported */ industry?: Maybe; isExpoAdmin: Scalars['Boolean']['output']; + lastDeletionAttemptTime?: Maybe; lastName?: Maybe; /** @deprecated No longer supported */ location?: Maybe; @@ -6493,6 +6677,23 @@ export type WebsiteNotificationsConnection = { pageInfo: PageInfo; }; +export type WorkerDeployment = { + __typename?: 'WorkerDeployment'; + id: Scalars['ID']['output']; +}; + +export type WorkerDeploymentEdge = { + __typename?: 'WorkerDeploymentEdge'; + cursor: Scalars['String']['output']; + node: WorkerDeployment; +}; + +export type WorkerDeploymentsConnection = { + __typename?: 'WorkerDeploymentsConnection'; + edges: Array; + pageInfo: PageInfo; +}; + export enum WorkerLoggerLevel { Debug = 'DEBUG', Error = 'ERROR', diff --git a/packages/eas-cli/src/project/resolveRuntimeVersionAsync.ts b/packages/eas-cli/src/project/resolveRuntimeVersionAsync.ts index 2b967587af..0a7a186df3 100644 --- a/packages/eas-cli/src/project/resolveRuntimeVersionAsync.ts +++ b/packages/eas-cli/src/project/resolveRuntimeVersionAsync.ts @@ -23,11 +23,17 @@ export async function resolveRuntimeVersionAsync({ projectDir: string; env: Env | undefined; cwd?: string; -}): Promise { +}): Promise<{ + runtimeVersion: string | null; + fingerprintSources: object[] | null; +} | null> { if (!(await isModernExpoUpdatesCLIWithRuntimeVersionCommandSupportedAsync(projectDir))) { // fall back to the previous behavior (using the @expo/config-plugins eas-cli dependency rather // than the versioned @expo/config-plugins dependency in the project) - return await Updates.getRuntimeVersionNullableAsync(projectDir, exp, platform); + return { + runtimeVersion: await Updates.getRuntimeVersionNullableAsync(projectDir, exp, platform), + fingerprintSources: null, + }; } try { @@ -45,7 +51,10 @@ export async function resolveRuntimeVersionAsync({ Log.debug('runtimeversion:resolve output:'); Log.debug(resolvedRuntimeVersionJSONResult); - return runtimeVersionResult.runtimeVersion ?? null; + return { + runtimeVersion: runtimeVersionResult.runtimeVersion ?? null, + fingerprintSources: runtimeVersionResult.fingerprintSources ?? null, + }; } catch (e: any) { // if expo-updates is not installed, there's no need for a runtime version in the build if (e instanceof ExpoUpdatesCLIModuleNotFoundError) { diff --git a/packages/eas-cli/src/rollout/actions/CreateRollout.ts b/packages/eas-cli/src/rollout/actions/CreateRollout.ts index e347e66f69..b344f24e04 100644 --- a/packages/eas-cli/src/rollout/actions/CreateRollout.ts +++ b/packages/eas-cli/src/rollout/actions/CreateRollout.ts @@ -286,7 +286,9 @@ export class CreateRollout implements EASUpdateAction runtime?.runtimeVersion) + .filter(truthy); const dedupedRuntimes = [...new Set(runtimes)]; if (dedupedRuntimes.length === 0) { diff --git a/yarn.lock b/yarn.lock index 68f4348c35..27e09a5aeb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1472,6 +1472,16 @@ semver "^7.6.2" zod "^3.23.8" +"@expo/eas-build-job@1.0.119": + version "1.0.119" + resolved "https://registry.yarnpkg.com/@expo/eas-build-job/-/eas-build-job-1.0.119.tgz#3ce1e757a935cfb3a17d35124d3513be2af2cd81" + integrity sha512-uWgriDXF/cKSKl62lqD0OnoCTtX8+s00te2KQ54S/tz3/LYfiE4JBRsLazQq9hIfz8JPEXwmfKN713BDeV/TOg== + dependencies: + "@expo/logger" "1.0.117" + joi "^17.13.1" + semver "^7.6.2" + zod "^3.23.8" + "@expo/fingerprint@^0.6.0": version "0.6.0" resolved "https://registry.yarnpkg.com/@expo/fingerprint/-/fingerprint-0.6.0.tgz#77366934673d4ecea37284109b4dd67f9e6a7487"