Compare commits

...
Author SHA1 Message Date
Tomasz Czajęcki 92266e314a update CHANGELOG.md for #4021 revert 2026-08-14 20:17:39 +03:00
Tomasz Czajęcki c6c8d86797 Revert "[eas-cli] remove deprecated GraphQL field usage (#4021)"
This reverts commit 763cbadaaa.
2026-08-14 20:14:52 +03:00
65 changed files with 711 additions and 1879 deletions

No files matched your search

+2
View File
@@ -10,6 +10,8 @@ This is the log of notable changes to EAS CLI and related packages.
### 🐛 Bug fixes
- [eas-cli] Revert the removal of deprecated GraphQL field usage from [#4021](https://github.com/expo/eas-cli/pull/4021). ([#4206](https://github.com/expo/eas-cli/pull/4206) by [@tchayen](https://github.com/tchayen))
### 🧹 Chores
## [22.0.0](https://github.com/expo/eas-cli/releases/tag/v22.0.0) - 2026-08-14
+49 -1199
View File
File diff suppressed because it is too large. Load diff
@@ -38,9 +38,14 @@ export function getMockAppFragment(): AppFragment {
ownerAccount: {
id: 'test-account-id',
name: 'testuser',
viewerUserPermission: {
role: Role.Owner,
},
users: [
{
role: Role.Owner,
actor: {
id: 'test-user-id',
},
},
],
},
};
}
@@ -180,7 +180,7 @@ describe(WorkflowLogView, () => {
createdAt: '2022-01-01T00:00:00.000Z',
updatedAt: '2022-01-01T00:00:00.000Z',
isForIosSimulator: false,
app: {
project: {
id: mockProjectId,
__typename: 'App',
name: 'App',
@@ -74,7 +74,7 @@ function createMockBuildFragment({
id: buildId ?? uuid(),
logFiles: [],
priority: BuildPriority.Normal,
app: {
project: {
__typename: 'App',
slug: 'test-project',
id: projectId,
@@ -74,7 +74,7 @@ function createMockBuildFragment({
platform: AppPlatform.Android,
id: buildId ?? uuid(),
priority: BuildPriority.Normal,
app: {
project: {
__typename: 'App',
slug: 'test-project',
id: projectId,
+1
View File
@@ -76,6 +76,7 @@ export async function collectMetadataAsync<T extends Platform>(
customWorkflowName: ctx.customBuildConfigMetadata?.workflowName,
developmentClient: ctx.developmentClient,
requiredPackageManager: ctx.requiredPackageManager ?? undefined,
selectedImage: ctx.buildProfile.image,
customNodeVersion: ctx.buildProfile.node,
simulator: 'simulator' in ctx.buildProfile && ctx.buildProfile.simulator,
};
@@ -597,7 +597,7 @@ export async function downloadAndRunAsync(
simulator?: SimulatorRunTarget
): Promise<void> {
assert(build.artifacts?.applicationArchiveUrl);
const cachedAppPath = getEasBuildRunCachedAppPath(build.app.id, build.id, build.platform);
const cachedAppPath = getEasBuildRunCachedAppPath(build.project.id, build.id, build.platform);
if (await pathExists(cachedAppPath)) {
Log.newLine();
@@ -93,7 +93,7 @@ export function formatGraphQLBuild(build: BuildFragment): string {
},
{
label: 'Channel',
value: build.updateChannel?.name,
value: build.channel,
},
{
label: 'SDK Version',
@@ -101,7 +101,7 @@ export function formatGraphQLBuild(build: BuildFragment): string {
},
{
label: 'Runtime Version',
value: build.runtime?.version,
value: build.runtimeVersion,
},
{
label: 'Version',
+8 -5
View File
@@ -19,10 +19,13 @@ export function getProjectPageUrl(
}
export function getBuildLogsUrl(build: BuildFragment, hash?: string): string {
const { app } = build;
const url = `/accounts/${app.ownerAccount.name}/projects/${app.slug}/builds/${build.id}${
hash ? `#${hash}` : ''
}`;
const { project } = build;
const url =
project.__typename !== 'App'
? `/builds/${build.id}`
: `/accounts/${project.ownerAccount.name}/projects/${project.slug}/builds/${build.id}${
hash ? `#${hash}` : ''
}`;
return new URL(url, getExpoWebsiteBaseUrl()).toString();
}
@@ -34,7 +37,7 @@ export function getArtifactUrl(artifactId: string): string {
export function getInternalDistributionInstallUrl(build: BuildFragment): string {
if (build.platform === AppPlatform.Ios) {
return `itms-services://?action=download-manifest;url=${getExpoApiBaseUrl()}/v2/projects/${
build.app.id
build.project.id
}/builds/${build.id}/manifest.plist`;
}
@@ -11,7 +11,7 @@ export const testUpdateBranch1: UpdateBranchObject = {
group: '16ca6dba-e63b-48b0-baa3-15a894ee9434',
message: 'fix bug',
createdAt: '2023-07-17T22:48:59.278Z',
runtime: { id: 'runtime-exposdk-48', version: 'exposdk:48.0.0' },
runtimeVersion: 'exposdk:48.0.0',
platform: 'ios',
manifestFragment:
'{"extra":{"expoClient":{"ios":{"supportsTablet":true,"bundleIdentifier":"com.quintest113.updatestest4"},"web":{"favicon":"./assets/favicon.png"},"icon":"./assets/icon.png","name":"updates-test-4","slug":"updates-test-4","extra":{"eas":{"projectId":"789a8784-0186-4f41-8bd2-7f219291a2b8"}},"splash":{"image":"./assets/splash.png","resizeMode":"contain","backgroundColor":"#ffffff"},"android":{"package":"com.quintest113.updatestest4","adaptiveIcon":{"backgroundColor":"#ffffff","foregroundImage":"./assets/adaptive-icon.png"}},"updates":{"url":"https://u.expo.dev/789a8784-0186-4f41-8bd2-7f219291a2b8"},"version":"1.0.0","platforms":["ios","android"],"sdkVersion":"48.0.0","orientation":"portrait","runtimeVersion":{"policy":"sdkVersion"},"currentFullName":"@quintest113/updates-test-4","originalFullName":"@quintest113/updates-test-4","userInterfaceStyle":"light","assetBundlePatterns":["**/*"]}},"assets":[{"bundleKey":"7d40544b395c5949f4646f5e150fe020","fileSHA256":"LN_rjlzN55dvcBL7jM5zryIpAp7iHU8VCf7RFIccbNg","storageKey":"Pi65ns2w9xLI5G_m9aGrJ5wK5FpWcGcInSSFwnA_0aA","contentType":"image/png","fileExtension":".png"},{"bundleKey":"cdd04e13d4ec83ff0cd13ec8dabdc341","fileSHA256":"irHji01LPI9giDYxtJo9bTPHaEHzuUcCMTlb4xn90Ks","storageKey":"oJZ9JX1m8IKNDgnIqcKOo5KUFOoa_NCaxruigZu65E0","contentType":"image/png","fileExtension":".png"},{"bundleKey":"a132ecc4ba5c1517ff83c0fb321bc7fc","fileSHA256":"K3RDqaWOksoRpXW9wRWYYVpX3eMFzYznDWAmBrMCzZg","storageKey":"X3OAkUu5P_LqyKFx1bNkA_qDQFLlSjCYNAlVEaOamHE","contentType":"image/png","fileExtension":".png"},{"bundleKey":"0ea69b5077e7c4696db85dbcba75b0e1","fileSHA256":"Pd0Hc-0n4j0leJ8wFzGzrEVa2L5aonoKG4OPicbSciU","storageKey":"FwJkAbrRNahBGX1KXnTAgiiwyzENu3D7DeEzCwmInyo","contentType":"image/png","fileExtension":".png"},{"bundleKey":"f5b790e2ac193b3d41015edb3551f9b8","fileSHA256":"vCfIss7SLYKt1AAi0hxjsgOMEDceLJB6ZWjQf6gTU4k","storageKey":"GQtYm7r0G9N3WJyrymjZ26p8eNMIb7rzqwSVgGco5EU","contentType":"image/png","fileExtension":".png"},{"bundleKey":"5223c8d9b0d08b82a5670fb5f71faf78","fileSHA256":"LJXowmdeeZM1_QBGuwfb2gbLfs_1HtN5IsYwnWGcxNM","storageKey":"jeqOrdQBNY4hgl04B3wtGs8QNWMDmjvbjIMUXPtOBpw","contentType":"image/png","fileExtension":".png"},{"bundleKey":"02d5848f62ade9617cf96894727d32e7","fileSHA256":"u1-8zHOj9oxS8maH-7JbShJIq1-KEV7FXnrGpEUcR-4","storageKey":"LMUvUZZpdGFb7KqaB_l9N4TXTkFn1Pw92ws9fWDNZPw","contentType":"model/gltf-binary","fileExtension":".glb"},{"bundleKey":"6013c27e421ab23c826713af3ebec891","fileSHA256":"dutQNnvzTCS4NgwvbeMbvhro5QnW0GJUeY_4rrvlcLY","storageKey":"85KB9Jr7eqz1Jwt1mYQGRzTy6ZXyO0j7ZcaLImCbzkU","contentType":"image/jpeg","fileExtension":".jpg"}],"launchAsset":{"bundleKey":"3d0ac172fe41ab941a8c68cd7e3a17ee","fileSHA256":"jjnar-ZPrb_g0Bx5tcFfjJrP3v8HdeAlXMk__xN7I1U","storageKey":"bimf-UXq5IFH5nNHCIHdcQ2MyJwTnwDVBb-P8hr2CZw","contentType":"application/javascript","fileExtension":".bundle"}}',
@@ -37,7 +37,7 @@ export const testUpdateBranch1: UpdateBranchObject = {
group: '16ca6dba-e63b-48b0-baa3-15a894ee9434',
message: 'fix bug',
createdAt: '2023-07-17T22:48:59.278Z',
runtime: { id: 'runtime-exposdk-48', version: 'exposdk:48.0.0' },
runtimeVersion: 'exposdk:48.0.0',
platform: 'android',
manifestFragment:
'{"extra":{"expoClient":{"ios":{"supportsTablet":true,"bundleIdentifier":"com.quintest113.updatestest4"},"web":{"favicon":"./assets/favicon.png"},"icon":"./assets/icon.png","name":"updates-test-4","slug":"updates-test-4","extra":{"eas":{"projectId":"789a8784-0186-4f41-8bd2-7f219291a2b8"}},"splash":{"image":"./assets/splash.png","resizeMode":"contain","backgroundColor":"#ffffff"},"android":{"package":"com.quintest113.updatestest4","adaptiveIcon":{"backgroundColor":"#ffffff","foregroundImage":"./assets/adaptive-icon.png"}},"updates":{"url":"https://u.expo.dev/789a8784-0186-4f41-8bd2-7f219291a2b8"},"version":"1.0.0","platforms":["ios","android"],"sdkVersion":"48.0.0","orientation":"portrait","runtimeVersion":{"policy":"sdkVersion"},"currentFullName":"@quintest113/updates-test-4","originalFullName":"@quintest113/updates-test-4","userInterfaceStyle":"light","assetBundlePatterns":["**/*"]}},"assets":[{"bundleKey":"778ffc9fe8773a878e9c30a6304784de","fileSHA256":"i2Gkx-9w3JJ1PwSUl2SC9m_UFQ7CPfx3KrZeEDc6-lU","storageKey":"idnX8z03q4vGLzhYMPaQGBADjhqvWe67_afPqJ1vGzM","contentType":"image/png","fileExtension":".png"},{"bundleKey":"376d6a4c7f622917c39feb23671ef71d","fileSHA256":"QJsG0VpGM-5viirUgoKq0M4zQ_TYyPfLhAhN5mrM54I","storageKey":"46DQ95-UdSKiRkQgt5FyXkE1FrKOT9tBZP3nS7auKlg","contentType":"image/png","fileExtension":".png"},{"bundleKey":"c79c3606a1cf168006ad3979763c7e0c","fileSHA256":"kGZm3WiTRq2iMs42ia3vkHtCV_obWT8DY40rlJf2SIQ","storageKey":"k-3xHp3vP8mR36WdccUZVPTRJKpP-zlyboWdkXCIQpQ","contentType":"image/png","fileExtension":".png"},{"bundleKey":"02bc1fa7c0313217bde2d65ccbff40c9","fileSHA256":"_6fuRbdkBbpzkhSVAI99aMneY5X0tpQdsGNGX244IyA","storageKey":"lfqeUjiWFXwowhxVDBEzxsbTOEzYxMLebljy5Bh1mpU","contentType":"image/png","fileExtension":".png"},{"bundleKey":"35ba0eaec5a4f5ed12ca16fabeae451d","fileSHA256":"hM9es7ICUPaeDkczvrTaX0F_BoKJKlrRteYlcHU8IbE","storageKey":"fMoMrsUeB5xWw_Ugn8FqGJf-M2pld2hkXKR704z0MM8","contentType":"image/png","fileExtension":".png"},{"bundleKey":"5223c8d9b0d08b82a5670fb5f71faf78","fileSHA256":"LJXowmdeeZM1_QBGuwfb2gbLfs_1HtN5IsYwnWGcxNM","storageKey":"jeqOrdQBNY4hgl04B3wtGs8QNWMDmjvbjIMUXPtOBpw","contentType":"image/png","fileExtension":".png"},{"bundleKey":"02d5848f62ade9617cf96894727d32e7","fileSHA256":"u1-8zHOj9oxS8maH-7JbShJIq1-KEV7FXnrGpEUcR-4","storageKey":"LMUvUZZpdGFb7KqaB_l9N4TXTkFn1Pw92ws9fWDNZPw","contentType":"model/gltf-binary","fileExtension":".glb"},{"bundleKey":"6013c27e421ab23c826713af3ebec891","fileSHA256":"dutQNnvzTCS4NgwvbeMbvhro5QnW0GJUeY_4rrvlcLY","storageKey":"85KB9Jr7eqz1Jwt1mYQGRzTy6ZXyO0j7ZcaLImCbzkU","contentType":"image/jpeg","fileExtension":".jpg"}],"launchAsset":{"bundleKey":"4cc2ee49988e438ac066827b809721de","fileSHA256":"ctfK72f8EdS1IQmDvJLya38RMSma16beJcMoQToZIe0","storageKey":"QdEoKuCQPvVPA71gY52wqJ9vmtV4ObnCcPE2FP4SIdo","contentType":"application/javascript","fileExtension":".bundle"}}',
@@ -73,7 +73,7 @@ export const testUpdateBranch2: UpdateBranchObject = {
group: 'e40ad156-e9af-4cc2-8e9d-c7b5c328db48',
message: 'fix bug',
createdAt: '2023-06-23T23:37:10.004Z',
runtime: { id: 'runtime-exposdk-48', version: 'exposdk:48.0.0' },
runtimeVersion: 'exposdk:48.0.0',
platform: 'ios',
manifestFragment:
'{"extra":{"expoClient":{"ios":{"supportsTablet":true,"bundleIdentifier":"com.quintest113.updatestest4"},"web":{"favicon":"./assets/favicon.png"},"icon":"./assets/icon.png","name":"updates-test-4","slug":"updates-test-4","extra":{"eas":{"projectId":"789a8784-0186-4f41-8bd2-7f219291a2b8"}},"splash":{"image":"./assets/splash.png","resizeMode":"contain","backgroundColor":"#ffffff"},"android":{"package":"com.quintest113.updatestest4","adaptiveIcon":{"backgroundColor":"#ffffff","foregroundImage":"./assets/adaptive-icon.png"}},"updates":{"url":"https://u.expo.dev/789a8784-0186-4f41-8bd2-7f219291a2b8"},"version":"1.0.0","platforms":["ios","android"],"sdkVersion":"48.0.0","orientation":"portrait","runtimeVersion":{"policy":"sdkVersion"},"currentFullName":"@quintest113/updates-test-4","originalFullName":"@quintest113/updates-test-4","userInterfaceStyle":"light","assetBundlePatterns":["**/*"]}},"assets":[{"bundleKey":"7d40544b395c5949f4646f5e150fe020","fileSHA256":"LN_rjlzN55dvcBL7jM5zryIpAp7iHU8VCf7RFIccbNg","storageKey":"Pi65ns2w9xLI5G_m9aGrJ5wK5FpWcGcInSSFwnA_0aA","contentType":"image/png","fileExtension":".png"},{"bundleKey":"cdd04e13d4ec83ff0cd13ec8dabdc341","fileSHA256":"irHji01LPI9giDYxtJo9bTPHaEHzuUcCMTlb4xn90Ks","storageKey":"oJZ9JX1m8IKNDgnIqcKOo5KUFOoa_NCaxruigZu65E0","contentType":"image/png","fileExtension":".png"},{"bundleKey":"a132ecc4ba5c1517ff83c0fb321bc7fc","fileSHA256":"K3RDqaWOksoRpXW9wRWYYVpX3eMFzYznDWAmBrMCzZg","storageKey":"X3OAkUu5P_LqyKFx1bNkA_qDQFLlSjCYNAlVEaOamHE","contentType":"image/png","fileExtension":".png"},{"bundleKey":"0ea69b5077e7c4696db85dbcba75b0e1","fileSHA256":"Pd0Hc-0n4j0leJ8wFzGzrEVa2L5aonoKG4OPicbSciU","storageKey":"FwJkAbrRNahBGX1KXnTAgiiwyzENu3D7DeEzCwmInyo","contentType":"image/png","fileExtension":".png"},{"bundleKey":"f5b790e2ac193b3d41015edb3551f9b8","fileSHA256":"vCfIss7SLYKt1AAi0hxjsgOMEDceLJB6ZWjQf6gTU4k","storageKey":"GQtYm7r0G9N3WJyrymjZ26p8eNMIb7rzqwSVgGco5EU","contentType":"image/png","fileExtension":".png"},{"bundleKey":"5223c8d9b0d08b82a5670fb5f71faf78","fileSHA256":"LJXowmdeeZM1_QBGuwfb2gbLfs_1HtN5IsYwnWGcxNM","storageKey":"jeqOrdQBNY4hgl04B3wtGs8QNWMDmjvbjIMUXPtOBpw","contentType":"image/png","fileExtension":".png"},{"bundleKey":"02d5848f62ade9617cf96894727d32e7","fileSHA256":"u1-8zHOj9oxS8maH-7JbShJIq1-KEV7FXnrGpEUcR-4","storageKey":"LMUvUZZpdGFb7KqaB_l9N4TXTkFn1Pw92ws9fWDNZPw","contentType":"model/gltf-binary","fileExtension":".glb"},{"bundleKey":"6013c27e421ab23c826713af3ebec891","fileSHA256":"dutQNnvzTCS4NgwvbeMbvhro5QnW0GJUeY_4rrvlcLY","storageKey":"85KB9Jr7eqz1Jwt1mYQGRzTy6ZXyO0j7ZcaLImCbzkU","contentType":"image/jpeg","fileExtension":".jpg"}],"launchAsset":{"bundleKey":"76ec49faddaef30ba78fe50edc5ab3d6","fileSHA256":"OLUdgP-fZI2shwGS5qlIk7nWnybL_13RJl5xR85CDBU","storageKey":"OCvI0-34zApbdo3eSGfIaQUbWdZeLeKH-nJSeedKTFs","contentType":"application/javascript","fileExtension":".bundle"}}',
@@ -99,7 +99,7 @@ export const testUpdateBranch2: UpdateBranchObject = {
group: 'e40ad156-e9af-4cc2-8e9d-c7b5c328db48',
message: 'fix bug',
createdAt: '2023-06-23T23:37:10.004Z',
runtime: { id: 'runtime-exposdk-48', version: 'exposdk:48.0.0' },
runtimeVersion: 'exposdk:48.0.0',
platform: 'android',
manifestFragment:
'{"extra":{"expoClient":{"ios":{"supportsTablet":true,"bundleIdentifier":"com.quintest113.updatestest4"},"web":{"favicon":"./assets/favicon.png"},"icon":"./assets/icon.png","name":"updates-test-4","slug":"updates-test-4","extra":{"eas":{"projectId":"789a8784-0186-4f41-8bd2-7f219291a2b8"}},"splash":{"image":"./assets/splash.png","resizeMode":"contain","backgroundColor":"#ffffff"},"android":{"package":"com.quintest113.updatestest4","adaptiveIcon":{"backgroundColor":"#ffffff","foregroundImage":"./assets/adaptive-icon.png"}},"updates":{"url":"https://u.expo.dev/789a8784-0186-4f41-8bd2-7f219291a2b8"},"version":"1.0.0","platforms":["ios","android"],"sdkVersion":"48.0.0","orientation":"portrait","runtimeVersion":{"policy":"sdkVersion"},"currentFullName":"@quintest113/updates-test-4","originalFullName":"@quintest113/updates-test-4","userInterfaceStyle":"light","assetBundlePatterns":["**/*"]}},"assets":[{"bundleKey":"778ffc9fe8773a878e9c30a6304784de","fileSHA256":"i2Gkx-9w3JJ1PwSUl2SC9m_UFQ7CPfx3KrZeEDc6-lU","storageKey":"idnX8z03q4vGLzhYMPaQGBADjhqvWe67_afPqJ1vGzM","contentType":"image/png","fileExtension":".png"},{"bundleKey":"376d6a4c7f622917c39feb23671ef71d","fileSHA256":"QJsG0VpGM-5viirUgoKq0M4zQ_TYyPfLhAhN5mrM54I","storageKey":"46DQ95-UdSKiRkQgt5FyXkE1FrKOT9tBZP3nS7auKlg","contentType":"image/png","fileExtension":".png"},{"bundleKey":"c79c3606a1cf168006ad3979763c7e0c","fileSHA256":"kGZm3WiTRq2iMs42ia3vkHtCV_obWT8DY40rlJf2SIQ","storageKey":"k-3xHp3vP8mR36WdccUZVPTRJKpP-zlyboWdkXCIQpQ","contentType":"image/png","fileExtension":".png"},{"bundleKey":"02bc1fa7c0313217bde2d65ccbff40c9","fileSHA256":"_6fuRbdkBbpzkhSVAI99aMneY5X0tpQdsGNGX244IyA","storageKey":"lfqeUjiWFXwowhxVDBEzxsbTOEzYxMLebljy5Bh1mpU","contentType":"image/png","fileExtension":".png"},{"bundleKey":"35ba0eaec5a4f5ed12ca16fabeae451d","fileSHA256":"hM9es7ICUPaeDkczvrTaX0F_BoKJKlrRteYlcHU8IbE","storageKey":"fMoMrsUeB5xWw_Ugn8FqGJf-M2pld2hkXKR704z0MM8","contentType":"image/png","fileExtension":".png"},{"bundleKey":"5223c8d9b0d08b82a5670fb5f71faf78","fileSHA256":"LJXowmdeeZM1_QBGuwfb2gbLfs_1HtN5IsYwnWGcxNM","storageKey":"jeqOrdQBNY4hgl04B3wtGs8QNWMDmjvbjIMUXPtOBpw","contentType":"image/png","fileExtension":".png"},{"bundleKey":"02d5848f62ade9617cf96894727d32e7","fileSHA256":"u1-8zHOj9oxS8maH-7JbShJIq1-KEV7FXnrGpEUcR-4","storageKey":"LMUvUZZpdGFb7KqaB_l9N4TXTkFn1Pw92ws9fWDNZPw","contentType":"model/gltf-binary","fileExtension":".glb"},{"bundleKey":"6013c27e421ab23c826713af3ebec891","fileSHA256":"dutQNnvzTCS4NgwvbeMbvhro5QnW0GJUeY_4rrvlcLY","storageKey":"85KB9Jr7eqz1Jwt1mYQGRzTy6ZXyO0j7ZcaLImCbzkU","contentType":"image/jpeg","fileExtension":".jpg"}],"launchAsset":{"bundleKey":"f4c6981626dbabcf51078d07a1611f4e","fileSHA256":"q-k1hSWl49aXpSg4jOSaVVnYFSFL6xf7HVl_TQE-ObM","storageKey":"FwK1PaZqtpL0QZIgaHsxU1AV93JhMdu9K1wZizXROAc","contentType":"application/javascript","fileExtension":".bundle"}}',
@@ -46,11 +46,7 @@ function makeInsights(
id: u.id,
group: u.group,
message: u.message,
runtime: {
__typename: 'Runtime' as const,
id: `${u.id}-runtime`,
version: u.runtimeVersion,
},
runtimeVersion: u.runtimeVersion,
platform: u.platform,
insights: {
__typename: 'UpdateInsights' as const,
@@ -48,18 +48,18 @@ describe(getProjectIdAsync, () => {
primaryAccount: {
id: 'account_id_1',
name: 'notnotbrent',
viewerUserPermission: { role: Role.Owner },
users: [{ role: Role.Owner, actor: { id: 'user_id' } }],
},
accounts: [
{
id: 'account_id_1',
name: 'notnotbrent',
viewerUserPermission: { role: Role.Owner },
users: [{ role: Role.Owner, actor: { id: 'user_id' } }],
},
{
id: 'account_id_2',
name: 'dominik',
viewerUserPermission: { role: Role.ViewOnly },
users: [{ role: Role.ViewOnly, actor: { id: 'user_id' } }],
},
],
isExpoAdmin: false,
@@ -198,12 +198,12 @@ describe(getProjectIdAsync, () => {
{
id: 'account_id_1',
name: 'notnotbrent',
viewerUserPermission: { role: Role.Admin },
users: [{ role: Role.Admin, actor: { id: 'robot_id' } }],
},
{
id: 'account_id_2',
name: 'dominik',
viewerUserPermission: { role: Role.ViewOnly },
users: [{ role: Role.ViewOnly, actor: { id: 'robot_id' } }],
},
],
isExpoAdmin: false,
@@ -423,13 +423,13 @@ describe(getProjectIdAsync, () => {
primaryAccount: {
id: 'account_id_1',
name: 'notnotbrent',
viewerUserPermission: { role: Role.Owner },
users: [{ role: Role.Owner, actor: { id: 'user_id' } }],
},
accounts: [
{
id: 'account_id_1',
name: 'notnotbrent',
viewerUserPermission: { role: Role.Owner },
users: [{ role: Role.Owner, actor: { id: 'user_id' } }],
},
],
isExpoAdmin: false,
@@ -465,7 +465,7 @@ describe(getProjectIdAsync, () => {
{
id: 'account_id_1',
name: 'notnotbrent',
viewerUserPermission: { role: Role.Admin },
users: [{ role: Role.Admin, actor: { id: 'robot_id' } }],
},
],
isExpoAdmin: false,
@@ -2,7 +2,7 @@ import { ExpoConfig } from '@expo/config';
import fs from 'fs-extra';
import { getEASUpdateURL } from '../../../api';
import { AppFragment, Role } from '../../../graphql/generated';
import { AppFragment } from '../../../graphql/generated';
import { easCliVersion } from '../../../utils/easCli';
import {
cleanAndPrefix,
@@ -62,7 +62,7 @@ describe('projectFiles', () => {
ownerAccount: {
id: 'testowner-account-id',
name: 'testowner',
viewerUserPermission: { role: Role.Owner },
users: [],
},
...overrides,
});
@@ -126,7 +126,7 @@ describe('projectFiles', () => {
ownerAccount: {
id: 'test-owner-account-id',
name: 'test-owner',
viewerUserPermission: { role: Role.Owner },
users: [],
},
});
@@ -151,7 +151,7 @@ describe('projectFiles', () => {
ownerAccount: {
id: 'test-owner-123-account-id',
name: 'test-owner-123',
viewerUserPermission: { role: Role.Owner },
users: [],
},
});
@@ -80,7 +80,8 @@ function getAccountPermissionsMap(actor: Actor): Map<string, boolean> {
const permissionsMap = new Map<string, boolean>();
for (const account of actor.accounts) {
const hasPermission = account.viewerUserPermission.role !== Role.ViewOnly;
const hasPermission =
account.users.find(it => it.actor.id === actor.id)?.role !== Role.ViewOnly;
permissionsMap.set(account.name, hasPermission);
}
@@ -1,4 +1,5 @@
import chalk from 'chalk';
import nullthrows from 'nullthrows';
import EasCommand from '../../commandUtils/EasCommand';
import { Role } from '../../graphql/generated';
@@ -51,7 +52,7 @@ export default class AccountView extends EasCommand {
return Role.Owner;
}
return account.viewerUserPermission.role;
return nullthrows(account.users.find(user => user.actor.id === actor.id)?.role);
}
private static getLabelForRole(role: Role): string {
@@ -27,8 +27,8 @@ async function cancelBuildAsync(
.mutation<CancelBuildMutation, CancelBuildMutationVariables>(
gql`
mutation CancelBuildMutation($buildId: ID!) {
build {
cancelBuild(buildId: $buildId) {
build(buildId: $buildId) {
cancel {
id
status
}
@@ -39,7 +39,7 @@ async function cancelBuildAsync(
)
.toPromise()
);
return data.build.cancelBuild;
return data.build.cancel;
}
export async function selectBuildToCancelAsync(
@@ -235,7 +235,7 @@ export default class Download extends EasCommand {
async getPathToBuildArtifactAsync(build: BuildFragment, platform: AppPlatform): Promise<string> {
const cachedBuildArtifactPath = getEasBuildRunCachedAppPath(
build.app.id,
build.project.id,
build.id,
platform
);
@@ -26,7 +26,7 @@ const insightsResponse = {
id: 'u1',
group: 'group-a',
message: 'first',
runtime: { __typename: 'Runtime' as const, id: 'u1-runtime', version: '1.0.0' },
runtimeVersion: '1.0.0',
platform: 'ios',
insights: { __typename: 'UpdateInsights' as const, id: 'u1-i', totalUniqueUsers: 200 },
},
@@ -6,7 +6,6 @@ import { AppStoreConnectApiKeyQuery } from '../../../../credentials/ios/api/grap
import { AscAppLinkMutation } from '../../../../graphql/mutations/AscAppLinkMutation';
import { AscAppLinkQuery } from '../../../../graphql/queries/AscAppLinkQuery';
import IntegrationsAscConnect from '../connect';
import { Role } from '../../../../graphql/generated';
jest.mock('../../../../graphql/queries/AscAppLinkQuery');
jest.mock('../../../../graphql/mutations/AscAppLinkMutation');
@@ -19,12 +18,7 @@ const testProjectId = 'test-project-id';
const mockMetadataConnected = {
id: testProjectId,
fullName: '@testuser/testapp',
ownerAccount: {
id: 'account-id',
name: 'testuser',
ownerUserActor: null,
viewerUserPermission: { role: Role.Owner },
},
ownerAccount: { id: 'account-id', name: 'testuser', ownerUserActor: null, users: [] },
appStoreConnectApp: {
id: 'asc-app-link-id',
ascAppIdentifier: '1234567890',
@@ -40,12 +34,7 @@ const mockMetadataConnected = {
const mockMetadataDisconnected = {
id: testProjectId,
fullName: '@testuser/testapp',
ownerAccount: {
id: 'account-id',
name: 'testuser',
ownerUserActor: null,
viewerUserPermission: { role: Role.Owner },
},
ownerAccount: { id: 'account-id', name: 'testuser', ownerUserActor: null, users: [] },
appStoreConnectApp: null,
};
@@ -8,7 +8,6 @@ import { AscAppLinkQuery } from '../../../../graphql/queries/AscAppLinkQuery';
import Log from '../../../../log';
import { toggleConfirmAsync } from '../../../../prompts';
import IntegrationsAscDisconnect from '../disconnect';
import { Role } from '../../../../graphql/generated';
jest.mock('../../../../graphql/queries/AscAppLinkQuery');
jest.mock('../../../../graphql/mutations/AscAppLinkMutation');
@@ -20,12 +19,7 @@ const testProjectId = 'test-project-id';
const mockMetadataConnected = {
id: testProjectId,
fullName: '@testuser/testapp',
ownerAccount: {
id: 'account-id',
name: 'testuser',
ownerUserActor: null,
viewerUserPermission: { role: Role.Owner },
},
ownerAccount: { id: 'account-id', name: 'testuser', ownerUserActor: null, users: [] },
appStoreConnectApp: {
id: 'asc-app-link-id',
ascAppIdentifier: '1234567890',
@@ -41,12 +35,7 @@ const mockMetadataConnected = {
const mockMetadataDisconnected = {
id: testProjectId,
fullName: '@testuser/testapp',
ownerAccount: {
id: 'account-id',
name: 'testuser',
ownerUserActor: null,
viewerUserPermission: { role: Role.Owner },
},
ownerAccount: { id: 'account-id', name: 'testuser', ownerUserActor: null, users: [] },
appStoreConnectApp: null,
};
@@ -6,7 +6,6 @@ import { ExpoGraphqlClient } from '../../../../commandUtils/context/contextUtils
import { AscAppLinkQuery } from '../../../../graphql/queries/AscAppLinkQuery';
import Log from '../../../../log';
import IntegrationsAscStatus from '../status';
import { Role } from '../../../../graphql/generated';
jest.mock('../../../../graphql/queries/AscAppLinkQuery');
jest.mock('../../../../log');
@@ -16,12 +15,7 @@ const testProjectId = 'test-project-id';
const mockMetadataConnected = {
id: testProjectId,
fullName: '@testuser/testapp',
ownerAccount: {
id: 'account-id',
name: 'testuser',
ownerUserActor: null,
viewerUserPermission: { role: Role.Owner },
},
ownerAccount: { id: 'account-id', name: 'testuser', ownerUserActor: null, users: [] },
appStoreConnectApp: {
id: 'asc-app-link-id',
ascAppIdentifier: '1234567890',
@@ -37,12 +31,7 @@ const mockMetadataConnected = {
const mockMetadataDisconnected = {
id: testProjectId,
fullName: '@testuser/testapp',
ownerAccount: {
id: 'account-id',
name: 'testuser',
ownerUserActor: null,
viewerUserPermission: { role: Role.Owner },
},
ownerAccount: { id: 'account-id', name: 'testuser', ownerUserActor: null, users: [] },
appStoreConnectApp: null,
};
@@ -9,7 +9,6 @@ import {
EnvironmentSecretType,
EnvironmentVariableScope,
EnvironmentVariableVisibility,
Role,
} from '../../../../graphql/generated';
import { ConvexMutation } from '../../../../graphql/mutations/ConvexMutation';
import { EnvironmentVariableMutation } from '../../../../graphql/mutations/EnvironmentVariableMutation';
@@ -60,7 +59,7 @@ describe(IntegrationsConvexConnect, () => {
id: testAccountId,
name: testAccountName,
ownerUserActor: null,
viewerUserPermission: { role: Role.Owner },
users: [],
},
accounts: [],
};
@@ -77,7 +76,7 @@ describe(IntegrationsConvexConnect, () => {
id: testAccountId,
name: testAccountName,
ownerUserActor: { id: 'test-user-id', username: testAccountName },
viewerUserPermission: { role: 'OWNER' as any },
users: [{ role: 'OWNER' as any, actor: { id: 'test-user-id' } }],
};
const mockConnection: ConvexTeamConnectionData = {
@@ -32,7 +32,7 @@ describe(IntegrationsConvexTeamDelete, () => {
id: testAccountId,
name: testAccountName,
ownerUserActor: { id: 'test-user-id', username: testAccountName },
viewerUserPermission: { role: 'OWNER' as any },
users: [{ role: 'OWNER' as any, actor: { id: 'test-user-id' } }],
};
const mockConnection: ConvexTeamConnectionData = {
@@ -41,7 +41,7 @@ describe(IntegrationsConvexTeamInvite, () => {
id: testAccountId,
name: testAccountName,
ownerUserActor: { id: 'test-user-id', username: testAccountName },
viewerUserPermission: { role: 'OWNER' as any },
users: [{ role: 'OWNER' as any, actor: { id: 'test-user-id' } }],
};
const mockConnection: ConvexTeamConnectionData = {
@@ -21,7 +21,7 @@ describe(IntegrationsConvexTeam, () => {
id: testAccountId,
name: testAccountName,
ownerUserActor: { id: 'test-user-id', username: testAccountName },
viewerUserPermission: { role: 'OWNER' as any },
users: [{ role: 'OWNER' as any, actor: { id: 'test-user-id' } }],
};
const mockConnection: ConvexTeamConnectionData = {
@@ -62,12 +62,7 @@ describe(IntegrationsPostHogConnect, () => {
email: '[email protected]',
featureGates: {},
isExpoAdmin: false,
primaryAccount: {
id: testAccountId,
name: testAccountName,
ownerUserActor: null,
viewerUserPermission: { role: Role.Owner },
},
primaryAccount: { id: testAccountId, name: testAccountName, ownerUserActor: null, users: [] },
accounts: [],
};
@@ -75,7 +70,7 @@ describe(IntegrationsPostHogConnect, () => {
id: testAccountId,
name: testAccountName,
ownerUserActor: { id: 'test-user-id', username: testAccountName },
viewerUserPermission: { role: Role.Owner },
users: [{ role: Role.Owner, actor: { id: 'test-user-id' } }],
};
const mockConnection: PostHogOrganizationConnectionData = {
@@ -35,7 +35,7 @@ const updateStub: UpdateFragment = {
group: 'group-1234',
branch: { id: 'branch-1234', name: 'main' },
message: 'test message',
runtime: { id: 'runtime-1234', version: 'exposdk:47.0.0' },
runtimeVersion: 'exposdk:47.0.0',
platform: 'ios',
gitCommitHash: 'commit',
isGitWorkingTreeDirty: false,
@@ -30,7 +30,7 @@ const updateStub: UpdateFragment = {
group: 'group-1234',
branch: { id: 'branch-1234', name: 'main' },
message: 'test message',
runtime: { id: 'runtime-1234', version: 'exposdk:47.0.0' },
runtimeVersion: 'exposdk:47.0.0',
platform: 'ios',
gitCommitHash: 'commit',
isGitWorkingTreeDirty: false,
@@ -154,7 +154,7 @@ describe(UpdateRepublish.name, () => {
expect.arrayContaining([
expect.objectContaining({
branchId: updateStub.branch.id,
runtimeVersion: updateStub.runtime.version,
runtimeVersion: updateStub.runtimeVersion,
updateInfoGroup: expect.objectContaining({
ios: expect.any(Object),
}),
@@ -225,7 +225,7 @@ describe(UpdateRepublish.name, () => {
expect.arrayContaining([
expect.objectContaining({
branchId: updateStub.branch.id,
runtimeVersion: updateStub.runtime.version,
runtimeVersion: updateStub.runtimeVersion,
updateInfoGroup: expect.objectContaining({
ios: expect.any(Object),
}),
@@ -270,7 +270,7 @@ describe(UpdateRepublish.name, () => {
expect.arrayContaining([
expect.objectContaining({
branchId: updateStub.branch.id,
runtimeVersion: updateStub.runtime.version,
runtimeVersion: updateStub.runtimeVersion,
updateInfoGroup: expect.objectContaining({
ios: expect.any(Object),
}),
@@ -313,7 +313,7 @@ describe(UpdateRepublish.name, () => {
expect.arrayContaining([
expect.objectContaining({
branchId: updateStub.branch.id,
runtimeVersion: updateStub.runtime.version,
runtimeVersion: updateStub.runtimeVersion,
updateInfoGroup: expect.objectContaining({
ios: expect.any(Object),
}),
@@ -357,7 +357,7 @@ describe(UpdateRepublish.name, () => {
expect.arrayContaining([
expect.objectContaining({
branchId: 'other-id',
runtimeVersion: updateStub.runtime.version,
runtimeVersion: updateStub.runtimeVersion,
updateInfoGroup: expect.objectContaining({
ios: expect.any(Object),
}),
@@ -401,7 +401,7 @@ describe(UpdateRepublish.name, () => {
expect.arrayContaining([
expect.objectContaining({
branchId: 'blah-id',
runtimeVersion: updateStub.runtime.version,
runtimeVersion: updateStub.runtimeVersion,
updateInfoGroup: expect.objectContaining({
ios: expect.any(Object),
}),
@@ -30,7 +30,7 @@ const updateStub: UpdateFragment = {
group: 'group-1234',
branch: { id: 'branch-1234', name: 'main' },
message: 'test message',
runtime: { id: 'runtime-1234', version: 'exposdk:47.0.0' },
runtimeVersion: 'exposdk:47.0.0',
platform: 'ios',
gitCommitHash: 'commit',
isGitWorkingTreeDirty: false,
@@ -24,7 +24,7 @@ const updateStub: UpdateFragment = {
group: 'group-source',
branch: { id: 'branch-1234', name: 'main' },
message: 'source message',
runtime: { id: 'runtime-1234', version: 'exposdk:47.0.0' },
runtimeVersion: 'exposdk:47.0.0',
platform: 'ios',
gitCommitHash: 'commit',
isGitWorkingTreeDirty: false,
@@ -33,7 +33,7 @@ const updateGroup = [
actor: null,
createdAt: '2026-04-09T00:00:00.000Z',
message: 'first',
runtime: { __typename: 'Runtime' as const, id: 'runtime-1', version: '1.0.0' },
runtimeVersion: '1.0.0',
platform: 'ios',
manifestPermalink: 'https://expo.dev/manifest/u1',
isRollBackToEmbedded: false,
@@ -670,7 +670,7 @@ export default class UpdatePublish extends EasCommand {
version => version.runtimeVersion
)) {
const newUpdatesForRuntimeVersion = newUpdates.filter(
update => update.runtime.version === runtime.runtimeVersion
update => update.runtimeVersion === runtime.runtimeVersion
);
if (newUpdatesForRuntimeVersion.length === 0) {
throw new Error(
@@ -322,7 +322,7 @@ export default class UpdateRevertUpdateRollout extends EasCommand {
});
const platforms = rolloutUpdateGroup.map(update => update.platform) as UpdatePublishPlatform[];
const runtimeVersion = rolloutUpdateGroup[0].runtime.version;
const runtimeVersion = rolloutUpdateGroup[0].runtimeVersion;
const targetBranch = {
name: rolloutUpdateGroup[0].branchName,
id: rolloutUpdateGroup[0].branchId,
@@ -147,7 +147,7 @@ async function getSourceUpdateGroupAsync(
return {
groupId,
branchName: arbitraryUpdate.branch.name,
runtimeVersion: arbitraryUpdate.runtime.version,
runtimeVersion: arbitraryUpdate.runtimeVersion,
};
}
@@ -60,7 +60,14 @@ export const testAppFragment: AppFragment = {
ownerAccount: {
id: 'test-account-id',
name: 'testuser',
viewerUserPermission: { role: Role.Owner },
users: [
{
role: Role.Owner,
actor: {
id: 'test-user-id',
},
},
],
},
};
@@ -11,18 +11,18 @@ export const jester: Actor = {
primaryAccount: {
id: 'jester-account-id',
name: 'jester',
viewerUserPermission: { role: Role.Admin },
users: [{ role: Role.Admin, actor: { id: 'jester-id' } }],
},
accounts: [
{
id: 'jester-account-id',
name: 'jester',
viewerUserPermission: { role: Role.Admin },
users: [{ role: Role.Admin, actor: { id: 'jester-id' } }],
},
{
id: 'other-account-id',
name: 'other',
viewerUserPermission: { role: Role.ViewOnly },
users: [{ role: Role.ViewOnly, actor: { id: 'jester-id' } }],
},
],
isExpoAdmin: false,
@@ -37,7 +37,7 @@ export const jester2 = {
{
id: 'jester2-account-id',
name: 'jester2',
viewerUserPermission: { role: Role.Admin },
users: [{ role: Role.Admin, actor: { id: 'jester2-id' } }],
},
],
isExpoAdmin: false,
@@ -52,7 +52,7 @@ export const robot: Actor = {
{
id: 'robot-account-id',
name: 'robot-account',
viewerUserPermission: { role: Role.Owner },
users: [],
},
],
isExpoAdmin: false,
@@ -60,7 +60,14 @@ export const testAppFragment: AppFragment = {
ownerAccount: {
id: 'test-account-id',
name: 'testuser',
viewerUserPermission: { role: Role.Owner },
users: [
{
role: Role.Owner,
actor: {
id: 'test-user-id',
},
},
],
},
};
@@ -1,7 +1,7 @@
import { CredentialsSource } from '@expo/eas-json';
import { vol } from 'memfs';
import { IosAppBuildCredentialsFragment, Role } from '../../../graphql/generated';
import { IosAppBuildCredentialsFragment } from '../../../graphql/generated';
import { AppQuery } from '../../../graphql/queries/AppQuery';
import { findApplicationTarget } from '../../../project/ios/target';
import { getAppstoreMock } from '../../__tests__/fixtures-appstore';
@@ -58,7 +58,7 @@ describe(IosCredentialsProvider, () => {
account: {
id: `id-${appLookupParams.account.name}`,
name: appLookupParams.account.name,
viewerUserPermission: { role: Role.Owner },
users: [],
},
projectName: appLookupParams.projectName,
},
@@ -102,7 +102,7 @@ describe(IosCredentialsProvider, () => {
account: {
id: `id-${appLookupParams.account.name}`,
name: appLookupParams.account.name,
viewerUserPermission: { role: Role.Owner },
users: [],
},
projectName: appLookupParams.projectName,
},
@@ -1,8 +1,4 @@
import {
IosAppBuildCredentialsFragment,
IosDistributionType,
Role,
} from '../../../../graphql/generated';
import { IosAppBuildCredentialsFragment, IosDistributionType } from '../../../../graphql/generated';
import { promptAsync } from '../../../../prompts';
import { getAppstoreMock, testAuthCtx } from '../../../__tests__/fixtures-appstore';
import { createCtxMock } from '../../../__tests__/fixtures-context';
@@ -47,11 +43,7 @@ describe(SetUpInternalProvisioningProfile, () => {
});
const action = new SetUpInternalProvisioningProfile({
app: {
account: {
id: 'account-id',
name: 'account-name',
viewerUserPermission: { role: Role.Owner },
},
account: { id: 'account-id', name: 'account-name', users: [] },
bundleIdentifier: 'com.expo.test',
projectName: 'testproject',
},
@@ -85,11 +77,7 @@ describe(SetUpInternalProvisioningProfile, () => {
const action = new SetUpInternalProvisioningProfile({
app: {
account: {
id: 'account-id',
name: 'account-name',
viewerUserPermission: { role: Role.Owner },
},
account: { id: 'account-id', name: 'account-name', users: [] },
bundleIdentifier: 'com.expo.test',
projectName: 'testproject',
},
@@ -130,11 +118,7 @@ describe(SetUpInternalProvisioningProfile, () => {
const action = new SetUpInternalProvisioningProfile({
app: {
account: {
id: 'account-id',
name: 'account-name',
viewerUserPermission: { role: Role.Owner },
},
account: { id: 'account-id', name: 'account-name', users: [] },
bundleIdentifier: 'com.expo.test',
projectName: 'testproject',
},
@@ -168,11 +152,7 @@ describe(SetUpInternalProvisioningProfile, () => {
const action = new SetUpInternalProvisioningProfile({
app: {
account: {
id: 'account-id',
name: 'account-name',
viewerUserPermission: { role: Role.Owner },
},
account: { id: 'account-id', name: 'account-name', users: [] },
bundleIdentifier: 'com.expo.test',
projectName: 'testproject',
},
@@ -208,11 +188,7 @@ describe(SetUpInternalProvisioningProfile, () => {
const action = new SetUpInternalProvisioningProfile({
app: {
account: {
id: 'account-id',
name: 'account-name',
viewerUserPermission: { role: Role.Owner },
},
account: { id: 'account-id', name: 'account-name', users: [] },
bundleIdentifier: 'com.expo.test',
projectName: 'testproject',
},
@@ -246,11 +222,7 @@ describe(SetUpInternalProvisioningProfile, () => {
const action = new SetUpInternalProvisioningProfile({
app: {
account: {
id: 'account-id',
name: 'account-name',
viewerUserPermission: { role: Role.Owner },
},
account: { id: 'account-id', name: 'account-name', users: [] },
bundleIdentifier: 'com.expo.test',
projectName: 'testproject',
},
@@ -283,11 +255,7 @@ describe(SetUpInternalProvisioningProfile, () => {
});
const action = new SetUpInternalProvisioningProfile({
app: {
account: {
id: 'account-id',
name: 'account-name',
viewerUserPermission: { role: Role.Owner },
},
account: { id: 'account-id', name: 'account-name', users: [] },
bundleIdentifier: 'com.expo.test',
projectName: 'testproject',
},
@@ -308,11 +276,7 @@ describe(SetUpInternalProvisioningProfile, () => {
});
const action = new SetUpInternalProvisioningProfile({
app: {
account: {
id: 'account-id',
name: 'account-name',
viewerUserPermission: { role: Role.Owner },
},
account: { id: 'account-id', name: 'account-name', users: [] },
bundleIdentifier: 'com.expo.test',
projectName: 'testproject',
},
@@ -331,11 +295,7 @@ describe(SetUpInternalProvisioningProfile, () => {
});
const action = new SetUpInternalProvisioningProfile({
app: {
account: {
id: 'account-id',
name: 'account-name',
viewerUserPermission: { role: Role.Owner },
},
account: { id: 'account-id', name: 'account-name', users: [] },
bundleIdentifier: 'com.expo.test',
projectName: 'testproject',
},
@@ -360,11 +320,7 @@ describe(SetUpInternalProvisioningProfile, () => {
});
const action = new SetUpInternalProvisioningProfile({
app: {
account: {
id: 'account-id',
name: 'account-name',
viewerUserPermission: { role: Role.Owner },
},
account: { id: 'account-id', name: 'account-name', users: [] },
bundleIdentifier: 'com.expo.test',
projectName: 'testproject',
},
@@ -76,22 +76,18 @@ export const AppleDeviceQuery = {
account {
byName(accountName: $accountName) {
id
appleTeamsPaginated(first: 1, filter: { appleTeamIdentifier: $appleTeamIdentifier }) {
edges {
node {
id
appleTeamIdentifier
appleTeamName
appleDevices(offset: $offset, limit: $limit) {
id
identifier
name
deviceClass
enabled
model
createdAt
}
}
appleTeams(appleTeamIdentifier: $appleTeamIdentifier) {
id
appleTeamIdentifier
appleTeamName
appleDevices(offset: $offset, limit: $limit) {
id
identifier
name
deviceClass
enabled
model
createdAt
}
}
}
@@ -105,12 +101,7 @@ export const AppleDeviceQuery = {
)
.toPromise()
);
const appleTeam = data.account.byName.appleTeamsPaginated.edges[0]?.node;
if (!appleTeam) {
throw new Error(
`Could not find Apple team with the identifier ${appleTeamIdentifier} on account ${accountName}`
);
}
const [appleTeam] = data.account.byName.appleTeams;
const { appleDevices } = appleTeam;
if (!appleDevices) {
throw new Error(`Could not find devices on Apple team -- ${formatAppleTeam(appleTeam)}`);
@@ -5,100 +5,35 @@ import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUt
import { withErrorHandlingAsync } from '../../../../../graphql/client';
import {
AppleTeamByIdentifierQuery,
AppleTeamFilterInput,
AppleTeamFragment,
AppleTeamsPaginatedByAccountQuery,
AppleTeamsByAccountNameQuery,
AppleTeamsByAccountNameQueryVariables,
} from '../../../../../graphql/generated';
import { AppleTeamFragmentNode } from '../../../../../graphql/types/credentials/AppleTeam';
import { Connection } from '../../../../../utils/relay';
export const AppleTeamQuery = {
async getAllForAccountAsync(
graphqlClient: ExpoGraphqlClient,
{
accountName,
offset,
limit,
}: { accountName: string; offset?: number | null; limit?: number | null }
{ accountName, offset, limit }: AppleTeamsByAccountNameQueryVariables
): Promise<AppleTeamFragment[]> {
// appleTeamsPaginated is cursor-based, so emulate offset/limit by fetching
// pages from the start until enough nodes are collected
const start = offset ?? 0;
const teams: AppleTeamFragment[] = [];
let after: string | undefined;
while (limit == null || teams.length < start + limit) {
const connection = await AppleTeamQuery.getAllForAccountPaginatedAsync(
graphqlClient,
accountName,
{ first: 100, after }
);
teams.push(...connection.edges.map(edge => edge.node));
if (!connection.pageInfo.hasNextPage) {
break;
}
after = connection.pageInfo.endCursor ?? undefined;
}
return limit == null ? teams.slice(start) : teams.slice(start, start + limit);
},
async getAllForAccountPaginatedAsync(
graphqlClient: ExpoGraphqlClient,
accountName: string,
{
after,
first,
before,
last,
filter,
}: {
after?: string;
first?: number;
before?: string;
last?: number;
filter?: AppleTeamFilterInput;
}
): Promise<Connection<AppleTeamFragment>> {
const data = await withErrorHandlingAsync(
graphqlClient
.query<AppleTeamsPaginatedByAccountQuery>(
.query<AppleTeamsByAccountNameQuery>(
gql`
query AppleTeamsPaginatedByAccountQuery(
$accountName: String!
$after: String
$first: Int
$before: String
$last: Int
$filter: AppleTeamFilterInput
) {
query AppleTeamsByAccountName($accountName: String!, $offset: Int, $limit: Int) {
account {
byName(accountName: $accountName) {
id
appleTeamsPaginated(
after: $after
first: $first
before: $before
last: $last
filter: $filter
) {
edges {
cursor
node {
id
...AppleTeamFragment
}
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
appleTeams(offset: $offset, limit: $limit) {
id
...AppleTeamFragment
}
}
}
}
${print(AppleTeamFragmentNode)}
`,
{ accountName, after, first, before, last, filter },
{ accountName, offset, limit },
{
additionalTypenames: ['AppleTeam'],
}
@@ -106,7 +41,7 @@ export const AppleTeamQuery = {
.toPromise()
);
return data.account.byName.appleTeamsPaginated;
return data.account.byName.appleTeams ?? [];
},
async getByAppleTeamIdentifierAsync(
graphqlClient: ExpoGraphqlClient,
@@ -7,7 +7,6 @@ import Log from '../../../../log';
import { IosAppCredentialsQuery } from '../../api/graphql/queries/IosAppCredentialsQuery';
import { App, Target } from '../../types';
import { displayIosCredentials } from '../printCredentials';
import { Role } from '../../../../graphql/generated';
jest.mock('../../../../log');
jest.mock('chalk', () => ({
@@ -30,7 +29,7 @@ describe('print credentials', () => {
account: {
id: 'account-id',
name: 'quinlanj',
viewerUserPermission: { role: Role.Owner },
users: [],
},
projectName: 'test52',
};
@@ -29,18 +29,18 @@ describe(AccountResolver, () => {
primaryAccount: {
id: 'account_id_777',
name: 'dominik',
viewerUserPermission: { role: Role.Owner },
users: [{ role: Role.Owner, actor: { id: 'user_id_666' } }],
},
accounts: [
{
id: 'account_id_777',
name: 'dominik',
viewerUserPermission: { role: Role.Owner },
users: [{ role: Role.Owner, actor: { id: 'user_id_666' } }],
},
{
id: 'account_id_888',
name: 'foo',
viewerUserPermission: { role: Role.Owner },
users: [{ role: Role.Owner, actor: { id: 'user_id_666' } }],
},
],
isExpoAdmin: false,
@@ -57,7 +57,7 @@ describe(AccountResolver, () => {
ownerAccount: {
id: 'account_id_888',
name: 'foo',
viewerUserPermission: { role: Role.Owner },
users: [{ role: Role.Owner, actor: { id: 'user_id_666' } }],
},
});
});
@@ -73,7 +73,7 @@ describe(AccountResolver, () => {
expect(account).toEqual({
id: user.accounts[1].id,
name: user.accounts[1].name,
viewerUserPermission: user.accounts[1].viewerUserPermission,
users: user.accounts[1].users,
});
});
@@ -40,7 +40,14 @@ describe(DeviceCreateAction, () => {
const account: AccountFragment = {
id: 'account_id',
name: 'foobar',
viewerUserPermission: { role: Role.Owner },
users: [
{
role: Role.Owner,
actor: {
id: 'user_id',
},
},
],
};
const appleTeam = {
id: 'apple-team-id',
@@ -64,7 +71,14 @@ describe(DeviceCreateAction, () => {
const account: AccountFragment = {
id: 'account_id',
name: 'foobar',
viewerUserPermission: { role: Role.Owner },
users: [
{
role: Role.Owner,
actor: {
id: 'user_id',
},
},
],
};
const appleTeam = {
id: 'apple-team-id',
@@ -88,7 +102,14 @@ describe(DeviceCreateAction, () => {
const account: AccountFragment = {
id: 'account_id',
name: 'foobar',
viewerUserPermission: { role: Role.Owner },
users: [
{
role: Role.Owner,
actor: {
id: 'user_id',
},
},
],
};
const appleTeam = {
id: 'apple-team-id',
@@ -112,7 +133,14 @@ describe(DeviceCreateAction, () => {
const account: AccountFragment = {
id: 'account_id',
name: 'foobar',
viewerUserPermission: { role: Role.Owner },
users: [
{
role: Role.Owner,
actor: {
id: 'user_id',
},
},
],
};
const appleTeam = {
id: 'apple-team-id',
+421 -324
View File
File diff suppressed because it is too large. Load diff
@@ -52,10 +52,7 @@ export const ChannelInsightsQuery = {
id
group
message
runtime {
id
version
}
runtimeVersion
platform
insights {
id
@@ -10,7 +10,10 @@ export const AccountFragmentNode = gql`
id
username
}
viewerUserPermission {
users {
actor {
id
}
role
}
}
+8 -13
View File
@@ -30,31 +30,26 @@ export const BuildFragmentNode = gql`
displayName
}
logFiles
app {
project {
__typename
id
name
slug
ownerAccount {
id
name
... on App {
ownerAccount {
id
name
}
}
}
updateChannel {
id
name
}
channel
distribution
iosEnterpriseProvisioning
buildProfile
appIdentifier
sdkVersion
appVersion
appBuildVersion
runtime {
id
version
}
runtimeVersion
gitCommitHash
gitCommitMessage
initialQueuePosition
@@ -15,6 +15,7 @@ export const SubmissionFragmentNode = gql`
}
}
androidConfig {
applicationIdentifier
track
releaseStatus
rollout
+1 -4
View File
@@ -6,10 +6,7 @@ export const UpdateFragmentNode = gql`
group
message
createdAt
runtime {
id
version
}
runtimeVersion
platform
manifestFragment
isRollBackToEmbedded
@@ -7,17 +7,11 @@ import {
formatAscAppLinkStatus,
isAscAuthenticationError,
} from '../utils';
import { Role } from '../../../graphql/generated';
const mockMetadataConnected = {
id: 'app-id',
fullName: '@testuser/testapp',
ownerAccount: {
id: 'account-id',
name: 'testuser',
ownerUserActor: null,
viewerUserPermission: { role: Role.Owner },
},
ownerAccount: { id: 'account-id', name: 'testuser', ownerUserActor: null, users: [] },
appStoreConnectApp: {
id: 'asc-app-link-id',
ascAppIdentifier: '1234567890',
@@ -33,12 +27,7 @@ const mockMetadataConnected = {
const mockMetadataDisconnected = {
id: 'app-id',
fullName: '@testuser/testapp',
ownerAccount: {
id: 'account-id',
name: 'testuser',
ownerUserActor: null,
viewerUserPermission: { role: Role.Owner },
},
ownerAccount: { id: 'account-id', name: 'testuser', ownerUserActor: null, users: [] },
appStoreConnectApp: null,
};
@@ -13,26 +13,26 @@ const userActor: Actor = {
primaryAccount: {
id: 'account-id-personal',
name: 'jane',
viewerUserPermission: { role: Role.Owner },
users: [{ role: Role.Owner, actor: { id: 'user-id' } }],
},
accounts: [
{
id: 'account-id-org',
name: 'acme',
ownerUserActor: null,
viewerUserPermission: { role: Role.ViewOnly },
users: [{ role: Role.ViewOnly, actor: { id: 'user-id' } }],
},
{
id: 'account-id-personal',
name: 'jane',
ownerUserActor: { id: 'user-id' },
viewerUserPermission: { role: Role.Owner },
users: [{ role: Role.Owner, actor: { id: 'user-id' } }],
},
{
id: 'account-id-team',
name: 'bob',
ownerUserActor: { id: 'other-user-id' },
viewerUserPermission: { role: Role.Admin },
users: [{ role: Role.Admin, actor: { id: 'user-id' } }],
},
],
isExpoAdmin: false,
@@ -46,12 +46,12 @@ const robotActor: Actor = {
{
id: 'account-id-1',
name: 'acme',
viewerUserPermission: { role: Role.Admin },
users: [{ role: Role.Admin, actor: { id: 'robot-id' } }],
},
{
id: 'account-id-2',
name: 'other-org',
viewerUserPermission: { role: Role.ViewOnly },
users: [{ role: Role.ViewOnly, actor: { id: 'robot-id' } }],
},
],
isExpoAdmin: false,
@@ -87,7 +87,7 @@ describe(getAccountChoices, () => {
id: 'account-id-personal',
name: 'jane',
ownerUserActor: { id: 'user-id' },
viewerUserPermission: { role: Role.ViewOnly },
users: [{ role: Role.ViewOnly, actor: { id: 'user-id' } }],
},
],
} as any as Actor;
@@ -6,7 +6,9 @@ export function getAccountNamesWhereUserHasSufficientPermissionsToCreateApp(
actor: Actor
): Set<string> {
return new Set(
actor.accounts.filter(a => a.viewerUserPermission.role !== Role.ViewOnly).map(it => it.name)
actor.accounts
.filter(a => a.users.find(it => it.actor.id === actor.id)?.role !== Role.ViewOnly)
.map(it => it.name)
);
}
@@ -33,7 +33,9 @@ export async function fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsyn
const allAccounts = actor.accounts;
const accountNamesWhereUserHasSufficientPublishPermissions = new Set(
allAccounts.filter(a => a.viewerUserPermission.role !== Role.ViewOnly).map(it => it.name)
allAccounts
.filter(a => a.users.find(it => it.actor.id === actor.id)?.role !== Role.ViewOnly)
.map(it => it.name)
);
if (options.nonInteractive) {
+4 -4
View File
@@ -348,11 +348,11 @@ function formatBuildChoice(build: BuildFragment): prompts.Choice {
const {
id,
updatedAt,
runtime,
runtimeVersion,
buildProfile,
gitCommitHash,
gitCommitMessage,
updateChannel,
channel,
message,
status,
} = build;
@@ -370,8 +370,8 @@ function formatBuildChoice(build: BuildFragment): prompts.Choice {
const descriptionItems: { name: string; value: string | null }[] = [
{ name: 'Profile', value: buildProfile ? chalk.bold(buildProfile) : null },
{ name: 'Channel', value: updateChannel ? chalk.bold(updateChannel.name) : null },
{ name: 'Runtime version', value: runtime ? chalk.bold(runtime.version) : null },
{ name: 'Channel', value: channel ? chalk.bold(channel) : null },
{ name: 'Runtime version', value: runtimeVersion ? chalk.bold(runtimeVersion) : null },
{ name: 'Commit', value: formattedCommitData },
{
name: 'Message',
+1 -1
View File
@@ -99,7 +99,7 @@ function toEasBuildLinkage(
return {
easSubmissionId: easSubmission?.id ?? null,
easBuildId: easSubmission?.submittedBuild?.id ?? null,
runtimeVersion: easSubmission?.submittedBuild?.runtime?.version ?? null,
runtimeVersion: easSubmission?.submittedBuild?.runtimeVersion ?? null,
fingerprintHash: easSubmission?.submittedBuild?.fingerprint?.hash ?? null,
};
}
@@ -49,7 +49,7 @@ export function formatGraphQLSubmission(submission: SubmissionWithSubmittedBuild
? [
{
label: 'Application Identifier',
value: sanitize(submittedBuild?.appIdentifier),
value: sanitize(submission.androidConfig?.applicationIdentifier),
},
{ label: 'Track', value: sanitize(submission.androidConfig?.track)?.toLowerCase() },
{
@@ -65,7 +65,7 @@ export function formatGraphQLSubmission(submission: SubmissionWithSubmittedBuild
label: submission.platform === AppPlatform.Android ? 'Version code' : 'Build number',
value: sanitize(submittedBuild?.appBuildVersion),
},
{ label: 'Runtime Version', value: sanitize(submittedBuild?.runtime?.version) },
{ label: 'Runtime Version', value: sanitize(submittedBuild?.runtimeVersion) },
{ label: 'Fingerprint', value: submittedBuild?.fingerprint?.hash },
{ label: 'Commit', value: sanitize(submittedBuild?.gitCommitHash) },
{ label: 'Error Code', value: sanitize(submission.error?.errorCode) },
@@ -161,7 +161,6 @@ function mockUpdateChannel({
pageInfo: { hasNextPage: false, hasPreviousPage: false },
},
embeddedUpdateCount: 0,
isProtected: false,
latestRuntimes: { edges: [], pageInfo: { hasNextPage: false, hasPreviousPage: false } },
runtimeInsights: {} as UpdateChannelRuntimeInsights,
name: channelName ?? 'default-channel-name',
+1 -1
View File
@@ -202,7 +202,7 @@ export async function selectUpdateGroupOnBranchAsync(
.map(group => {
const first = group[0];
return first
? `${first.group} (runtime: ${first.runtime.version}, message: ${first.message ?? 'N/A'})`
? `${first.group} (runtime: ${first.runtimeVersion}, message: ${first.message ?? 'N/A'})`
: 'unknown';
})
.join('\n ');
+3 -3
View File
@@ -71,7 +71,7 @@ export async function republishAsync({
update.groupId === arbitraryUpdate.groupId &&
update.branchId === arbitraryUpdate.branchId &&
update.branchName === arbitraryUpdate.branchName &&
update.runtime.version === arbitraryUpdate.runtime.version &&
update.runtimeVersion === arbitraryUpdate.runtimeVersion &&
update.manifestHostOverride === arbitraryUpdate.manifestHostOverride &&
update.assetHostOverride === arbitraryUpdate.assetHostOverride;
assert(
@@ -90,7 +90,7 @@ export async function republishAsync({
'Cannot republish an update that is being rolled-out. Either complete the update rollout and then republish or publish a new rollout update.'
);
const runtimeVersion = arbitraryUpdate.runtime.version;
const { runtimeVersion } = arbitraryUpdate;
// If codesigning was created for the original update, we need to add it to the republish.
// If one wishes to not sign the republish or sign with a different key, a normal publish should
@@ -246,7 +246,7 @@ export async function republishAsync({
Log.log(
formatFields([
{ label: 'Branch', value: targetBranchName },
{ label: 'Runtime version', value: arbitraryRepublishedUpdate.runtime.version },
{ label: 'Runtime version', value: arbitraryRepublishedUpdate.runtimeVersion },
{ label: 'Platform', value: updatesRepublished.map(update => update.platform).join(', ') },
{ label: 'Update group ID', value: arbitraryRepublishedUpdate.group },
...(updatesRepublishedByPlatform.android
@@ -84,7 +84,7 @@ export async function publishRollBackToEmbeddedUpdateAsync({
version => version.runtimeVersion
)) {
const newUpdatesForRuntimeVersion = newUpdates.filter(
update => update.runtime.version === runtime.runtimeVersion
update => update.runtimeVersion === runtime.runtimeVersion
);
if (newUpdatesForRuntimeVersion.length === 0) {
throw new Error(
+16 -9
View File
@@ -34,9 +34,16 @@ export type FormatUpdateParameter = Pick<Update, 'id' | 'createdAt' | 'message'>
| null;
};
export type UpdateJsonInfo = { branch: string; runtimeVersion: string } & Pick<
export type UpdateJsonInfo = { branch: string } & Pick<
UpdateFragment,
'id' | 'createdAt' | 'group' | 'message' | 'platform' | 'manifestPermalink' | 'gitCommitHash'
| 'id'
| 'createdAt'
| 'group'
| 'message'
| 'runtimeVersion'
| 'platform'
| 'manifestPermalink'
| 'gitCommitHash'
>;
export type UpdateGroupDescription = FormatUpdateParameter & {
@@ -184,7 +191,7 @@ export function ensureValidVersions(exp: ExpoConfig, platform: RequestedPlatform
}
export function formatUpdateTitle(update: UpdateFragment): string {
const { message, createdAt, actor, runtime } = update;
const { message, createdAt, actor, runtimeVersion } = update;
let actorName: string;
switch (actor?.__typename) {
@@ -206,7 +213,7 @@ export function formatUpdateTitle(update: UpdateFragment): string {
return `[${dateFormat(
createdAt,
'mmm dd HH:MM'
)} by ${actorName}, runtimeVersion: ${runtime.version}] ${message}`;
)} by ${actorName}, runtimeVersion: ${runtimeVersion}] ${message}`;
}
export function getUpdateJsonInfosForUpdates(updates: UpdateFragment[]): UpdateJsonInfo[] {
@@ -216,7 +223,7 @@ export function getUpdateJsonInfosForUpdates(updates: UpdateFragment[]): UpdateJ
group: update.group,
branch: update.branch.name,
message: update.message,
runtimeVersion: update.runtime.version,
runtimeVersion: update.runtimeVersion,
platform: update.platform,
manifestPermalink: update.manifestPermalink,
isRollBackToEmbedded: update.isRollBackToEmbedded,
@@ -229,7 +236,7 @@ export function getUpdateGroupDescriptions(
): FormattedUpdateGroupDescription[] {
return updateGroups.map(updateGroup => ({
message: formatUpdateMessage(updateGroup[0]),
runtimeVersion: updateGroup[0].runtime.version,
runtimeVersion: updateGroup[0].runtimeVersion,
isRollBackToEmbedded: updateGroup[0].isRollBackToEmbedded,
rolloutPercentage: updateGroup[0].rolloutPercentage ?? undefined,
codeSigningKey: updateGroup[0].codeSigningInfo?.keyid,
@@ -244,7 +251,7 @@ export function getUpdateGroupDescriptionsWithBranch(
return updateGroups.map(updateGroup => ({
branch: updateGroup[0].branch.name,
message: formatUpdateMessage(updateGroup[0]),
runtimeVersion: updateGroup[0].runtime.version,
runtimeVersion: updateGroup[0].runtimeVersion,
isRollBackToEmbedded: updateGroup[0].isRollBackToEmbedded,
rolloutPercentage: updateGroup[0].rolloutPercentage ?? undefined,
codeSigningKey: updateGroup[0].codeSigningInfo?.keyid,
@@ -263,7 +270,7 @@ export function getBranchDescription(branch: UpdateBranchFragment): FormattedBra
branch: branch.name,
update: {
message: formatUpdateMessage(latestUpdate),
runtimeVersion: latestUpdate.runtime.version,
runtimeVersion: latestUpdate.runtimeVersion,
isRollBackToEmbedded: latestUpdate.isRollBackToEmbedded,
rolloutPercentage: latestUpdate.rolloutPercentage ?? undefined,
codeSigningKey: latestUpdate.codeSigningInfo?.keyid,
@@ -315,7 +322,7 @@ export async function prewarmDiffingAsync(
appId,
branchName: update.branch.name,
platform: updatePublishPlatformToAppPlatform[updatePublishPlatform],
runtimeVersion: update.runtime.version,
runtimeVersion: update.runtimeVersion,
limit: 2,
});
if (updateIds.length !== 2) {
+1 -1
View File
@@ -9,7 +9,7 @@ export type Actor = NonNullable<CurrentUserQuery['meActor']>;
*/
export function getCreatableAccountNames(actor: Actor): string[] {
const creatableAccounts = actor.accounts.filter(
a => a.viewerUserPermission.role !== Role.ViewOnly
a => a.users.find(it => it.actor.id === actor.id)?.role !== Role.ViewOnly
);
if (actor.__typename === 'Robot') {
return creatableAccounts.map(it => it.name);
@@ -9,13 +9,13 @@ const userStub: Actor = {
primaryAccount: {
id: 'account_id_777',
name: 'username',
viewerUserPermission: { role: Role.Owner },
users: [{ role: Role.Owner, actor: { id: 'userId' } }],
},
accounts: [
{
id: 'account_id_777',
name: 'username',
viewerUserPermission: { role: Role.Owner },
users: [{ role: Role.Owner, actor: { id: 'userId' } }],
},
],
isExpoAdmin: false,
@@ -29,13 +29,13 @@ const ssoUserStub: Actor = {
primaryAccount: {
id: 'account_id_888',
name: 'ssoUsername',
viewerUserPermission: { role: Role.Owner },
users: [{ role: Role.Owner, actor: { id: 'ssoUserId' } }],
},
accounts: [
{
id: 'account_id_888',
name: 'ssoUsername',
viewerUserPermission: { role: Role.Owner },
users: [{ role: Role.Owner, actor: { id: 'ssoUserId' } }],
},
],
isExpoAdmin: false,
@@ -81,24 +81,24 @@ describe('getCreatableAccountNames', () => {
{
id: 'account_id_1',
name: 'some-org',
viewerUserPermission: { role: Role.Owner },
users: [{ role: Role.Owner, actor: { id: 'userId' } }],
},
{
id: 'account_id_2',
name: 'other-user-team',
ownerUserActor: { id: 'otherUserId', username: 'other-user' },
viewerUserPermission: { role: Role.Admin },
users: [{ role: Role.Admin, actor: { id: 'userId' } }],
},
{
id: 'account_id_3',
name: 'view-only-org',
viewerUserPermission: { role: Role.ViewOnly },
users: [{ role: Role.ViewOnly, actor: { id: 'userId' } }],
},
{
id: 'account_id_4',
name: 'username',
ownerUserActor: { id: 'userId', username: 'username' },
viewerUserPermission: { role: Role.Owner },
users: [{ role: Role.Owner, actor: { id: 'userId' } }],
},
],
};