eas-cli 9.0.3 → 9.0.5

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 (224) hide show
  1. package/README.md +59 -59
  2. package/build/analytics/AnalyticsManager.js +4 -5
  3. package/build/api.js +1 -2
  4. package/build/branch/actions/SelectBranch.js +2 -3
  5. package/build/branch/queries.js +3 -5
  6. package/build/branch/utils.js +1 -1
  7. package/build/build/android/build.js +3 -5
  8. package/build/build/android/graphql.js +1 -2
  9. package/build/build/android/prepareJob.js +1 -2
  10. package/build/build/android/syncProjectConfiguration.js +1 -1
  11. package/build/build/android/version.js +14 -16
  12. package/build/build/build.js +8 -10
  13. package/build/build/createContext.js +7 -8
  14. package/build/build/ios/build.js +2 -4
  15. package/build/build/ios/credentials.js +1 -2
  16. package/build/build/ios/graphql.js +4 -6
  17. package/build/build/ios/prepareJob.js +5 -6
  18. package/build/build/ios/syncProjectConfiguration.js +1 -1
  19. package/build/build/ios/version.js +17 -20
  20. package/build/build/local.js +2 -3
  21. package/build/build/metadata.js +9 -10
  22. package/build/build/queries.js +6 -9
  23. package/build/build/runBuildAndSubmit.d.ts +3 -1
  24. package/build/build/runBuildAndSubmit.js +19 -13
  25. package/build/build/utils/appJson.js +1 -2
  26. package/build/build/utils/formatBuild.js +5 -8
  27. package/build/build/utils/printBuildInfo.js +1 -2
  28. package/build/build/utils/resourceClass.js +3 -4
  29. package/build/build/utils/url.js +1 -2
  30. package/build/build/validate.js +8 -11
  31. package/build/channel/actions/SelectChannel.js +2 -3
  32. package/build/channel/errors.js +1 -1
  33. package/build/channel/queries.js +6 -10
  34. package/build/channel/utils.js +1 -1
  35. package/build/commandUtils/EasCommand.js +7 -6
  36. package/build/commandUtils/builds.js +3 -3
  37. package/build/commandUtils/context/DynamicProjectConfigContextField.js +2 -2
  38. package/build/commandUtils/context/LoggedInContextField.js +1 -2
  39. package/build/commandUtils/context/MaybeLoggedInContextField.js +2 -3
  40. package/build/commandUtils/context/VcsClientContextField.js +1 -1
  41. package/build/commandUtils/context/contextUtils/createGraphqlClient.js +1 -1
  42. package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.js +4 -6
  43. package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +2 -4
  44. package/build/commandUtils/gating/FeatureGateEnvOverrides.js +1 -2
  45. package/build/commandUtils/pagination.js +3 -4
  46. package/build/commands/account/view.js +1 -2
  47. package/build/commands/branch/delete.js +1 -2
  48. package/build/commands/build/configure.js +1 -2
  49. package/build/commands/build/index.js +1 -2
  50. package/build/commands/build/internal.js +1 -2
  51. package/build/commands/build/resign.js +7 -7
  52. package/build/commands/build/run.js +2 -3
  53. package/build/commands/build/version/get.js +3 -4
  54. package/build/commands/build/version/set.js +5 -6
  55. package/build/commands/build/version/sync.js +5 -7
  56. package/build/commands/channel/rollout.js +1 -2
  57. package/build/commands/config.js +16 -14
  58. package/build/commands/credentials/configure-build.js +3 -3
  59. package/build/commands/credentials/index.js +1 -1
  60. package/build/commands/device/create.js +1 -1
  61. package/build/commands/device/rename.js +1 -1
  62. package/build/commands/diagnostics.js +6 -2
  63. package/build/commands/project/init.js +11 -9
  64. package/build/commands/project/onboarding.js +192 -20
  65. package/build/commands/secret/delete.js +5 -5
  66. package/build/commands/update/index.js +5 -6
  67. package/build/commands/update/republish.js +1 -2
  68. package/build/commands/update/roll-back-to-embedded.js +3 -4
  69. package/build/credentials/android/AndroidCredentialsProvider.js +4 -5
  70. package/build/credentials/android/actions/BuildCredentialsUtils.js +2 -3
  71. package/build/credentials/android/actions/DownloadKeystore.js +2 -3
  72. package/build/credentials/android/actions/RemoveFcm.js +1 -1
  73. package/build/credentials/android/actions/SetUpBuildCredentials.js +3 -5
  74. package/build/credentials/android/actions/SetUpGoogleServiceAccountKeyForFcmV1.js +3 -3
  75. package/build/credentials/android/actions/SetUpGoogleServiceAccountKeyForSubmissions.js +3 -3
  76. package/build/credentials/android/api/GraphqlClient.js +4 -8
  77. package/build/credentials/android/api/graphql/queries/AndroidAppCredentialsQuery.js +1 -2
  78. package/build/credentials/android/utils/printCredentials.js +4 -4
  79. package/build/credentials/context.js +2 -3
  80. package/build/credentials/credentialsJson/update.js +14 -16
  81. package/build/credentials/errors.js +7 -5
  82. package/build/credentials/ios/IosCredentialsProvider.js +3 -4
  83. package/build/credentials/ios/actions/AscApiKeyUtils.js +5 -9
  84. package/build/credentials/ios/actions/AssignAscApiKey.js +2 -3
  85. package/build/credentials/ios/actions/AssignPushKey.js +2 -3
  86. package/build/credentials/ios/actions/BuildCredentialsUtils.js +3 -5
  87. package/build/credentials/ios/actions/ConfigureProvisioningProfile.js +1 -1
  88. package/build/credentials/ios/actions/CreateProvisioningProfile.js +2 -3
  89. package/build/credentials/ios/actions/DistributionCertificateUtils.js +3 -4
  90. package/build/credentials/ios/actions/ProvisioningProfileUtils.js +2 -3
  91. package/build/credentials/ios/actions/PushKeyUtils.js +5 -5
  92. package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +3 -4
  93. package/build/credentials/ios/actions/SetUpAscApiKey.js +1 -1
  94. package/build/credentials/ios/actions/SetUpBuildCredentials.js +3 -4
  95. package/build/credentials/ios/actions/SetUpDistributionCertificate.js +1 -2
  96. package/build/credentials/ios/actions/SetUpProvisioningProfile.js +2 -3
  97. package/build/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.js +2 -3
  98. package/build/credentials/ios/api/GraphqlClient.js +11 -15
  99. package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.js +2 -2
  100. package/build/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.js +2 -2
  101. package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +2 -4
  102. package/build/credentials/ios/api/graphql/queries/IosAppBuildCredentialsQuery.js +1 -2
  103. package/build/credentials/ios/api/graphql/queries/IosAppCredentialsQuery.js +2 -4
  104. package/build/credentials/ios/appstore/AppStoreApi.js +1 -2
  105. package/build/credentials/ios/appstore/ascApiKey.js +6 -8
  106. package/build/credentials/ios/appstore/authenticate.js +2 -4
  107. package/build/credentials/ios/appstore/bundleIdCapabilities.js +1 -1
  108. package/build/credentials/ios/appstore/contractMessages.js +3 -5
  109. package/build/credentials/ios/appstore/distributionCertificate.js +2 -3
  110. package/build/credentials/ios/appstore/ensureAppExists.js +1 -2
  111. package/build/credentials/ios/appstore/provisioningProfileAdhoc.js +5 -7
  112. package/build/credentials/ios/appstore/pushKey.js +2 -3
  113. package/build/credentials/ios/appstore/resolveCredentials.js +8 -9
  114. package/build/credentials/ios/errors.js +1 -1
  115. package/build/credentials/ios/utils/p12Certificate.js +1 -2
  116. package/build/credentials/ios/utils/provisioningProfile.js +1 -2
  117. package/build/credentials/ios/validators/validateProvisioningProfile.js +5 -7
  118. package/build/credentials/manager/ManageAndroid.js +2 -2
  119. package/build/credentials/manager/ManageIos.js +3 -4
  120. package/build/credentials/manager/SelectIosDistributionTypeGraphqlFromBuildProfile.js +1 -2
  121. package/build/credentials/manager/SetDefaultAndroidKeystore.js +1 -1
  122. package/build/credentials/manager/SetUpAndroidBuildCredentials.js +2 -2
  123. package/build/credentials/manager/SetUpIosBuildCredentials.js +2 -2
  124. package/build/credentials/utils/promptForCredentials.js +2 -3
  125. package/build/devices/actions/create/currentMachineMethod.js +4 -5
  126. package/build/devices/actions/create/developerPortalMethod.js +1 -2
  127. package/build/devices/actions/create/inputMethod.js +1 -1
  128. package/build/devices/context.js +1 -1
  129. package/build/devices/queries.js +3 -6
  130. package/build/devices/utils/errors.js +2 -2
  131. package/build/devices/utils/formatDevice.js +4 -6
  132. package/build/graphql/client.js +5 -8
  133. package/build/graphql/generated.d.ts +42 -0
  134. package/build/graphql/mutations/AppMutation.js +1 -2
  135. package/build/graphql/mutations/AppVersionMutation.js +1 -2
  136. package/build/graphql/mutations/BuildMutation.js +4 -8
  137. package/build/graphql/mutations/UserPreferencesMutation.js +2 -3
  138. package/build/graphql/queries/AppVersionQuery.js +1 -2
  139. package/build/graphql/queries/BranchQuery.js +1 -2
  140. package/build/graphql/queries/BuildQuery.js +1 -2
  141. package/build/graphql/queries/EnvironmentSecretsQuery.js +2 -3
  142. package/build/graphql/queries/SubmissionQuery.js +1 -2
  143. package/build/graphql/queries/WebhookQuery.js +1 -2
  144. package/build/graphql/types/App.js +1 -0
  145. package/build/log.js +2 -2
  146. package/build/metadata/apple/config/reader.js +26 -32
  147. package/build/metadata/apple/config/writer.js +35 -39
  148. package/build/metadata/apple/rules/infoKeywordLength.js +2 -4
  149. package/build/metadata/apple/rules/infoRestrictedWords.js +2 -4
  150. package/build/metadata/apple/tasks/app-review-detail.js +1 -2
  151. package/build/metadata/apple/tasks/app-version.js +6 -8
  152. package/build/metadata/auth.js +1 -2
  153. package/build/metadata/config/resolve.js +2 -3
  154. package/build/metadata/config/validate.js +2 -4
  155. package/build/metadata/errors.js +3 -5
  156. package/build/metadata/upload.js +1 -2
  157. package/build/metadata/utils/retry.js +1 -2
  158. package/build/metadata/utils/telemetry.js +8 -11
  159. package/build/onboarding/runCommand.js +2 -2
  160. package/build/ora.js +1 -1
  161. package/build/project/android/applicationId.js +3 -4
  162. package/build/project/android/gradle.js +3 -4
  163. package/build/project/android/gradleUtils.js +4 -5
  164. package/build/project/expoConfig.js +3 -4
  165. package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.js +3 -5
  166. package/build/project/ios/bundleIdentifier.js +7 -8
  167. package/build/project/ios/entitlements.js +1 -2
  168. package/build/project/ios/scheme.js +7 -6
  169. package/build/project/ios/target.js +17 -23
  170. package/build/project/metroConfig.js +1 -2
  171. package/build/project/projectUtils.js +5 -7
  172. package/build/project/publish.js +18 -27
  173. package/build/project/remoteVersionSource.js +6 -7
  174. package/build/project/resolveRuntimeVersionAsync.d.ts +2 -1
  175. package/build/project/resolveRuntimeVersionAsync.js +3 -4
  176. package/build/prompts.js +5 -7
  177. package/build/rollout/actions/CreateRollout.js +4 -5
  178. package/build/rollout/actions/EditRollout.js +1 -2
  179. package/build/rollout/actions/EndRollout.js +2 -4
  180. package/build/rollout/actions/ManageRollout.js +1 -2
  181. package/build/rollout/actions/NonInteractiveRollout.js +1 -2
  182. package/build/rollout/actions/SelectRuntime.js +2 -4
  183. package/build/rollout/utils.js +4 -5
  184. package/build/run/android/adb.js +4 -7
  185. package/build/run/ios/xcode.js +1 -2
  186. package/build/run/ios/xcrun.js +1 -2
  187. package/build/run/utils.js +2 -4
  188. package/build/submit/ArchiveSource.js +1 -1
  189. package/build/submit/android/AndroidSubmitCommand.js +3 -5
  190. package/build/submit/android/AndroidSubmitter.js +3 -3
  191. package/build/submit/android/ServiceAccountSource.js +1 -2
  192. package/build/submit/ios/AppProduce.js +5 -4
  193. package/build/submit/ios/AppSpecificPasswordSource.js +2 -2
  194. package/build/submit/ios/AscApiKeySource.js +5 -3
  195. package/build/submit/ios/IosSubmitCommand.js +2 -3
  196. package/build/submit/ios/IosSubmitter.js +1 -1
  197. package/build/submit/ios/utils/language.js +3 -4
  198. package/build/submit/submit.js +2 -3
  199. package/build/submit/utils/errors.js +1 -2
  200. package/build/submit/utils/wait.js +1 -1
  201. package/build/update/android/UpdatesModule.js +1 -2
  202. package/build/update/configure.js +11 -14
  203. package/build/update/ios/UpdatesModule.js +2 -4
  204. package/build/update/queries.js +6 -10
  205. package/build/update/utils.js +28 -39
  206. package/build/user/SessionManager.js +5 -8
  207. package/build/user/User.js +2 -2
  208. package/build/user/expoSsoLauncher.js +1 -2
  209. package/build/utils/code-signing.js +4 -7
  210. package/build/utils/expoCli.js +1 -2
  211. package/build/utils/expoUpdatesCli.d.ts +1 -0
  212. package/build/utils/expoUpdatesCli.js +3 -2
  213. package/build/utils/profiles.js +3 -3
  214. package/build/utils/progress.js +2 -2
  215. package/build/utils/relay.js +10 -14
  216. package/build/utils/timer.js +1 -2
  217. package/build/vcs/clients/git.d.ts +1 -1
  218. package/build/vcs/clients/git.js +24 -20
  219. package/build/vcs/git.d.ts +1 -1
  220. package/build/vcs/git.js +4 -2
  221. package/build/vcs/local.js +1 -2
  222. package/build/webhooks/input.js +2 -2
  223. package/oclif.manifest.json +1 -1
  224. package/package.json +3 -3
@@ -20,7 +20,6 @@ class SelectIosDistributionTypeGraphqlFromBuildProfile {
20
20
  }
21
21
  }
22
22
  async resolveInternalDistributionAsync(ctx) {
23
- var _a;
24
23
  // check if the type is specified in eas config
25
24
  const maybeEnterpriseProvisioning = this.buildProfile.enterpriseProvisioning;
26
25
  if (maybeEnterpriseProvisioning) {
@@ -34,7 +33,7 @@ class SelectIosDistributionTypeGraphqlFromBuildProfile {
34
33
  }
35
34
  }
36
35
  // only enterprise accounts support enterprise distributions
37
- const isDefinitelyNotAnEnterpriseAccount = ((_a = ctx.appStore.authCtx) === null || _a === void 0 ? void 0 : _a.team.inHouse) === false;
36
+ const isDefinitelyNotAnEnterpriseAccount = ctx.appStore.authCtx?.team.inHouse === false;
38
37
  if (isDefinitelyNotAnEnterpriseAccount) {
39
38
  return generated_1.IosDistributionType.AdHoc;
40
39
  }
@@ -28,7 +28,7 @@ class SetDefaultAndroidKeystore {
28
28
  message: 'Select build credentials',
29
29
  choices: [...sortedBuildCredentialsChoices, { title: 'Cancel', value: null }],
30
30
  });
31
- if (!(buildCredentialsResult === null || buildCredentialsResult === void 0 ? void 0 : buildCredentialsResult.androidKeystore)) {
31
+ if (!buildCredentialsResult?.androidKeystore) {
32
32
  return;
33
33
  }
34
34
  log_1.default.log('Updating the default build credentials for this project...');
@@ -21,7 +21,7 @@ class SetUpAndroidBuildCredentials extends ManageAndroid_1.ManageAndroid {
21
21
  let projectInfo = null;
22
22
  if (hasProjectContext) {
23
23
  const { exp, projectId } = await this.callingAction.getDynamicPrivateProjectConfigAsync({
24
- env: buildProfile === null || buildProfile === void 0 ? void 0 : buildProfile.env,
24
+ env: buildProfile?.env,
25
25
  });
26
26
  projectInfo = { exp, projectId };
27
27
  }
@@ -31,7 +31,7 @@ class SetUpAndroidBuildCredentials extends ManageAndroid_1.ManageAndroid {
31
31
  user: this.callingAction.actor,
32
32
  graphqlClient: this.callingAction.graphqlClient,
33
33
  analytics: this.callingAction.analytics,
34
- env: buildProfile === null || buildProfile === void 0 ? void 0 : buildProfile.env,
34
+ env: buildProfile?.env,
35
35
  nonInteractive: false,
36
36
  vcsClient: this.callingAction.vcsClient,
37
37
  });
@@ -23,7 +23,7 @@ class SetUpIosBuildCredentials extends ManageIos_1.ManageIos {
23
23
  let projectInfo = null;
24
24
  if (this.callingAction.projectInfo) {
25
25
  const { exp, projectId } = await this.callingAction.getDynamicPrivateProjectConfigAsync({
26
- env: buildProfile === null || buildProfile === void 0 ? void 0 : buildProfile.env,
26
+ env: buildProfile?.env,
27
27
  });
28
28
  projectInfo = { exp, projectId };
29
29
  }
@@ -33,7 +33,7 @@ class SetUpIosBuildCredentials extends ManageIos_1.ManageIos {
33
33
  user: this.callingAction.actor,
34
34
  graphqlClient: this.callingAction.graphqlClient,
35
35
  analytics: this.callingAction.analytics,
36
- env: buildProfile === null || buildProfile === void 0 ? void 0 : buildProfile.env,
36
+ env: buildProfile?.env,
37
37
  nonInteractive: false,
38
38
  vcsClient: this.callingAction.vcsClient,
39
39
  });
@@ -32,7 +32,7 @@ exports.askForUserProvidedAsync = askForUserProvidedAsync;
32
32
  async function getCredentialsFromUserAsync(credentialsSchema, initialValues = {}) {
33
33
  const results = {};
34
34
  for (const question of credentialsSchema.questions) {
35
- results[question.field] = await askQuestionAndProcessAnswerAsync(question, initialValues === null || initialValues === void 0 ? void 0 : initialValues[question.field]);
35
+ results[question.field] = await askQuestionAndProcessAnswerAsync(question, initialValues?.[question.field]);
36
36
  }
37
37
  return credentialsSchema.transformResultAsync
38
38
  ? await credentialsSchema.transformResultAsync(results)
@@ -40,9 +40,8 @@ async function getCredentialsFromUserAsync(credentialsSchema, initialValues = {}
40
40
  }
41
41
  exports.getCredentialsFromUserAsync = getCredentialsFromUserAsync;
42
42
  async function shouldAutoGenerateCredentialsAsync(schema) {
43
- var _a, _b;
44
43
  const answer = await (0, prompts_1.confirmAsync)({
45
- message: (_b = (_a = schema === null || schema === void 0 ? void 0 : schema.provideMethodQuestion) === null || _a === void 0 ? void 0 : _a.question) !== null && _b !== void 0 ? _b : `Generate a new ${schema.name}?`,
44
+ message: schema?.provideMethodQuestion?.question ?? `Generate a new ${schema.name}?`,
46
45
  initial: true,
47
46
  });
48
47
  return answer;
@@ -37,7 +37,7 @@ async function collectDataAndRegisterDeviceAsync(graphqlClient, { accountId, app
37
37
  appleTeamId: appleTeam.id,
38
38
  identifier: udid,
39
39
  name,
40
- deviceClass: deviceClass !== null && deviceClass !== void 0 ? deviceClass : undefined,
40
+ deviceClass: deviceClass ?? undefined,
41
41
  }, accountId);
42
42
  }
43
43
  catch (err) {
@@ -50,7 +50,7 @@ async function collectDeviceDataAsync(appleTeam, initialValues = {}) {
50
50
  log_1.default.log(chalk_1.default.white('Fetching the provisioning UDID.'));
51
51
  const [udid, defaultMachineName] = await fetchCurrentMachineUDIDAsync();
52
52
  log_1.default.log(chalk_1.default.green(`Fetched the provisioning UDID - ${udid}`));
53
- const name = await (0, utils_1.promptForNameAsync)(defaultMachineName !== null && defaultMachineName !== void 0 ? defaultMachineName : initialValues.name);
53
+ const name = await (0, utils_1.promptForNameAsync)(defaultMachineName ?? initialValues.name);
54
54
  const deviceClass = generated_1.AppleDeviceClass.Mac;
55
55
  const deviceData = {
56
56
  udid,
@@ -71,7 +71,6 @@ async function collectDeviceDataAsync(appleTeam, initialValues = {}) {
71
71
  }
72
72
  }
73
73
  async function fetchCurrentMachineUDIDAsync() {
74
- var _a, _b;
75
74
  try {
76
75
  const profilerData = (await (0, spawn_async_1.default)('system_profiler', ['-json', 'SPHardwareDataType'])).stdout.trim();
77
76
  if (!profilerData) {
@@ -80,13 +79,13 @@ async function fetchCurrentMachineUDIDAsync() {
80
79
  throw new errors_1.DeviceCreateError(message);
81
80
  }
82
81
  const profilerDataJSON = JSON.parse(profilerData);
83
- const provisioningUDID = (_a = profilerDataJSON === null || profilerDataJSON === void 0 ? void 0 : profilerDataJSON.SPHardwareDataType[0]) === null || _a === void 0 ? void 0 : _a.provisioning_UDID;
82
+ const provisioningUDID = profilerDataJSON?.SPHardwareDataType[0]?.provisioning_UDID;
84
83
  if (!provisioningUDID) {
85
84
  const message = 'System profiler data did not contain the provisioning UDID';
86
85
  log_1.default.error(message);
87
86
  throw new errors_1.DeviceCreateError(message);
88
87
  }
89
- const defaultMachineName = (_b = profilerDataJSON === null || profilerDataJSON === void 0 ? void 0 : profilerDataJSON.SPHardwareDataType[0]) === null || _b === void 0 ? void 0 : _b.machine_name;
88
+ const defaultMachineName = profilerDataJSON?.SPHardwareDataType[0]?.machine_name;
90
89
  return [provisioningUDID, defaultMachineName];
91
90
  }
92
91
  catch (err) {
@@ -44,12 +44,11 @@ async function importDevicesAsync(graphqlClient, accountId, appleTeam, devices)
44
44
  }
45
45
  async function importDeviceChunkAsync(graphqlClient, accountId, appleTeam, devices) {
46
46
  const promises = devices.map(device => {
47
- var _a;
48
47
  return AppleDeviceMutation_1.AppleDeviceMutation.createAppleDeviceAsync(graphqlClient, {
49
48
  appleTeamId: appleTeam.id,
50
49
  identifier: device.attributes.udid,
51
50
  name: device.attributes.name,
52
- deviceClass: (_a = DEVICE_CLASS_TO_GRAPHQL_TYPE[device.attributes.deviceClass]) !== null && _a !== void 0 ? _a : undefined,
51
+ deviceClass: DEVICE_CLASS_TO_GRAPHQL_TYPE[device.attributes.deviceClass] ?? undefined,
53
52
  }, accountId);
54
53
  });
55
54
  await Promise.all(promises);
@@ -30,7 +30,7 @@ async function collectDataAndRegisterDeviceAsync(graphqlClient, { accountId, app
30
30
  appleTeamId: appleTeam.id,
31
31
  identifier: udid,
32
32
  name,
33
- deviceClass: deviceClass !== null && deviceClass !== void 0 ? deviceClass : undefined,
33
+ deviceClass: deviceClass ?? undefined,
34
34
  }, accountId);
35
35
  }
36
36
  catch (err) {
@@ -6,7 +6,7 @@ async function createContextAsync({ appStore, user, graphqlClient, projectId, })
6
6
  appStore,
7
7
  user,
8
8
  graphqlClient,
9
- projectId: projectId !== null && projectId !== void 0 ? projectId : null,
9
+ projectId: projectId ?? null,
10
10
  };
11
11
  }
12
12
  exports.createContextAsync = createContextAsync;
@@ -14,13 +14,12 @@ const queries_1 = require("../utils/queries");
14
14
  exports.TEAMS_LIMIT = 50;
15
15
  exports.DEVICES_LIMIT = 50;
16
16
  async function selectAppleTeamOnAccountAsync(graphqlClient, { accountName, selectionPromptTitle, paginatedQueryOptions, }) {
17
- var _a;
18
17
  if (paginatedQueryOptions.nonInteractive) {
19
18
  throw new Error('Unable to select an Apple team in non-interactive mode.');
20
19
  }
21
20
  else {
22
21
  const selectedAppleTeam = await (0, queries_1.paginatedQueryWithSelectPromptAsync)({
23
- limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.TEAMS_LIMIT,
22
+ limit: paginatedQueryOptions.limit ?? exports.TEAMS_LIMIT,
24
23
  offset: paginatedQueryOptions.offset,
25
24
  queryToPerform: (limit, offset) => AppleTeamQuery_1.AppleTeamQuery.getAllForAccountAsync(graphqlClient, {
26
25
  accountName,
@@ -45,13 +44,12 @@ async function selectAppleTeamOnAccountAsync(graphqlClient, { accountName, selec
45
44
  }
46
45
  exports.selectAppleTeamOnAccountAsync = selectAppleTeamOnAccountAsync;
47
46
  async function selectAppleDeviceOnAppleTeamAsync(graphqlClient, { accountName, appleTeamIdentifier, selectionPromptTitle, paginatedQueryOptions, }) {
48
- var _a;
49
47
  if (paginatedQueryOptions.nonInteractive) {
50
48
  throw new Error('Unable to select an Apple device in non-interactive mode.');
51
49
  }
52
50
  else {
53
51
  const selectedAppleDevice = await (0, queries_1.paginatedQueryWithSelectPromptAsync)({
54
- limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.DEVICES_LIMIT,
52
+ limit: paginatedQueryOptions.limit ?? exports.DEVICES_LIMIT,
55
53
  offset: paginatedQueryOptions.offset,
56
54
  queryToPerform: (limit, offset) => AppleDeviceQuery_1.AppleDeviceQuery.getAllForAppleTeamAsync(graphqlClient, {
57
55
  accountName,
@@ -75,7 +73,6 @@ async function selectAppleDeviceOnAppleTeamAsync(graphqlClient, { accountName, a
75
73
  }
76
74
  exports.selectAppleDeviceOnAppleTeamAsync = selectAppleDeviceOnAppleTeamAsync;
77
75
  async function listAndRenderAppleDevicesOnAppleTeamAsync(graphqlClient, { accountName, appleTeam, paginatedQueryOptions, }) {
78
- var _a;
79
76
  if (paginatedQueryOptions.nonInteractive) {
80
77
  const devices = await AppleDeviceQuery_1.AppleDeviceQuery.getAllForAppleTeamAsync(graphqlClient, {
81
78
  accountName,
@@ -87,7 +84,7 @@ async function listAndRenderAppleDevicesOnAppleTeamAsync(graphqlClient, { accoun
87
84
  }
88
85
  else {
89
86
  await (0, queries_1.paginatedQueryWithConfirmPromptAsync)({
90
- limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.DEVICES_LIMIT,
87
+ limit: paginatedQueryOptions.limit ?? exports.DEVICES_LIMIT,
91
88
  offset: paginatedQueryOptions.offset,
92
89
  queryToPerform: (limit, offset) => AppleDeviceQuery_1.AppleDeviceQuery.getAllForAppleTeamAsync(graphqlClient, {
93
90
  accountName,
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DeviceCreateError = exports.DeviceNotFoundError = void 0;
4
4
  class DeviceNotFoundError extends Error {
5
5
  constructor(message) {
6
- super(message !== null && message !== void 0 ? message : 'Device not found.');
6
+ super(message ?? 'Device not found.');
7
7
  }
8
8
  }
9
9
  exports.DeviceNotFoundError = DeviceNotFoundError;
10
10
  class DeviceCreateError extends Error {
11
11
  constructor(message) {
12
- super(message !== null && message !== void 0 ? message : 'Failed to create a device.');
12
+ super(message ?? 'Failed to create a device.');
13
13
  }
14
14
  }
15
15
  exports.DeviceCreateError = DeviceCreateError;
@@ -19,25 +19,23 @@ function formatDeviceClass(device) {
19
19
  .join(' ');
20
20
  }
21
21
  function formatDevice(device, team) {
22
- var _a, _b;
23
22
  const fields = [
24
23
  { label: 'UDID', value: device.identifier },
25
- { label: 'Name', value: (_a = device.name) !== null && _a !== void 0 ? _a : 'Unknown' },
24
+ { label: 'Name', value: device.name ?? 'Unknown' },
26
25
  {
27
26
  label: 'Class',
28
27
  value: formatDeviceClass(device),
29
28
  },
30
29
  ];
31
30
  if (team) {
32
- fields.push({ label: 'Apple Team ID', value: team.appleTeamIdentifier }, { label: 'Apple Team Name', value: (_b = team.appleTeamName) !== null && _b !== void 0 ? _b : 'Unknown' });
31
+ fields.push({ label: 'Apple Team ID', value: team.appleTeamIdentifier }, { label: 'Apple Team Name', value: team.appleTeamName ?? 'Unknown' });
33
32
  }
34
33
  return (0, formatFields_1.default)(fields);
35
34
  }
36
35
  exports.default = formatDevice;
37
36
  function formatNewDevice(device, team) {
38
- var _a, _b;
39
37
  const fields = [
40
- { label: 'Name', value: (_a = device.name) !== null && _a !== void 0 ? _a : '(empty)' },
38
+ { label: 'Name', value: device.name ?? '(empty)' },
41
39
  {
42
40
  label: 'Class',
43
41
  value: formatDeviceClass(device),
@@ -45,7 +43,7 @@ function formatNewDevice(device, team) {
45
43
  { label: 'UDID', value: device.identifier },
46
44
  ];
47
45
  if (team) {
48
- fields.push({ label: 'Apple Team ID', value: team.appleTeamIdentifier }, { label: 'Apple Team Name', value: (_b = team.appleTeamName) !== null && _b !== void 0 ? _b : 'Unknown' });
46
+ fields.push({ label: 'Apple Team ID', value: team.appleTeamIdentifier }, { label: 'Apple Team Name', value: team.appleTeamName ?? 'Unknown' });
49
47
  }
50
48
  return (0, formatFields_1.default)(fields);
51
49
  }
@@ -8,14 +8,11 @@ const log_1 = tslib_1.__importDefault(require("../log"));
8
8
  async function withErrorHandlingAsync(promise) {
9
9
  const { data, error } = await promise;
10
10
  if (error) {
11
- if (error.graphQLErrors.some(e => {
12
- var _a, _b;
13
- return ((_a = e === null || e === void 0 ? void 0 : e.extensions) === null || _a === void 0 ? void 0 : _a.isTransient) &&
14
- ![
15
- 'EAS_BUILD_FREE_TIER_LIMIT_EXCEEDED',
16
- 'EAS_BUILD_FREE_TIER_IOS_LIMIT_EXCEEDED',
17
- ].includes((_b = e === null || e === void 0 ? void 0 : e.extensions) === null || _b === void 0 ? void 0 : _b.errorCode);
18
- })) {
11
+ if (error.graphQLErrors.some(e => e?.extensions?.isTransient &&
12
+ ![
13
+ 'EAS_BUILD_FREE_TIER_LIMIT_EXCEEDED',
14
+ 'EAS_BUILD_FREE_TIER_IOS_LIMIT_EXCEEDED',
15
+ ].includes(e?.extensions?.errorCode))) {
19
16
  log_1.default.error(`We've encountered a transient error. Try again shortly.`);
20
17
  }
21
18
  throw error;
@@ -3610,6 +3610,7 @@ export type JobRun = {
3610
3610
  __typename?: 'JobRun';
3611
3611
  app: App;
3612
3612
  createdAt: Scalars['DateTime']['output'];
3613
+ displayName?: Maybe<Scalars['String']['output']>;
3613
3614
  endedAt?: Maybe<Scalars['DateTime']['output']>;
3614
3615
  expiresAt: Scalars['DateTime']['output'];
3615
3616
  gitCommitHash?: Maybe<Scalars['String']['output']>;
@@ -5749,6 +5750,7 @@ export type CreateAndroidAppCredentialsMutation = {
5749
5750
  app: {
5750
5751
  __typename?: 'App';
5751
5752
  id: string;
5753
+ name: string;
5752
5754
  fullName: string;
5753
5755
  slug: string;
5754
5756
  ownerAccount: {
@@ -5868,6 +5870,7 @@ export type SetFcmMutation = {
5868
5870
  app: {
5869
5871
  __typename?: 'App';
5870
5872
  id: string;
5873
+ name: string;
5871
5874
  fullName: string;
5872
5875
  slug: string;
5873
5876
  ownerAccount: {
@@ -5987,6 +5990,7 @@ export type SetGoogleServiceAccountKeyForSubmissionsMutation = {
5987
5990
  app: {
5988
5991
  __typename?: 'App';
5989
5992
  id: string;
5993
+ name: string;
5990
5994
  fullName: string;
5991
5995
  slug: string;
5992
5996
  ownerAccount: {
@@ -6106,6 +6110,7 @@ export type SetGoogleServiceAccountKeyForFcmV1Mutation = {
6106
6110
  app: {
6107
6111
  __typename?: 'App';
6108
6112
  id: string;
6113
+ name: string;
6109
6114
  fullName: string;
6110
6115
  slug: string;
6111
6116
  ownerAccount: {
@@ -6341,6 +6346,7 @@ export type CommonAndroidAppCredentialsWithBuildCredentialsByApplicationIdentifi
6341
6346
  app: {
6342
6347
  __typename?: 'App';
6343
6348
  id: string;
6349
+ name: string;
6344
6350
  fullName: string;
6345
6351
  slug: string;
6346
6352
  ownerAccount: {
@@ -6638,6 +6644,7 @@ export type CreateAppleDistributionCertificateMutation = {
6638
6644
  app: {
6639
6645
  __typename?: 'App';
6640
6646
  id: string;
6647
+ name: string;
6641
6648
  fullName: string;
6642
6649
  slug: string;
6643
6650
  ownerAccount: {
@@ -6813,6 +6820,7 @@ export type CreateApplePushKeyMutation = {
6813
6820
  app: {
6814
6821
  __typename?: 'App';
6815
6822
  id: string;
6823
+ name: string;
6816
6824
  fullName: string;
6817
6825
  slug: string;
6818
6826
  ownerAccount: {
@@ -6956,6 +6964,7 @@ export type CreateIosAppBuildCredentialsMutation = {
6956
6964
  app: {
6957
6965
  __typename?: 'App';
6958
6966
  id: string;
6967
+ name: string;
6959
6968
  fullName: string;
6960
6969
  slug: string;
6961
6970
  ownerAccount: {
@@ -7073,6 +7082,7 @@ export type SetDistributionCertificateMutation = {
7073
7082
  app: {
7074
7083
  __typename?: 'App';
7075
7084
  id: string;
7085
+ name: string;
7076
7086
  fullName: string;
7077
7087
  slug: string;
7078
7088
  ownerAccount: {
@@ -7190,6 +7200,7 @@ export type SetProvisioningProfileMutation = {
7190
7200
  app: {
7191
7201
  __typename?: 'App';
7192
7202
  id: string;
7203
+ name: string;
7193
7204
  fullName: string;
7194
7205
  slug: string;
7195
7206
  ownerAccount: {
@@ -7311,6 +7322,7 @@ export type CreateIosAppCredentialsMutation = {
7311
7322
  app: {
7312
7323
  __typename?: 'App';
7313
7324
  id: string;
7325
+ name: string;
7314
7326
  fullName: string;
7315
7327
  slug: string;
7316
7328
  ownerAccount: {
@@ -7392,6 +7404,7 @@ export type CreateIosAppCredentialsMutation = {
7392
7404
  app: {
7393
7405
  __typename?: 'App';
7394
7406
  id: string;
7407
+ name: string;
7395
7408
  fullName: string;
7396
7409
  slug: string;
7397
7410
  ownerAccount: {
@@ -7460,6 +7473,7 @@ export type CreateIosAppCredentialsMutation = {
7460
7473
  app: {
7461
7474
  __typename?: 'App';
7462
7475
  id: string;
7476
+ name: string;
7463
7477
  fullName: string;
7464
7478
  slug: string;
7465
7479
  ownerAccount: {
@@ -7566,6 +7580,7 @@ export type SetPushKeyMutation = {
7566
7580
  app: {
7567
7581
  __typename?: 'App';
7568
7582
  id: string;
7583
+ name: string;
7569
7584
  fullName: string;
7570
7585
  slug: string;
7571
7586
  ownerAccount: {
@@ -7647,6 +7662,7 @@ export type SetPushKeyMutation = {
7647
7662
  app: {
7648
7663
  __typename?: 'App';
7649
7664
  id: string;
7665
+ name: string;
7650
7666
  fullName: string;
7651
7667
  slug: string;
7652
7668
  ownerAccount: {
@@ -7715,6 +7731,7 @@ export type SetPushKeyMutation = {
7715
7731
  app: {
7716
7732
  __typename?: 'App';
7717
7733
  id: string;
7734
+ name: string;
7718
7735
  fullName: string;
7719
7736
  slug: string;
7720
7737
  ownerAccount: {
@@ -7821,6 +7838,7 @@ export type SetAppStoreConnectApiKeyForSubmissionsMutation = {
7821
7838
  app: {
7822
7839
  __typename?: 'App';
7823
7840
  id: string;
7841
+ name: string;
7824
7842
  fullName: string;
7825
7843
  slug: string;
7826
7844
  ownerAccount: {
@@ -7902,6 +7920,7 @@ export type SetAppStoreConnectApiKeyForSubmissionsMutation = {
7902
7920
  app: {
7903
7921
  __typename?: 'App';
7904
7922
  id: string;
7923
+ name: string;
7905
7924
  fullName: string;
7906
7925
  slug: string;
7907
7926
  ownerAccount: {
@@ -7970,6 +7989,7 @@ export type SetAppStoreConnectApiKeyForSubmissionsMutation = {
7970
7989
  app: {
7971
7990
  __typename?: 'App';
7972
7991
  id: string;
7992
+ name: string;
7973
7993
  fullName: string;
7974
7994
  slug: string;
7975
7995
  ownerAccount: {
@@ -8224,6 +8244,7 @@ export type AppleDistributionCertificateByAppQuery = {
8224
8244
  app: {
8225
8245
  __typename?: 'App';
8226
8246
  id: string;
8247
+ name: string;
8227
8248
  fullName: string;
8228
8249
  slug: string;
8229
8250
  ownerAccount: {
@@ -8326,6 +8347,7 @@ export type AppleDistributionCertificatesPaginatedByAccountQuery = {
8326
8347
  app: {
8327
8348
  __typename?: 'App';
8328
8349
  id: string;
8350
+ name: string;
8329
8351
  fullName: string;
8330
8352
  slug: string;
8331
8353
  ownerAccount: {
@@ -8479,6 +8501,7 @@ export type ApplePushKeysPaginatedByAccountQuery = {
8479
8501
  app: {
8480
8502
  __typename?: 'App';
8481
8503
  id: string;
8504
+ name: string;
8482
8505
  fullName: string;
8483
8506
  slug: string;
8484
8507
  ownerAccount: {
@@ -8619,6 +8642,7 @@ export type IosAppBuildCredentialsByAppleAppIdentiferAndDistributionQuery = {
8619
8642
  app: {
8620
8643
  __typename?: 'App';
8621
8644
  id: string;
8645
+ name: string;
8622
8646
  fullName: string;
8623
8647
  slug: string;
8624
8648
  ownerAccount: {
@@ -8745,6 +8769,7 @@ export type IosAppCredentialsWithBuildCredentialsByAppIdentifierIdQuery = {
8745
8769
  app: {
8746
8770
  __typename?: 'App';
8747
8771
  id: string;
8772
+ name: string;
8748
8773
  fullName: string;
8749
8774
  slug: string;
8750
8775
  ownerAccount: {
@@ -8826,6 +8851,7 @@ export type IosAppCredentialsWithBuildCredentialsByAppIdentifierIdQuery = {
8826
8851
  app: {
8827
8852
  __typename?: 'App';
8828
8853
  id: string;
8854
+ name: string;
8829
8855
  fullName: string;
8830
8856
  slug: string;
8831
8857
  ownerAccount: {
@@ -8894,6 +8920,7 @@ export type IosAppCredentialsWithBuildCredentialsByAppIdentifierIdQuery = {
8894
8920
  app: {
8895
8921
  __typename?: 'App';
8896
8922
  id: string;
8923
+ name: string;
8897
8924
  fullName: string;
8898
8925
  slug: string;
8899
8926
  ownerAccount: {
@@ -9004,6 +9031,7 @@ export type CommonIosAppCredentialsWithBuildCredentialsByAppIdentifierIdQuery =
9004
9031
  app: {
9005
9032
  __typename?: 'App';
9006
9033
  id: string;
9034
+ name: string;
9007
9035
  fullName: string;
9008
9036
  slug: string;
9009
9037
  ownerAccount: {
@@ -9085,6 +9113,7 @@ export type CommonIosAppCredentialsWithBuildCredentialsByAppIdentifierIdQuery =
9085
9113
  app: {
9086
9114
  __typename?: 'App';
9087
9115
  id: string;
9116
+ name: string;
9088
9117
  fullName: string;
9089
9118
  slug: string;
9090
9119
  ownerAccount: {
@@ -9153,6 +9182,7 @@ export type CommonIosAppCredentialsWithBuildCredentialsByAppIdentifierIdQuery =
9153
9182
  app: {
9154
9183
  __typename?: 'App';
9155
9184
  id: string;
9185
+ name: string;
9156
9186
  fullName: string;
9157
9187
  slug: string;
9158
9188
  ownerAccount: {
@@ -9906,6 +9936,7 @@ export type AppByIdQuery = {
9906
9936
  byId: {
9907
9937
  __typename?: 'App';
9908
9938
  id: string;
9939
+ name: string;
9909
9940
  fullName: string;
9910
9941
  slug: string;
9911
9942
  ownerAccount: {
@@ -9958,6 +9989,7 @@ export type AppByFullNameQuery = {
9958
9989
  byFullName: {
9959
9990
  __typename?: 'App';
9960
9991
  id: string;
9992
+ name: string;
9961
9993
  fullName: string;
9962
9994
  slug: string;
9963
9995
  ownerAccount: {
@@ -11268,6 +11300,7 @@ export type AccountFragment = {
11268
11300
  export type AppFragment = {
11269
11301
  __typename?: 'App';
11270
11302
  id: string;
11303
+ name: string;
11271
11304
  fullName: string;
11272
11305
  slug: string;
11273
11306
  ownerAccount: {
@@ -11667,6 +11700,7 @@ export type CommonAndroidAppCredentialsFragment = {
11667
11700
  app: {
11668
11701
  __typename?: 'App';
11669
11702
  id: string;
11703
+ name: string;
11670
11704
  fullName: string;
11671
11705
  slug: string;
11672
11706
  ownerAccount: {
@@ -11860,6 +11894,7 @@ export type AppleDistributionCertificateFragment = {
11860
11894
  app: {
11861
11895
  __typename?: 'App';
11862
11896
  id: string;
11897
+ name: string;
11863
11898
  fullName: string;
11864
11899
  slug: string;
11865
11900
  ownerAccount: {
@@ -11959,6 +11994,7 @@ export type ApplePushKeyFragment = {
11959
11994
  app: {
11960
11995
  __typename?: 'App';
11961
11996
  id: string;
11997
+ name: string;
11962
11998
  fullName: string;
11963
11999
  slug: string;
11964
12000
  ownerAccount: {
@@ -12051,6 +12087,7 @@ export type IosAppBuildCredentialsFragment = {
12051
12087
  app: {
12052
12088
  __typename?: 'App';
12053
12089
  id: string;
12090
+ name: string;
12054
12091
  fullName: string;
12055
12092
  slug: string;
12056
12093
  ownerAccount: {
@@ -12135,6 +12172,7 @@ export type CommonIosAppCredentialsWithoutBuildCredentialsFragment = {
12135
12172
  app: {
12136
12173
  __typename?: 'App';
12137
12174
  id: string;
12175
+ name: string;
12138
12176
  fullName: string;
12139
12177
  slug: string;
12140
12178
  ownerAccount: {
@@ -12203,6 +12241,7 @@ export type CommonIosAppCredentialsWithoutBuildCredentialsFragment = {
12203
12241
  app: {
12204
12242
  __typename?: 'App';
12205
12243
  id: string;
12244
+ name: string;
12206
12245
  fullName: string;
12207
12246
  slug: string;
12208
12247
  ownerAccount: {
@@ -12299,6 +12338,7 @@ export type CommonIosAppCredentialsFragment = {
12299
12338
  app: {
12300
12339
  __typename?: 'App';
12301
12340
  id: string;
12341
+ name: string;
12302
12342
  fullName: string;
12303
12343
  slug: string;
12304
12344
  ownerAccount: {
@@ -12380,6 +12420,7 @@ export type CommonIosAppCredentialsFragment = {
12380
12420
  app: {
12381
12421
  __typename?: 'App';
12382
12422
  id: string;
12423
+ name: string;
12383
12424
  fullName: string;
12384
12425
  slug: string;
12385
12426
  ownerAccount: {
@@ -12448,6 +12489,7 @@ export type CommonIosAppCredentialsFragment = {
12448
12489
  app: {
12449
12490
  __typename?: 'App';
12450
12491
  id: string;
12492
+ name: string;
12451
12493
  fullName: string;
12452
12494
  slug: string;
12453
12495
  ownerAccount: {
@@ -7,7 +7,6 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
7
  const client_1 = require("../client");
8
8
  exports.AppMutation = {
9
9
  async createAppAsync(graphqlClient, appInput) {
10
- var _a;
11
10
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
12
11
  .mutation((0, graphql_tag_1.default) `
13
12
  mutation CreateAppMutation($appInput: AppInput!) {
@@ -21,7 +20,7 @@ exports.AppMutation = {
21
20
  appInput,
22
21
  })
23
22
  .toPromise());
24
- const appId = (_a = data.app) === null || _a === void 0 ? void 0 : _a.createApp.id;
23
+ const appId = data.app?.createApp.id;
25
24
  (0, assert_1.default)(appId, 'App ID must be defined');
26
25
  return appId;
27
26
  },
@@ -7,7 +7,6 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
7
  const client_1 = require("../client");
8
8
  exports.AppVersionMutation = {
9
9
  async createAppVersionAsync(graphqlClient, appVersionInput) {
10
- var _a;
11
10
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
12
11
  .mutation((0, graphql_tag_1.default) `
13
12
  mutation CreateAppVersionMutation($appVersionInput: AppVersionInput!) {
@@ -21,7 +20,7 @@ exports.AppVersionMutation = {
21
20
  appVersionInput,
22
21
  })
23
22
  .toPromise());
24
- const appVersionId = (_a = data.appVersion) === null || _a === void 0 ? void 0 : _a.createAppVersion.id;
23
+ const appVersionId = data.appVersion?.createAppVersion.id;
25
24
  (0, assert_1.default)(appVersionId, 'AppVersion ID must be defined');
26
25
  return appVersionId;
27
26
  },