eas-cli 2.2.1 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) 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/queries.d.ts +2 -1
  24. package/build/build/queries.js +3 -3
  25. package/build/build/runBuildAndSubmit.d.ts +2 -1
  26. package/build/build/runBuildAndSubmit.js +26 -16
  27. package/build/build/types.d.ts +6 -1
  28. package/build/build/types.js +5 -0
  29. package/build/channel/queries.d.ts +4 -3
  30. package/build/channel/queries.js +13 -13
  31. package/build/commandUtils/EasCommand.d.ts +24 -3
  32. package/build/commandUtils/EasCommand.js +36 -6
  33. package/build/commandUtils/context/ContextField.d.ts +2 -0
  34. package/build/commandUtils/context/DynamicProjectConfigContextField.d.ts +1 -1
  35. package/build/commandUtils/context/DynamicProjectConfigContextField.js +2 -2
  36. package/build/commandUtils/context/LoggedInContextField.d.ts +12 -0
  37. package/build/commandUtils/context/LoggedInContextField.js +15 -0
  38. package/build/commandUtils/context/MaybeLoggedInContextField.d.ts +12 -0
  39. package/build/commandUtils/context/MaybeLoggedInContextField.js +17 -0
  40. package/build/commandUtils/context/OptionalProjectConfigContextField.d.ts +1 -1
  41. package/build/commandUtils/context/OptionalProjectConfigContextField.js +2 -2
  42. package/build/commandUtils/context/ProjectConfigContextField.d.ts +1 -1
  43. package/build/commandUtils/context/ProjectConfigContextField.js +2 -2
  44. package/build/commandUtils/context/SessionManagementContextField.d.ts +5 -0
  45. package/build/commandUtils/context/SessionManagementContextField.js +10 -0
  46. package/build/commandUtils/context/contextUtils/createGraphqlClient.d.ts +11 -0
  47. package/build/commandUtils/context/contextUtils/createGraphqlClient.js +43 -0
  48. package/build/commandUtils/context/contextUtils/getProjectIdAsync.d.ts +2 -1
  49. package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +11 -7
  50. package/build/commands/account/login.d.ts +3 -0
  51. package/build/commands/account/login.js +7 -2
  52. package/build/commands/account/logout.d.ts +3 -0
  53. package/build/commands/account/logout.js +7 -2
  54. package/build/commands/account/view.d.ts +3 -0
  55. package/build/commands/account/view.js +8 -3
  56. package/build/commands/branch/create.d.ts +3 -1
  57. package/build/commands/branch/create.js +6 -5
  58. package/build/commands/branch/delete.d.ts +1 -0
  59. package/build/commands/branch/delete.js +10 -9
  60. package/build/commands/branch/list.d.ts +1 -0
  61. package/build/commands/branch/list.js +3 -2
  62. package/build/commands/branch/rename.d.ts +1 -0
  63. package/build/commands/branch/rename.js +6 -5
  64. package/build/commands/branch/view.d.ts +1 -0
  65. package/build/commands/branch/view.js +4 -3
  66. package/build/commands/build/cancel.d.ts +3 -1
  67. package/build/commands/build/cancel.js +14 -13
  68. package/build/commands/build/configure.d.ts +1 -0
  69. package/build/commands/build/configure.js +4 -3
  70. package/build/commands/build/index.d.ts +1 -1
  71. package/build/commands/build/index.js +9 -3
  72. package/build/commands/build/inspect.d.ts +1 -1
  73. package/build/commands/build/inspect.js +2 -2
  74. package/build/commands/build/list.d.ts +1 -0
  75. package/build/commands/build/list.js +4 -3
  76. package/build/commands/build/version/set.d.ts +1 -1
  77. package/build/commands/build/version/set.js +4 -4
  78. package/build/commands/build/version/sync.d.ts +1 -1
  79. package/build/commands/build/version/sync.js +2 -2
  80. package/build/commands/build/view.d.ts +1 -0
  81. package/build/commands/build/view.js +5 -4
  82. package/build/commands/channel/create.d.ts +3 -1
  83. package/build/commands/channel/create.js +8 -7
  84. package/build/commands/channel/delete.d.ts +1 -0
  85. package/build/commands/channel/delete.js +7 -6
  86. package/build/commands/channel/edit.d.ts +3 -1
  87. package/build/commands/channel/edit.js +12 -8
  88. package/build/commands/channel/list.d.ts +1 -0
  89. package/build/commands/channel/list.js +3 -2
  90. package/build/commands/channel/rollout.d.ts +1 -0
  91. package/build/commands/channel/rollout.js +15 -14
  92. package/build/commands/channel/view.d.ts +1 -0
  93. package/build/commands/channel/view.js +4 -3
  94. package/build/commands/credentials.d.ts +1 -1
  95. package/build/commands/credentials.js +2 -2
  96. package/build/commands/device/create.d.ts +1 -1
  97. package/build/commands/device/create.js +2 -1
  98. package/build/commands/device/delete.d.ts +3 -1
  99. package/build/commands/device/delete.js +9 -8
  100. package/build/commands/device/list.d.ts +1 -0
  101. package/build/commands/device/list.js +5 -4
  102. package/build/commands/device/view.d.ts +1 -0
  103. package/build/commands/device/view.js +4 -3
  104. package/build/commands/metadata/pull.d.ts +1 -1
  105. package/build/commands/metadata/pull.js +2 -1
  106. package/build/commands/metadata/push.d.ts +1 -1
  107. package/build/commands/metadata/push.js +2 -1
  108. package/build/commands/open.d.ts +1 -0
  109. package/build/commands/open.js +3 -2
  110. package/build/commands/project/info.d.ts +1 -0
  111. package/build/commands/project/info.js +5 -4
  112. package/build/commands/project/init.d.ts +1 -1
  113. package/build/commands/project/init.js +5 -5
  114. package/build/commands/secret/create.d.ts +1 -0
  115. package/build/commands/secret/create.js +10 -9
  116. package/build/commands/secret/delete.d.ts +1 -0
  117. package/build/commands/secret/delete.js +4 -3
  118. package/build/commands/secret/list.d.ts +1 -0
  119. package/build/commands/secret/list.js +3 -2
  120. package/build/commands/submit.d.ts +1 -1
  121. package/build/commands/submit.js +4 -3
  122. package/build/commands/update/configure.d.ts +1 -0
  123. package/build/commands/update/configure.js +4 -3
  124. package/build/commands/update/delete.d.ts +3 -0
  125. package/build/commands/update/delete.js +9 -3
  126. package/build/commands/update/index.d.ts +3 -1
  127. package/build/commands/update/index.js +23 -17
  128. package/build/commands/update/list.d.ts +1 -0
  129. package/build/commands/update/list.js +6 -5
  130. package/build/commands/update/view.d.ts +3 -0
  131. package/build/commands/update/view.js +7 -1
  132. package/build/commands/webhook/create.d.ts +1 -0
  133. package/build/commands/webhook/create.js +3 -2
  134. package/build/commands/webhook/delete.d.ts +1 -0
  135. package/build/commands/webhook/delete.js +7 -6
  136. package/build/commands/webhook/list.d.ts +1 -0
  137. package/build/commands/webhook/list.js +4 -3
  138. package/build/commands/webhook/update.d.ts +3 -0
  139. package/build/commands/webhook/update.js +8 -2
  140. package/build/commands/webhook/view.d.ts +3 -0
  141. package/build/commands/webhook/view.js +7 -1
  142. package/build/credentials/android/actions/AssignFcm.js +2 -2
  143. package/build/credentials/android/actions/AssignGoogleServiceAccountKey.js +2 -2
  144. package/build/credentials/android/actions/BuildCredentialsUtils.js +12 -12
  145. package/build/credentials/android/actions/CreateFcm.js +1 -1
  146. package/build/credentials/android/actions/CreateGoogleServiceAccountKey.js +1 -1
  147. package/build/credentials/android/actions/CreateKeystore.js +4 -4
  148. package/build/credentials/android/actions/RemoveFcm.js +2 -2
  149. package/build/credentials/android/actions/RemoveGoogleServiceAccountKey.js +2 -2
  150. package/build/credentials/android/actions/RemoveKeystore.js +1 -1
  151. package/build/credentials/android/actions/SetUpBuildCredentials.js +3 -3
  152. package/build/credentials/android/actions/SetUpBuildCredentialsFromCredentialsJson.js +3 -3
  153. package/build/credentials/android/actions/SetUpGoogleServiceAccountKey.js +3 -3
  154. package/build/credentials/android/actions/UseExistingGoogleServiceAccountKey.js +1 -1
  155. package/build/credentials/android/api/GraphqlClient.d.ts +19 -18
  156. package/build/credentials/android/api/GraphqlClient.js +45 -45
  157. package/build/credentials/android/api/graphql/mutations/AndroidAppBuildCredentialsMutation.d.ts +3 -2
  158. package/build/credentials/android/api/graphql/mutations/AndroidAppBuildCredentialsMutation.js +4 -4
  159. package/build/credentials/android/api/graphql/mutations/AndroidAppCredentialsMutation.d.ts +4 -3
  160. package/build/credentials/android/api/graphql/mutations/AndroidAppCredentialsMutation.js +6 -6
  161. package/build/credentials/android/api/graphql/mutations/AndroidFcmMutation.d.ts +3 -2
  162. package/build/credentials/android/api/graphql/mutations/AndroidFcmMutation.js +4 -4
  163. package/build/credentials/android/api/graphql/mutations/AndroidKeystoreMutation.d.ts +3 -2
  164. package/build/credentials/android/api/graphql/mutations/AndroidKeystoreMutation.js +4 -4
  165. package/build/credentials/android/api/graphql/mutations/GoogleServiceAccountKeyMutation.d.ts +3 -2
  166. package/build/credentials/android/api/graphql/mutations/GoogleServiceAccountKeyMutation.js +4 -4
  167. package/build/credentials/android/api/graphql/queries/AndroidAppCredentialsQuery.d.ts +2 -1
  168. package/build/credentials/android/api/graphql/queries/AndroidAppCredentialsQuery.js +2 -2
  169. package/build/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.d.ts +2 -1
  170. package/build/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.js +2 -2
  171. package/build/credentials/android/utils/keystore.d.ts +2 -1
  172. package/build/credentials/android/utils/keystore.js +6 -6
  173. package/build/credentials/context.d.ts +3 -0
  174. package/build/credentials/context.js +1 -0
  175. package/build/credentials/credentialsJson/update.js +1 -1
  176. package/build/credentials/ios/actions/AppleTeamUtils.js +1 -1
  177. package/build/credentials/ios/actions/AscApiKeyUtils.js +1 -1
  178. package/build/credentials/ios/actions/AssignAscApiKey.js +2 -2
  179. package/build/credentials/ios/actions/AssignPushKey.js +2 -2
  180. package/build/credentials/ios/actions/BuildCredentialsUtils.js +5 -5
  181. package/build/credentials/ios/actions/ConfigureProvisioningProfile.js +1 -1
  182. package/build/credentials/ios/actions/CreateAscApiKey.js +1 -1
  183. package/build/credentials/ios/actions/CreateDistributionCertificate.js +1 -1
  184. package/build/credentials/ios/actions/CreateProvisioningProfile.js +2 -2
  185. package/build/credentials/ios/actions/CreatePushKey.js +1 -1
  186. package/build/credentials/ios/actions/DistributionCertificateUtils.js +2 -2
  187. package/build/credentials/ios/actions/PushKeyUtils.js +1 -1
  188. package/build/credentials/ios/actions/RemoveAscApiKey.js +1 -1
  189. package/build/credentials/ios/actions/RemoveDistributionCertificate.js +1 -1
  190. package/build/credentials/ios/actions/RemoveProvisioningProfile.js +1 -1
  191. package/build/credentials/ios/actions/RemovePushKey.js +1 -1
  192. package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +8 -8
  193. package/build/credentials/ios/actions/SetUpAscApiKey.js +2 -2
  194. package/build/credentials/ios/actions/SetUpDistributionCertificate.js +2 -2
  195. package/build/credentials/ios/actions/SetUpProvisioningProfile.js +1 -1
  196. package/build/credentials/ios/actions/SetUpPushKey.js +4 -4
  197. package/build/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.js +5 -5
  198. package/build/credentials/ios/api/GraphqlClient.d.ts +25 -24
  199. package/build/credentials/ios/api/GraphqlClient.js +73 -73
  200. package/build/credentials/ios/api/graphql/mutations/AppStoreConnectApiKeyMutation.d.ts +3 -2
  201. package/build/credentials/ios/api/graphql/mutations/AppStoreConnectApiKeyMutation.js +4 -4
  202. package/build/credentials/ios/api/graphql/mutations/AppleAppIdentifierMutation.d.ts +2 -1
  203. package/build/credentials/ios/api/graphql/mutations/AppleAppIdentifierMutation.js +2 -2
  204. package/build/credentials/ios/api/graphql/mutations/AppleDeviceMutation.d.ts +3 -2
  205. package/build/credentials/ios/api/graphql/mutations/AppleDeviceMutation.js +4 -4
  206. package/build/credentials/ios/api/graphql/mutations/AppleDeviceRegistrationRequestMutation.d.ts +2 -1
  207. package/build/credentials/ios/api/graphql/mutations/AppleDeviceRegistrationRequestMutation.js +2 -2
  208. package/build/credentials/ios/api/graphql/mutations/AppleDistributionCertificateMutation.d.ts +3 -2
  209. package/build/credentials/ios/api/graphql/mutations/AppleDistributionCertificateMutation.js +4 -4
  210. package/build/credentials/ios/api/graphql/mutations/AppleProvisioningProfileMutation.d.ts +4 -3
  211. package/build/credentials/ios/api/graphql/mutations/AppleProvisioningProfileMutation.js +6 -6
  212. package/build/credentials/ios/api/graphql/mutations/ApplePushKeyMutation.d.ts +3 -2
  213. package/build/credentials/ios/api/graphql/mutations/ApplePushKeyMutation.js +4 -4
  214. package/build/credentials/ios/api/graphql/mutations/AppleTeamMutation.d.ts +2 -1
  215. package/build/credentials/ios/api/graphql/mutations/AppleTeamMutation.js +2 -2
  216. package/build/credentials/ios/api/graphql/mutations/IosAppBuildCredentialsMutation.d.ts +4 -3
  217. package/build/credentials/ios/api/graphql/mutations/IosAppBuildCredentialsMutation.js +6 -6
  218. package/build/credentials/ios/api/graphql/mutations/IosAppCredentialsMutation.d.ts +4 -3
  219. package/build/credentials/ios/api/graphql/mutations/IosAppCredentialsMutation.js +6 -6
  220. package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.d.ts +2 -1
  221. package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.js +2 -2
  222. package/build/credentials/ios/api/graphql/queries/AppleAppIdentifierQuery.d.ts +2 -1
  223. package/build/credentials/ios/api/graphql/queries/AppleAppIdentifierQuery.js +2 -2
  224. package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.d.ts +4 -3
  225. package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +6 -6
  226. package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.d.ts +3 -2
  227. package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.js +4 -4
  228. package/build/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.d.ts +2 -1
  229. package/build/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.js +2 -2
  230. package/build/credentials/ios/api/graphql/queries/ApplePushKeyQuery.d.ts +2 -1
  231. package/build/credentials/ios/api/graphql/queries/ApplePushKeyQuery.js +2 -2
  232. package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.d.ts +3 -2
  233. package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +4 -4
  234. package/build/credentials/ios/api/graphql/queries/IosAppBuildCredentialsQuery.d.ts +2 -1
  235. package/build/credentials/ios/api/graphql/queries/IosAppBuildCredentialsQuery.js +2 -2
  236. package/build/credentials/ios/api/graphql/queries/IosAppCredentialsQuery.d.ts +3 -2
  237. package/build/credentials/ios/api/graphql/queries/IosAppCredentialsQuery.js +4 -4
  238. package/build/credentials/manager/HelperActions.d.ts +2 -0
  239. package/build/credentials/manager/ManageAndroid.js +4 -3
  240. package/build/credentials/manager/ManageIos.js +4 -3
  241. package/build/credentials/manager/SelectAndroidBuildCredentials.js +2 -2
  242. package/build/credentials/manager/SelectPlatform.d.ts +3 -1
  243. package/build/credentials/manager/SelectPlatform.js +2 -1
  244. package/build/devices/actions/create/action.d.ts +3 -1
  245. package/build/devices/actions/create/action.js +5 -4
  246. package/build/devices/actions/create/developerPortalMethod.d.ts +2 -1
  247. package/build/devices/actions/create/developerPortalMethod.js +9 -9
  248. package/build/devices/actions/create/inputMethod.d.ts +2 -1
  249. package/build/devices/actions/create/inputMethod.js +4 -4
  250. package/build/devices/actions/create/registrationUrlMethod.d.ts +2 -1
  251. package/build/devices/actions/create/registrationUrlMethod.js +4 -4
  252. package/build/devices/context.d.ts +4 -1
  253. package/build/devices/context.js +2 -1
  254. package/build/devices/manager.d.ts +3 -1
  255. package/build/devices/manager.js +9 -8
  256. package/build/devices/queries.d.ts +4 -3
  257. package/build/devices/queries.js +7 -7
  258. package/build/graphql/client.d.ts +1 -8
  259. package/build/graphql/client.js +1 -39
  260. package/build/graphql/generated.d.ts +2 -7
  261. package/build/graphql/generated.js +2 -0
  262. package/build/graphql/mutations/AppMutation.d.ts +2 -1
  263. package/build/graphql/mutations/AppMutation.js +2 -2
  264. package/build/graphql/mutations/AppVersionMutation.d.ts +2 -1
  265. package/build/graphql/mutations/AppVersionMutation.js +2 -2
  266. package/build/graphql/mutations/BuildMutation.d.ts +3 -2
  267. package/build/graphql/mutations/BuildMutation.js +4 -4
  268. package/build/graphql/mutations/EnvironmentSecretMutation.d.ts +4 -3
  269. package/build/graphql/mutations/EnvironmentSecretMutation.js +6 -6
  270. package/build/graphql/mutations/KeystoreGenerationUrlMutation.d.ts +2 -1
  271. package/build/graphql/mutations/KeystoreGenerationUrlMutation.js +2 -2
  272. package/build/graphql/mutations/PublishMutation.d.ts +4 -3
  273. package/build/graphql/mutations/PublishMutation.js +6 -6
  274. package/build/graphql/mutations/SubmissionMutation.d.ts +3 -2
  275. package/build/graphql/mutations/SubmissionMutation.js +4 -4
  276. package/build/graphql/mutations/UploadSessionMutation.d.ts +2 -1
  277. package/build/graphql/mutations/UploadSessionMutation.js +2 -2
  278. package/build/graphql/mutations/WebhookMutation.d.ts +4 -3
  279. package/build/graphql/mutations/WebhookMutation.js +6 -6
  280. package/build/graphql/queries/AppQuery.d.ts +3 -2
  281. package/build/graphql/queries/AppQuery.js +4 -4
  282. package/build/graphql/queries/AppVersionQuery.d.ts +2 -1
  283. package/build/graphql/queries/AppVersionQuery.js +2 -2
  284. package/build/graphql/queries/BranchQuery.d.ts +4 -3
  285. package/build/graphql/queries/BranchQuery.js +6 -6
  286. package/build/graphql/queries/BuildQuery.d.ts +4 -3
  287. package/build/graphql/queries/BuildQuery.js +6 -6
  288. package/build/graphql/queries/ChannelQuery.d.ts +3 -2
  289. package/build/graphql/queries/ChannelQuery.js +4 -4
  290. package/build/graphql/queries/EnvironmentSecretsQuery.d.ts +3 -2
  291. package/build/graphql/queries/EnvironmentSecretsQuery.js +4 -4
  292. package/build/graphql/queries/PublishQuery.d.ts +3 -2
  293. package/build/graphql/queries/PublishQuery.js +4 -4
  294. package/build/graphql/queries/StatuspageServiceQuery.d.ts +2 -1
  295. package/build/graphql/queries/StatuspageServiceQuery.js +2 -2
  296. package/build/graphql/queries/SubmissionQuery.d.ts +3 -2
  297. package/build/graphql/queries/SubmissionQuery.js +4 -4
  298. package/build/graphql/queries/UpdateQuery.d.ts +4 -3
  299. package/build/graphql/queries/UpdateQuery.js +6 -6
  300. package/build/graphql/queries/UserQuery.d.ts +2 -1
  301. package/build/graphql/queries/UserQuery.js +2 -2
  302. package/build/graphql/queries/WebhookQuery.d.ts +3 -2
  303. package/build/graphql/queries/WebhookQuery.js +4 -4
  304. package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.d.ts +3 -2
  305. package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.js +5 -5
  306. package/build/project/projectUtils.d.ts +3 -2
  307. package/build/project/projectUtils.js +4 -4
  308. package/build/project/publish.d.ts +3 -2
  309. package/build/project/publish.js +7 -7
  310. package/build/submit/ArchiveSource.d.ts +2 -1
  311. package/build/submit/ArchiveSource.js +30 -30
  312. package/build/submit/android/AndroidSubmitter.js +2 -2
  313. package/build/submit/context.d.ts +3 -0
  314. package/build/submit/context.js +3 -2
  315. package/build/submit/ios/IosSubmitter.js +2 -2
  316. package/build/submit/submit.d.ts +2 -1
  317. package/build/submit/submit.js +2 -2
  318. package/build/submit/utils/builds.d.ts +2 -1
  319. package/build/submit/utils/builds.js +2 -2
  320. package/build/submit/utils/errors.js +20 -4
  321. package/build/submit/utils/files.d.ts +2 -1
  322. package/build/submit/utils/files.js +2 -2
  323. package/build/submit/utils/wait.d.ts +2 -1
  324. package/build/submit/utils/wait.js +2 -2
  325. package/build/update/android/UpdatesModule.d.ts +2 -1
  326. package/build/update/android/UpdatesModule.js +2 -2
  327. package/build/update/ios/UpdatesModule.d.ts +2 -1
  328. package/build/update/ios/UpdatesModule.js +2 -2
  329. package/build/update/queries.d.ts +4 -3
  330. package/build/update/queries.js +22 -12
  331. package/build/uploads.d.ts +2 -1
  332. package/build/uploads.js +2 -2
  333. package/build/user/SessionManager.d.ts +70 -0
  334. package/build/user/SessionManager.js +258 -0
  335. package/build/user/User.d.ts +0 -9
  336. package/build/user/User.js +1 -60
  337. package/build/user/fetchSessionSecretAndUser.d.ts +9 -0
  338. package/build/user/fetchSessionSecretAndUser.js +43 -0
  339. package/build/utils/statuspageService.d.ts +2 -1
  340. package/build/utils/statuspageService.js +4 -4
  341. package/oclif.manifest.json +1 -1
  342. package/package.json +2 -2
  343. package/build/commandUtils/context/ActorContextField.d.ts +0 -5
  344. package/build/commandUtils/context/ActorContextField.js +0 -11
  345. package/build/commandUtils/context/contextUtils/ensureLoggedInAsync.d.ts +0 -21
  346. package/build/commandUtils/context/contextUtils/ensureLoggedInAsync.js +0 -75
  347. package/build/user/otp.d.ts +0 -29
  348. package/build/user/otp.js +0 -119
  349. package/build/user/sessionStorage.d.ts +0 -11
  350. package/build/user/sessionStorage.js +0 -36
@@ -7,8 +7,8 @@ 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.WebhookMutation = {
10
- async createWebhookAsync(appId, webhookInput) {
11
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
10
+ async createWebhookAsync(graphqlClient, appId, webhookInput) {
11
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
12
12
  .mutation((0, graphql_tag_1.default) `
13
13
  mutation CreateWebhookMutation($appId: String!, $webhookInput: WebhookInput!) {
14
14
  webhook {
@@ -23,8 +23,8 @@ exports.WebhookMutation = {
23
23
  .toPromise());
24
24
  return data.webhook.createWebhook;
25
25
  },
26
- async updateWebhookAsync(webhookId, webhookInput) {
27
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
26
+ async updateWebhookAsync(graphqlClient, webhookId, webhookInput) {
27
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
28
28
  .mutation((0, graphql_tag_1.default) `
29
29
  mutation UpdateWebhookMutation($webhookId: ID!, $webhookInput: WebhookInput!) {
30
30
  webhook {
@@ -39,8 +39,8 @@ exports.WebhookMutation = {
39
39
  .toPromise());
40
40
  return data.webhook.updateWebhook;
41
41
  },
42
- async deleteWebhookAsync(webhookId) {
43
- await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
42
+ async deleteWebhookAsync(graphqlClient, webhookId) {
43
+ await (0, client_1.withErrorHandlingAsync)(graphqlClient
44
44
  .mutation((0, graphql_tag_1.default) `
45
45
  mutation DeleteWebhookMutation($webhookId: ID!) {
46
46
  webhook {
@@ -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 {};