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
@@ -1,5 +1,6 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { AppFragment } from '../generated';
2
3
  export declare const AppQuery: {
3
- byIdAsync(projectId: string): Promise<AppFragment>;
4
- byFullNameAsync(fullName: string): Promise<AppFragment>;
4
+ byIdAsync(graphqlClient: ExpoGraphqlClient, projectId: string): Promise<AppFragment>;
5
+ byFullNameAsync(graphqlClient: ExpoGraphqlClient, fullName: string): Promise<AppFragment>;
5
6
  };
@@ -8,8 +8,8 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
8
8
  const client_1 = require("../client");
9
9
  const App_1 = require("../types/App");
10
10
  exports.AppQuery = {
11
- async byIdAsync(projectId) {
12
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
11
+ async byIdAsync(graphqlClient, projectId) {
12
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
13
13
  .query((0, graphql_tag_1.default) `
14
14
  query AppByIdQuery($appId: String!) {
15
15
  app {
@@ -27,8 +27,8 @@ exports.AppQuery = {
27
27
  (0, assert_1.default)(data.app, 'GraphQL: `app` not defined in server response');
28
28
  return data.app.byId;
29
29
  },
30
- async byFullNameAsync(fullName) {
31
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
30
+ async byFullNameAsync(graphqlClient, fullName) {
31
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
32
32
  .query((0, graphql_tag_1.default) `
33
33
  query AppByFullNameQuery($fullName: String!) {
34
34
  app {
@@ -1,4 +1,5 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { AppPlatform, AppVersion } from '../generated';
2
3
  export declare const AppVersionQuery: {
3
- latestVersionAsync(appId: string, platform: AppPlatform, applicationIdentifier: string): Promise<Pick<AppVersion, 'storeVersion' | 'buildVersion'> | null>;
4
+ latestVersionAsync(graphqlClient: ExpoGraphqlClient, appId: string, platform: AppPlatform, applicationIdentifier: string): Promise<Pick<AppVersion, 'storeVersion' | 'buildVersion'> | null>;
4
5
  };
@@ -5,9 +5,9 @@ const tslib_1 = require("tslib");
5
5
  const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
6
6
  const client_1 = require("../client");
7
7
  exports.AppVersionQuery = {
8
- async latestVersionAsync(appId, platform, applicationIdentifier) {
8
+ async latestVersionAsync(graphqlClient, appId, platform, applicationIdentifier) {
9
9
  var _a;
10
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
10
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
11
11
  .query((0, graphql_tag_1.default) `
12
12
  query LatestAppVersion(
13
13
  $appId: String!
@@ -1,7 +1,8 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { BranchesByAppQueryVariables, UpdateBranchFragment, ViewBranchQuery, ViewBranchQueryVariables, ViewBranchesOnUpdateChannelQuery, ViewBranchesOnUpdateChannelQueryVariables } from '../generated';
2
3
  export declare type UpdateBranchOnChannelObject = NonNullable<ViewBranchesOnUpdateChannelQuery['app']['byId']['updateChannelByName']>['updateBranches'][number];
3
4
  export declare const BranchQuery: {
4
- getBranchByNameAsync({ appId, name, }: ViewBranchQueryVariables): Promise<NonNullable<ViewBranchQuery['app']['byId']['updateBranchByName']>>;
5
- listBranchesOnAppAsync({ appId, limit, offset, }: BranchesByAppQueryVariables): Promise<UpdateBranchFragment[]>;
6
- listBranchesOnChannelAsync({ appId, channelName, offset, limit, }: ViewBranchesOnUpdateChannelQueryVariables): Promise<UpdateBranchOnChannelObject[]>;
5
+ getBranchByNameAsync(graphqlClient: ExpoGraphqlClient, { appId, name }: ViewBranchQueryVariables): Promise<NonNullable<ViewBranchQuery['app']['byId']['updateBranchByName']>>;
6
+ listBranchesOnAppAsync(graphqlClient: ExpoGraphqlClient, { appId, limit, offset }: BranchesByAppQueryVariables): Promise<UpdateBranchFragment[]>;
7
+ listBranchesOnChannelAsync(graphqlClient: ExpoGraphqlClient, { appId, channelName, offset, limit }: ViewBranchesOnUpdateChannelQueryVariables): Promise<UpdateBranchOnChannelObject[]>;
7
8
  };
@@ -9,8 +9,8 @@ const client_1 = require("../client");
9
9
  const Update_1 = require("../types/Update");
10
10
  const UpdateBranch_1 = require("../types/UpdateBranch");
11
11
  exports.BranchQuery = {
12
- async getBranchByNameAsync({ appId, name, }) {
13
- const response = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
12
+ async getBranchByNameAsync(graphqlClient, { appId, name }) {
13
+ const response = await (0, client_1.withErrorHandlingAsync)(graphqlClient
14
14
  .query((0, graphql_tag_1.default) `
15
15
  query ViewBranch($appId: String!, $name: String!) {
16
16
  app {
@@ -34,9 +34,9 @@ exports.BranchQuery = {
34
34
  }
35
35
  return updateBranchByName;
36
36
  },
37
- async listBranchesOnAppAsync({ appId, limit, offset, }) {
37
+ async listBranchesOnAppAsync(graphqlClient, { appId, limit, offset }) {
38
38
  var _a, _b;
39
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
39
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
40
40
  .query((0, graphql_tag_1.default) `
41
41
  query BranchesByAppQuery($appId: String!, $limit: Int!, $offset: Int!) {
42
42
  app {
@@ -58,8 +58,8 @@ exports.BranchQuery = {
58
58
  .toPromise());
59
59
  return (_b = (_a = data === null || data === void 0 ? void 0 : data.app) === null || _a === void 0 ? void 0 : _a.byId.updateBranches) !== null && _b !== void 0 ? _b : [];
60
60
  },
61
- async listBranchesOnChannelAsync({ appId, channelName, offset, limit, }) {
62
- const response = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
61
+ async listBranchesOnChannelAsync(graphqlClient, { appId, channelName, offset, limit }) {
62
+ const response = await (0, client_1.withErrorHandlingAsync)(graphqlClient
63
63
  .query((0, graphql_tag_1.default) `
64
64
  query ViewBranchesOnUpdateChannel(
65
65
  $appId: String!
@@ -1,10 +1,11 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { BuildFragment, BuildWithSubmissionsFragment, ViewBuildsOnAppQueryVariables } from '../generated';
2
3
  export declare const BuildQuery: {
3
- byIdAsync(buildId: string, { useCache }?: {
4
+ byIdAsync(graphqlClient: ExpoGraphqlClient, buildId: string, { useCache }?: {
4
5
  useCache?: boolean | undefined;
5
6
  }): Promise<BuildFragment>;
6
- withSubmissionsByIdAsync(buildId: string, { useCache }?: {
7
+ withSubmissionsByIdAsync(graphqlClient: ExpoGraphqlClient, buildId: string, { useCache }?: {
7
8
  useCache?: boolean | undefined;
8
9
  }): Promise<BuildWithSubmissionsFragment>;
9
- viewBuildsOnAppAsync({ appId, limit, offset, filter, }: ViewBuildsOnAppQueryVariables): Promise<BuildFragment[]>;
10
+ viewBuildsOnAppAsync(graphqlClient: ExpoGraphqlClient, { appId, limit, offset, filter }: ViewBuildsOnAppQueryVariables): Promise<BuildFragment[]>;
10
11
  };
@@ -7,8 +7,8 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
7
  const client_1 = require("../client");
8
8
  const Build_1 = require("../types/Build");
9
9
  exports.BuildQuery = {
10
- async byIdAsync(buildId, { useCache = true } = {}) {
11
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
10
+ async byIdAsync(graphqlClient, buildId, { useCache = true } = {}) {
11
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
12
12
  .query((0, graphql_tag_1.default) `
13
13
  query BuildsByIdQuery($buildId: ID!) {
14
14
  builds {
@@ -26,8 +26,8 @@ exports.BuildQuery = {
26
26
  .toPromise());
27
27
  return data.builds.byId;
28
28
  },
29
- async withSubmissionsByIdAsync(buildId, { useCache = true } = {}) {
30
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
29
+ async withSubmissionsByIdAsync(graphqlClient, buildId, { useCache = true } = {}) {
30
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
31
31
  .query((0, graphql_tag_1.default) `
32
32
  query BuildsWithSubmissionsByIdQuery($buildId: ID!) {
33
33
  builds {
@@ -45,9 +45,9 @@ exports.BuildQuery = {
45
45
  .toPromise());
46
46
  return data.builds.byId;
47
47
  },
48
- async viewBuildsOnAppAsync({ appId, limit, offset, filter, }) {
48
+ async viewBuildsOnAppAsync(graphqlClient, { appId, limit, offset, filter }) {
49
49
  var _a, _b;
50
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
50
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
51
51
  .query(
52
52
  // TODO: Change $appId: String! to ID! when fixed server-side schema
53
53
  (0, graphql_tag_1.default) `
@@ -1,7 +1,8 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { ViewUpdateChannelOnAppQuery, ViewUpdateChannelOnAppQueryVariables, ViewUpdateChannelsOnAppQuery, ViewUpdateChannelsOnAppQueryVariables } from '../generated';
2
3
  export declare type UpdateChannelObject = NonNullable<ViewUpdateChannelsOnAppQuery['app']['byId']['updateChannels']>[number];
3
4
  export declare type UpdateChannelByNameObject = NonNullable<ViewUpdateChannelOnAppQuery['app']['byId']['updateChannelByName']>;
4
5
  export declare const ChannelQuery: {
5
- viewUpdateChannelAsync({ appId, channelName, }: ViewUpdateChannelOnAppQueryVariables): Promise<UpdateChannelByNameObject>;
6
- viewUpdateChannelsOnAppAsync({ appId, limit, offset, }: ViewUpdateChannelsOnAppQueryVariables): Promise<UpdateChannelObject[]>;
6
+ viewUpdateChannelAsync(graphqlClient: ExpoGraphqlClient, { appId, channelName }: ViewUpdateChannelOnAppQueryVariables): Promise<UpdateChannelByNameObject>;
7
+ viewUpdateChannelsOnAppAsync(graphqlClient: ExpoGraphqlClient, { appId, limit, offset }: ViewUpdateChannelsOnAppQueryVariables): Promise<UpdateChannelObject[]>;
7
8
  };
@@ -7,8 +7,8 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
7
  const client_1 = require("../client");
8
8
  const Update_1 = require("../types/Update");
9
9
  exports.ChannelQuery = {
10
- async viewUpdateChannelAsync({ appId, channelName, }) {
11
- const response = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
10
+ async viewUpdateChannelAsync(graphqlClient, { appId, channelName }) {
11
+ const response = await (0, client_1.withErrorHandlingAsync)(graphqlClient
12
12
  .query((0, graphql_tag_1.default) `
13
13
  query ViewUpdateChannelOnApp($appId: String!, $channelName: String!) {
14
14
  app {
@@ -40,8 +40,8 @@ exports.ChannelQuery = {
40
40
  }
41
41
  return updateChannelByName;
42
42
  },
43
- async viewUpdateChannelsOnAppAsync({ appId, limit, offset, }) {
44
- const response = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
43
+ async viewUpdateChannelsOnAppAsync(graphqlClient, { appId, limit, offset }) {
44
+ const response = await (0, client_1.withErrorHandlingAsync)(graphqlClient
45
45
  .query((0, graphql_tag_1.default) `
46
46
  query ViewUpdateChannelsOnApp($appId: String!, $offset: Int!, $limit: Int!) {
47
47
  app {
@@ -1,3 +1,4 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { EnvironmentSecretFragment } from '../generated';
2
3
  export declare enum EnvironmentSecretScope {
3
4
  ACCOUNT = "account",
@@ -7,9 +8,9 @@ export declare type EnvironmentSecretWithScope = EnvironmentSecretFragment & {
7
8
  scope: EnvironmentSecretScope;
8
9
  };
9
10
  export declare const EnvironmentSecretsQuery: {
10
- byAppIdAsync(appId: string): Promise<{
11
+ byAppIdAsync(graphqlClient: ExpoGraphqlClient, appId: string): Promise<{
11
12
  accountSecrets: EnvironmentSecretFragment[];
12
13
  appSecrets: EnvironmentSecretFragment[];
13
14
  }>;
14
- allAsync(projectId: string): Promise<EnvironmentSecretWithScope[]>;
15
+ allAsync(graphqlClient: ExpoGraphqlClient, projectId: string): Promise<EnvironmentSecretWithScope[]>;
15
16
  };
@@ -12,9 +12,9 @@ var EnvironmentSecretScope;
12
12
  EnvironmentSecretScope["PROJECT"] = "project";
13
13
  })(EnvironmentSecretScope = exports.EnvironmentSecretScope || (exports.EnvironmentSecretScope = {}));
14
14
  exports.EnvironmentSecretsQuery = {
15
- async byAppIdAsync(appId) {
15
+ async byAppIdAsync(graphqlClient, appId) {
16
16
  var _a, _b, _c, _d;
17
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
17
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
18
18
  .query((0, graphql_tag_1.default) `
19
19
  query EnvironmentSecretsByAppId($appId: String!) {
20
20
  app {
@@ -42,8 +42,8 @@ exports.EnvironmentSecretsQuery = {
42
42
  appSecrets: (_d = (_c = data.app) === null || _c === void 0 ? void 0 : _c.byId.environmentSecrets) !== null && _d !== void 0 ? _d : [],
43
43
  };
44
44
  },
45
- async allAsync(projectId) {
46
- const { accountSecrets, appSecrets } = await this.byAppIdAsync(projectId);
45
+ async allAsync(graphqlClient, projectId) {
46
+ const { accountSecrets, appSecrets } = await this.byAppIdAsync(graphqlClient, projectId);
47
47
  return [
48
48
  ...appSecrets.map(s => ({ ...s, scope: EnvironmentSecretScope.PROJECT })),
49
49
  ...accountSecrets.map(s => ({ ...s, scope: EnvironmentSecretScope.ACCOUNT })),
@@ -1,5 +1,6 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { AssetMetadataResult, GetAssetLimitPerUpdateGroupForAppQuery } from '../generated';
2
3
  export declare const PublishQuery: {
3
- getAssetMetadataAsync(storageKeys: string[]): Promise<AssetMetadataResult[]>;
4
- getAssetLimitPerUpdateGroupAsync(appId: string): Promise<GetAssetLimitPerUpdateGroupForAppQuery['app']['byId']['assetLimitPerUpdateGroup']>;
4
+ getAssetMetadataAsync(graphqlClient: ExpoGraphqlClient, storageKeys: string[]): Promise<AssetMetadataResult[]>;
5
+ getAssetLimitPerUpdateGroupAsync(graphqlClient: ExpoGraphqlClient, appId: string): Promise<GetAssetLimitPerUpdateGroupForAppQuery['app']['byId']['assetLimitPerUpdateGroup']>;
5
6
  };
@@ -5,8 +5,8 @@ const tslib_1 = require("tslib");
5
5
  const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
6
6
  const client_1 = require("../client");
7
7
  exports.PublishQuery = {
8
- async getAssetMetadataAsync(storageKeys) {
9
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
8
+ async getAssetMetadataAsync(graphqlClient, storageKeys) {
9
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
10
10
  .query((0, graphql_tag_1.default) `
11
11
  query GetAssetMetadataQuery($storageKeys: [String!]!) {
12
12
  asset {
@@ -26,8 +26,8 @@ exports.PublishQuery = {
26
26
  .toPromise());
27
27
  return data.asset.metadata;
28
28
  },
29
- async getAssetLimitPerUpdateGroupAsync(appId) {
30
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
29
+ async getAssetLimitPerUpdateGroupAsync(graphqlClient, appId) {
30
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
31
31
  .query((0, graphql_tag_1.default) `
32
32
  query GetAssetLimitPerUpdateGroupForApp($appId: String!) {
33
33
  app {
@@ -1,4 +1,5 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { StatuspageServiceFragment, StatuspageServiceName } from '../generated';
2
3
  export declare const StatuspageServiceQuery: {
3
- statuspageServicesAsync(serviceNames: StatuspageServiceName[]): Promise<StatuspageServiceFragment[]>;
4
+ statuspageServicesAsync(graphqlClient: ExpoGraphqlClient, serviceNames: StatuspageServiceName[]): Promise<StatuspageServiceFragment[]>;
4
5
  };
@@ -7,8 +7,8 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
7
  const client_1 = require("../client");
8
8
  const StatuspageService_1 = require("../types/StatuspageService");
9
9
  exports.StatuspageServiceQuery = {
10
- async statuspageServicesAsync(serviceNames) {
11
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
10
+ async statuspageServicesAsync(graphqlClient, serviceNames) {
11
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
12
12
  .query((0, graphql_tag_1.default) `
13
13
  query StatuspageServiceByServiceNamesQuery($serviceNames: [StatuspageServiceName!]!) {
14
14
  statuspageService {
@@ -1,3 +1,4 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { AppPlatform, SubmissionFragment, SubmissionStatus } from '../generated';
2
3
  declare type Filters = {
3
4
  platform?: AppPlatform;
@@ -6,9 +7,9 @@ declare type Filters = {
6
7
  limit?: number;
7
8
  };
8
9
  export declare const SubmissionQuery: {
9
- byIdAsync(submissionId: string, { useCache }?: {
10
+ byIdAsync(graphqlClient: ExpoGraphqlClient, submissionId: string, { useCache }?: {
10
11
  useCache?: boolean | undefined;
11
12
  }): Promise<SubmissionFragment>;
12
- allForAppAsync(appId: string, { limit, offset, status, platform }: Filters): Promise<SubmissionFragment[]>;
13
+ allForAppAsync(graphqlClient: ExpoGraphqlClient, appId: string, { limit, offset, status, platform }: Filters): Promise<SubmissionFragment[]>;
13
14
  };
14
15
  export {};
@@ -7,8 +7,8 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
7
  const client_1 = require("../client");
8
8
  const Submission_1 = require("../types/Submission");
9
9
  exports.SubmissionQuery = {
10
- async byIdAsync(submissionId, { useCache = true } = {}) {
11
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
10
+ async byIdAsync(graphqlClient, submissionId, { useCache = true } = {}) {
11
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
12
12
  .query((0, graphql_tag_1.default) `
13
13
  query SubmissionsByIdQuery($submissionId: ID!) {
14
14
  submissions {
@@ -26,9 +26,9 @@ exports.SubmissionQuery = {
26
26
  .toPromise());
27
27
  return data.submissions.byId;
28
28
  },
29
- async allForAppAsync(appId, { limit = 10, offset = 0, status, platform }) {
29
+ async allForAppAsync(graphqlClient, appId, { limit = 10, offset = 0, status, platform }) {
30
30
  var _a, _b;
31
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
31
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
32
32
  .query((0, graphql_tag_1.default) `
33
33
  query GetAllSubmissionsForApp(
34
34
  $appId: String!
@@ -1,6 +1,7 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { UpdateFragment, ViewUpdateGroupsOnAppQueryVariables, ViewUpdateGroupsOnBranchQueryVariables, ViewUpdatesByGroupQueryVariables } from '../generated';
2
3
  export declare const UpdateQuery: {
3
- viewUpdateGroupAsync({ groupId, }: ViewUpdatesByGroupQueryVariables): Promise<UpdateFragment[]>;
4
- viewUpdateGroupsOnBranchAsync({ limit, offset, appId, branchName, filter, }: ViewUpdateGroupsOnBranchQueryVariables): Promise<UpdateFragment[][]>;
5
- viewUpdateGroupsOnAppAsync({ limit, offset, appId, filter, }: ViewUpdateGroupsOnAppQueryVariables): Promise<UpdateFragment[][]>;
4
+ viewUpdateGroupAsync(graphqlClient: ExpoGraphqlClient, { groupId }: ViewUpdatesByGroupQueryVariables): Promise<UpdateFragment[]>;
5
+ viewUpdateGroupsOnBranchAsync(graphqlClient: ExpoGraphqlClient, { limit, offset, appId, branchName, filter }: ViewUpdateGroupsOnBranchQueryVariables): Promise<UpdateFragment[][]>;
6
+ viewUpdateGroupsOnAppAsync(graphqlClient: ExpoGraphqlClient, { limit, offset, appId, filter }: ViewUpdateGroupsOnAppQueryVariables): Promise<UpdateFragment[][]>;
6
7
  };
@@ -7,8 +7,8 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
7
  const client_1 = require("../client");
8
8
  const Update_1 = require("../types/Update");
9
9
  exports.UpdateQuery = {
10
- async viewUpdateGroupAsync({ groupId, }) {
11
- const { updatesByGroup } = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
10
+ async viewUpdateGroupAsync(graphqlClient, { groupId }) {
11
+ const { updatesByGroup } = await (0, client_1.withErrorHandlingAsync)(graphqlClient
12
12
  .query((0, graphql_tag_1.default) `
13
13
  query ViewUpdatesByGroup($groupId: ID!) {
14
14
  updatesByGroup(group: $groupId) {
@@ -26,8 +26,8 @@ exports.UpdateQuery = {
26
26
  }
27
27
  return updatesByGroup;
28
28
  },
29
- async viewUpdateGroupsOnBranchAsync({ limit, offset, appId, branchName, filter, }) {
30
- const response = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
29
+ async viewUpdateGroupsOnBranchAsync(graphqlClient, { limit, offset, appId, branchName, filter }) {
30
+ const response = await (0, client_1.withErrorHandlingAsync)(graphqlClient
31
31
  .query((0, graphql_tag_1.default) `
32
32
  query ViewUpdateGroupsOnBranch(
33
33
  $appId: String!
@@ -64,8 +64,8 @@ exports.UpdateQuery = {
64
64
  }
65
65
  return branch.updateGroups;
66
66
  },
67
- async viewUpdateGroupsOnAppAsync({ limit, offset, appId, filter, }) {
68
- const response = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
67
+ async viewUpdateGroupsOnAppAsync(graphqlClient, { limit, offset, appId, filter }) {
68
+ const response = await (0, client_1.withErrorHandlingAsync)(graphqlClient
69
69
  .query((0, graphql_tag_1.default) `
70
70
  query ViewUpdateGroupsOnApp(
71
71
  $appId: String!
@@ -1,4 +1,5 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { CurrentUserQuery } from '../generated';
2
3
  export declare const UserQuery: {
3
- currentUserAsync(): Promise<CurrentUserQuery['meActor']>;
4
+ currentUserAsync(graphqlClient: ExpoGraphqlClient): Promise<CurrentUserQuery['meActor']>;
4
5
  };
@@ -7,8 +7,8 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
7
  const client_1 = require("../client");
8
8
  const Account_1 = require("../types/Account");
9
9
  exports.UserQuery = {
10
- async currentUserAsync() {
11
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
10
+ async currentUserAsync(graphqlClient) {
11
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
12
12
  .query((0, graphql_tag_1.default) `
13
13
  query CurrentUser {
14
14
  meActor {
@@ -1,5 +1,6 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { WebhookFilter, WebhookFragment } from '../generated';
2
3
  export declare const WebhookQuery: {
3
- byAppIdAsync(appId: string, webhookFilter?: WebhookFilter): Promise<WebhookFragment[]>;
4
- byIdAsync(webhookId: string): Promise<WebhookFragment>;
4
+ byAppIdAsync(graphqlClient: ExpoGraphqlClient, appId: string, webhookFilter?: WebhookFilter): Promise<WebhookFragment[]>;
5
+ byIdAsync(graphqlClient: ExpoGraphqlClient, webhookId: string): Promise<WebhookFragment>;
5
6
  };
@@ -7,9 +7,9 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
7
  const client_1 = require("../client");
8
8
  const Webhook_1 = require("../types/Webhook");
9
9
  exports.WebhookQuery = {
10
- async byAppIdAsync(appId, webhookFilter) {
10
+ async byAppIdAsync(graphqlClient, appId, webhookFilter) {
11
11
  var _a, _b;
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 WebhooksByAppId($appId: String!, $webhookFilter: WebhookFilter) {
15
15
  app {
@@ -29,8 +29,8 @@ exports.WebhookQuery = {
29
29
  .toPromise());
30
30
  return (_b = (_a = data.app) === null || _a === void 0 ? void 0 : _a.byId.webhooks) !== null && _b !== void 0 ? _b : [];
31
31
  },
32
- async byIdAsync(webhookId) {
33
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
32
+ async byIdAsync(graphqlClient, webhookId) {
33
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
34
34
  .query((0, graphql_tag_1.default) `
35
35
  query WebhookById($webhookId: ID!) {
36
36
  webhook {
@@ -1,3 +1,4 @@
1
+ import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { AppPrivacy } from '../graphql/generated';
2
3
  import { Actor } from '../user/User';
3
4
  /**
@@ -6,7 +7,7 @@ import { Actor } from '../user/User';
6
7
  * 2. If no existing project is found, ask the user whether they would like to register a new one.
7
8
  * If yes, register and return that. If not, throw.
8
9
  */
9
- export declare function fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync(projectInfo: {
10
+ export declare function fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync(graphqlClient: ExpoGraphqlClient, projectInfo: {
10
11
  accountName: string;
11
12
  projectName: string;
12
13
  privacy?: AppPrivacy;
@@ -19,4 +20,4 @@ export declare function fetchOrCreateProjectIDForWriteToConfigWithConfirmationAs
19
20
  * @param slug project slug
20
21
  * @returns A promise resolving to Project ID, null if it doesn't exist
21
22
  */
22
- export declare function findProjectIdByAccountNameAndSlugNullableAsync(accountName: string, slug: string): Promise<string | null>;
23
+ export declare function findProjectIdByAccountNameAndSlugNullableAsync(graphqlClient: ExpoGraphqlClient, accountName: string, slug: string): Promise<string | null>;
@@ -16,7 +16,7 @@ const prompts_1 = require("../prompts");
16
16
  * 2. If no existing project is found, ask the user whether they would like to register a new one.
17
17
  * If yes, register and return that. If not, throw.
18
18
  */
19
- async function fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync(projectInfo, options, actor) {
19
+ async function fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync(graphqlClient, projectInfo, options, actor) {
20
20
  var _a;
21
21
  const { accountName, projectName } = projectInfo;
22
22
  const projectFullName = `@${accountName}/${projectName}`;
@@ -31,7 +31,7 @@ async function fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync(proje
31
31
  if (!account) {
32
32
  throw new Error(`You must have access to the ${accountName} account to configure this EAS project.`);
33
33
  }
34
- const projectIdOnServer = await findProjectIdByAccountNameAndSlugNullableAsync(accountName, projectName);
34
+ const projectIdOnServer = await findProjectIdByAccountNameAndSlugNullableAsync(graphqlClient, accountName, projectName);
35
35
  if (projectIdOnServer) {
36
36
  const affirmedLink = await (0, prompts_1.confirmAsync)({
37
37
  message: `Existing EAS project found for ${projectFullName} (id = ${projectIdOnServer}). Configure this project?`,
@@ -57,7 +57,7 @@ async function fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync(proje
57
57
  });
58
58
  const spinner = (0, ora_1.ora)(`Creating ${chalk_1.default.bold(projectFullName)} on Expo`).start();
59
59
  try {
60
- const id = await AppMutation_1.AppMutation.createAppAsync({
60
+ const id = await AppMutation_1.AppMutation.createAppAsync(graphqlClient, {
61
61
  accountId: account.id,
62
62
  projectName,
63
63
  privacy: (_a = projectInfo.privacy) !== null && _a !== void 0 ? _a : generated_1.AppPrivacy.Public,
@@ -77,10 +77,10 @@ exports.fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync = fetchOrCre
77
77
  * @param slug project slug
78
78
  * @returns A promise resolving to Project ID, null if it doesn't exist
79
79
  */
80
- async function findProjectIdByAccountNameAndSlugNullableAsync(accountName, slug) {
80
+ async function findProjectIdByAccountNameAndSlugNullableAsync(graphqlClient, accountName, slug) {
81
81
  var _a;
82
82
  try {
83
- const { id } = await AppQuery_1.AppQuery.byFullNameAsync(`@${accountName}/${slug}`);
83
+ const { id } = await AppQuery_1.AppQuery.byFullNameAsync(graphqlClient, `@${accountName}/${slug}`);
84
84
  return id;
85
85
  }
86
86
  catch (err) {
@@ -1,4 +1,5 @@
1
1
  import { ExpoConfig } from '@expo/config';
2
+ import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
2
3
  import { AccountFragment, AppPrivacy } from '../graphql/generated';
3
4
  import { Actor } from '../user/User';
4
5
  export declare function getUsername(exp: ExpoConfig, user: Actor): string | undefined;
@@ -15,5 +16,5 @@ export declare function isExpoUpdatesInstalled(projectDir: string): boolean;
15
16
  export declare function isExpoUpdatesInstalledOrAvailable(projectDir: string, sdkVersion?: string): boolean;
16
17
  export declare function validateAppVersionRuntimePolicySupportAsync(projectDir: string, exp: ExpoConfig): Promise<void>;
17
18
  export declare function installExpoUpdatesAsync(projectDir: string): Promise<void>;
18
- export declare function getOwnerAccountForProjectIdAsync(projectId: string): Promise<AccountFragment>;
19
- export declare function getDisplayNameForProjectIdAsync(projectId: string): Promise<string>;
19
+ export declare function getOwnerAccountForProjectIdAsync(graphqlClient: ExpoGraphqlClient, projectId: string): Promise<AccountFragment>;
20
+ export declare function getDisplayNameForProjectIdAsync(graphqlClient: ExpoGraphqlClient, projectId: string): Promise<string>;
@@ -96,13 +96,13 @@ async function installExpoUpdatesAsync(projectDir) {
96
96
  log_1.default.newLine();
97
97
  }
98
98
  exports.installExpoUpdatesAsync = installExpoUpdatesAsync;
99
- async function getOwnerAccountForProjectIdAsync(projectId) {
100
- const app = await AppQuery_1.AppQuery.byIdAsync(projectId);
99
+ async function getOwnerAccountForProjectIdAsync(graphqlClient, projectId) {
100
+ const app = await AppQuery_1.AppQuery.byIdAsync(graphqlClient, projectId);
101
101
  return app.ownerAccount;
102
102
  }
103
103
  exports.getOwnerAccountForProjectIdAsync = getOwnerAccountForProjectIdAsync;
104
- async function getDisplayNameForProjectIdAsync(projectId) {
105
- const app = await AppQuery_1.AppQuery.byIdAsync(projectId);
104
+ async function getDisplayNameForProjectIdAsync(graphqlClient, projectId) {
105
+ const app = await AppQuery_1.AppQuery.byIdAsync(graphqlClient, projectId);
106
106
  return app.fullName;
107
107
  }
108
108
  exports.getDisplayNameForProjectIdAsync = getDisplayNameForProjectIdAsync;
@@ -1,6 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  import { ExpoConfig, Platform } from '@expo/config';
3
3
  import Joi from 'joi';
4
+ import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
4
5
  import { PartialManifestAsset } from '../graphql/generated';
5
6
  export declare type PublishPlatform = Extract<'android' | 'ios', Platform>;
6
7
  declare type Metadata = {
@@ -67,7 +68,7 @@ export declare function collectAssetsAsync({ inputDir, platforms, }: {
67
68
  inputDir: string;
68
69
  platforms: PublishPlatform[];
69
70
  }): Promise<CollectedAssets>;
70
- export declare function filterOutAssetsThatAlreadyExistAsync(uniqueAssetsWithStorageKey: (RawAsset & {
71
+ export declare function filterOutAssetsThatAlreadyExistAsync(graphqlClient: ExpoGraphqlClient, uniqueAssetsWithStorageKey: (RawAsset & {
71
72
  storageKey: string;
72
73
  })[]): Promise<(RawAsset & {
73
74
  storageKey: string;
@@ -78,6 +79,6 @@ declare type AssetUploadResult = {
78
79
  uniqueUploadedAssetCount: number;
79
80
  assetLimitPerUpdateGroup: number;
80
81
  };
81
- export declare function uploadAssetsAsync(assetsForUpdateInfoGroup: CollectedAssets, projectId: string, updateSpinnerText?: (totalAssets: number, missingAssets: number) => void): Promise<AssetUploadResult>;
82
+ export declare function uploadAssetsAsync(graphqlClient: ExpoGraphqlClient, assetsForUpdateInfoGroup: CollectedAssets, projectId: string, updateSpinnerText?: (totalAssets: number, missingAssets: number) => void): Promise<AssetUploadResult>;
82
83
  export declare function isUploadedAssetCountAboveWarningThreshold(uploadedAssetCount: number, assetLimitPerUpdateGroup: number): boolean;
83
84
  export {};
@@ -174,8 +174,8 @@ async function collectAssetsAsync({ inputDir, platforms, }) {
174
174
  return assetsFinal;
175
175
  }
176
176
  exports.collectAssetsAsync = collectAssetsAsync;
177
- async function filterOutAssetsThatAlreadyExistAsync(uniqueAssetsWithStorageKey) {
178
- const assetMetadata = await PublishQuery_1.PublishQuery.getAssetMetadataAsync(uniqueAssetsWithStorageKey.map(asset => asset.storageKey));
177
+ async function filterOutAssetsThatAlreadyExistAsync(graphqlClient, uniqueAssetsWithStorageKey) {
178
+ const assetMetadata = await PublishQuery_1.PublishQuery.getAssetMetadataAsync(graphqlClient, uniqueAssetsWithStorageKey.map(asset => asset.storageKey));
179
179
  const missingAssetKeys = assetMetadata
180
180
  .filter(result => result.status !== generated_1.AssetMetadataStatus.Exists)
181
181
  .map(result => result.storageKey);
@@ -185,7 +185,7 @@ async function filterOutAssetsThatAlreadyExistAsync(uniqueAssetsWithStorageKey)
185
185
  return missingAssets;
186
186
  }
187
187
  exports.filterOutAssetsThatAlreadyExistAsync = filterOutAssetsThatAlreadyExistAsync;
188
- async function uploadAssetsAsync(assetsForUpdateInfoGroup, projectId, updateSpinnerText) {
188
+ async function uploadAssetsAsync(graphqlClient, assetsForUpdateInfoGroup, projectId, updateSpinnerText) {
189
189
  let assets = [];
190
190
  let platform;
191
191
  for (platform in assetsForUpdateInfoGroup) {
@@ -204,18 +204,18 @@ async function uploadAssetsAsync(assetsForUpdateInfoGroup, projectId, updateSpin
204
204
  const uniqueAssets = (0, uniqBy_1.default)(assetsWithStorageKey, asset => asset.storageKey);
205
205
  const totalAssets = uniqueAssets.length;
206
206
  updateSpinnerText === null || updateSpinnerText === void 0 ? void 0 : updateSpinnerText(totalAssets, totalAssets);
207
- let missingAssets = await filterOutAssetsThatAlreadyExistAsync(uniqueAssets);
207
+ let missingAssets = await filterOutAssetsThatAlreadyExistAsync(graphqlClient, uniqueAssets);
208
208
  const uniqueUploadedAssetCount = missingAssets.length;
209
209
  const missingAssetChunks = (0, chunk_1.default)(missingAssets, 100);
210
210
  const specifications = [];
211
211
  for (const missingAssets of missingAssetChunks) {
212
- const { specifications: chunkSpecifications } = await PublishMutation_1.PublishMutation.getUploadURLsAsync(missingAssets.map(ma => ma.contentType));
212
+ const { specifications: chunkSpecifications } = await PublishMutation_1.PublishMutation.getUploadURLsAsync(graphqlClient, missingAssets.map(ma => ma.contentType));
213
213
  specifications.push(...chunkSpecifications);
214
214
  }
215
215
  updateSpinnerText === null || updateSpinnerText === void 0 ? void 0 : updateSpinnerText(totalAssets, missingAssets.length);
216
216
  const assetUploadPromiseLimit = (0, promise_limit_1.default)(15);
217
217
  const [assetLimitPerUpdateGroup] = await Promise.all([
218
- PublishQuery_1.PublishQuery.getAssetLimitPerUpdateGroupAsync(projectId),
218
+ PublishQuery_1.PublishQuery.getAssetLimitPerUpdateGroupAsync(graphqlClient, projectId),
219
219
  missingAssets.map((missingAsset, i) => {
220
220
  assetUploadPromiseLimit(async () => {
221
221
  const presignedPost = JSON.parse(specifications[i]);
@@ -226,7 +226,7 @@ async function uploadAssetsAsync(assetsForUpdateInfoGroup, projectId, updateSpin
226
226
  let timeout = 1;
227
227
  while (missingAssets.length > 0) {
228
228
  const timeoutPromise = new Promise(resolve => setTimeout(resolve, Math.min(timeout * 1000, 5000))); // linear backoff
229
- missingAssets = await filterOutAssetsThatAlreadyExistAsync(missingAssets);
229
+ missingAssets = await filterOutAssetsThatAlreadyExistAsync(graphqlClient, missingAssets);
230
230
  await timeoutPromise; // await after filterOutAssetsThatAlreadyExistAsync for easy mocking with jest.runAllTimers
231
231
  timeout += 1;
232
232
  updateSpinnerText === null || updateSpinnerText === void 0 ? void 0 : updateSpinnerText(totalAssets, missingAssets.length);
@@ -1,4 +1,5 @@
1
1
  import { Platform } from '@expo/eas-build-job';
2
+ import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
2
3
  import { BuildFragment } from '../graphql/generated';
3
4
  export declare const BUILD_LIST_ITEM_COUNT = 4;
4
5
  export declare enum ArchiveSourceType {
@@ -42,6 +43,6 @@ export interface Archive {
42
43
  url?: string;
43
44
  }
44
45
  export declare type ArchiveSource = ArchiveUrlSource | ArchiveLatestSource | ArchivePathSource | ArchiveBuildIdSource | ArchiveBuildListSource | ArchivePromptSource;
45
- export declare function getArchiveAsync(source: ArchiveSource): Promise<Archive>;
46
+ export declare function getArchiveAsync(graphqlClient: ExpoGraphqlClient, source: ArchiveSource): Promise<Archive>;
46
47
  export declare function isUuidV4(s: string): boolean;
47
48
  export {};