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
@@ -14,13 +14,13 @@ const DEVICE_CLASS_DISPLAY_NAMES = {
14
14
  [generated_1.AppleDeviceClass.Iphone]: 'iPhone',
15
15
  [generated_1.AppleDeviceClass.Ipad]: 'iPad',
16
16
  };
17
- async function runInputMethodAsync(accountId, appleTeam) {
17
+ async function runInputMethodAsync(graphqlClient, accountId, appleTeam) {
18
18
  log_1.default.newLine();
19
19
  log_1.default.log(chalk_1.default.yellow('This is an advanced option. Use at your own risk.'));
20
20
  log_1.default.newLine();
21
21
  let registerNextDevice = true;
22
22
  while (registerNextDevice) {
23
- await collectDataAndRegisterDeviceAsync({ accountId, appleTeam });
23
+ await collectDataAndRegisterDeviceAsync(graphqlClient, { accountId, appleTeam });
24
24
  log_1.default.newLine();
25
25
  registerNextDevice = await (0, prompts_1.confirmAsync)({
26
26
  message: 'Do you want to register another device?',
@@ -28,11 +28,11 @@ async function runInputMethodAsync(accountId, appleTeam) {
28
28
  }
29
29
  }
30
30
  exports.runInputMethodAsync = runInputMethodAsync;
31
- async function collectDataAndRegisterDeviceAsync({ accountId, appleTeam, }) {
31
+ async function collectDataAndRegisterDeviceAsync(graphqlClient, { accountId, appleTeam, }) {
32
32
  const { udid, deviceClass, name } = await collectDeviceDataAsync(appleTeam);
33
33
  const spinner = (0, ora_1.ora)(`Registering Apple device on Expo`).start();
34
34
  try {
35
- await AppleDeviceMutation_1.AppleDeviceMutation.createAppleDeviceAsync({
35
+ await AppleDeviceMutation_1.AppleDeviceMutation.createAppleDeviceAsync(graphqlClient, {
36
36
  appleTeamId: appleTeam.id,
37
37
  identifier: udid,
38
38
  name,
@@ -1,2 +1,3 @@
1
+ import { ExpoGraphqlClient } from '../../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { AppleTeam } from '../../../graphql/generated';
2
- export declare function runRegistrationUrlMethodAsync(accountId: string, appleTeam: Pick<AppleTeam, 'id'>): Promise<void>;
3
+ export declare function runRegistrationUrlMethodAsync(graphqlClient: ExpoGraphqlClient, accountId: string, appleTeam: Pick<AppleTeam, 'id'>): Promise<void>;
@@ -9,8 +9,8 @@ const url_1 = require("url");
9
9
  const api_1 = require("../../../api");
10
10
  const AppleDeviceRegistrationRequestMutation_1 = require("../../../credentials/ios/api/graphql/mutations/AppleDeviceRegistrationRequestMutation");
11
11
  const log_1 = tslib_1.__importDefault(require("../../../log"));
12
- async function runRegistrationUrlMethodAsync(accountId, appleTeam) {
13
- const registrationURL = await generateDeviceRegistrationURLAsync(accountId, appleTeam);
12
+ async function runRegistrationUrlMethodAsync(graphqlClient, accountId, appleTeam) {
13
+ const registrationURL = await generateDeviceRegistrationURLAsync(graphqlClient, accountId, appleTeam);
14
14
  log_1.default.newLine();
15
15
  qrcode_terminal_1.default.generate(registrationURL, { small: true }, code => log_1.default.log(`${(0, indent_string_1.default)(code, 2)}\n`));
16
16
  log_1.default.log('Open the following link on your iOS devices (or scan the QR code) and follow the instructions to install the development profile:');
@@ -18,8 +18,8 @@ async function runRegistrationUrlMethodAsync(accountId, appleTeam) {
18
18
  log_1.default.log(chalk_1.default.green(`${registrationURL}`));
19
19
  }
20
20
  exports.runRegistrationUrlMethodAsync = runRegistrationUrlMethodAsync;
21
- async function generateDeviceRegistrationURLAsync(accountId, appleTeam) {
22
- const appleDeviceRegistrationRequest = await AppleDeviceRegistrationRequestMutation_1.AppleDeviceRegistrationRequestMutation.createAppleDeviceRegistrationRequestAsync(appleTeam.id, accountId);
21
+ async function generateDeviceRegistrationURLAsync(graphqlClient, accountId, appleTeam) {
22
+ const appleDeviceRegistrationRequest = await AppleDeviceRegistrationRequestMutation_1.AppleDeviceRegistrationRequestMutation.createAppleDeviceRegistrationRequestAsync(graphqlClient, appleTeam.id, accountId);
23
23
  return formatRegistrationURL(appleDeviceRegistrationRequest.id);
24
24
  }
25
25
  function formatRegistrationURL(id) {
@@ -1,12 +1,15 @@
1
+ import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import AppStoreApi from '../credentials/ios/appstore/AppStoreApi';
2
3
  import { Actor } from '../user/User';
3
4
  export interface DeviceManagerContext {
4
5
  appStore: AppStoreApi;
5
6
  user: Actor;
7
+ graphqlClient: ExpoGraphqlClient;
6
8
  projectId: string | null;
7
9
  }
8
- export declare function createContextAsync({ appStore, user, projectId, }: {
10
+ export declare function createContextAsync({ appStore, user, graphqlClient, projectId, }: {
9
11
  appStore: AppStoreApi;
10
12
  user: Actor;
13
+ graphqlClient: ExpoGraphqlClient;
11
14
  projectId: string | undefined;
12
15
  }): Promise<DeviceManagerContext>;
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createContextAsync = void 0;
4
- async function createContextAsync({ appStore, user, projectId, }) {
4
+ async function createContextAsync({ appStore, user, graphqlClient, projectId, }) {
5
5
  return {
6
6
  appStore,
7
7
  user,
8
+ graphqlClient,
8
9
  projectId: projectId !== null && projectId !== void 0 ? projectId : null,
9
10
  };
10
11
  }
@@ -1,3 +1,4 @@
1
+ import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { AccountFragment } from '../graphql/generated';
2
3
  import { Actor } from '../user/User';
3
4
  import { DeviceManagerContext } from './context';
@@ -8,9 +9,10 @@ export default class DeviceManager {
8
9
  private resolveAccountAsync;
9
10
  }
10
11
  export declare class AccountResolver {
12
+ private graphqlClient;
11
13
  private projectId;
12
14
  private user;
13
- constructor(projectId: string | null, user: Actor);
15
+ constructor(graphqlClient: ExpoGraphqlClient, projectId: string | null, user: Actor);
14
16
  resolveAccountAsync(): Promise<AccountFragment>;
15
17
  private resolveProjectAccountAsync;
16
18
  private promptForAccountAsync;
@@ -26,21 +26,22 @@ class DeviceManager {
26
26
  log_1.default.addNewLineIfNone();
27
27
  const account = await this.resolveAccountAsync();
28
28
  const appleAuthCtx = await this.ctx.appStore.ensureAuthenticatedAsync();
29
- const appleTeam = await ensureAppleTeamExistsAsync(account.id, {
29
+ const appleTeam = await ensureAppleTeamExistsAsync(this.ctx.graphqlClient, account.id, {
30
30
  appleTeamIdentifier: appleAuthCtx.team.id,
31
31
  appleTeamName: appleAuthCtx.team.name,
32
32
  });
33
- const action = new action_1.default(this.ctx.appStore, account, appleTeam);
33
+ const action = new action_1.default(this.ctx.graphqlClient, this.ctx.appStore, account, appleTeam);
34
34
  await action.runAsync();
35
35
  }
36
36
  async resolveAccountAsync() {
37
- const resolver = new AccountResolver(this.ctx.projectId, this.ctx.user);
37
+ const resolver = new AccountResolver(this.ctx.graphqlClient, this.ctx.projectId, this.ctx.user);
38
38
  return await resolver.resolveAccountAsync();
39
39
  }
40
40
  }
41
41
  exports.default = DeviceManager;
42
42
  class AccountResolver {
43
- constructor(projectId, user) {
43
+ constructor(graphqlClient, projectId, user) {
44
+ this.graphqlClient = graphqlClient;
44
45
  this.projectId = projectId;
45
46
  this.user = user;
46
47
  }
@@ -55,7 +56,7 @@ class AccountResolver {
55
56
  }
56
57
  async resolveProjectAccountAsync() {
57
58
  (0, assert_1.default)(this.projectId, 'expo config is not set');
58
- const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(this.projectId);
59
+ const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(this.graphqlClient, this.projectId);
59
60
  const useProjectAccount = await (0, prompts_1.confirmAsync)({
60
61
  message: `You're inside the project directory. Would you like to use the ${chalk_1.default.underline(account.name)} account?`,
61
62
  });
@@ -76,13 +77,13 @@ class AccountResolver {
76
77
  }
77
78
  }
78
79
  exports.AccountResolver = AccountResolver;
79
- async function ensureAppleTeamExistsAsync(accountId, { appleTeamIdentifier, appleTeamName }) {
80
- const appleTeam = await AppleTeamQuery_1.AppleTeamQuery.getByAppleTeamIdentifierAsync(accountId, appleTeamIdentifier);
80
+ async function ensureAppleTeamExistsAsync(graphqlClient, accountId, { appleTeamIdentifier, appleTeamName }) {
81
+ const appleTeam = await AppleTeamQuery_1.AppleTeamQuery.getByAppleTeamIdentifierAsync(graphqlClient, accountId, appleTeamIdentifier);
81
82
  if (appleTeam) {
82
83
  return appleTeam;
83
84
  }
84
85
  else {
85
- return await AppleTeamMutation_1.AppleTeamMutation.createAppleTeamAsync({
86
+ return await AppleTeamMutation_1.AppleTeamMutation.createAppleTeamAsync(graphqlClient, {
86
87
  appleTeamIdentifier,
87
88
  appleTeamName,
88
89
  }, accountId);
@@ -1,20 +1,21 @@
1
+ import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { PaginatedQueryOptions } from '../commandUtils/pagination';
2
3
  import { AppleDeviceFragment, AppleTeamFragment } from '../graphql/generated';
3
4
  import { AppleTeamIdAndName } from './utils/formatDevice';
4
5
  export declare const TEAMS_LIMIT = 50;
5
6
  export declare const DEVICES_LIMIT = 50;
6
- export declare function selectAppleTeamOnAccountAsync({ accountName, selectionPromptTitle, paginatedQueryOptions, }: {
7
+ export declare function selectAppleTeamOnAccountAsync(graphqlClient: ExpoGraphqlClient, { accountName, selectionPromptTitle, paginatedQueryOptions, }: {
7
8
  accountName: string;
8
9
  selectionPromptTitle: string;
9
10
  paginatedQueryOptions: PaginatedQueryOptions;
10
11
  }): Promise<AppleTeamFragment>;
11
- export declare function selectAppleDeviceOnAppleTeamAsync({ accountName, appleTeamIdentifier, selectionPromptTitle, paginatedQueryOptions, }: {
12
+ export declare function selectAppleDeviceOnAppleTeamAsync(graphqlClient: ExpoGraphqlClient, { accountName, appleTeamIdentifier, selectionPromptTitle, paginatedQueryOptions, }: {
12
13
  accountName: string;
13
14
  appleTeamIdentifier: string;
14
15
  selectionPromptTitle: string;
15
16
  paginatedQueryOptions: PaginatedQueryOptions;
16
17
  }): Promise<AppleDeviceFragment>;
17
- export declare function listAndRenderAppleDevicesOnAppleTeamAsync({ accountName, appleTeam, paginatedQueryOptions, }: {
18
+ export declare function listAndRenderAppleDevicesOnAppleTeamAsync(graphqlClient: ExpoGraphqlClient, { accountName, appleTeam, paginatedQueryOptions, }: {
18
19
  accountName: string;
19
20
  appleTeam: AppleTeamIdAndName;
20
21
  paginatedQueryOptions: PaginatedQueryOptions;
@@ -13,7 +13,7 @@ const queries_1 = require("../utils/queries");
13
13
  const formatDevice_1 = tslib_1.__importDefault(require("./utils/formatDevice"));
14
14
  exports.TEAMS_LIMIT = 50;
15
15
  exports.DEVICES_LIMIT = 50;
16
- async function selectAppleTeamOnAccountAsync({ accountName, selectionPromptTitle, paginatedQueryOptions, }) {
16
+ async function selectAppleTeamOnAccountAsync(graphqlClient, { accountName, selectionPromptTitle, paginatedQueryOptions, }) {
17
17
  var _a;
18
18
  if (paginatedQueryOptions.nonInteractive) {
19
19
  throw new Error('Unable to select an Apple team in non-interactive mode.');
@@ -22,7 +22,7 @@ async function selectAppleTeamOnAccountAsync({ accountName, selectionPromptTitle
22
22
  const selectedAppleTeam = await (0, queries_1.paginatedQueryWithSelectPromptAsync)({
23
23
  limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.TEAMS_LIMIT,
24
24
  offset: paginatedQueryOptions.offset,
25
- queryToPerform: (limit, offset) => AppleTeamQuery_1.AppleTeamQuery.getAllForAccountAsync({
25
+ queryToPerform: (limit, offset) => AppleTeamQuery_1.AppleTeamQuery.getAllForAccountAsync(graphqlClient, {
26
26
  accountName,
27
27
  limit,
28
28
  offset,
@@ -42,7 +42,7 @@ async function selectAppleTeamOnAccountAsync({ accountName, selectionPromptTitle
42
42
  }
43
43
  }
44
44
  exports.selectAppleTeamOnAccountAsync = selectAppleTeamOnAccountAsync;
45
- async function selectAppleDeviceOnAppleTeamAsync({ accountName, appleTeamIdentifier, selectionPromptTitle, paginatedQueryOptions, }) {
45
+ async function selectAppleDeviceOnAppleTeamAsync(graphqlClient, { accountName, appleTeamIdentifier, selectionPromptTitle, paginatedQueryOptions, }) {
46
46
  var _a;
47
47
  if (paginatedQueryOptions.nonInteractive) {
48
48
  throw new Error('Unable to select an Apple device in non-interactive mode.');
@@ -51,7 +51,7 @@ async function selectAppleDeviceOnAppleTeamAsync({ accountName, appleTeamIdentif
51
51
  const selectedAppleDevice = await (0, queries_1.paginatedQueryWithSelectPromptAsync)({
52
52
  limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.DEVICES_LIMIT,
53
53
  offset: paginatedQueryOptions.offset,
54
- queryToPerform: (limit, offset) => AppleDeviceQuery_1.AppleDeviceQuery.getAllForAppleTeamAsync({
54
+ queryToPerform: (limit, offset) => AppleDeviceQuery_1.AppleDeviceQuery.getAllForAppleTeamAsync(graphqlClient, {
55
55
  accountName,
56
56
  appleTeamIdentifier,
57
57
  limit,
@@ -70,10 +70,10 @@ async function selectAppleDeviceOnAppleTeamAsync({ accountName, appleTeamIdentif
70
70
  }
71
71
  }
72
72
  exports.selectAppleDeviceOnAppleTeamAsync = selectAppleDeviceOnAppleTeamAsync;
73
- async function listAndRenderAppleDevicesOnAppleTeamAsync({ accountName, appleTeam, paginatedQueryOptions, }) {
73
+ async function listAndRenderAppleDevicesOnAppleTeamAsync(graphqlClient, { accountName, appleTeam, paginatedQueryOptions, }) {
74
74
  var _a;
75
75
  if (paginatedQueryOptions.nonInteractive) {
76
- const devices = await AppleDeviceQuery_1.AppleDeviceQuery.getAllForAppleTeamAsync({
76
+ const devices = await AppleDeviceQuery_1.AppleDeviceQuery.getAllForAppleTeamAsync(graphqlClient, {
77
77
  accountName,
78
78
  appleTeamIdentifier: appleTeam.appleTeamIdentifier,
79
79
  offset: paginatedQueryOptions.offset,
@@ -85,7 +85,7 @@ async function listAndRenderAppleDevicesOnAppleTeamAsync({ accountName, appleTea
85
85
  await (0, queries_1.paginatedQueryWithConfirmPromptAsync)({
86
86
  limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.DEVICES_LIMIT,
87
87
  offset: paginatedQueryOptions.offset,
88
- queryToPerform: (limit, offset) => AppleDeviceQuery_1.AppleDeviceQuery.getAllForAppleTeamAsync({
88
+ queryToPerform: (limit, offset) => AppleDeviceQuery_1.AppleDeviceQuery.getAllForAppleTeamAsync(graphqlClient, {
89
89
  accountName,
90
90
  appleTeamIdentifier: appleTeam.appleTeamIdentifier,
91
91
  limit,
@@ -1,10 +1,3 @@
1
- import { Client, CombinedError as GraphqlError, OperationContext, OperationResult, PromisifiedSource, TypedDocumentNode } from '@urql/core';
2
- import { DocumentNode } from 'graphql';
3
- export declare const graphqlClient: StricterClient;
4
- export interface StricterClient extends Client {
5
- query<Data = any, Variables extends object = {}>(query: DocumentNode | TypedDocumentNode<Data, Variables> | string, variables: Variables | undefined, context: Partial<OperationContext> & {
6
- additionalTypenames: string[];
7
- }): PromisifiedSource<OperationResult<Data, Variables>>;
8
- }
1
+ import { CombinedError as GraphqlError, OperationResult } from '@urql/core';
9
2
  export declare function withErrorHandlingAsync<T>(promise: Promise<OperationResult<T>>): Promise<T>;
10
3
  export { GraphqlError };
@@ -1,48 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GraphqlError = exports.withErrorHandlingAsync = exports.graphqlClient = void 0;
3
+ exports.GraphqlError = exports.withErrorHandlingAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const core_1 = require("@urql/core");
6
6
  Object.defineProperty(exports, "GraphqlError", { enumerable: true, get: function () { return core_1.CombinedError; } });
7
- const exchange_retry_1 = require("@urql/exchange-retry");
8
- const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
9
- const api_1 = require("../api");
10
- const fetch_1 = require("../fetch");
11
7
  const log_1 = tslib_1.__importDefault(require("../log"));
12
- const sessionStorage_1 = require("../user/sessionStorage");
13
- exports.graphqlClient = (0, core_1.createClient)({
14
- url: (0, api_1.getExpoApiBaseUrl)() + '/graphql',
15
- exchanges: [
16
- core_1.dedupExchange,
17
- core_1.cacheExchange,
18
- (0, exchange_retry_1.retryExchange)({
19
- maxDelayMs: 4000,
20
- retryIf: (err, operation) => {
21
- return !!(err &&
22
- !operation.context.noRetry &&
23
- (err.networkError || err.graphQLErrors.some(e => { var _a; return (_a = e === null || e === void 0 ? void 0 : e.extensions) === null || _a === void 0 ? void 0 : _a.isTransient; })));
24
- },
25
- }),
26
- core_1.fetchExchange,
27
- ],
28
- // @ts-expect-error Type 'typeof fetch' is not assignable to type '(input: RequestInfo, init?: RequestInit | undefined) => Promise<Response>'.
29
- fetch: node_fetch_1.default,
30
- fetchOptions: () => {
31
- const headers = {};
32
- const token = (0, sessionStorage_1.getAccessToken)();
33
- if (token) {
34
- headers.authorization = `Bearer ${token}`;
35
- }
36
- const sessionSecret = (0, sessionStorage_1.getSessionSecret)();
37
- if (!token && sessionSecret) {
38
- headers['expo-session'] = sessionSecret;
39
- }
40
- return {
41
- ...(fetch_1.httpsProxyAgent ? { agent: fetch_1.httpsProxyAgent } : {}),
42
- headers,
43
- };
44
- },
45
- });
46
8
  async function withErrorHandlingAsync(promise) {
47
9
  const { data, error } = await promise;
48
10
  if (error) {
@@ -268,8 +268,6 @@ export declare type AccountMutation = {
268
268
  setPaymentSource: Account;
269
269
  /** Require authorization to send push notifications for experiences owned by this account */
270
270
  setPushSecurityEnabled: Account;
271
- /** Add a subscription */
272
- subscribeToProduct: Account;
273
271
  };
274
272
  export declare type AccountMutationBuyProductArgs = {
275
273
  accountName: Scalars['ID'];
@@ -320,11 +318,6 @@ export declare type AccountMutationSetPushSecurityEnabledArgs = {
320
318
  accountID: Scalars['ID'];
321
319
  pushSecurityEnabled: Scalars['Boolean'];
322
320
  };
323
- export declare type AccountMutationSubscribeToProductArgs = {
324
- accountName: Scalars['ID'];
325
- paymentSource: Scalars['ID'];
326
- productId: Scalars['ID'];
327
- };
328
321
  export declare type AccountQuery = {
329
322
  __typename?: 'AccountQuery';
330
323
  /** Query an Account by ID */
@@ -1782,6 +1775,8 @@ export declare enum BuildResourceClass {
1782
1775
  AndroidLarge = "ANDROID_LARGE",
1783
1776
  IosDefault = "IOS_DEFAULT",
1784
1777
  IosLarge = "IOS_LARGE",
1778
+ /** @experimental This resource class is not yet ready to be used in production. For testing purposes only. */
1779
+ IosM1Large = "IOS_M1_LARGE",
1785
1780
  Legacy = "LEGACY"
1786
1781
  }
1787
1782
  export declare enum BuildStatus {
@@ -127,6 +127,8 @@ var BuildResourceClass;
127
127
  BuildResourceClass["AndroidLarge"] = "ANDROID_LARGE";
128
128
  BuildResourceClass["IosDefault"] = "IOS_DEFAULT";
129
129
  BuildResourceClass["IosLarge"] = "IOS_LARGE";
130
+ /** @experimental This resource class is not yet ready to be used in production. For testing purposes only. */
131
+ BuildResourceClass["IosM1Large"] = "IOS_M1_LARGE";
130
132
  BuildResourceClass["Legacy"] = "LEGACY";
131
133
  })(BuildResourceClass = exports.BuildResourceClass || (exports.BuildResourceClass = {}));
132
134
  var BuildStatus;
@@ -1,6 +1,7 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { AppPrivacy } from '../generated';
2
3
  export declare const AppMutation: {
3
- createAppAsync(appInput: {
4
+ createAppAsync(graphqlClient: ExpoGraphqlClient, appInput: {
4
5
  accountId: string;
5
6
  projectName: string;
6
7
  privacy: AppPrivacy;
@@ -6,9 +6,9 @@ const assert_1 = tslib_1.__importDefault(require("assert"));
6
6
  const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
7
  const client_1 = require("../client");
8
8
  exports.AppMutation = {
9
- async createAppAsync(appInput) {
9
+ async createAppAsync(graphqlClient, appInput) {
10
10
  var _a;
11
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
11
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
12
12
  .mutation((0, graphql_tag_1.default) `
13
13
  mutation CreateAppMutation($appInput: AppInput!) {
14
14
  app {
@@ -1,6 +1,7 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { AppPlatform } from '../generated';
2
3
  export declare const AppVersionMutation: {
3
- createAppVersionAsync(appVersionInput: {
4
+ createAppVersionAsync(graphqlClient: ExpoGraphqlClient, appVersionInput: {
4
5
  appId: string;
5
6
  platform: AppPlatform;
6
7
  applicationIdentifier: string;
@@ -6,9 +6,9 @@ const assert_1 = tslib_1.__importDefault(require("assert"));
6
6
  const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
7
  const client_1 = require("../client");
8
8
  exports.AppVersionMutation = {
9
- async createAppVersionAsync(appVersionInput) {
9
+ async createAppVersionAsync(graphqlClient, appVersionInput) {
10
10
  var _a;
11
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
11
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
12
12
  .mutation((0, graphql_tag_1.default) `
13
13
  mutation CreateAppVersionMutation($appVersionInput: AppVersionInput!) {
14
14
  appVersion {
@@ -1,16 +1,17 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { AndroidJobInput, BuildFragment, BuildMetadataInput, BuildParamsInput, EasBuildDeprecationInfo, IosJobInput } from '../generated';
2
3
  export interface BuildResult {
3
4
  build: BuildFragment;
4
5
  deprecationInfo?: EasBuildDeprecationInfo | null;
5
6
  }
6
7
  export declare const BuildMutation: {
7
- createAndroidBuildAsync(input: {
8
+ createAndroidBuildAsync(graphqlClient: ExpoGraphqlClient, input: {
8
9
  appId: string;
9
10
  job: AndroidJobInput;
10
11
  metadata: BuildMetadataInput;
11
12
  buildParams: BuildParamsInput;
12
13
  }): Promise<BuildResult>;
13
- createIosBuildAsync(input: {
14
+ createIosBuildAsync(graphqlClient: ExpoGraphqlClient, input: {
14
15
  appId: string;
15
16
  job: IosJobInput;
16
17
  metadata: BuildMetadataInput;
@@ -8,9 +8,9 @@ const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
8
8
  const client_1 = require("../client");
9
9
  const Build_1 = require("../types/Build");
10
10
  exports.BuildMutation = {
11
- async createAndroidBuildAsync(input) {
11
+ async createAndroidBuildAsync(graphqlClient, input) {
12
12
  var _a;
13
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
13
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
14
14
  .mutation((0, graphql_tag_1.default) `
15
15
  mutation CreateAndroidBuildMutation(
16
16
  $appId: ID!
@@ -41,9 +41,9 @@ exports.BuildMutation = {
41
41
  .toPromise());
42
42
  return (0, nullthrows_1.default)((_a = data.build) === null || _a === void 0 ? void 0 : _a.createAndroidBuild);
43
43
  },
44
- async createIosBuildAsync(input) {
44
+ async createIosBuildAsync(graphqlClient, input) {
45
45
  var _a;
46
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
46
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
47
47
  .mutation((0, graphql_tag_1.default) `
48
48
  mutation CreateIosBuildMutation(
49
49
  $appId: ID!
@@ -1,16 +1,17 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { EnvironmentSecretFragment, EnvironmentSecretType } from '../generated';
2
3
  export declare const EnvironmentSecretMutation: {
3
- createForAccountAsync(input: {
4
+ createForAccountAsync(graphqlClient: ExpoGraphqlClient, input: {
4
5
  name: string;
5
6
  value: string;
6
7
  type: EnvironmentSecretType;
7
8
  }, accountId: string): Promise<EnvironmentSecretFragment>;
8
- createForAppAsync(input: {
9
+ createForAppAsync(graphqlClient: ExpoGraphqlClient, input: {
9
10
  name: string;
10
11
  value: string;
11
12
  type: EnvironmentSecretType;
12
13
  }, appId: string): Promise<EnvironmentSecretFragment>;
13
- deleteAsync(id: string): Promise<{
14
+ deleteAsync(graphqlClient: ExpoGraphqlClient, id: string): Promise<{
14
15
  id: string;
15
16
  }>;
16
17
  };
@@ -7,8 +7,8 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
7
  const client_1 = require("../client");
8
8
  const EnvironmentSecret_1 = require("../types/EnvironmentSecret");
9
9
  exports.EnvironmentSecretMutation = {
10
- async createForAccountAsync(input, accountId) {
11
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
10
+ async createForAccountAsync(graphqlClient, input, accountId) {
11
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
12
12
  .mutation((0, graphql_tag_1.default) `
13
13
  mutation CreateEnvironmentSecretForAccount(
14
14
  $input: CreateEnvironmentSecretInput!
@@ -29,8 +29,8 @@ exports.EnvironmentSecretMutation = {
29
29
  .toPromise());
30
30
  return data.environmentSecret.createEnvironmentSecretForAccount;
31
31
  },
32
- async createForAppAsync(input, appId) {
33
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
32
+ async createForAppAsync(graphqlClient, input, appId) {
33
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
34
34
  .mutation((0, graphql_tag_1.default) `
35
35
  mutation CreateEnvironmentSecretForApp(
36
36
  $input: CreateEnvironmentSecretInput!
@@ -48,8 +48,8 @@ exports.EnvironmentSecretMutation = {
48
48
  .toPromise());
49
49
  return data.environmentSecret.createEnvironmentSecretForApp;
50
50
  },
51
- async deleteAsync(id) {
52
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
51
+ async deleteAsync(graphqlClient, id) {
52
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
53
53
  .mutation((0, graphql_tag_1.default) `
54
54
  mutation DeleteEnvironmentSecret($id: String!) {
55
55
  environmentSecret {
@@ -1,3 +1,4 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  export declare const KeystoreGenerationUrlMutation: {
2
- createKeystoreGenerationUrlAsync(): Promise<string>;
3
+ createKeystoreGenerationUrlAsync(graphqlClient: ExpoGraphqlClient): Promise<string>;
3
4
  };
@@ -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.KeystoreGenerationUrlMutation = {
8
- async createKeystoreGenerationUrlAsync() {
9
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
8
+ async createKeystoreGenerationUrlAsync(graphqlClient) {
9
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
10
10
  .mutation((0, graphql_tag_1.default) `
11
11
  mutation CreateKeystoreGenerationUrlMutation {
12
12
  keystoreGenerationUrl {
@@ -1,6 +1,7 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { CodeSigningInfoInput, GetSignedUploadMutation, PublishUpdateGroupInput, SetCodeSigningInfoMutation, UpdatePublishMutation } from '../generated';
2
3
  export declare const PublishMutation: {
3
- getUploadURLsAsync(contentTypes: string[]): Promise<GetSignedUploadMutation['asset']['getSignedAssetUploadSpecifications']>;
4
- publishUpdateGroupAsync(publishUpdateGroupsInput: PublishUpdateGroupInput[]): Promise<UpdatePublishMutation['updateBranch']['publishUpdateGroups']>;
5
- setCodeSigningInfoAsync(updateId: string, codeSigningInfo: CodeSigningInfoInput): Promise<SetCodeSigningInfoMutation['update']['setCodeSigningInfo']>;
4
+ getUploadURLsAsync(graphqlClient: ExpoGraphqlClient, contentTypes: string[]): Promise<GetSignedUploadMutation['asset']['getSignedAssetUploadSpecifications']>;
5
+ publishUpdateGroupAsync(graphqlClient: ExpoGraphqlClient, publishUpdateGroupsInput: PublishUpdateGroupInput[]): Promise<UpdatePublishMutation['updateBranch']['publishUpdateGroups']>;
6
+ setCodeSigningInfoAsync(graphqlClient: ExpoGraphqlClient, updateId: string, codeSigningInfo: CodeSigningInfoInput): Promise<SetCodeSigningInfoMutation['update']['setCodeSigningInfo']>;
6
7
  };
@@ -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.PublishMutation = {
8
- async getUploadURLsAsync(contentTypes) {
9
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
8
+ async getUploadURLsAsync(graphqlClient, contentTypes) {
9
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
10
10
  .mutation((0, graphql_tag_1.default) `
11
11
  mutation GetSignedUploadMutation($contentTypes: [String!]!) {
12
12
  asset {
@@ -21,8 +21,8 @@ exports.PublishMutation = {
21
21
  .toPromise());
22
22
  return data.asset.getSignedAssetUploadSpecifications;
23
23
  },
24
- async publishUpdateGroupAsync(publishUpdateGroupsInput) {
25
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
24
+ async publishUpdateGroupAsync(graphqlClient, publishUpdateGroupsInput) {
25
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
26
26
  .mutation((0, graphql_tag_1.default) `
27
27
  mutation UpdatePublishMutation($publishUpdateGroupsInput: [PublishUpdateGroupInput!]!) {
28
28
  updateBranch {
@@ -39,8 +39,8 @@ exports.PublishMutation = {
39
39
  .toPromise());
40
40
  return data.updateBranch.publishUpdateGroups;
41
41
  },
42
- async setCodeSigningInfoAsync(updateId, codeSigningInfo) {
43
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
42
+ async setCodeSigningInfoAsync(graphqlClient, updateId, codeSigningInfo) {
43
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
44
44
  .mutation((0, graphql_tag_1.default) `
45
45
  mutation SetCodeSigningInfoMutation(
46
46
  $updateId: ID!
@@ -1,5 +1,6 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { CreateAndroidSubmissionInput, CreateIosSubmissionInput, SubmissionFragment } from '../generated';
2
3
  export declare const SubmissionMutation: {
3
- createAndroidSubmissionAsync(input: CreateAndroidSubmissionInput): Promise<SubmissionFragment>;
4
- createIosSubmissionAsync(input: CreateIosSubmissionInput): Promise<SubmissionFragment>;
4
+ createAndroidSubmissionAsync(graphqlClient: ExpoGraphqlClient, input: CreateAndroidSubmissionInput): Promise<SubmissionFragment>;
5
+ createIosSubmissionAsync(graphqlClient: ExpoGraphqlClient, input: CreateIosSubmissionInput): Promise<SubmissionFragment>;
5
6
  };
@@ -8,8 +8,8 @@ const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
8
8
  const client_1 = require("../client");
9
9
  const Submission_1 = require("../types/Submission");
10
10
  exports.SubmissionMutation = {
11
- async createAndroidSubmissionAsync(input) {
12
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
11
+ async createAndroidSubmissionAsync(graphqlClient, input) {
12
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
13
13
  .mutation((0, graphql_tag_1.default) `
14
14
  mutation CreateAndroidSubmissionMutation(
15
15
  $appId: ID!
@@ -32,8 +32,8 @@ exports.SubmissionMutation = {
32
32
  .toPromise());
33
33
  return (0, nullthrows_1.default)(data.submission.createAndroidSubmission.submission);
34
34
  },
35
- async createIosSubmissionAsync(input) {
36
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
35
+ async createIosSubmissionAsync(graphqlClient, input) {
36
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
37
37
  .mutation((0, graphql_tag_1.default) `
38
38
  mutation CreateIosSubmissionMutation(
39
39
  $appId: ID!
@@ -1,8 +1,9 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { UploadSessionType } from '../generated';
2
3
  export interface PresignedPost {
3
4
  url: string;
4
5
  fields: Record<string, string>;
5
6
  }
6
7
  export declare const UploadSessionMutation: {
7
- createUploadSessionAsync(type: UploadSessionType): Promise<PresignedPost>;
8
+ createUploadSessionAsync(graphqlClient: ExpoGraphqlClient, type: UploadSessionType): Promise<PresignedPost>;
8
9
  };
@@ -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.UploadSessionMutation = {
8
- async createUploadSessionAsync(type) {
9
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
8
+ async createUploadSessionAsync(graphqlClient, type) {
9
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
10
10
  .mutation((0, graphql_tag_1.default) `
11
11
  mutation CreateUploadSessionMutation($type: UploadSessionType!) {
12
12
  uploadSession {
@@ -1,6 +1,7 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
1
2
  import { WebhookFragment, WebhookInput } from '../generated';
2
3
  export declare const WebhookMutation: {
3
- createWebhookAsync(appId: string, webhookInput: WebhookInput): Promise<WebhookFragment>;
4
- updateWebhookAsync(webhookId: string, webhookInput: WebhookInput): Promise<WebhookFragment>;
5
- deleteWebhookAsync(webhookId: string): Promise<void>;
4
+ createWebhookAsync(graphqlClient: ExpoGraphqlClient, appId: string, webhookInput: WebhookInput): Promise<WebhookFragment>;
5
+ updateWebhookAsync(graphqlClient: ExpoGraphqlClient, webhookId: string, webhookInput: WebhookInput): Promise<WebhookFragment>;
6
+ deleteWebhookAsync(graphqlClient: ExpoGraphqlClient, webhookId: string): Promise<void>;
6
7
  };