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
@@ -8,8 +8,8 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
8
8
  const client_1 = require("../../../../../graphql/client");
9
9
  const IosAppBuildCredentials_1 = require("../../../../../graphql/types/credentials/IosAppBuildCredentials");
10
10
  exports.IosAppBuildCredentialsMutation = {
11
- async createIosAppBuildCredentialsAsync(iosAppBuildCredentialsInput, iosAppCredentialsId) {
12
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
11
+ async createIosAppBuildCredentialsAsync(graphqlClient, iosAppBuildCredentialsInput, iosAppCredentialsId) {
12
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
13
13
  .mutation((0, graphql_tag_1.default) `
14
14
  mutation CreateIosAppBuildCredentialsMutation(
15
15
  $iosAppBuildCredentialsInput: IosAppBuildCredentialsInput!
@@ -33,8 +33,8 @@ exports.IosAppBuildCredentialsMutation = {
33
33
  .toPromise());
34
34
  return data.iosAppBuildCredentials.createIosAppBuildCredentials;
35
35
  },
36
- async setDistributionCertificateAsync(iosAppBuildCredentialsId, distributionCertificateId) {
37
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
36
+ async setDistributionCertificateAsync(graphqlClient, iosAppBuildCredentialsId, distributionCertificateId) {
37
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
38
38
  .mutation((0, graphql_tag_1.default) `
39
39
  mutation SetDistributionCertificateMutation(
40
40
  $iosAppBuildCredentialsId: ID!
@@ -58,8 +58,8 @@ exports.IosAppBuildCredentialsMutation = {
58
58
  .toPromise());
59
59
  return data.iosAppBuildCredentials.setDistributionCertificate;
60
60
  },
61
- async setProvisioningProfileAsync(iosAppBuildCredentialsId, provisioningProfileId) {
62
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
61
+ async setProvisioningProfileAsync(graphqlClient, iosAppBuildCredentialsId, provisioningProfileId) {
62
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
63
63
  .mutation((0, graphql_tag_1.default) `
64
64
  mutation SetProvisioningProfileMutation(
65
65
  $iosAppBuildCredentialsId: ID!
@@ -1,6 +1,7 @@
1
+ import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { CommonIosAppCredentialsFragment, IosAppCredentialsInput } from '../../../../../graphql/generated';
2
3
  export declare const IosAppCredentialsMutation: {
3
- createIosAppCredentialsAsync(iosAppCredentialsInput: IosAppCredentialsInput, appId: string, appleAppIdentifierId: string): Promise<CommonIosAppCredentialsFragment>;
4
- setPushKeyAsync(iosAppCredentialsId: string, pushKeyId: string): Promise<CommonIosAppCredentialsFragment>;
5
- setAppStoreConnectApiKeyForSubmissionsAsync(iosAppCredentialsId: string, ascApiKeyId: string): Promise<CommonIosAppCredentialsFragment>;
4
+ createIosAppCredentialsAsync(graphqlClient: ExpoGraphqlClient, iosAppCredentialsInput: IosAppCredentialsInput, appId: string, appleAppIdentifierId: string): Promise<CommonIosAppCredentialsFragment>;
5
+ setPushKeyAsync(graphqlClient: ExpoGraphqlClient, iosAppCredentialsId: string, pushKeyId: string): Promise<CommonIosAppCredentialsFragment>;
6
+ setAppStoreConnectApiKeyForSubmissionsAsync(graphqlClient: ExpoGraphqlClient, iosAppCredentialsId: string, ascApiKeyId: string): Promise<CommonIosAppCredentialsFragment>;
6
7
  };
@@ -8,8 +8,8 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
8
8
  const client_1 = require("../../../../../graphql/client");
9
9
  const IosAppCredentials_1 = require("../../../../../graphql/types/credentials/IosAppCredentials");
10
10
  exports.IosAppCredentialsMutation = {
11
- async createIosAppCredentialsAsync(iosAppCredentialsInput, appId, appleAppIdentifierId) {
12
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
11
+ async createIosAppCredentialsAsync(graphqlClient, iosAppCredentialsInput, appId, appleAppIdentifierId) {
12
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
13
13
  .mutation((0, graphql_tag_1.default) `
14
14
  mutation CreateIosAppCredentialsMutation(
15
15
  $iosAppCredentialsInput: IosAppCredentialsInput!
@@ -37,8 +37,8 @@ exports.IosAppCredentialsMutation = {
37
37
  (0, assert_1.default)(data.iosAppCredentials.createIosAppCredentials, 'GraphQL: `createIosAppCredentials` not defined in server response');
38
38
  return data.iosAppCredentials.createIosAppCredentials;
39
39
  },
40
- async setPushKeyAsync(iosAppCredentialsId, pushKeyId) {
41
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
40
+ async setPushKeyAsync(graphqlClient, iosAppCredentialsId, pushKeyId) {
41
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
42
42
  .mutation((0, graphql_tag_1.default) `
43
43
  mutation SetPushKeyMutation($iosAppCredentialsId: ID!, $pushKeyId: ID!) {
44
44
  iosAppCredentials {
@@ -56,8 +56,8 @@ exports.IosAppCredentialsMutation = {
56
56
  .toPromise());
57
57
  return data.iosAppCredentials.setPushKey;
58
58
  },
59
- async setAppStoreConnectApiKeyForSubmissionsAsync(iosAppCredentialsId, ascApiKeyId) {
60
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
59
+ async setAppStoreConnectApiKeyForSubmissionsAsync(graphqlClient, iosAppCredentialsId, ascApiKeyId) {
60
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
61
61
  .mutation((0, graphql_tag_1.default) `
62
62
  mutation SetAppStoreConnectApiKeyForSubmissionsMutation(
63
63
  $iosAppCredentialsId: ID!
@@ -1,4 +1,5 @@
1
+ import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { AppStoreConnectApiKeyFragment } from '../../../../../graphql/generated';
2
3
  export declare const AppStoreConnectApiKeyQuery: {
3
- getAllForAccountAsync(accountName: string): Promise<AppStoreConnectApiKeyFragment[]>;
4
+ getAllForAccountAsync(graphqlClient: ExpoGraphqlClient, accountName: string): Promise<AppStoreConnectApiKeyFragment[]>;
4
5
  };
@@ -7,8 +7,8 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
7
  const client_1 = require("../../../../../graphql/client");
8
8
  const AppStoreConnectApiKey_1 = require("../../../../../graphql/types/credentials/AppStoreConnectApiKey");
9
9
  exports.AppStoreConnectApiKeyQuery = {
10
- async getAllForAccountAsync(accountName) {
11
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
10
+ async getAllForAccountAsync(graphqlClient, accountName) {
11
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
12
12
  .query((0, graphql_tag_1.default) `
13
13
  query AppStoreConnectApiKeyByAccountQuery($accountName: String!) {
14
14
  account {
@@ -1,4 +1,5 @@
1
+ import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { AppleAppIdentifierFragment } from '../../../../../graphql/generated';
2
3
  export declare const AppleAppIdentifierQuery: {
3
- byBundleIdentifierAsync(accountName: string, bundleIdentifier: string): Promise<AppleAppIdentifierFragment | null>;
4
+ byBundleIdentifierAsync(graphqlClient: ExpoGraphqlClient, accountName: string, bundleIdentifier: string): Promise<AppleAppIdentifierFragment | null>;
4
5
  };
@@ -7,8 +7,8 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
7
  const client_1 = require("../../../../../graphql/client");
8
8
  const AppleAppIdentifier_1 = require("../../../../../graphql/types/credentials/AppleAppIdentifier");
9
9
  exports.AppleAppIdentifierQuery = {
10
- async byBundleIdentifierAsync(accountName, bundleIdentifier) {
11
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
10
+ async byBundleIdentifierAsync(graphqlClient, accountName, bundleIdentifier) {
11
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
12
12
  .query((0, graphql_tag_1.default) `
13
13
  query AppleAppIdentifierByBundleIdQuery(
14
14
  $accountName: String!
@@ -1,3 +1,4 @@
1
+ import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { AppleDevice, AppleDeviceFragment, AppleDevicesByTeamIdentifierQueryVariables, AppleTeamFragment } from '../../../../../graphql/generated';
2
3
  export declare type AppleDeviceFragmentWithAppleTeam = AppleDeviceFragment & {
3
4
  appleTeam: AppleTeamFragment;
@@ -10,9 +11,9 @@ export declare type AppleDevicesByIdentifierQueryResult = AppleDeviceQueryResult
10
11
  appleTeam: AppleTeamFragment;
11
12
  };
12
13
  export declare const AppleDeviceQuery: {
13
- getAllByAppleTeamIdentifierAsync(accountId: string, appleTeamIdentifier: string, { useCache }?: {
14
+ getAllByAppleTeamIdentifierAsync(graphqlClient: ExpoGraphqlClient, accountId: string, appleTeamIdentifier: string, { useCache }?: {
14
15
  useCache?: boolean | undefined;
15
16
  }): Promise<AppleDeviceFragmentWithAppleTeam[]>;
16
- getAllForAppleTeamAsync({ accountName, appleTeamIdentifier, offset, limit, }: AppleDevicesByTeamIdentifierQueryVariables): Promise<AppleDeviceFragment[]>;
17
- getByDeviceIdentifierAsync(accountName: string, identifier: string): Promise<AppleDevicesByIdentifierQueryResult>;
17
+ getAllForAppleTeamAsync(graphqlClient: ExpoGraphqlClient, { accountName, appleTeamIdentifier, offset, limit }: AppleDevicesByTeamIdentifierQueryVariables): Promise<AppleDeviceFragment[]>;
18
+ getByDeviceIdentifierAsync(graphqlClient: ExpoGraphqlClient, accountName: string, identifier: string): Promise<AppleDevicesByIdentifierQueryResult>;
18
19
  };
@@ -11,8 +11,8 @@ const AppleDevice_1 = require("../../../../../graphql/types/credentials/AppleDev
11
11
  const AppleTeam_1 = require("../../../../../graphql/types/credentials/AppleTeam");
12
12
  const AppleTeamFormatting_1 = require("../../../actions/AppleTeamFormatting");
13
13
  exports.AppleDeviceQuery = {
14
- async getAllByAppleTeamIdentifierAsync(accountId, appleTeamIdentifier, { useCache = true } = {}) {
15
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
14
+ async getAllByAppleTeamIdentifierAsync(graphqlClient, accountId, appleTeamIdentifier, { useCache = true } = {}) {
15
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
16
16
  .query((0, graphql_tag_1.default) `
17
17
  query AppleDevicesByAppleTeamQuery($accountId: ID!, $appleTeamIdentifier: String!) {
18
18
  appleTeam {
@@ -45,8 +45,8 @@ exports.AppleDeviceQuery = {
45
45
  (0, assert_1.default)(appleDevices, 'Apple Devices should be defined in this context - enforced by GraphQL');
46
46
  return appleDevices;
47
47
  },
48
- async getAllForAppleTeamAsync({ accountName, appleTeamIdentifier, offset, limit, }) {
49
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
48
+ async getAllForAppleTeamAsync(graphqlClient, { accountName, appleTeamIdentifier, offset, limit }) {
49
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
50
50
  .query((0, graphql_tag_1.default) `
51
51
  query AppleDevicesByTeamIdentifier(
52
52
  $accountName: String!
@@ -84,8 +84,8 @@ exports.AppleDeviceQuery = {
84
84
  }
85
85
  return appleDevices;
86
86
  },
87
- async getByDeviceIdentifierAsync(accountName, identifier) {
88
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
87
+ async getByDeviceIdentifierAsync(graphqlClient, accountName, identifier) {
88
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
89
89
  .query((0, graphql_tag_1.default) `
90
90
  query AppleDevicesByIdentifier($accountName: String!, $identifier: String!) {
91
91
  account {
@@ -1,8 +1,9 @@
1
+ import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { AppleDistributionCertificateFragment, IosDistributionType } from '../../../../../graphql/generated';
2
3
  export declare const AppleDistributionCertificateQuery: {
3
- getForAppAsync(projectFullName: string, { appleAppIdentifierId, iosDistributionType, }: {
4
+ getForAppAsync(graphqlClient: ExpoGraphqlClient, projectFullName: string, { appleAppIdentifierId, iosDistributionType, }: {
4
5
  appleAppIdentifierId: string;
5
6
  iosDistributionType: IosDistributionType;
6
7
  }): Promise<AppleDistributionCertificateFragment | null>;
7
- getAllForAccountAsync(accountName: string): Promise<AppleDistributionCertificateFragment[]>;
8
+ getAllForAccountAsync(graphqlClient: ExpoGraphqlClient, accountName: string): Promise<AppleDistributionCertificateFragment[]>;
8
9
  };
@@ -9,9 +9,9 @@ const client_1 = require("../../../../../graphql/client");
9
9
  const AppleDistributionCertificate_1 = require("../../../../../graphql/types/credentials/AppleDistributionCertificate");
10
10
  const AppleTeam_1 = require("../../../../../graphql/types/credentials/AppleTeam");
11
11
  exports.AppleDistributionCertificateQuery = {
12
- async getForAppAsync(projectFullName, { appleAppIdentifierId, iosDistributionType, }) {
12
+ async getForAppAsync(graphqlClient, projectFullName, { appleAppIdentifierId, iosDistributionType, }) {
13
13
  var _a, _b, _c;
14
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
14
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
15
15
  .query((0, graphql_tag_1.default) `
16
16
  query AppleDistributionCertificateByAppQuery(
17
17
  $projectFullName: String!
@@ -57,8 +57,8 @@ exports.AppleDistributionCertificateQuery = {
57
57
  (0, assert_1.default)(data.app, 'GraphQL: `app` not defined in server response');
58
58
  return ((_c = (_b = (_a = data.app.byFullName.iosAppCredentials[0]) === null || _a === void 0 ? void 0 : _a.iosAppBuildCredentialsList[0]) === null || _b === void 0 ? void 0 : _b.distributionCertificate) !== null && _c !== void 0 ? _c : null);
59
59
  },
60
- async getAllForAccountAsync(accountName) {
61
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
60
+ async getAllForAccountAsync(graphqlClient, accountName) {
61
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
62
62
  .query((0, graphql_tag_1.default) `
63
63
  query AppleDistributionCertificateByAccountQuery($accountName: String!) {
64
64
  account {
@@ -1,3 +1,4 @@
1
+ import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { AppleAppIdentifierFragment, AppleDeviceFragment, AppleProvisioningProfileFragment, AppleTeamFragment, IosDistributionType } from '../../../../../graphql/generated';
2
3
  export declare type AppleProvisioningProfileQueryResult = AppleProvisioningProfileFragment & {
3
4
  appleTeam?: AppleTeamFragment | null;
@@ -7,7 +8,7 @@ export declare type AppleProvisioningProfileQueryResult = AppleProvisioningProfi
7
8
  appleAppIdentifier: AppleAppIdentifierFragment;
8
9
  };
9
10
  export declare const AppleProvisioningProfileQuery: {
10
- getForAppAsync(projectFullName: string, { appleAppIdentifierId, iosDistributionType, }: {
11
+ getForAppAsync(graphqlClient: ExpoGraphqlClient, projectFullName: string, { appleAppIdentifierId, iosDistributionType, }: {
11
12
  appleAppIdentifierId: string;
12
13
  iosDistributionType: IosDistributionType;
13
14
  }): Promise<AppleProvisioningProfileQueryResult | null>;
@@ -11,9 +11,9 @@ const AppleDevice_1 = require("../../../../../graphql/types/credentials/AppleDev
11
11
  const AppleProvisioningProfile_1 = require("../../../../../graphql/types/credentials/AppleProvisioningProfile");
12
12
  const AppleTeam_1 = require("../../../../../graphql/types/credentials/AppleTeam");
13
13
  exports.AppleProvisioningProfileQuery = {
14
- async getForAppAsync(projectFullName, { appleAppIdentifierId, iosDistributionType, }) {
14
+ async getForAppAsync(graphqlClient, projectFullName, { appleAppIdentifierId, iosDistributionType, }) {
15
15
  var _a, _b, _c;
16
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
16
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
17
17
  .query((0, graphql_tag_1.default) `
18
18
  query AppleProvisioningProfilesByAppQuery(
19
19
  $projectFullName: String!
@@ -1,4 +1,5 @@
1
+ import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { ApplePushKeyFragment } from '../../../../../graphql/generated';
2
3
  export declare const ApplePushKeyQuery: {
3
- getAllForAccountAsync(accountName: string): Promise<ApplePushKeyFragment[]>;
4
+ getAllForAccountAsync(graphqlClient: ExpoGraphqlClient, accountName: string): Promise<ApplePushKeyFragment[]>;
4
5
  };
@@ -7,8 +7,8 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
7
  const client_1 = require("../../../../../graphql/client");
8
8
  const ApplePushKey_1 = require("../../../../../graphql/types/credentials/ApplePushKey");
9
9
  exports.ApplePushKeyQuery = {
10
- async getAllForAccountAsync(accountName) {
11
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
10
+ async getAllForAccountAsync(graphqlClient, accountName) {
11
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
12
12
  .query((0, graphql_tag_1.default) `
13
13
  query ApplePushKeyByAccountQuery($accountName: String!) {
14
14
  account {
@@ -1,5 +1,6 @@
1
+ import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { AppleTeamFragment, AppleTeamsByAccountNameQueryVariables } from '../../../../../graphql/generated';
2
3
  export declare const AppleTeamQuery: {
3
- getAllForAccountAsync({ accountName, offset, limit, }: AppleTeamsByAccountNameQueryVariables): Promise<AppleTeamFragment[]>;
4
- getByAppleTeamIdentifierAsync(accountId: string, appleTeamIdentifier: string): Promise<AppleTeamFragment | null>;
4
+ getAllForAccountAsync(graphqlClient: ExpoGraphqlClient, { accountName, offset, limit }: AppleTeamsByAccountNameQueryVariables): Promise<AppleTeamFragment[]>;
5
+ getByAppleTeamIdentifierAsync(graphqlClient: ExpoGraphqlClient, accountId: string, appleTeamIdentifier: string): Promise<AppleTeamFragment | null>;
5
6
  };
@@ -7,9 +7,9 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
7
  const client_1 = require("../../../../../graphql/client");
8
8
  const AppleTeam_1 = require("../../../../../graphql/types/credentials/AppleTeam");
9
9
  exports.AppleTeamQuery = {
10
- async getAllForAccountAsync({ accountName, offset, limit, }) {
10
+ async getAllForAccountAsync(graphqlClient, { accountName, offset, limit }) {
11
11
  var _a;
12
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
12
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
13
13
  .query((0, graphql_tag_1.default) `
14
14
  query AppleTeamsByAccountName($accountName: String!, $offset: Int, $limit: Int) {
15
15
  account {
@@ -29,9 +29,9 @@ exports.AppleTeamQuery = {
29
29
  .toPromise());
30
30
  return (_a = data.account.byName.appleTeams) !== null && _a !== void 0 ? _a : [];
31
31
  },
32
- async getByAppleTeamIdentifierAsync(accountId, appleTeamIdentifier) {
32
+ async getByAppleTeamIdentifierAsync(graphqlClient, accountId, appleTeamIdentifier) {
33
33
  var _a;
34
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
34
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
35
35
  .query((0, graphql_tag_1.default) `
36
36
  query AppleTeamByIdentifierQuery($accountId: ID!, $appleTeamIdentifier: String!) {
37
37
  appleTeam {
@@ -1,6 +1,7 @@
1
+ import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { IosAppBuildCredentialsFragment, IosDistributionType } from '../../../../../graphql/generated';
2
3
  export declare const IosAppBuildCredentialsQuery: {
3
- byAppIdentifierIdAndDistributionTypeAsync(projectFullName: string, { appleAppIdentifierId, iosDistributionType, }: {
4
+ byAppIdentifierIdAndDistributionTypeAsync(graphqlClient: ExpoGraphqlClient, projectFullName: string, { appleAppIdentifierId, iosDistributionType, }: {
4
5
  appleAppIdentifierId: string;
5
6
  iosDistributionType: IosDistributionType;
6
7
  }): Promise<IosAppBuildCredentialsFragment | null>;
@@ -8,9 +8,9 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
8
8
  const client_1 = require("../../../../../graphql/client");
9
9
  const IosAppBuildCredentials_1 = require("../../../../../graphql/types/credentials/IosAppBuildCredentials");
10
10
  exports.IosAppBuildCredentialsQuery = {
11
- async byAppIdentifierIdAndDistributionTypeAsync(projectFullName, { appleAppIdentifierId, iosDistributionType, }) {
11
+ async byAppIdentifierIdAndDistributionTypeAsync(graphqlClient, projectFullName, { appleAppIdentifierId, iosDistributionType, }) {
12
12
  var _a, _b;
13
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
13
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
14
14
  .query((0, graphql_tag_1.default) `
15
15
  query IosAppBuildCredentialsByAppleAppIdentiferAndDistributionQuery(
16
16
  $projectFullName: String!
@@ -1,10 +1,11 @@
1
+ import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { CommonIosAppCredentialsFragment, IosDistributionType } from '../../../../../graphql/generated';
2
3
  export declare const IosAppCredentialsQuery: {
3
- withBuildCredentialsByAppIdentifierIdAsync(projectFullName: string, { appleAppIdentifierId, iosDistributionType, }: {
4
+ withBuildCredentialsByAppIdentifierIdAsync(graphqlClient: ExpoGraphqlClient, projectFullName: string, { appleAppIdentifierId, iosDistributionType, }: {
4
5
  appleAppIdentifierId: string;
5
6
  iosDistributionType?: IosDistributionType | undefined;
6
7
  }): Promise<CommonIosAppCredentialsFragment | null>;
7
- withCommonFieldsByAppIdentifierIdAsync(projectFullName: string, { appleAppIdentifierId, }: {
8
+ withCommonFieldsByAppIdentifierIdAsync(graphqlClient: ExpoGraphqlClient, projectFullName: string, { appleAppIdentifierId, }: {
8
9
  appleAppIdentifierId: string;
9
10
  }): Promise<CommonIosAppCredentialsFragment | null>;
10
11
  };
@@ -9,9 +9,9 @@ const client_1 = require("../../../../../graphql/client");
9
9
  const IosAppBuildCredentials_1 = require("../../../../../graphql/types/credentials/IosAppBuildCredentials");
10
10
  const IosAppCredentials_1 = require("../../../../../graphql/types/credentials/IosAppCredentials");
11
11
  exports.IosAppCredentialsQuery = {
12
- async withBuildCredentialsByAppIdentifierIdAsync(projectFullName, { appleAppIdentifierId, iosDistributionType, }) {
12
+ async withBuildCredentialsByAppIdentifierIdAsync(graphqlClient, projectFullName, { appleAppIdentifierId, iosDistributionType, }) {
13
13
  var _a;
14
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
14
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
15
15
  .query((0, graphql_tag_1.default) `
16
16
  query IosAppCredentialsWithBuildCredentialsByAppIdentifierIdQuery(
17
17
  $projectFullName: String!
@@ -47,9 +47,9 @@ exports.IosAppCredentialsQuery = {
47
47
  (0, assert_1.default)(data.app, 'GraphQL: `app` not defined in server response');
48
48
  return (_a = data.app.byFullName.iosAppCredentials[0]) !== null && _a !== void 0 ? _a : null;
49
49
  },
50
- async withCommonFieldsByAppIdentifierIdAsync(projectFullName, { appleAppIdentifierId, }) {
50
+ async withCommonFieldsByAppIdentifierIdAsync(graphqlClient, projectFullName, { appleAppIdentifierId, }) {
51
51
  var _a;
52
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
52
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
53
53
  .query((0, graphql_tag_1.default) `
54
54
  query CommonIosAppCredentialsWithBuildCredentialsByAppIdentifierIdQuery(
55
55
  $projectFullName: String!
@@ -1,7 +1,9 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { Actor } from '../../user/User';
2
3
  import { CredentialsContext, CredentialsContextProjectInfo } from '../context';
3
4
  export interface Action<T = void> {
4
5
  actor: Actor;
6
+ graphqlClient: ExpoGraphqlClient;
5
7
  projectInfo: CredentialsContextProjectInfo | null;
6
8
  runAsync(ctx: CredentialsContext): Promise<T>;
7
9
  }
@@ -42,6 +42,7 @@ class ManageAndroid {
42
42
  projectDir: process.cwd(),
43
43
  projectInfo: this.callingAction.projectInfo,
44
44
  user: this.callingAction.actor,
45
+ graphqlClient: this.callingAction.graphqlClient,
45
46
  env: buildProfile === null || buildProfile === void 0 ? void 0 : buildProfile.env,
46
47
  nonInteractive: false,
47
48
  });
@@ -54,7 +55,7 @@ class ManageAndroid {
54
55
  try {
55
56
  if (ctx.hasProjectContext) {
56
57
  const appLookupParams = await (0, BuildCredentialsUtils_1.getAppLookupParamsFromContextAsync)(ctx, gradleContext);
57
- const appCredentials = await ctx.android.getAndroidAppCredentialsWithCommonFieldsAsync(appLookupParams);
58
+ const appCredentials = await ctx.android.getAndroidAppCredentialsWithCommonFieldsAsync(ctx.graphqlClient, appLookupParams);
58
59
  if (!appCredentials) {
59
60
  (0, printCredentials_1.displayEmptyAndroidCredentials)(appLookupParams);
60
61
  }
@@ -129,13 +130,13 @@ class ManageAndroid {
129
130
  const keystore = await new CreateKeystore_1.CreateKeystore(appLookupParams.account).runAsync(ctx);
130
131
  if (selectBuildCredentialsResult.resultType ===
131
132
  SelectAndroidBuildCredentials_1.SelectAndroidBuildCredentialsResultType.CREATE_REQUEST) {
132
- await ctx.android.createAndroidAppBuildCredentialsAsync(appLookupParams, {
133
+ await ctx.android.createAndroidAppBuildCredentialsAsync(ctx.graphqlClient, appLookupParams, {
133
134
  ...selectBuildCredentialsResult.result,
134
135
  androidKeystoreId: keystore.id,
135
136
  });
136
137
  }
137
138
  else {
138
- await ctx.android.updateAndroidAppBuildCredentialsAsync(selectBuildCredentialsResult.result, {
139
+ await ctx.android.updateAndroidAppBuildCredentialsAsync(ctx.graphqlClient, selectBuildCredentialsResult.result, {
139
140
  androidKeystoreId: keystore.id,
140
141
  });
141
142
  }
@@ -52,6 +52,7 @@ class ManageIos {
52
52
  projectDir: process.cwd(),
53
53
  projectInfo: this.callingAction.projectInfo,
54
54
  user: this.callingAction.actor,
55
+ graphqlClient: this.callingAction.graphqlClient,
55
56
  env: buildProfile === null || buildProfile === void 0 ? void 0 : buildProfile.env,
56
57
  nonInteractive: false,
57
58
  });
@@ -60,7 +61,7 @@ class ManageIos {
60
61
  const ascApiKeyActions = (0, IosActions_1.getAscApiKeyActions)(ctx);
61
62
  await ctx.bestEffortAppStoreAuthenticateAsync();
62
63
  const getAccountForProjectAsync = async (projectId) => {
63
- return await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(projectId);
64
+ return await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(ctx.graphqlClient, projectId);
64
65
  };
65
66
  const account = ctx.hasProjectContext
66
67
  ? await getAccountForProjectAsync(ctx.projectId)
@@ -81,7 +82,7 @@ class ManageIos {
81
82
  for (const target of targets) {
82
83
  const appLookupParams = await (0, BuildCredentialsUtils_1.getAppLookupParamsFromContextAsync)(ctx, target);
83
84
  iosAppCredentialsMap[target.targetName] =
84
- await ctx.ios.getIosAppCredentialsWithCommonFieldsAsync(appLookupParams);
85
+ await ctx.ios.getIosAppCredentialsWithCommonFieldsAsync(ctx.graphqlClient, appLookupParams);
85
86
  }
86
87
  (0, printCredentials_1.displayIosCredentials)(app, iosAppCredentialsMap, targets);
87
88
  }
@@ -225,7 +226,7 @@ class ManageIos {
225
226
  return;
226
227
  }
227
228
  case Actions_1.IosActionType.RemoveProvisioningProfile: {
228
- const iosAppCredentials = await ctx.ios.getIosAppCredentialsWithCommonFieldsAsync(appLookupParams);
229
+ const iosAppCredentials = await ctx.ios.getIosAppCredentialsWithCommonFieldsAsync(ctx.graphqlClient, appLookupParams);
229
230
  const provisioningProfile = (_a = iosAppCredentials === null || iosAppCredentials === void 0 ? void 0 : iosAppCredentials.iosAppBuildCredentialsList.find(buildCredentials => buildCredentials.iosDistributionType === distributionType)) === null || _a === void 0 ? void 0 : _a.provisioningProfile;
230
231
  if (!provisioningProfile) {
231
232
  log_1.default.log(`No provisioning profile associated with the ${distributionType} configuration of ${appLookupParams.projectName}`);
@@ -18,7 +18,7 @@ class SelectAndroidBuildCredentials {
18
18
  this.app = app;
19
19
  }
20
20
  async runAsync(ctx) {
21
- const buildCredentialsList = await ctx.android.getAndroidAppBuildCredentialsListAsync(this.app);
21
+ const buildCredentialsList = await ctx.android.getAndroidAppBuildCredentialsListAsync(ctx.graphqlClient, this.app);
22
22
  if (buildCredentialsList.length === 0) {
23
23
  return {
24
24
  resultType: SelectAndroidBuildCredentialsResultType.CREATE_REQUEST,
@@ -70,7 +70,7 @@ class SelectExistingAndroidBuildCredentials {
70
70
  this.app = app;
71
71
  }
72
72
  async runAsync(ctx) {
73
- const buildCredentialsList = await ctx.android.getAndroidAppBuildCredentialsListAsync(this.app);
73
+ const buildCredentialsList = await ctx.android.getAndroidAppBuildCredentialsListAsync(ctx.graphqlClient, this.app);
74
74
  if (buildCredentialsList.length === 0) {
75
75
  log_1.default.log(`You don't have any Android Build Credentials`);
76
76
  return null;
@@ -1,9 +1,11 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { Actor } from '../../user/User';
2
3
  import { CredentialsContextProjectInfo } from '../context';
3
4
  export declare class SelectPlatform {
4
5
  readonly actor: Actor;
6
+ readonly graphqlClient: ExpoGraphqlClient;
5
7
  readonly projectInfo: CredentialsContextProjectInfo | null;
6
8
  private readonly flagPlatform?;
7
- constructor(actor: Actor, projectInfo: CredentialsContextProjectInfo | null, flagPlatform?: string | undefined);
9
+ constructor(actor: Actor, graphqlClient: ExpoGraphqlClient, projectInfo: CredentialsContextProjectInfo | null, flagPlatform?: string | undefined);
8
10
  runAsync(): Promise<void>;
9
11
  }
@@ -5,8 +5,9 @@ const platform_1 = require("../../platform");
5
5
  const ManageAndroid_1 = require("./ManageAndroid");
6
6
  const ManageIos_1 = require("./ManageIos");
7
7
  class SelectPlatform {
8
- constructor(actor, projectInfo, flagPlatform) {
8
+ constructor(actor, graphqlClient, projectInfo, flagPlatform) {
9
9
  this.actor = actor;
10
+ this.graphqlClient = graphqlClient;
10
11
  this.projectInfo = projectInfo;
11
12
  this.flagPlatform = flagPlatform;
12
13
  }
@@ -1,3 +1,4 @@
1
+ import { ExpoGraphqlClient } from '../../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import AppStoreApi from '../../../credentials/ios/appstore/AppStoreApi';
2
3
  import { AccountFragment, AppleTeam } from '../../../graphql/generated';
3
4
  export declare enum RegistrationMethod {
@@ -7,10 +8,11 @@ export declare enum RegistrationMethod {
7
8
  EXIT = 3
8
9
  }
9
10
  export default class DeviceCreateAction {
11
+ private graphqlClient;
10
12
  private appStoreApi;
11
13
  private account;
12
14
  private appleTeam;
13
- constructor(appStoreApi: AppStoreApi, account: AccountFragment, appleTeam: Pick<AppleTeam, 'appleTeamIdentifier' | 'appleTeamName' | 'id'>);
15
+ constructor(graphqlClient: ExpoGraphqlClient, appStoreApi: AppStoreApi, account: AccountFragment, appleTeam: Pick<AppleTeam, 'appleTeamIdentifier' | 'appleTeamName' | 'id'>);
14
16
  runAsync(): Promise<RegistrationMethod>;
15
17
  private askForRegistrationMethodAsync;
16
18
  }
@@ -16,7 +16,8 @@ var RegistrationMethod;
16
16
  RegistrationMethod[RegistrationMethod["EXIT"] = 3] = "EXIT";
17
17
  })(RegistrationMethod = exports.RegistrationMethod || (exports.RegistrationMethod = {}));
18
18
  class DeviceCreateAction {
19
- constructor(appStoreApi, account, appleTeam) {
19
+ constructor(graphqlClient, appStoreApi, account, appleTeam) {
20
+ this.graphqlClient = graphqlClient;
20
21
  this.appStoreApi = appStoreApi;
21
22
  this.account = account;
22
23
  this.appleTeam = appleTeam;
@@ -24,13 +25,13 @@ class DeviceCreateAction {
24
25
  async runAsync() {
25
26
  const method = await this.askForRegistrationMethodAsync();
26
27
  if (method === RegistrationMethod.WEBSITE) {
27
- await (0, registrationUrlMethod_1.runRegistrationUrlMethodAsync)(this.account.id, this.appleTeam);
28
+ await (0, registrationUrlMethod_1.runRegistrationUrlMethodAsync)(this.graphqlClient, this.account.id, this.appleTeam);
28
29
  }
29
30
  else if (method === RegistrationMethod.DEVELOPER_PORTAL) {
30
- await (0, developerPortalMethod_1.runDeveloperPortalMethodAsync)(this.appStoreApi, this.account.id, this.appleTeam);
31
+ await (0, developerPortalMethod_1.runDeveloperPortalMethodAsync)(this.graphqlClient, this.appStoreApi, this.account.id, this.appleTeam);
31
32
  }
32
33
  else if (method === RegistrationMethod.INPUT) {
33
- await (0, inputMethod_1.runInputMethodAsync)(this.account.id, this.appleTeam);
34
+ await (0, inputMethod_1.runInputMethodAsync)(this.graphqlClient, this.account.id, this.appleTeam);
34
35
  }
35
36
  else if (method === RegistrationMethod.EXIT) {
36
37
  log_1.default.log('Bye!');
@@ -1,6 +1,7 @@
1
1
  /// <reference types="@expo/apple-utils/ts-declarations/expo__app-store" />
2
2
  import { Device } from '@expo/apple-utils';
3
+ import { ExpoGraphqlClient } from '../../../commandUtils/context/contextUtils/createGraphqlClient';
3
4
  import AppStoreApi from '../../../credentials/ios/appstore/AppStoreApi';
4
5
  import { AppleTeam } from '../../../graphql/generated';
5
- export declare function runDeveloperPortalMethodAsync(appStoreApi: AppStoreApi, accountId: string, appleTeam: Pick<AppleTeam, 'appleTeamIdentifier' | 'appleTeamName' | 'id'>): Promise<void>;
6
+ export declare function runDeveloperPortalMethodAsync(graphqlClient: ExpoGraphqlClient, appStoreApi: AppStoreApi, accountId: string, appleTeam: Pick<AppleTeam, 'appleTeamIdentifier' | 'appleTeamName' | 'id'>): Promise<void>;
6
7
  export declare function formatDeviceLabel(device: Device): string;
@@ -16,23 +16,23 @@ const DEVICE_CLASS_TO_GRAPHQL_TYPE = {
16
16
  [apple_utils_1.DeviceClass.IPAD]: generated_1.AppleDeviceClass.Ipad,
17
17
  [apple_utils_1.DeviceClass.IPHONE]: generated_1.AppleDeviceClass.Iphone,
18
18
  };
19
- async function runDeveloperPortalMethodAsync(appStoreApi, accountId, appleTeam) {
19
+ async function runDeveloperPortalMethodAsync(graphqlClient, appStoreApi, accountId, appleTeam) {
20
20
  const appleAuthCtx = await appStoreApi.ensureAuthenticatedAsync();
21
- const unregisteredPortalDevices = await findUnregisteredPortalDevicesAsync(appleAuthCtx, accountId, appleTeam);
21
+ const unregisteredPortalDevices = await findUnregisteredPortalDevicesAsync(graphqlClient, appleAuthCtx, accountId, appleTeam);
22
22
  if (unregisteredPortalDevices.length === 0) {
23
23
  log_1.default.log('All your devices registered on Apple Developer Portal are already imported to EAS.');
24
24
  return;
25
25
  }
26
26
  const devicesToImport = await chooseDevicesToImportAsync(unregisteredPortalDevices);
27
- await importDevicesAsync(accountId, appleTeam, devicesToImport);
27
+ await importDevicesAsync(graphqlClient, accountId, appleTeam, devicesToImport);
28
28
  }
29
29
  exports.runDeveloperPortalMethodAsync = runDeveloperPortalMethodAsync;
30
- async function importDevicesAsync(accountId, appleTeam, devices) {
30
+ async function importDevicesAsync(graphqlClient, accountId, appleTeam, devices) {
31
31
  const spinner = (0, ora_1.ora)(`Importing ${devices.length} Apple device${devices.length === 1 ? '' : 's'} to EAS`).start();
32
32
  const deviceChunks = (0, chunk_1.default)(devices, DEVICE_IMPORT_CHUNK_SIZE);
33
33
  try {
34
34
  for (const deviceChunk of deviceChunks) {
35
- await importDeviceChunkAsync(accountId, appleTeam, deviceChunk);
35
+ await importDeviceChunkAsync(graphqlClient, accountId, appleTeam, deviceChunk);
36
36
  }
37
37
  }
38
38
  catch (err) {
@@ -41,10 +41,10 @@ async function importDevicesAsync(accountId, appleTeam, devices) {
41
41
  }
42
42
  spinner.succeed();
43
43
  }
44
- async function importDeviceChunkAsync(accountId, appleTeam, devices) {
44
+ async function importDeviceChunkAsync(graphqlClient, accountId, appleTeam, devices) {
45
45
  const promises = devices.map(device => {
46
46
  var _a;
47
- return AppleDeviceMutation_1.AppleDeviceMutation.createAppleDeviceAsync({
47
+ return AppleDeviceMutation_1.AppleDeviceMutation.createAppleDeviceAsync(graphqlClient, {
48
48
  appleTeamId: appleTeam.id,
49
49
  identifier: device.attributes.udid,
50
50
  name: device.attributes.name,
@@ -53,8 +53,8 @@ async function importDeviceChunkAsync(accountId, appleTeam, devices) {
53
53
  });
54
54
  await Promise.all(promises);
55
55
  }
56
- async function findUnregisteredPortalDevicesAsync(appleAuthCtx, accountId, appleTeam) {
57
- const expoRegisteredDevices = await AppleDeviceQuery_1.AppleDeviceQuery.getAllByAppleTeamIdentifierAsync(accountId, appleTeam.appleTeamIdentifier, { useCache: false });
56
+ async function findUnregisteredPortalDevicesAsync(graphqlClient, appleAuthCtx, accountId, appleTeam) {
57
+ const expoRegisteredDevices = await AppleDeviceQuery_1.AppleDeviceQuery.getAllByAppleTeamIdentifierAsync(graphqlClient, accountId, appleTeam.appleTeamIdentifier, { useCache: false });
58
58
  const expoRegisteredDevicesByUdid = expoRegisteredDevices.reduce((acc, device) => {
59
59
  acc[device.identifier] = device;
60
60
  return acc;
@@ -1,3 +1,4 @@
1
+ import { ExpoGraphqlClient } from '../../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { AppleTeam } from '../../../graphql/generated';
2
- export declare function runInputMethodAsync(accountId: string, appleTeam: Pick<AppleTeam, 'appleTeamIdentifier' | 'appleTeamName' | 'id'>): Promise<void>;
3
+ export declare function runInputMethodAsync(graphqlClient: ExpoGraphqlClient, accountId: string, appleTeam: Pick<AppleTeam, 'appleTeamIdentifier' | 'appleTeamName' | 'id'>): Promise<void>;
3
4
  export declare function promptForUDIDAsync(initial?: string): Promise<string>;