eas-cli 2.3.0 → 2.4.1

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 (348) hide show
  1. package/README.md +47 -47
  2. package/build/ApiV2Error.d.ts +15 -0
  3. package/build/ApiV2Error.js +14 -0
  4. package/build/api.d.ts +10 -16
  5. package/build/api.js +52 -59
  6. package/build/branch/queries.d.ts +3 -2
  7. package/build/branch/queries.js +7 -7
  8. package/build/build/android/build.js +3 -3
  9. package/build/build/android/syncProjectConfiguration.d.ts +2 -1
  10. package/build/build/android/syncProjectConfiguration.js +2 -2
  11. package/build/build/android/version.d.ts +2 -1
  12. package/build/build/android/version.js +4 -4
  13. package/build/build/build.d.ts +2 -1
  14. package/build/build/build.js +5 -5
  15. package/build/build/context.d.ts +2 -0
  16. package/build/build/createContext.d.ts +3 -1
  17. package/build/build/createContext.js +4 -2
  18. package/build/build/ios/build.js +3 -3
  19. package/build/build/ios/syncProjectConfiguration.d.ts +2 -1
  20. package/build/build/ios/syncProjectConfiguration.js +2 -2
  21. package/build/build/ios/version.d.ts +2 -1
  22. package/build/build/ios/version.js +4 -4
  23. package/build/build/local.js +1 -1
  24. package/build/build/queries.d.ts +2 -1
  25. package/build/build/queries.js +3 -3
  26. package/build/build/runBuildAndSubmit.d.ts +2 -1
  27. package/build/build/runBuildAndSubmit.js +9 -6
  28. package/build/channel/queries.d.ts +4 -3
  29. package/build/channel/queries.js +13 -13
  30. package/build/commandUtils/EasCommand.d.ts +24 -3
  31. package/build/commandUtils/EasCommand.js +36 -6
  32. package/build/commandUtils/context/ContextField.d.ts +2 -0
  33. package/build/commandUtils/context/DynamicProjectConfigContextField.d.ts +1 -1
  34. package/build/commandUtils/context/DynamicProjectConfigContextField.js +2 -2
  35. package/build/commandUtils/context/LoggedInContextField.d.ts +12 -0
  36. package/build/commandUtils/context/LoggedInContextField.js +15 -0
  37. package/build/commandUtils/context/MaybeLoggedInContextField.d.ts +12 -0
  38. package/build/commandUtils/context/MaybeLoggedInContextField.js +17 -0
  39. package/build/commandUtils/context/OptionalProjectConfigContextField.d.ts +1 -1
  40. package/build/commandUtils/context/OptionalProjectConfigContextField.js +2 -2
  41. package/build/commandUtils/context/ProjectConfigContextField.d.ts +1 -1
  42. package/build/commandUtils/context/ProjectConfigContextField.js +2 -2
  43. package/build/commandUtils/context/SessionManagementContextField.d.ts +5 -0
  44. package/build/commandUtils/context/SessionManagementContextField.js +10 -0
  45. package/build/commandUtils/context/contextUtils/createGraphqlClient.d.ts +11 -0
  46. package/build/commandUtils/context/contextUtils/createGraphqlClient.js +43 -0
  47. package/build/commandUtils/context/contextUtils/getProjectIdAsync.d.ts +2 -1
  48. package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +11 -7
  49. package/build/commands/account/login.d.ts +3 -0
  50. package/build/commands/account/login.js +7 -2
  51. package/build/commands/account/logout.d.ts +3 -0
  52. package/build/commands/account/logout.js +7 -2
  53. package/build/commands/account/view.d.ts +3 -0
  54. package/build/commands/account/view.js +8 -3
  55. package/build/commands/branch/create.d.ts +3 -1
  56. package/build/commands/branch/create.js +6 -5
  57. package/build/commands/branch/delete.d.ts +1 -0
  58. package/build/commands/branch/delete.js +10 -9
  59. package/build/commands/branch/list.d.ts +1 -0
  60. package/build/commands/branch/list.js +3 -2
  61. package/build/commands/branch/rename.d.ts +1 -0
  62. package/build/commands/branch/rename.js +6 -5
  63. package/build/commands/branch/view.d.ts +1 -0
  64. package/build/commands/branch/view.js +4 -3
  65. package/build/commands/build/cancel.d.ts +3 -1
  66. package/build/commands/build/cancel.js +14 -13
  67. package/build/commands/build/configure.d.ts +1 -0
  68. package/build/commands/build/configure.js +4 -3
  69. package/build/commands/build/index.d.ts +1 -1
  70. package/build/commands/build/index.js +3 -3
  71. package/build/commands/build/inspect.d.ts +1 -1
  72. package/build/commands/build/inspect.js +2 -2
  73. package/build/commands/build/list.d.ts +1 -0
  74. package/build/commands/build/list.js +4 -3
  75. package/build/commands/build/version/set.d.ts +1 -1
  76. package/build/commands/build/version/set.js +4 -4
  77. package/build/commands/build/version/sync.d.ts +1 -1
  78. package/build/commands/build/version/sync.js +2 -2
  79. package/build/commands/build/view.d.ts +1 -0
  80. package/build/commands/build/view.js +5 -4
  81. package/build/commands/channel/create.d.ts +3 -1
  82. package/build/commands/channel/create.js +8 -7
  83. package/build/commands/channel/delete.d.ts +1 -0
  84. package/build/commands/channel/delete.js +7 -6
  85. package/build/commands/channel/edit.d.ts +3 -1
  86. package/build/commands/channel/edit.js +12 -8
  87. package/build/commands/channel/list.d.ts +1 -0
  88. package/build/commands/channel/list.js +3 -2
  89. package/build/commands/channel/rollout.d.ts +1 -0
  90. package/build/commands/channel/rollout.js +15 -14
  91. package/build/commands/channel/view.d.ts +1 -0
  92. package/build/commands/channel/view.js +4 -3
  93. package/build/commands/credentials.d.ts +1 -1
  94. package/build/commands/credentials.js +2 -2
  95. package/build/commands/device/create.d.ts +1 -1
  96. package/build/commands/device/create.js +2 -1
  97. package/build/commands/device/delete.d.ts +3 -1
  98. package/build/commands/device/delete.js +9 -8
  99. package/build/commands/device/list.d.ts +1 -0
  100. package/build/commands/device/list.js +5 -4
  101. package/build/commands/device/view.d.ts +1 -0
  102. package/build/commands/device/view.js +4 -3
  103. package/build/commands/metadata/pull.d.ts +1 -1
  104. package/build/commands/metadata/pull.js +2 -1
  105. package/build/commands/metadata/push.d.ts +1 -1
  106. package/build/commands/metadata/push.js +2 -1
  107. package/build/commands/open.d.ts +1 -0
  108. package/build/commands/open.js +3 -2
  109. package/build/commands/project/info.d.ts +1 -0
  110. package/build/commands/project/info.js +5 -4
  111. package/build/commands/project/init.d.ts +1 -1
  112. package/build/commands/project/init.js +5 -5
  113. package/build/commands/secret/create.d.ts +1 -0
  114. package/build/commands/secret/create.js +10 -9
  115. package/build/commands/secret/delete.d.ts +1 -0
  116. package/build/commands/secret/delete.js +4 -3
  117. package/build/commands/secret/list.d.ts +1 -0
  118. package/build/commands/secret/list.js +3 -2
  119. package/build/commands/submit.d.ts +1 -1
  120. package/build/commands/submit.js +4 -3
  121. package/build/commands/update/configure.d.ts +1 -0
  122. package/build/commands/update/configure.js +4 -3
  123. package/build/commands/update/delete.d.ts +3 -0
  124. package/build/commands/update/delete.js +9 -3
  125. package/build/commands/update/index.d.ts +3 -1
  126. package/build/commands/update/index.js +23 -17
  127. package/build/commands/update/list.d.ts +1 -0
  128. package/build/commands/update/list.js +6 -5
  129. package/build/commands/update/view.d.ts +3 -0
  130. package/build/commands/update/view.js +7 -1
  131. package/build/commands/webhook/create.d.ts +1 -0
  132. package/build/commands/webhook/create.js +3 -2
  133. package/build/commands/webhook/delete.d.ts +1 -0
  134. package/build/commands/webhook/delete.js +7 -6
  135. package/build/commands/webhook/list.d.ts +1 -0
  136. package/build/commands/webhook/list.js +4 -3
  137. package/build/commands/webhook/update.d.ts +3 -0
  138. package/build/commands/webhook/update.js +8 -2
  139. package/build/commands/webhook/view.d.ts +3 -0
  140. package/build/commands/webhook/view.js +7 -1
  141. package/build/credentials/android/actions/AssignFcm.js +2 -2
  142. package/build/credentials/android/actions/AssignGoogleServiceAccountKey.js +2 -2
  143. package/build/credentials/android/actions/BuildCredentialsUtils.js +12 -12
  144. package/build/credentials/android/actions/CreateFcm.js +1 -1
  145. package/build/credentials/android/actions/CreateGoogleServiceAccountKey.js +1 -1
  146. package/build/credentials/android/actions/CreateKeystore.js +4 -4
  147. package/build/credentials/android/actions/RemoveFcm.js +2 -2
  148. package/build/credentials/android/actions/RemoveGoogleServiceAccountKey.js +2 -2
  149. package/build/credentials/android/actions/RemoveKeystore.js +1 -1
  150. package/build/credentials/android/actions/SetUpBuildCredentials.js +3 -3
  151. package/build/credentials/android/actions/SetUpBuildCredentialsFromCredentialsJson.js +3 -3
  152. package/build/credentials/android/actions/SetUpGoogleServiceAccountKey.js +3 -3
  153. package/build/credentials/android/actions/UseExistingGoogleServiceAccountKey.js +1 -1
  154. package/build/credentials/android/api/GraphqlClient.d.ts +19 -18
  155. package/build/credentials/android/api/GraphqlClient.js +45 -45
  156. package/build/credentials/android/api/graphql/mutations/AndroidAppBuildCredentialsMutation.d.ts +3 -2
  157. package/build/credentials/android/api/graphql/mutations/AndroidAppBuildCredentialsMutation.js +4 -4
  158. package/build/credentials/android/api/graphql/mutations/AndroidAppCredentialsMutation.d.ts +4 -3
  159. package/build/credentials/android/api/graphql/mutations/AndroidAppCredentialsMutation.js +6 -6
  160. package/build/credentials/android/api/graphql/mutations/AndroidFcmMutation.d.ts +3 -2
  161. package/build/credentials/android/api/graphql/mutations/AndroidFcmMutation.js +4 -4
  162. package/build/credentials/android/api/graphql/mutations/AndroidKeystoreMutation.d.ts +3 -2
  163. package/build/credentials/android/api/graphql/mutations/AndroidKeystoreMutation.js +4 -4
  164. package/build/credentials/android/api/graphql/mutations/GoogleServiceAccountKeyMutation.d.ts +3 -2
  165. package/build/credentials/android/api/graphql/mutations/GoogleServiceAccountKeyMutation.js +4 -4
  166. package/build/credentials/android/api/graphql/queries/AndroidAppCredentialsQuery.d.ts +2 -1
  167. package/build/credentials/android/api/graphql/queries/AndroidAppCredentialsQuery.js +2 -2
  168. package/build/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.d.ts +2 -1
  169. package/build/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.js +2 -2
  170. package/build/credentials/android/utils/keystore.d.ts +2 -1
  171. package/build/credentials/android/utils/keystore.js +6 -6
  172. package/build/credentials/context.d.ts +3 -0
  173. package/build/credentials/context.js +1 -0
  174. package/build/credentials/credentialsJson/update.js +1 -1
  175. package/build/credentials/ios/actions/AppleTeamUtils.js +1 -1
  176. package/build/credentials/ios/actions/AscApiKeyUtils.js +1 -1
  177. package/build/credentials/ios/actions/AssignAscApiKey.js +2 -2
  178. package/build/credentials/ios/actions/AssignPushKey.js +2 -2
  179. package/build/credentials/ios/actions/BuildCredentialsUtils.js +5 -5
  180. package/build/credentials/ios/actions/ConfigureProvisioningProfile.js +1 -1
  181. package/build/credentials/ios/actions/CreateAscApiKey.js +1 -1
  182. package/build/credentials/ios/actions/CreateDistributionCertificate.js +1 -1
  183. package/build/credentials/ios/actions/CreateProvisioningProfile.js +2 -2
  184. package/build/credentials/ios/actions/CreatePushKey.js +1 -1
  185. package/build/credentials/ios/actions/DistributionCertificateUtils.js +2 -2
  186. package/build/credentials/ios/actions/PushKeyUtils.js +1 -1
  187. package/build/credentials/ios/actions/RemoveAscApiKey.js +1 -1
  188. package/build/credentials/ios/actions/RemoveDistributionCertificate.js +1 -1
  189. package/build/credentials/ios/actions/RemoveProvisioningProfile.js +1 -1
  190. package/build/credentials/ios/actions/RemovePushKey.js +1 -1
  191. package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +8 -8
  192. package/build/credentials/ios/actions/SetUpAscApiKey.js +2 -2
  193. package/build/credentials/ios/actions/SetUpDistributionCertificate.js +2 -2
  194. package/build/credentials/ios/actions/SetUpProvisioningProfile.js +1 -1
  195. package/build/credentials/ios/actions/SetUpPushKey.js +4 -4
  196. package/build/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.js +5 -5
  197. package/build/credentials/ios/api/GraphqlClient.d.ts +25 -24
  198. package/build/credentials/ios/api/GraphqlClient.js +73 -73
  199. package/build/credentials/ios/api/graphql/mutations/AppStoreConnectApiKeyMutation.d.ts +3 -2
  200. package/build/credentials/ios/api/graphql/mutations/AppStoreConnectApiKeyMutation.js +4 -4
  201. package/build/credentials/ios/api/graphql/mutations/AppleAppIdentifierMutation.d.ts +2 -1
  202. package/build/credentials/ios/api/graphql/mutations/AppleAppIdentifierMutation.js +2 -2
  203. package/build/credentials/ios/api/graphql/mutations/AppleDeviceMutation.d.ts +3 -2
  204. package/build/credentials/ios/api/graphql/mutations/AppleDeviceMutation.js +4 -4
  205. package/build/credentials/ios/api/graphql/mutations/AppleDeviceRegistrationRequestMutation.d.ts +2 -1
  206. package/build/credentials/ios/api/graphql/mutations/AppleDeviceRegistrationRequestMutation.js +2 -2
  207. package/build/credentials/ios/api/graphql/mutations/AppleDistributionCertificateMutation.d.ts +3 -2
  208. package/build/credentials/ios/api/graphql/mutations/AppleDistributionCertificateMutation.js +4 -4
  209. package/build/credentials/ios/api/graphql/mutations/AppleProvisioningProfileMutation.d.ts +4 -3
  210. package/build/credentials/ios/api/graphql/mutations/AppleProvisioningProfileMutation.js +6 -6
  211. package/build/credentials/ios/api/graphql/mutations/ApplePushKeyMutation.d.ts +3 -2
  212. package/build/credentials/ios/api/graphql/mutations/ApplePushKeyMutation.js +4 -4
  213. package/build/credentials/ios/api/graphql/mutations/AppleTeamMutation.d.ts +2 -1
  214. package/build/credentials/ios/api/graphql/mutations/AppleTeamMutation.js +2 -2
  215. package/build/credentials/ios/api/graphql/mutations/IosAppBuildCredentialsMutation.d.ts +4 -3
  216. package/build/credentials/ios/api/graphql/mutations/IosAppBuildCredentialsMutation.js +6 -6
  217. package/build/credentials/ios/api/graphql/mutations/IosAppCredentialsMutation.d.ts +4 -3
  218. package/build/credentials/ios/api/graphql/mutations/IosAppCredentialsMutation.js +6 -6
  219. package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.d.ts +2 -1
  220. package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.js +2 -2
  221. package/build/credentials/ios/api/graphql/queries/AppleAppIdentifierQuery.d.ts +2 -1
  222. package/build/credentials/ios/api/graphql/queries/AppleAppIdentifierQuery.js +2 -2
  223. package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.d.ts +4 -3
  224. package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +6 -6
  225. package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.d.ts +3 -2
  226. package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.js +4 -4
  227. package/build/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.d.ts +2 -1
  228. package/build/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.js +2 -2
  229. package/build/credentials/ios/api/graphql/queries/ApplePushKeyQuery.d.ts +2 -1
  230. package/build/credentials/ios/api/graphql/queries/ApplePushKeyQuery.js +2 -2
  231. package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.d.ts +3 -2
  232. package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +4 -4
  233. package/build/credentials/ios/api/graphql/queries/IosAppBuildCredentialsQuery.d.ts +2 -1
  234. package/build/credentials/ios/api/graphql/queries/IosAppBuildCredentialsQuery.js +2 -2
  235. package/build/credentials/ios/api/graphql/queries/IosAppCredentialsQuery.d.ts +3 -2
  236. package/build/credentials/ios/api/graphql/queries/IosAppCredentialsQuery.js +4 -4
  237. package/build/credentials/manager/HelperActions.d.ts +2 -0
  238. package/build/credentials/manager/ManageAndroid.js +4 -3
  239. package/build/credentials/manager/ManageIos.js +4 -3
  240. package/build/credentials/manager/SelectAndroidBuildCredentials.js +2 -2
  241. package/build/credentials/manager/SelectPlatform.d.ts +3 -1
  242. package/build/credentials/manager/SelectPlatform.js +2 -1
  243. package/build/devices/actions/create/action.d.ts +3 -1
  244. package/build/devices/actions/create/action.js +5 -4
  245. package/build/devices/actions/create/developerPortalMethod.d.ts +2 -1
  246. package/build/devices/actions/create/developerPortalMethod.js +9 -9
  247. package/build/devices/actions/create/inputMethod.d.ts +2 -1
  248. package/build/devices/actions/create/inputMethod.js +4 -4
  249. package/build/devices/actions/create/registrationUrlMethod.d.ts +2 -1
  250. package/build/devices/actions/create/registrationUrlMethod.js +4 -4
  251. package/build/devices/context.d.ts +4 -1
  252. package/build/devices/context.js +2 -1
  253. package/build/devices/manager.d.ts +3 -1
  254. package/build/devices/manager.js +9 -8
  255. package/build/devices/queries.d.ts +4 -3
  256. package/build/devices/queries.js +7 -7
  257. package/build/graphql/client.d.ts +1 -8
  258. package/build/graphql/client.js +1 -39
  259. package/build/graphql/mutations/AppMutation.d.ts +2 -1
  260. package/build/graphql/mutations/AppMutation.js +2 -2
  261. package/build/graphql/mutations/AppVersionMutation.d.ts +2 -1
  262. package/build/graphql/mutations/AppVersionMutation.js +2 -2
  263. package/build/graphql/mutations/BuildMutation.d.ts +3 -2
  264. package/build/graphql/mutations/BuildMutation.js +4 -4
  265. package/build/graphql/mutations/EnvironmentSecretMutation.d.ts +4 -3
  266. package/build/graphql/mutations/EnvironmentSecretMutation.js +6 -6
  267. package/build/graphql/mutations/KeystoreGenerationUrlMutation.d.ts +2 -1
  268. package/build/graphql/mutations/KeystoreGenerationUrlMutation.js +2 -2
  269. package/build/graphql/mutations/PublishMutation.d.ts +4 -3
  270. package/build/graphql/mutations/PublishMutation.js +6 -6
  271. package/build/graphql/mutations/SubmissionMutation.d.ts +3 -2
  272. package/build/graphql/mutations/SubmissionMutation.js +4 -4
  273. package/build/graphql/mutations/UploadSessionMutation.d.ts +2 -1
  274. package/build/graphql/mutations/UploadSessionMutation.js +2 -2
  275. package/build/graphql/mutations/WebhookMutation.d.ts +4 -3
  276. package/build/graphql/mutations/WebhookMutation.js +6 -6
  277. package/build/graphql/queries/AppQuery.d.ts +3 -2
  278. package/build/graphql/queries/AppQuery.js +4 -4
  279. package/build/graphql/queries/AppVersionQuery.d.ts +2 -1
  280. package/build/graphql/queries/AppVersionQuery.js +2 -2
  281. package/build/graphql/queries/BranchQuery.d.ts +4 -3
  282. package/build/graphql/queries/BranchQuery.js +6 -6
  283. package/build/graphql/queries/BuildQuery.d.ts +4 -3
  284. package/build/graphql/queries/BuildQuery.js +6 -6
  285. package/build/graphql/queries/ChannelQuery.d.ts +3 -2
  286. package/build/graphql/queries/ChannelQuery.js +4 -4
  287. package/build/graphql/queries/EnvironmentSecretsQuery.d.ts +3 -2
  288. package/build/graphql/queries/EnvironmentSecretsQuery.js +4 -4
  289. package/build/graphql/queries/PublishQuery.d.ts +3 -2
  290. package/build/graphql/queries/PublishQuery.js +4 -4
  291. package/build/graphql/queries/StatuspageServiceQuery.d.ts +2 -1
  292. package/build/graphql/queries/StatuspageServiceQuery.js +2 -2
  293. package/build/graphql/queries/SubmissionQuery.d.ts +3 -2
  294. package/build/graphql/queries/SubmissionQuery.js +4 -4
  295. package/build/graphql/queries/UpdateQuery.d.ts +4 -3
  296. package/build/graphql/queries/UpdateQuery.js +6 -6
  297. package/build/graphql/queries/UserQuery.d.ts +2 -1
  298. package/build/graphql/queries/UserQuery.js +2 -2
  299. package/build/graphql/queries/WebhookQuery.d.ts +3 -2
  300. package/build/graphql/queries/WebhookQuery.js +4 -4
  301. package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.d.ts +3 -2
  302. package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.js +5 -5
  303. package/build/project/projectUtils.d.ts +3 -2
  304. package/build/project/projectUtils.js +4 -4
  305. package/build/project/publish.d.ts +3 -2
  306. package/build/project/publish.js +7 -7
  307. package/build/submit/ArchiveSource.d.ts +2 -1
  308. package/build/submit/ArchiveSource.js +30 -30
  309. package/build/submit/android/AndroidSubmitter.js +2 -2
  310. package/build/submit/context.d.ts +3 -0
  311. package/build/submit/context.js +3 -2
  312. package/build/submit/ios/IosSubmitter.js +2 -2
  313. package/build/submit/submit.d.ts +2 -1
  314. package/build/submit/submit.js +2 -2
  315. package/build/submit/utils/builds.d.ts +2 -1
  316. package/build/submit/utils/builds.js +2 -2
  317. package/build/submit/utils/errors.d.ts +3 -0
  318. package/build/submit/utils/errors.js +15 -67
  319. package/build/submit/utils/files.d.ts +2 -1
  320. package/build/submit/utils/files.js +2 -2
  321. package/build/submit/utils/wait.d.ts +2 -1
  322. package/build/submit/utils/wait.js +2 -2
  323. package/build/update/android/UpdatesModule.d.ts +2 -1
  324. package/build/update/android/UpdatesModule.js +2 -2
  325. package/build/update/ios/UpdatesModule.d.ts +2 -1
  326. package/build/update/ios/UpdatesModule.js +2 -2
  327. package/build/update/queries.d.ts +4 -3
  328. package/build/update/queries.js +22 -12
  329. package/build/uploads.d.ts +2 -1
  330. package/build/uploads.js +2 -2
  331. package/build/user/SessionManager.d.ts +70 -0
  332. package/build/user/SessionManager.js +258 -0
  333. package/build/user/User.d.ts +0 -9
  334. package/build/user/User.js +1 -60
  335. package/build/user/fetchSessionSecretAndUser.d.ts +9 -0
  336. package/build/user/fetchSessionSecretAndUser.js +43 -0
  337. package/build/utils/statuspageService.d.ts +2 -1
  338. package/build/utils/statuspageService.js +4 -4
  339. package/oclif.manifest.json +1 -1
  340. package/package.json +2 -2
  341. package/build/commandUtils/context/ActorContextField.d.ts +0 -5
  342. package/build/commandUtils/context/ActorContextField.js +0 -11
  343. package/build/commandUtils/context/contextUtils/ensureLoggedInAsync.d.ts +0 -21
  344. package/build/commandUtils/context/contextUtils/ensureLoggedInAsync.js +0 -75
  345. package/build/user/otp.d.ts +0 -29
  346. package/build/user/otp.js +0 -119
  347. package/build/user/sessionStorage.d.ts +0 -11
  348. package/build/user/sessionStorage.js +0 -36
@@ -24,34 +24,34 @@ var ArchiveSourceType;
24
24
  ArchiveSourceType[ArchiveSourceType["buildList"] = 4] = "buildList";
25
25
  ArchiveSourceType[ArchiveSourceType["prompt"] = 5] = "prompt";
26
26
  })(ArchiveSourceType = exports.ArchiveSourceType || (exports.ArchiveSourceType = {}));
27
- async function getArchiveAsync(source) {
27
+ async function getArchiveAsync(graphqlClient, source) {
28
28
  switch (source.sourceType) {
29
29
  case ArchiveSourceType.prompt: {
30
- return await handlePromptSourceAsync(source);
30
+ return await handlePromptSourceAsync(graphqlClient, source);
31
31
  }
32
32
  case ArchiveSourceType.url: {
33
- return await handleUrlSourceAsync(source);
33
+ return await handleUrlSourceAsync(graphqlClient, source);
34
34
  }
35
35
  case ArchiveSourceType.latest: {
36
- return await handleLatestSourceAsync(source);
36
+ return await handleLatestSourceAsync(graphqlClient, source);
37
37
  }
38
38
  case ArchiveSourceType.path: {
39
- return await handlePathSourceAsync(source);
39
+ return await handlePathSourceAsync(graphqlClient, source);
40
40
  }
41
41
  case ArchiveSourceType.buildId: {
42
- return await handleBuildIdSourceAsync(source);
42
+ return await handleBuildIdSourceAsync(graphqlClient, source);
43
43
  }
44
44
  case ArchiveSourceType.buildList: {
45
- return await handleBuildListSourceAsync(source);
45
+ return await handleBuildListSourceAsync(graphqlClient, source);
46
46
  }
47
47
  }
48
48
  }
49
49
  exports.getArchiveAsync = getArchiveAsync;
50
- async function handleUrlSourceAsync(source) {
50
+ async function handleUrlSourceAsync(graphqlClient, source) {
51
51
  const { url } = source;
52
52
  if (!validateUrl(url)) {
53
53
  log_1.default.error(chalk_1.default.bold(`The URL you provided is invalid: ${url}`));
54
- return getArchiveAsync({
54
+ return getArchiveAsync(graphqlClient, {
55
55
  ...source,
56
56
  sourceType: ArchiveSourceType.prompt,
57
57
  });
@@ -59,7 +59,7 @@ async function handleUrlSourceAsync(source) {
59
59
  const maybeBuildId = isBuildDetailsPage(url);
60
60
  if (maybeBuildId) {
61
61
  if (await askIfUseBuildIdFromUrlAsync(source, maybeBuildId)) {
62
- return getArchiveAsync({
62
+ return getArchiveAsync(graphqlClient, {
63
63
  ...source,
64
64
  sourceType: ArchiveSourceType.buildId,
65
65
  id: maybeBuildId,
@@ -71,12 +71,12 @@ async function handleUrlSourceAsync(source) {
71
71
  source,
72
72
  };
73
73
  }
74
- async function handleLatestSourceAsync(source) {
74
+ async function handleLatestSourceAsync(graphqlClient, source) {
75
75
  try {
76
- const [latestBuild] = await (0, builds_1.getRecentBuildsForSubmissionAsync)((0, AppPlatform_1.toAppPlatform)(source.platform), source.projectId);
76
+ const [latestBuild] = await (0, builds_1.getRecentBuildsForSubmissionAsync)(graphqlClient, (0, AppPlatform_1.toAppPlatform)(source.platform), source.projectId);
77
77
  if (!latestBuild) {
78
78
  log_1.default.error(chalk_1.default.bold("Couldn't find any builds for this project on EAS servers. It looks like you haven't run 'eas build' yet."));
79
- return getArchiveAsync({
79
+ return getArchiveAsync(graphqlClient, {
80
80
  ...source,
81
81
  sourceType: ArchiveSourceType.prompt,
82
82
  });
@@ -91,29 +91,29 @@ async function handleLatestSourceAsync(source) {
91
91
  throw err;
92
92
  }
93
93
  }
94
- async function handlePathSourceAsync(source) {
94
+ async function handlePathSourceAsync(graphqlClient, source) {
95
95
  if (!(await (0, files_1.isExistingFileAsync)(source.path))) {
96
96
  log_1.default.error(chalk_1.default.bold(`${source.path} doesn't exist`));
97
- return getArchiveAsync({
97
+ return getArchiveAsync(graphqlClient, {
98
98
  ...source,
99
99
  sourceType: ArchiveSourceType.prompt,
100
100
  });
101
101
  }
102
102
  log_1.default.log('Uploading your app archive to the Expo Submission Service');
103
- const uploadUrl = await (0, files_1.uploadAppArchiveAsync)(source.path);
103
+ const uploadUrl = await (0, files_1.uploadAppArchiveAsync)(graphqlClient, source.path);
104
104
  return {
105
105
  url: uploadUrl,
106
106
  source,
107
107
  };
108
108
  }
109
- async function handleBuildIdSourceAsync(source) {
109
+ async function handleBuildIdSourceAsync(graphqlClient, source) {
110
110
  try {
111
- const build = await BuildQuery_1.BuildQuery.byIdAsync(source.id);
111
+ const build = await BuildQuery_1.BuildQuery.byIdAsync(graphqlClient, source.id);
112
112
  if (build.platform !== (0, AppPlatform_1.toAppPlatform)(source.platform)) {
113
113
  const expectedPlatformName = platform_1.appPlatformDisplayNames[(0, AppPlatform_1.toAppPlatform)(source.platform)];
114
114
  const receivedPlatformName = platform_1.appPlatformDisplayNames[build.platform];
115
115
  log_1.default.error(chalk_1.default.bold(`Build platform doesn't match! Expected ${expectedPlatformName} build but got ${receivedPlatformName}.`));
116
- return getArchiveAsync({
116
+ return getArchiveAsync(graphqlClient, {
117
117
  ...source,
118
118
  sourceType: ArchiveSourceType.prompt,
119
119
  });
@@ -128,24 +128,24 @@ async function handleBuildIdSourceAsync(source) {
128
128
  log_1.default.warn('Are you sure that the given ID corresponds to a build from EAS Build?');
129
129
  log_1.default.warn(`Build IDs from the classic build service (expo build:[android|ios]) are not supported. ${(0, log_1.learnMore)('https://docs.expo.dev/submit/classic-builds/')}`);
130
130
  log_1.default.debug('Original error:', err);
131
- return getArchiveAsync({
131
+ return getArchiveAsync(graphqlClient, {
132
132
  ...source,
133
133
  sourceType: ArchiveSourceType.prompt,
134
134
  });
135
135
  }
136
136
  }
137
- async function handleBuildListSourceAsync(source) {
137
+ async function handleBuildListSourceAsync(graphqlClient, source) {
138
138
  try {
139
139
  const appPlatform = (0, AppPlatform_1.toAppPlatform)(source.platform);
140
140
  const expiryDate = new Date(); // artifacts expire after 30 days
141
141
  expiryDate.setDate(expiryDate.getDate() - 30);
142
- const recentBuilds = await (0, builds_1.getRecentBuildsForSubmissionAsync)(appPlatform, source.projectId, {
142
+ const recentBuilds = await (0, builds_1.getRecentBuildsForSubmissionAsync)(graphqlClient, appPlatform, source.projectId, {
143
143
  limit: exports.BUILD_LIST_ITEM_COUNT,
144
144
  });
145
145
  if (recentBuilds.length < 1) {
146
146
  log_1.default.error(chalk_1.default.bold(`Couldn't find any ${platform_1.appPlatformDisplayNames[appPlatform]} builds for this project on EAS servers. ` +
147
147
  "It looks like you haven't run 'eas build' yet."));
148
- return getArchiveAsync({
148
+ return getArchiveAsync(graphqlClient, {
149
149
  ...source,
150
150
  sourceType: ArchiveSourceType.prompt,
151
151
  });
@@ -153,7 +153,7 @@ async function handleBuildListSourceAsync(source) {
153
153
  if (recentBuilds.every(it => new Date(it.updatedAt) < expiryDate)) {
154
154
  log_1.default.error(chalk_1.default.bold('It looks like all of your build artifacts have expired. ' +
155
155
  'EAS keeps your build artifacts only for 30 days.'));
156
- return getArchiveAsync({
156
+ return getArchiveAsync(graphqlClient, {
157
157
  ...source,
158
158
  sourceType: ArchiveSourceType.prompt,
159
159
  });
@@ -171,7 +171,7 @@ async function handleBuildListSourceAsync(source) {
171
171
  warn: 'This artifact has expired',
172
172
  });
173
173
  if (selectedBuild == null) {
174
- return getArchiveAsync({
174
+ return getArchiveAsync(graphqlClient, {
175
175
  ...source,
176
176
  sourceType: ArchiveSourceType.prompt,
177
177
  });
@@ -211,7 +211,7 @@ function formatBuildChoice(build, expiryDate) {
211
211
  disabled: buildDate < expiryDate,
212
212
  };
213
213
  }
214
- async function handlePromptSourceAsync(source) {
214
+ async function handlePromptSourceAsync(graphqlClient, source) {
215
215
  const { sourceType: sourceTypeRaw } = await (0, prompts_1.promptAsync)({
216
216
  name: 'sourceType',
217
217
  type: 'select',
@@ -236,7 +236,7 @@ async function handlePromptSourceAsync(source) {
236
236
  switch (sourceType) {
237
237
  case ArchiveSourceType.url: {
238
238
  const url = await askForArchiveUrlAsync(source.platform);
239
- return getArchiveAsync({
239
+ return getArchiveAsync(graphqlClient, {
240
240
  ...source,
241
241
  sourceType: ArchiveSourceType.url,
242
242
  url,
@@ -244,21 +244,21 @@ async function handlePromptSourceAsync(source) {
244
244
  }
245
245
  case ArchiveSourceType.path: {
246
246
  const path = await askForArchivePathAsync(source.platform);
247
- return getArchiveAsync({
247
+ return getArchiveAsync(graphqlClient, {
248
248
  ...source,
249
249
  sourceType: ArchiveSourceType.path,
250
250
  path,
251
251
  });
252
252
  }
253
253
  case ArchiveSourceType.buildList: {
254
- return getArchiveAsync({
254
+ return getArchiveAsync(graphqlClient, {
255
255
  ...source,
256
256
  sourceType: ArchiveSourceType.buildList,
257
257
  });
258
258
  }
259
259
  case ArchiveSourceType.buildId: {
260
260
  const id = await askForBuildIdAsync();
261
- return getArchiveAsync({
261
+ return getArchiveAsync(graphqlClient, {
262
262
  ...source,
263
263
  sourceType: ArchiveSourceType.buildId,
264
264
  id,
@@ -13,7 +13,7 @@ class AndroidSubmitter extends BaseSubmitter_1.default {
13
13
  constructor(ctx, options) {
14
14
  const sourceOptionsResolver = {
15
15
  // eslint-disable-next-line async-protect/async-suffix
16
- archive: async () => await (0, ArchiveSource_1.getArchiveAsync)(this.options.archiveSource),
16
+ archive: async () => await (0, ArchiveSource_1.getArchiveAsync)(ctx.graphqlClient, this.options.archiveSource),
17
17
  // eslint-disable-next-line async-protect/async-suffix
18
18
  serviceAccountKeyResult: async () => {
19
19
  return await (0, ServiceAccountSource_1.getServiceAccountKeyResultAsync)(this.ctx, this.options.serviceAccountSource);
@@ -44,7 +44,7 @@ class AndroidSubmitter extends BaseSubmitter_1.default {
44
44
  };
45
45
  }
46
46
  async createPlatformSubmissionAsync({ projectId, submissionConfig, buildId, }) {
47
- return await SubmissionMutation_1.SubmissionMutation.createAndroidSubmissionAsync({
47
+ return await SubmissionMutation_1.SubmissionMutation.createAndroidSubmissionAsync(this.ctx.graphqlClient, {
48
48
  appId: projectId,
49
49
  config: submissionConfig,
50
50
  submittedBuildId: buildId,
@@ -2,6 +2,7 @@ import { ExpoConfig } from '@expo/config';
2
2
  import { Platform } from '@expo/eas-build-job';
3
3
  import { SubmitProfile } from '@expo/eas-json';
4
4
  import { TrackingContext } from '../analytics/common';
5
+ import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
5
6
  import { CredentialsContext } from '../credentials/context';
6
7
  import { Actor } from '../user/User';
7
8
  export interface SubmissionContext<T extends Platform> {
@@ -17,6 +18,7 @@ export interface SubmissionContext<T extends Platform> {
17
18
  projectId: string;
18
19
  projectName: string;
19
20
  user: Actor;
21
+ graphqlClient: ExpoGraphqlClient;
20
22
  applicationIdentifierOverride?: string;
21
23
  }
22
24
  export interface SubmitArchiveFlags {
@@ -35,6 +37,7 @@ export declare function createSubmissionContextAsync<T extends Platform>(params:
35
37
  projectDir: string;
36
38
  applicationIdentifier?: string;
37
39
  actor: Actor;
40
+ graphqlClient: ExpoGraphqlClient;
38
41
  exp: ExpoConfig;
39
42
  projectId: string;
40
43
  }): Promise<SubmissionContext<T>>;
@@ -6,16 +6,17 @@ const events_1 = require("../analytics/events");
6
6
  const context_1 = require("../credentials/context");
7
7
  const projectUtils_1 = require("../project/projectUtils");
8
8
  async function createSubmissionContextAsync(params) {
9
- const { applicationIdentifier, projectDir, nonInteractive, actor, exp, projectId } = params;
9
+ const { applicationIdentifier, projectDir, nonInteractive, actor, exp, projectId, graphqlClient, } = params;
10
10
  const { env, ...rest } = params;
11
11
  const projectName = exp.slug;
12
- const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(projectId);
12
+ const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(graphqlClient, projectId);
13
13
  const accountId = account.id;
14
14
  let credentialsCtx = params.credentialsCtx;
15
15
  if (!credentialsCtx) {
16
16
  credentialsCtx = new context_1.CredentialsContext({
17
17
  projectDir,
18
18
  user: actor,
19
+ graphqlClient,
19
20
  projectInfo: { exp, projectId },
20
21
  nonInteractive,
21
22
  });
@@ -15,7 +15,7 @@ class IosSubmitter extends BaseSubmitter_1.default {
15
15
  constructor(ctx, options) {
16
16
  const sourceOptionsResolver = {
17
17
  // eslint-disable-next-line async-protect/async-suffix
18
- archive: async () => await (0, ArchiveSource_1.getArchiveAsync)(this.options.archiveSource),
18
+ archive: async () => await (0, ArchiveSource_1.getArchiveAsync)(ctx.graphqlClient, this.options.archiveSource),
19
19
  // eslint-disable-next-line async-protect/async-suffix
20
20
  credentials: async () => {
21
21
  const maybeAppSpecificPassword = this.options.appSpecificPasswordSource
@@ -59,7 +59,7 @@ class IosSubmitter extends BaseSubmitter_1.default {
59
59
  };
60
60
  }
61
61
  async createPlatformSubmissionAsync({ projectId, submissionConfig, buildId, }) {
62
- return await SubmissionMutation_1.SubmissionMutation.createIosSubmissionAsync({
62
+ return await SubmissionMutation_1.SubmissionMutation.createIosSubmissionAsync(this.ctx.graphqlClient, {
63
63
  appId: projectId,
64
64
  config: submissionConfig,
65
65
  submittedBuildId: buildId,
@@ -1,8 +1,9 @@
1
1
  import { Platform } from '@expo/eas-build-job';
2
+ import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
2
3
  import { SubmissionFragment } from '../graphql/generated';
3
4
  import { SubmissionContext } from './context';
4
5
  export declare function submitAsync<T extends Platform>(ctx: SubmissionContext<T>): Promise<SubmissionFragment>;
5
- export declare function waitToCompleteAsync(submissions: SubmissionFragment[], { verbose }?: {
6
+ export declare function waitToCompleteAsync(graphqlClient: ExpoGraphqlClient, submissions: SubmissionFragment[], { verbose }?: {
6
7
  verbose?: boolean;
7
8
  }): Promise<SubmissionFragment[]>;
8
9
  export declare function exitWithNonZeroCodeIfSomeSubmissionsDidntFinish(submissions: SubmissionFragment[]): void;
@@ -27,9 +27,9 @@ async function submitAsync(ctx) {
27
27
  });
28
28
  }
29
29
  exports.submitAsync = submitAsync;
30
- async function waitToCompleteAsync(submissions, { verbose = false } = {}) {
30
+ async function waitToCompleteAsync(graphqlClient, submissions, { verbose = false } = {}) {
31
31
  log_1.default.newLine();
32
- const completedSubmissions = await (0, wait_1.waitForSubmissionsEndAsync)(submissions);
32
+ const completedSubmissions = await (0, wait_1.waitForSubmissionsEndAsync)(graphqlClient, submissions);
33
33
  const moreSubmissions = completedSubmissions.length > 1;
34
34
  if (moreSubmissions) {
35
35
  log_1.default.newLine();
@@ -1,4 +1,5 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { AppPlatform, BuildFragment } from '../../graphql/generated';
2
- export declare function getRecentBuildsForSubmissionAsync(platform: AppPlatform, appId: string, { limit }?: {
3
+ export declare function getRecentBuildsForSubmissionAsync(graphqlClient: ExpoGraphqlClient, platform: AppPlatform, appId: string, { limit }?: {
3
4
  limit?: number;
4
5
  }): Promise<BuildFragment[]>;
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRecentBuildsForSubmissionAsync = void 0;
4
4
  const generated_1 = require("../../graphql/generated");
5
5
  const BuildQuery_1 = require("../../graphql/queries/BuildQuery");
6
- async function getRecentBuildsForSubmissionAsync(platform, appId, { limit = 1 } = {}) {
7
- return await BuildQuery_1.BuildQuery.viewBuildsOnAppAsync({
6
+ async function getRecentBuildsForSubmissionAsync(graphqlClient, platform, appId, { limit = 1 } = {}) {
7
+ return await BuildQuery_1.BuildQuery.viewBuildsOnAppAsync(graphqlClient, {
8
8
  appId,
9
9
  limit,
10
10
  offset: 0,
@@ -1,2 +1,5 @@
1
1
  import { SubmissionError } from '../../graphql/generated';
2
+ /**
3
+ * Returns a boolean indicating whether the submission logs should be printed.
4
+ */
2
5
  export declare function printSubmissionError(error: SubmissionError): boolean;
@@ -2,76 +2,24 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.printSubmissionError = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const log_1 = tslib_1.__importStar(require("../../log"));
6
- var SubmissionErrorCode;
7
- (function (SubmissionErrorCode) {
8
- SubmissionErrorCode["ARCHIVE_DOWNLOAD_NOT_FOUND_ERROR"] = "SUBMISSION_SERVICE_COMMON_ARCHIVE_DOWNLOAD_NOT_FOUND_ERROR";
9
- SubmissionErrorCode["ARCHIVE_DOWNLOAD_FORBIDDEN_ERROR"] = "SUBMISSION_SERVICE_COMMON_ARCHIVE_DOWNLOAD_FORBIDDEN_ERROR";
10
- SubmissionErrorCode["ARCHIVE_EXTRACT_NO_FILES_FOUND_ERROR"] = "SUBMISSION_SERVICE_COMMON_ARCHIVE_EXTRACT_NO_FILES_FOUND_ERROR";
11
- SubmissionErrorCode["ARCHIVE_EXTRACT_CORRUPT_ARCHIVE_ERROR"] = "SUBMISSION_SERVICE_COMMON_ARCHIVE_EXTRACT_CORRUPT_ARCHIVE_ERROR";
12
- SubmissionErrorCode["UPLOAD_TAKING_TOO_LONG_ERROR"] = "SUBMISSION_SERVICE_COMMON_UPLOAD_TAKING_TOO_LONG_ERROR";
13
- SubmissionErrorCode["ANDROID_UNKNOWN_ERROR"] = "SUBMISSION_SERVICE_ANDROID_UNKNOWN_ERROR";
14
- SubmissionErrorCode["ANDROID_FIRST_UPLOAD_ERROR"] = "SUBMISSION_SERVICE_ANDROID_FIRST_UPLOAD_ERROR";
15
- SubmissionErrorCode["ANDROID_OLD_VERSION_CODE_ERROR"] = "SUBMISSION_SERVICE_ANDROID_OLD_VERSION_CODE_ERROR";
16
- SubmissionErrorCode["ANDROID_MISSING_PRIVACY_POLICY"] = "SUBMISSION_SERVICE_ANDROID_MISSING_PRIVACY_POLICY";
17
- SubmissionErrorCode["IOS_OLD_VERSION_CODE_ERROR"] = "SUBMISSION_SERVICE_IOS_OLD_VERSION_CODE_ERROR";
18
- SubmissionErrorCode["IOS_UNKNOWN_ERROR"] = "SUBMISSION_SERVICE_IOS_UNKNOWN_ERROR";
19
- SubmissionErrorCode["IOS_MISSING_APP_ICON"] = "SUBMISSION_SERVICE_IOS_MISSING_APP_ICON";
20
- SubmissionErrorCode["IOS_INVALID_SIGNATURE"] = "SUBMISSION_SERVICE_IOS_INVALID_SIGNATURE";
21
- SubmissionErrorCode["IOS_INCORRECT_CREDENTIALS"] = "SUBMISSION_SERVICE_IOS_INVALID_CREDENTIALS";
22
- SubmissionErrorCode["IOS_IPAD_INVALID_ORIENTATION"] = "SUBMISSION_SERVICE_IOS_IPAD_INVALID_ORIENTATION";
23
- SubmissionErrorCode["IOS_APPLE_MAINTENANCE"] = "SUBMISSION_SERVICE_IOS_APPLE_MAINTENANCE";
24
- SubmissionErrorCode["IOS_INVALID_PROVISIONING_PROFILE_SIGNATURE"] = "SUBMISSION_SERVICE_IOS_INVALID_PROVISIONING_PROFILE_SIGNATURE";
25
- SubmissionErrorCode["IOS_SIGNED_WITH_ADHOC_PROFILE"] = "SUBMISSION_SERVICE_IOS_SIGNED_WITH_ADHOC_PROFILE";
26
- })(SubmissionErrorCode || (SubmissionErrorCode = {}));
27
- const SubmissionErrorMessages = {
28
- [SubmissionErrorCode.ARCHIVE_DOWNLOAD_NOT_FOUND_ERROR]: "Failed to download the archive file (Response code: 404 Not Found). Make sure the URL you've provided is correct.",
29
- [SubmissionErrorCode.ARCHIVE_DOWNLOAD_FORBIDDEN_ERROR]: 'Failed to download the archive file (Response code: 403 Forbidden). This is most probably caused by trying to upload an expired build artifact. All EAS build artifacts expire after 30 days.',
30
- [SubmissionErrorCode.ARCHIVE_EXTRACT_CORRUPT_ARCHIVE_ERROR]: 'The compressed archive is corrupt, in an unsupported format, or contains an invalid application format. Supported files include .apk, .aab, and .ipa files and one of these files compressed into a .tar.gz archive.',
31
- [SubmissionErrorCode.ARCHIVE_EXTRACT_NO_FILES_FOUND_ERROR]: "EAS Submit couldn't find a valid build artifact within provided compressed archive.\n" +
32
- 'If you provide a tar.gz archive, it should contain at least one .apk/.aab/.ipa file, depending on the submission platform.',
33
- [SubmissionErrorCode.ANDROID_UNKNOWN_ERROR]: "We couldn't figure out what went wrong. See logs to learn more.",
34
- [SubmissionErrorCode.ANDROID_FIRST_UPLOAD_ERROR]: "You haven't submitted this app to Google Play Store yet. The first submission of the app needs to be performed manually.\n" +
35
- `${(0, log_1.learnMore)('https://expo.fyi/first-android-submission')}.`,
36
- [SubmissionErrorCode.ANDROID_OLD_VERSION_CODE_ERROR]: "You've already submitted this version of the app.\n" +
37
- 'Versions are identified by Android version code (expo.android.versionCode in app.json).\n' +
38
- "If you're submitting a managed Expo project, increment the version code in app.json and build the project with eas build.\n" +
39
- `${(0, log_1.learnMore)('https://expo.fyi/bumping-android-version-code')}.`,
40
- [SubmissionErrorCode.ANDROID_MISSING_PRIVACY_POLICY]: 'The app has permissions that require a privacy policy set for the app.\n' +
41
- `${(0, log_1.learnMore)('https://expo.fyi/missing-privacy-policy')}.`,
42
- [SubmissionErrorCode.IOS_OLD_VERSION_CODE_ERROR]: "You've already submitted this version of the app.\n" +
43
- 'Versions are identified by Build Numbers (expo.ios.buildNumber in app.json).\n' +
44
- "If you're submitting an Expo project built with EAS Build, increment the build number in app.json and build the project again.\n" +
45
- `${(0, log_1.learnMore)('https://expo.fyi/bumping-ios-build-number')}.`,
46
- [SubmissionErrorCode.IOS_UNKNOWN_ERROR]: "We couldn't figure out what went wrong. See logs to learn more.",
47
- [SubmissionErrorCode.IOS_MISSING_APP_ICON]: 'Your iOS app icon is missing or is an invalid format. The icon must be a 1024x1024 PNG image with no transparency.\n' +
48
- 'Check your icon image and icon configuration in app.json.\n' +
49
- `${(0, log_1.learnMore)('https://docs.expo.dev/guides/app-icons/')}`,
50
- [SubmissionErrorCode.IOS_INVALID_SIGNATURE]: 'Your app signature seems to be invalid.\n' +
51
- "Check your iOS Distribution Certificate and your app's Provisioning Profile.\n" +
52
- `${(0, log_1.learnMore)('https://docs.expo.dev/distribution/app-signing')}`,
53
- [SubmissionErrorCode.IOS_INCORRECT_CREDENTIALS]: 'Your Apple ID or app-specific password is incorrect. Verify that you entered them correctly and try again.',
54
- [SubmissionErrorCode.IOS_IPAD_INVALID_ORIENTATION]: "Your app doesn't support iPad multitasking and has to require full screen.\n" +
55
- "If you're submitting a managed Expo project, set the `expo.ios.requireFullScreen` to true in app.json and build the project again.\n" +
56
- `${(0, log_1.learnMore)('https://expo.fyi/ipad-requires-fullscreen')}`,
57
- [SubmissionErrorCode.IOS_APPLE_MAINTENANCE]: 'It looks like Apple servers are undergoing an unscheduled maintenance. Try again later.',
58
- [SubmissionErrorCode.IOS_INVALID_PROVISIONING_PROFILE_SIGNATURE]: 'Invalid Provisioning Profile Signature (ITMS-90165)\n' +
59
- "Some of Apple's certificates have expired.\n" +
60
- 'Delete your Provisioning Profile from your account. Then rebuild the app interactively to generate a new one, and try submitting it to the App Store again.',
61
- [SubmissionErrorCode.UPLOAD_TAKING_TOO_LONG_ERROR]: 'Submission has reached the timeout limit. Try again.',
62
- [SubmissionErrorCode.IOS_SIGNED_WITH_ADHOC_PROFILE]: 'Invalid Provisioning Profile for Apple App Store distribution. The application was signed with an Ad Hoc/Enterprise Provisioning Profile, which is meant for "Internal Distribution". In order to distribute an app on the store, it must be signed with a Distribution Provisioning Profile. Ensure that you are submitting the correct build, or rebuild the application with a Distribution Provisioning Profile and submit that new build.',
63
- };
5
+ const log_1 = tslib_1.__importDefault(require("../../log"));
6
+ const UNKNOWN_ERROR_CODES = [
7
+ 'SUBMISSION_SERVICE_ANDROID_UNKNOWN_ERROR',
8
+ 'SUBMISSION_SERVICE_IOS_UNKNOWN_ERROR',
9
+ ];
10
+ /**
11
+ * Returns a boolean indicating whether the submission logs should be printed.
12
+ */
64
13
  function printSubmissionError(error) {
65
- if (error.errorCode &&
66
- Object.values(SubmissionErrorCode).includes(error.errorCode)) {
67
- const errorCode = error.errorCode;
68
- log_1.default.addNewLineIfNone();
69
- log_1.default.error(SubmissionErrorMessages[errorCode]);
70
- return [SubmissionErrorCode.ANDROID_UNKNOWN_ERROR, SubmissionErrorCode.IOS_UNKNOWN_ERROR].some(code => code === errorCode);
14
+ var _a;
15
+ log_1.default.addNewLineIfNone();
16
+ if (!error.message || (error.errorCode && UNKNOWN_ERROR_CODES.includes(error.errorCode))) {
17
+ log_1.default.error((_a = error.message) !== null && _a !== void 0 ? _a : `We couldn't figure out what went wrong. See logs to learn more.`);
18
+ return true;
71
19
  }
72
20
  else {
73
- log_1.default.log(error.message);
74
- return true;
21
+ log_1.default.error(error.message);
22
+ return false;
75
23
  }
76
24
  }
77
25
  exports.printSubmissionError = printSubmissionError;
@@ -1,2 +1,3 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  export declare function isExistingFileAsync(filePath: string): Promise<boolean>;
2
- export declare function uploadAppArchiveAsync(path: string): Promise<string>;
3
+ export declare function uploadAppArchiveAsync(graphqlClient: ExpoGraphqlClient, path: string): Promise<string>;
@@ -16,9 +16,9 @@ async function isExistingFileAsync(filePath) {
16
16
  }
17
17
  }
18
18
  exports.isExistingFileAsync = isExistingFileAsync;
19
- async function uploadAppArchiveAsync(path) {
19
+ async function uploadAppArchiveAsync(graphqlClient, path) {
20
20
  const fileSize = (await fs_extra_1.default.stat(path)).size;
21
- const { url } = await (0, uploads_1.uploadFileAtPathToS3Async)(generated_1.UploadSessionType.EasSubmitAppArchive, path, (0, progress_1.createProgressTracker)({
21
+ const { url } = await (0, uploads_1.uploadFileAtPathToS3Async)(graphqlClient, generated_1.UploadSessionType.EasSubmitAppArchive, path, (0, progress_1.createProgressTracker)({
22
22
  total: fileSize,
23
23
  message: 'Uploading to EAS Submit',
24
24
  completedMessage: 'Uploaded to EAS Submit',
@@ -1,2 +1,3 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { SubmissionFragment } from '../../graphql/generated';
2
- export declare function waitForSubmissionsEndAsync(initialSubmissions: SubmissionFragment[]): Promise<SubmissionFragment[]>;
3
+ export declare function waitForSubmissionsEndAsync(graphqlClient: ExpoGraphqlClient, initialSubmissions: SubmissionFragment[]): Promise<SubmissionFragment[]>;
@@ -13,13 +13,13 @@ const APP_STORE_NAMES = {
13
13
  [generated_1.AppPlatform.Ios]: 'Apple App Store Connect',
14
14
  };
15
15
  const CHECK_INTERVAL_MS = 5000;
16
- async function waitForSubmissionsEndAsync(initialSubmissions) {
16
+ async function waitForSubmissionsEndAsync(graphqlClient, initialSubmissions) {
17
17
  log_1.default.log(`Waiting for submission${initialSubmissions.length > 1 ? 's' : ''} to complete. You can press Ctrl+C to exit.`);
18
18
  const spinner = (0, ora_1.ora)(`Submitting`).start();
19
19
  while (true) {
20
20
  const submissions = await Promise.all(initialSubmissions.map(({ id }) => {
21
21
  try {
22
- return SubmissionQuery_1.SubmissionQuery.byIdAsync(id, { useCache: false });
22
+ return SubmissionQuery_1.SubmissionQuery.byIdAsync(graphqlClient, id, { useCache: false });
23
23
  }
24
24
  catch (err) {
25
25
  log_1.default.debug('Failed to fetch the submission status', err);
@@ -1,4 +1,5 @@
1
1
  import { ExpoConfig } from '@expo/config';
2
- export declare function syncUpdatesConfigurationAsync(projectDir: string, exp: ExpoConfig, projectId: string): Promise<void>;
2
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
3
+ export declare function syncUpdatesConfigurationAsync(graphqlClient: ExpoGraphqlClient, projectDir: string, exp: ExpoConfig, projectId: string): Promise<void>;
3
4
  export declare function readReleaseChannelSafelyAsync(projectDir: string): Promise<string | null>;
4
5
  export declare function readChannelSafelyAsync(projectDir: string): Promise<string | null>;
@@ -5,9 +5,9 @@ const config_plugins_1 = require("@expo/config-plugins");
5
5
  const platform_1 = require("../../platform");
6
6
  const projectUtils_1 = require("../../project/projectUtils");
7
7
  const utils_1 = require("../utils");
8
- async function syncUpdatesConfigurationAsync(projectDir, exp, projectId) {
8
+ async function syncUpdatesConfigurationAsync(graphqlClient, projectDir, exp, projectId) {
9
9
  (0, utils_1.ensureValidVersions)(exp, platform_1.RequestedPlatform.Android);
10
- const accountName = (await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(projectId)).name;
10
+ const accountName = (await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(graphqlClient, projectId)).name;
11
11
  const androidManifestPath = await config_plugins_1.AndroidConfig.Paths.getAndroidManifestAsync(projectDir);
12
12
  const androidManifest = await getAndroidManifestAsync(projectDir);
13
13
  const updatedAndroidManifest = config_plugins_1.AndroidConfig.Updates.setUpdatesConfig(projectDir, exp, androidManifest, accountName);
@@ -1,4 +1,5 @@
1
1
  import { ExpoConfig } from '@expo/config';
2
- export declare function syncUpdatesConfigurationAsync(projectDir: string, exp: ExpoConfig, projectId: string): Promise<void>;
2
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
3
+ export declare function syncUpdatesConfigurationAsync(graphqlClient: ExpoGraphqlClient, projectDir: string, exp: ExpoConfig, projectId: string): Promise<void>;
3
4
  export declare function readReleaseChannelSafelyAsync(projectDir: string): Promise<string | null>;
4
5
  export declare function readChannelSafelyAsync(projectDir: string): Promise<string | null>;
@@ -7,9 +7,9 @@ const projectUtils_1 = require("../../project/projectUtils");
7
7
  const plist_1 = require("../../utils/plist");
8
8
  const vcs_1 = require("../../vcs");
9
9
  const utils_1 = require("../utils");
10
- async function syncUpdatesConfigurationAsync(projectDir, exp, projectId) {
10
+ async function syncUpdatesConfigurationAsync(graphqlClient, projectDir, exp, projectId) {
11
11
  (0, utils_1.ensureValidVersions)(exp, platform_1.RequestedPlatform.Ios);
12
- const accountName = (await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(projectId)).name;
12
+ const accountName = (await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(graphqlClient, projectId)).name;
13
13
  const expoPlist = await readExpoPlistAsync(projectDir);
14
14
  const updatedExpoPlist = config_plugins_1.IOSConfig.Updates.setUpdatesConfig(projectDir, exp, expoPlist, accountName);
15
15
  await writeExpoPlistAsync(projectDir, updatedExpoPlist);
@@ -1,17 +1,18 @@
1
+ import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { PaginatedQueryOptions } from '../commandUtils/pagination';
2
3
  import { UpdateFragment } from '../graphql/generated';
3
4
  export declare const UPDATES_LIMIT = 50;
4
5
  export declare const UPDATE_GROUPS_LIMIT = 25;
5
- export declare function listAndRenderUpdateGroupsOnAppAsync({ projectId, paginatedQueryOptions, }: {
6
+ export declare function listAndRenderUpdateGroupsOnAppAsync(graphqlClient: ExpoGraphqlClient, { projectId, paginatedQueryOptions, }: {
6
7
  projectId: string;
7
8
  paginatedQueryOptions: PaginatedQueryOptions;
8
9
  }): Promise<void>;
9
- export declare function listAndRenderUpdateGroupsOnBranchAsync({ projectId, branchName, paginatedQueryOptions, }: {
10
+ export declare function listAndRenderUpdateGroupsOnBranchAsync(graphqlClient: ExpoGraphqlClient, { projectId, branchName, paginatedQueryOptions, }: {
10
11
  projectId: string;
11
12
  branchName: string;
12
13
  paginatedQueryOptions: PaginatedQueryOptions;
13
14
  }): Promise<void>;
14
- export declare function selectUpdateGroupOnBranchAsync({ projectId, branchName, paginatedQueryOptions, }: {
15
+ export declare function selectUpdateGroupOnBranchAsync(graphqlClient: ExpoGraphqlClient, { projectId, branchName, paginatedQueryOptions, }: {
15
16
  projectId: string;
16
17
  branchName: string;
17
18
  paginatedQueryOptions: PaginatedQueryOptions;
@@ -13,10 +13,10 @@ const queries_1 = require("../utils/queries");
13
13
  const utils_1 = require("./utils");
14
14
  exports.UPDATES_LIMIT = 50;
15
15
  exports.UPDATE_GROUPS_LIMIT = 25;
16
- async function listAndRenderUpdateGroupsOnAppAsync({ projectId, paginatedQueryOptions, }) {
16
+ async function listAndRenderUpdateGroupsOnAppAsync(graphqlClient, { projectId, paginatedQueryOptions, }) {
17
17
  var _a, _b;
18
18
  if (paginatedQueryOptions.nonInteractive) {
19
- const updateGroups = await queryUpdateGroupsOnAppAsync({
19
+ const updateGroups = await queryUpdateGroupsOnAppAsync(graphqlClient, {
20
20
  limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.UPDATE_GROUPS_LIMIT,
21
21
  offset: paginatedQueryOptions.offset,
22
22
  appId: projectId,
@@ -27,7 +27,7 @@ async function listAndRenderUpdateGroupsOnAppAsync({ projectId, paginatedQueryOp
27
27
  await (0, queries_1.paginatedQueryWithConfirmPromptAsync)({
28
28
  limit: (_b = paginatedQueryOptions.limit) !== null && _b !== void 0 ? _b : exports.UPDATE_GROUPS_LIMIT,
29
29
  offset: paginatedQueryOptions.offset,
30
- queryToPerform: (limit, offset) => queryUpdateGroupsOnAppAsync({ limit, offset, appId: projectId }),
30
+ queryToPerform: (limit, offset) => queryUpdateGroupsOnAppAsync(graphqlClient, { limit, offset, appId: projectId }),
31
31
  promptOptions: {
32
32
  title: 'Load more update groups?',
33
33
  renderListItems: updateGroups => renderUpdateGroupsOnAppAsTable(updateGroups, paginatedQueryOptions),
@@ -36,10 +36,10 @@ async function listAndRenderUpdateGroupsOnAppAsync({ projectId, paginatedQueryOp
36
36
  }
37
37
  }
38
38
  exports.listAndRenderUpdateGroupsOnAppAsync = listAndRenderUpdateGroupsOnAppAsync;
39
- async function listAndRenderUpdateGroupsOnBranchAsync({ projectId, branchName, paginatedQueryOptions, }) {
39
+ async function listAndRenderUpdateGroupsOnBranchAsync(graphqlClient, { projectId, branchName, paginatedQueryOptions, }) {
40
40
  var _a, _b;
41
41
  if (paginatedQueryOptions.nonInteractive) {
42
- const updateGroups = await queryUpdateGroupsOnBranchAsync({
42
+ const updateGroups = await queryUpdateGroupsOnBranchAsync(graphqlClient, {
43
43
  limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.UPDATE_GROUPS_LIMIT,
44
44
  offset: paginatedQueryOptions.offset,
45
45
  appId: projectId,
@@ -51,7 +51,12 @@ async function listAndRenderUpdateGroupsOnBranchAsync({ projectId, branchName, p
51
51
  await (0, queries_1.paginatedQueryWithConfirmPromptAsync)({
52
52
  limit: (_b = paginatedQueryOptions.limit) !== null && _b !== void 0 ? _b : exports.UPDATE_GROUPS_LIMIT,
53
53
  offset: paginatedQueryOptions.offset,
54
- queryToPerform: (limit, offset) => queryUpdateGroupsOnBranchAsync({ limit, offset, appId: projectId, branchName }),
54
+ queryToPerform: (limit, offset) => queryUpdateGroupsOnBranchAsync(graphqlClient, {
55
+ limit,
56
+ offset,
57
+ appId: projectId,
58
+ branchName,
59
+ }),
55
60
  promptOptions: {
56
61
  title: 'Load more update groups?',
57
62
  renderListItems: updateGroups => renderUpdateGroupsOnBranchAsTable({ updateGroups, branchName, paginatedQueryOptions }),
@@ -60,7 +65,7 @@ async function listAndRenderUpdateGroupsOnBranchAsync({ projectId, branchName, p
60
65
  }
61
66
  }
62
67
  exports.listAndRenderUpdateGroupsOnBranchAsync = listAndRenderUpdateGroupsOnBranchAsync;
63
- async function selectUpdateGroupOnBranchAsync({ projectId, branchName, paginatedQueryOptions, }) {
68
+ async function selectUpdateGroupOnBranchAsync(graphqlClient, { projectId, branchName, paginatedQueryOptions, }) {
64
69
  var _a;
65
70
  if (paginatedQueryOptions.nonInteractive) {
66
71
  throw new Error('Unable to select an update in non-interactive mode.');
@@ -68,7 +73,12 @@ async function selectUpdateGroupOnBranchAsync({ projectId, branchName, paginated
68
73
  const updateGroup = await (0, queries_1.paginatedQueryWithSelectPromptAsync)({
69
74
  limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.UPDATE_GROUPS_LIMIT,
70
75
  offset: paginatedQueryOptions.offset,
71
- queryToPerform: (limit, offset) => queryUpdateGroupsOnBranchAsync({ appId: projectId, branchName, limit, offset }),
76
+ queryToPerform: (limit, offset) => queryUpdateGroupsOnBranchAsync(graphqlClient, {
77
+ appId: projectId,
78
+ branchName,
79
+ limit,
80
+ offset,
81
+ }),
72
82
  promptOptions: {
73
83
  title: 'Load more update groups?',
74
84
  createDisplayTextForSelectionPromptListItem: updateGroup => (0, utils_1.formatUpdateTitle)(updateGroup[0]),
@@ -81,11 +91,11 @@ async function selectUpdateGroupOnBranchAsync({ projectId, branchName, paginated
81
91
  return updateGroup;
82
92
  }
83
93
  exports.selectUpdateGroupOnBranchAsync = selectUpdateGroupOnBranchAsync;
84
- async function queryUpdateGroupsOnBranchAsync(args) {
85
- return await UpdateQuery_1.UpdateQuery.viewUpdateGroupsOnBranchAsync(args);
94
+ async function queryUpdateGroupsOnBranchAsync(graphqlClient, args) {
95
+ return await UpdateQuery_1.UpdateQuery.viewUpdateGroupsOnBranchAsync(graphqlClient, args);
86
96
  }
87
- async function queryUpdateGroupsOnAppAsync(args) {
88
- return await UpdateQuery_1.UpdateQuery.viewUpdateGroupsOnAppAsync(args);
97
+ async function queryUpdateGroupsOnAppAsync(graphqlClient, args) {
98
+ return await UpdateQuery_1.UpdateQuery.viewUpdateGroupsOnAppAsync(graphqlClient, args);
89
99
  }
90
100
  function renderUpdateGroupsOnBranchAsTable({ updateGroups, branchName, paginatedQueryOptions: { json }, }) {
91
101
  var _a, _b;