eas-cli 21.8.0 → 22.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +166 -156
  2. package/build/build/android/prepareJob.js +1 -0
  3. package/build/build/ios/prepareJob.js +1 -0
  4. package/build/build/metadata.js +0 -1
  5. package/build/build/runBuildAndSubmit.js +1 -1
  6. package/build/build/utils/formatBuild.js +2 -2
  7. package/build/build/utils/url.js +3 -5
  8. package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +10 -3
  9. package/build/commandUtils/new/configs.js +1 -1
  10. package/build/commands/account/view.js +1 -2
  11. package/build/commands/build/cancel.js +3 -3
  12. package/build/commands/build/download.js +1 -1
  13. package/build/commands/go.js +2 -45
  14. package/build/commands/project/icon/set.js +4 -40
  15. package/build/commands/project/init.d.ts +1 -0
  16. package/build/commands/project/init.js +13 -0
  17. package/build/commands/submit.d.ts +1 -0
  18. package/build/commands/submit.js +8 -1
  19. package/build/commands/update/index.js +1 -1
  20. package/build/commands/update/revert-update-rollout.js +1 -1
  21. package/build/commands/update/rollback.js +1 -1
  22. package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +20 -13
  23. package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.d.ts +14 -2
  24. package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +47 -7
  25. package/build/credentials/ios/appstore/ensureTestFlightGroup.d.ts +3 -1
  26. package/build/credentials/ios/appstore/ensureTestFlightGroup.js +14 -11
  27. package/build/graphql/generated.d.ts +596 -922
  28. package/build/graphql/generated.js +12 -2
  29. package/build/graphql/queries/ChannelInsightsQuery.js +4 -1
  30. package/build/graphql/types/Account.js +1 -4
  31. package/build/graphql/types/Build.js +13 -8
  32. package/build/graphql/types/Submission.js +0 -1
  33. package/build/graphql/types/Update.js +4 -1
  34. package/build/project/accountSelection.js +1 -3
  35. package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.js +3 -5
  36. package/build/project/projectIcon.d.ts +40 -0
  37. package/build/project/projectIcon.js +132 -0
  38. package/build/project/projectNotConfiguredError.d.ts +17 -0
  39. package/build/project/projectNotConfiguredError.js +24 -0
  40. package/build/submit/ArchiveSource.js +3 -3
  41. package/build/submit/context.d.ts +2 -0
  42. package/build/submit/context.js +1 -0
  43. package/build/submit/ios/AppProduce.js +1 -1
  44. package/build/submit/ios/IosSubmitCommand.js +2 -0
  45. package/build/submit/ios/ensureTestFlightSetup.d.ts +7 -0
  46. package/build/submit/ios/ensureTestFlightSetup.js +81 -0
  47. package/build/submit/status.js +1 -1
  48. package/build/submit/utils/formatSubmission.js +2 -2
  49. package/build/update/queries.js +1 -1
  50. package/build/update/republish.js +3 -3
  51. package/build/update/roll-back-to-embedded.js +1 -1
  52. package/build/update/utils.d.ts +2 -1
  53. package/build/update/utils.js +7 -7
  54. package/build/user/User.js +1 -1
  55. package/oclif.manifest.json +2323 -2311
  56. package/package.json +6 -6
@@ -13,11 +13,7 @@ const AUTO_GROUP_NAME = 'Team (Expo)';
13
13
  * Ensure a TestFlight internal group with access to all builds exists for the app and has all admin users invited to it.
14
14
  * This allows users to instantly access their builds from TestFlight after it finishes processing.
15
15
  */
16
- async function ensureTestFlightGroupExistsAsync(app) {
17
- if (process.env.EAS_NO_AUTO_TESTFLIGHT_SETUP) {
18
- log_1.default.debug('EAS_NO_AUTO_TESTFLIGHT_SETUP is set, skipping TestFlight setup');
19
- return;
20
- }
16
+ async function ensureTestFlightGroupExistsAsync(app, { nonInteractive = false } = {}) {
21
17
  const groups = await app.getBetaGroupsAsync({
22
18
  query: {
23
19
  includes: ['betaTesters'],
@@ -31,12 +27,13 @@ async function ensureTestFlightGroupExistsAsync(app) {
31
27
  const group = await ensureInternalGroupAsync({
32
28
  app,
33
29
  groups,
30
+ nonInteractive,
34
31
  });
35
32
  const users = await apple_utils_1.User.getAsync(app.context);
36
33
  const admins = users.filter(user => user.attributes.roles?.includes(apple_utils_1.UserRole.ADMIN));
37
- await addAllUsersToInternalGroupAsync(group, admins);
34
+ await addAllUsersToInternalGroupAsync(group, admins, app);
38
35
  }
39
- async function ensureInternalGroupAsync({ groups, app, }) {
36
+ async function ensureInternalGroupAsync({ groups, app, nonInteractive, }) {
40
37
  let betaGroup = groups.find(group => group.attributes.name === AUTO_GROUP_NAME);
41
38
  if (!betaGroup) {
42
39
  const spinner = (0, ora_1.ora)().start('Creating TestFlight group...');
@@ -70,6 +67,11 @@ async function ensureInternalGroupAsync({ groups, app, }) {
70
67
  }
71
68
  // `hasAccessToAllBuilds` is a newer feature that allows the group to automatically have access to all builds. This cannot be patched so we need to recreate the group.
72
69
  if (!betaGroup.attributes.hasAccessToAllBuilds) {
70
+ if (nonInteractive) {
71
+ // Deleting a group is destructive, so it needs explicit confirmation.
72
+ log_1.default.warn(`TestFlight group "${AUTO_GROUP_NAME}" does not have automatic access to new builds. Re-run in interactive mode to regenerate it, or recreate it in App Store Connect.`);
73
+ return betaGroup;
74
+ }
73
75
  if (await (0, prompts_1.confirmAsync)({
74
76
  message: 'Regenerate internal TestFlight group to allow automatic access to all builds?',
75
77
  })) {
@@ -81,12 +83,13 @@ async function ensureInternalGroupAsync({ groups, app, }) {
81
83
  includes: ['betaTesters'],
82
84
  },
83
85
  }),
86
+ nonInteractive,
84
87
  });
85
88
  }
86
89
  }
87
90
  return betaGroup;
88
91
  }
89
- async function addAllUsersToInternalGroupAsync(group, users) {
92
+ async function addAllUsersToInternalGroupAsync(group, users, app) {
90
93
  let emails = users
91
94
  .filter(user => user.attributes.email)
92
95
  .map(user => ({
@@ -128,7 +131,7 @@ async function addAllUsersToInternalGroupAsync(group, users) {
128
131
  return true;
129
132
  });
130
133
  if (!success) {
131
- const groupUrl = await getTestFlightGroupUrlAsync(group);
134
+ const groupUrl = await getTestFlightGroupUrlAsync(group, app);
132
135
  log_1.default.error(`Unable to add all admins to TestFlight group "${group.attributes.name}". You can add them manually in App Store Connect. ${groupUrl ?? ''}`);
133
136
  }
134
137
  else {
@@ -140,11 +143,11 @@ async function addAllUsersToInternalGroupAsync(group, users) {
140
143
  // TODO: When we have more TestFlight functionality, we can link to it from here.
141
144
  }
142
145
  }
143
- async function getTestFlightGroupUrlAsync(group) {
146
+ async function getTestFlightGroupUrlAsync(group, app) {
144
147
  if (group.context.providerId) {
145
148
  try {
146
149
  const session = await apple_utils_1.Session.getSessionForProviderIdAsync(group.context.providerId);
147
- return `https://appstoreconnect.apple.com/teams/${session.provider.publicProviderId}/apps/6741088859/testflight/groups/${group.id}`;
150
+ return `https://appstoreconnect.apple.com/teams/${session.provider.publicProviderId}/apps/${app.id}/testflight/groups/${group.id}`;
148
151
  }
149
152
  catch (error) {
150
153
  // Avoid crashing if we can't get the session.