eas-cli 0.45.1 → 0.48.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 (311) hide show
  1. package/README.md +117 -117
  2. package/build/analytics/rudderstackClient.js +3 -3
  3. package/build/api.d.ts +25 -1
  4. package/build/api.js +70 -38
  5. package/build/build/android/build.js +4 -4
  6. package/build/build/android/prepareJob.js +2 -2
  7. package/build/build/android/syncProjectConfiguration.js +7 -7
  8. package/build/build/android/version.js +3 -3
  9. package/build/build/build.js +4 -4
  10. package/build/build/configure.js +3 -3
  11. package/build/build/createContext.js +2 -2
  12. package/build/build/ios/credentials.js +1 -1
  13. package/build/build/ios/graphql.js +1 -1
  14. package/build/build/ios/prepareJob.js +2 -2
  15. package/build/build/ios/syncProjectConfiguration.js +3 -3
  16. package/build/build/ios/version.js +3 -3
  17. package/build/build/local.js +3 -3
  18. package/build/build/metadata.js +7 -18
  19. package/build/build/runBuildAndSubmit.js +3 -3
  20. package/build/build/utils/appJson.js +3 -3
  21. package/build/build/utils/credentials.js +2 -2
  22. package/build/build/utils/devClient.js +3 -3
  23. package/build/build/utils/formatBuild.js +2 -2
  24. package/build/build/utils/printBuildInfo.js +5 -5
  25. package/build/build/utils/repository.js +5 -5
  26. package/build/build/utils/url.js +1 -1
  27. package/build/build/utils/version.js +4 -4
  28. package/build/build/validate.js +3 -3
  29. package/build/commandUtils/EasCommand.js +2 -2
  30. package/build/commands/account/login.js +2 -2
  31. package/build/commands/account/logout.js +2 -2
  32. package/build/commands/account/view.js +3 -3
  33. package/build/commands/analytics.js +4 -4
  34. package/build/commands/branch/create.js +5 -5
  35. package/build/commands/branch/delete.js +5 -5
  36. package/build/commands/branch/list.js +6 -6
  37. package/build/commands/branch/publish.js +1 -1
  38. package/build/commands/branch/rename.js +5 -5
  39. package/build/commands/branch/view.js +7 -7
  40. package/build/commands/build/cancel.js +5 -5
  41. package/build/commands/build/configure.js +7 -8
  42. package/build/commands/build/index.js +13 -9
  43. package/build/commands/build/inspect.js +6 -6
  44. package/build/commands/build/list.js +3 -3
  45. package/build/commands/build/view.js +2 -2
  46. package/build/commands/channel/create.js +13 -12
  47. package/build/commands/channel/delete.js +5 -5
  48. package/build/commands/channel/edit.js +39 -33
  49. package/build/commands/channel/list.js +5 -5
  50. package/build/commands/channel/rollout.js +50 -41
  51. package/build/commands/channel/view.d.ts +0 -2
  52. package/build/commands/channel/view.js +10 -54
  53. package/build/commands/config.js +11 -5
  54. package/build/commands/credentials.js +2 -2
  55. package/build/commands/device/create.js +3 -3
  56. package/build/commands/device/delete.js +4 -4
  57. package/build/commands/device/list.js +5 -5
  58. package/build/commands/device/view.js +3 -3
  59. package/build/commands/diagnostics.js +4 -4
  60. package/build/commands/project/info.js +4 -4
  61. package/build/commands/project/init.js +3 -3
  62. package/build/commands/secret/create.js +4 -4
  63. package/build/commands/secret/delete.js +3 -5
  64. package/build/commands/secret/list.js +6 -6
  65. package/build/commands/submit.js +4 -5
  66. package/build/commands/update/configure.d.ts +3 -0
  67. package/build/commands/update/configure.js +151 -36
  68. package/build/commands/update/delete.js +7 -7
  69. package/build/commands/update/index.d.ts +1 -0
  70. package/build/commands/update/index.js +66 -13
  71. package/build/commands/update/list.js +7 -7
  72. package/build/commands/update/view.js +5 -5
  73. package/build/commands/webhook/create.js +2 -2
  74. package/build/commands/webhook/delete.js +6 -6
  75. package/build/commands/webhook/list.js +4 -4
  76. package/build/commands/webhook/update.js +3 -3
  77. package/build/commands/webhook/view.js +3 -3
  78. package/build/credentials/android/AndroidCredentialsProvider.js +2 -2
  79. package/build/credentials/android/actions/AssignFcm.js +1 -1
  80. package/build/credentials/android/actions/AssignGoogleServiceAccountKey.js +1 -1
  81. package/build/credentials/android/actions/BuildCredentialsUtils.js +1 -1
  82. package/build/credentials/android/actions/CreateFcm.js +1 -1
  83. package/build/credentials/android/actions/CreateGoogleServiceAccountKey.js +1 -1
  84. package/build/credentials/android/actions/CreateKeystore.js +1 -1
  85. package/build/credentials/android/actions/DownloadKeystore.js +3 -3
  86. package/build/credentials/android/actions/RemoveFcm.js +1 -1
  87. package/build/credentials/android/actions/RemoveGoogleServiceAccountKey.js +1 -1
  88. package/build/credentials/android/actions/RemoveKeystore.js +2 -2
  89. package/build/credentials/android/actions/SetUpBuildCredentials.js +2 -2
  90. package/build/credentials/android/actions/SetUpBuildCredentialsFromCredentialsJson.js +1 -1
  91. package/build/credentials/android/actions/SetUpGoogleServiceAccountKey.js +2 -2
  92. package/build/credentials/android/actions/UpdateCredentialsJson.js +1 -1
  93. package/build/credentials/android/actions/UseExistingGoogleServiceAccountKey.js +1 -1
  94. package/build/credentials/android/api/graphql/mutations/AndroidAppBuildCredentialsMutation.js +2 -2
  95. package/build/credentials/android/api/graphql/mutations/AndroidAppCredentialsMutation.js +2 -2
  96. package/build/credentials/android/api/graphql/mutations/AndroidFcmMutation.js +2 -2
  97. package/build/credentials/android/api/graphql/mutations/AndroidKeystoreMutation.js +2 -2
  98. package/build/credentials/android/api/graphql/mutations/GoogleServiceAccountKeyMutation.js +2 -2
  99. package/build/credentials/android/api/graphql/queries/AndroidAppCredentialsQuery.js +2 -2
  100. package/build/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.js +1 -1
  101. package/build/credentials/android/utils/googleServiceAccountKey.js +6 -6
  102. package/build/credentials/android/utils/keystore.js +9 -12
  103. package/build/credentials/android/utils/keystoreNew.js +2 -2
  104. package/build/credentials/android/utils/printCredentials.js +3 -3
  105. package/build/credentials/context.js +5 -5
  106. package/build/credentials/credentialsJson/read.js +2 -2
  107. package/build/credentials/credentialsJson/types.js +1 -1
  108. package/build/credentials/credentialsJson/update.js +6 -6
  109. package/build/credentials/credentialsJson/utils.js +1 -1
  110. package/build/credentials/ios/IosCredentialsProvider.js +2 -2
  111. package/build/credentials/ios/actions/AscApiKeyUtils.js +4 -4
  112. package/build/credentials/ios/actions/AssignAscApiKey.js +1 -1
  113. package/build/credentials/ios/actions/AssignPushKey.js +1 -1
  114. package/build/credentials/ios/actions/BuildCredentialsUtils.js +1 -1
  115. package/build/credentials/ios/actions/ConfigureProvisioningProfile.js +3 -3
  116. package/build/credentials/ios/actions/CreateAscApiKey.js +1 -1
  117. package/build/credentials/ios/actions/CreateDistributionCertificate.js +1 -1
  118. package/build/credentials/ios/actions/CreateProvisioningProfile.js +3 -3
  119. package/build/credentials/ios/actions/CreatePushKey.js +1 -1
  120. package/build/credentials/ios/actions/DistributionCertificateUtils.js +4 -4
  121. package/build/credentials/ios/actions/ProvisioningProfileUtils.js +1 -1
  122. package/build/credentials/ios/actions/PushKeyUtils.js +2 -2
  123. package/build/credentials/ios/actions/RemoveAscApiKey.d.ts +1 -2
  124. package/build/credentials/ios/actions/RemoveAscApiKey.js +3 -4
  125. package/build/credentials/ios/actions/RemoveDistributionCertificate.js +1 -1
  126. package/build/credentials/ios/actions/RemoveProvisioningProfile.js +2 -2
  127. package/build/credentials/ios/actions/RemovePushKey.d.ts +1 -2
  128. package/build/credentials/ios/actions/RemovePushKey.js +3 -4
  129. package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +6 -6
  130. package/build/credentials/ios/actions/SetUpAscApiKey.js +3 -3
  131. package/build/credentials/ios/actions/SetUpBuildCredentials.js +3 -3
  132. package/build/credentials/ios/actions/SetUpBuildCredentialsFromCredentialsJson.js +2 -2
  133. package/build/credentials/ios/actions/SetUpDistributionCertificate.js +4 -4
  134. package/build/credentials/ios/actions/SetUpInternalProvisioningProfile.js +1 -1
  135. package/build/credentials/ios/actions/SetUpProvisioningProfile.js +1 -1
  136. package/build/credentials/ios/actions/SetUpPushKey.js +3 -3
  137. package/build/credentials/ios/actions/SetUpSubmissionCredentials.js +4 -4
  138. package/build/credentials/ios/actions/SetUpTargetBuildCredentials.js +1 -1
  139. package/build/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.js +3 -3
  140. package/build/credentials/ios/actions/UpdateCredentialsJson.js +1 -1
  141. package/build/credentials/ios/api/GraphqlClient.js +1 -1
  142. package/build/credentials/ios/api/graphql/mutations/AppStoreConnectApiKeyMutation.js +2 -2
  143. package/build/credentials/ios/api/graphql/mutations/AppleAppIdentifierMutation.js +2 -2
  144. package/build/credentials/ios/api/graphql/mutations/AppleDeviceMutation.js +1 -1
  145. package/build/credentials/ios/api/graphql/mutations/AppleDeviceRegistrationRequestMutation.js +1 -1
  146. package/build/credentials/ios/api/graphql/mutations/AppleDistributionCertificateMutation.js +2 -2
  147. package/build/credentials/ios/api/graphql/mutations/AppleProvisioningProfileMutation.js +1 -1
  148. package/build/credentials/ios/api/graphql/mutations/ApplePushKeyMutation.js +2 -2
  149. package/build/credentials/ios/api/graphql/mutations/AppleTeamMutation.js +1 -1
  150. package/build/credentials/ios/api/graphql/mutations/IosAppBuildCredentialsMutation.js +2 -2
  151. package/build/credentials/ios/api/graphql/mutations/IosAppCredentialsMutation.js +2 -2
  152. package/build/credentials/ios/api/graphql/queries/AppQuery.js +2 -2
  153. package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.js +1 -1
  154. package/build/credentials/ios/api/graphql/queries/AppleAppIdentifierQuery.js +1 -1
  155. package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +2 -2
  156. package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.js +2 -2
  157. package/build/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.js +2 -2
  158. package/build/credentials/ios/api/graphql/queries/ApplePushKeyQuery.js +1 -1
  159. package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +1 -1
  160. package/build/credentials/ios/api/graphql/queries/IosAppBuildCredentialsQuery.js +2 -2
  161. package/build/credentials/ios/api/graphql/queries/IosAppCredentialsQuery.js +2 -2
  162. package/build/credentials/ios/appstore/AppStoreApi.d.ts +1 -1
  163. package/build/credentials/ios/appstore/AppStoreApi.js +2 -2
  164. package/build/credentials/ios/appstore/Credentials.js +1 -1
  165. package/build/credentials/ios/appstore/ascApiKey.js +1 -1
  166. package/build/credentials/ios/appstore/authenticate.js +3 -3
  167. package/build/credentials/ios/appstore/bundleIdCapabilities.js +2 -2
  168. package/build/credentials/ios/appstore/capabilityIdentifiers.js +1 -1
  169. package/build/credentials/ios/appstore/contractMessages.js +2 -2
  170. package/build/credentials/ios/appstore/ensureAppExists.js +2 -2
  171. package/build/credentials/ios/appstore/keychain.js +1 -1
  172. package/build/credentials/ios/appstore/provisioningProfile.d.ts +1 -1
  173. package/build/credentials/ios/appstore/provisioningProfile.js +1 -1
  174. package/build/credentials/ios/appstore/pushKey.js +3 -3
  175. package/build/credentials/ios/appstore/resolveCredentials.js +5 -5
  176. package/build/credentials/ios/credentials.js +1 -1
  177. package/build/credentials/ios/utils/convertHTMLToASCII.js +4 -4
  178. package/build/credentials/ios/utils/p12Certificate.js +1 -1
  179. package/build/credentials/ios/utils/printCredentials.js +4 -4
  180. package/build/credentials/ios/utils/provisioningProfile.js +1 -1
  181. package/build/credentials/ios/validators/validateProvisioningProfile.js +5 -5
  182. package/build/credentials/manager/HelperActions.js +1 -1
  183. package/build/credentials/manager/ManageAndroid.js +2 -2
  184. package/build/credentials/manager/ManageIos.js +3 -3
  185. package/build/credentials/manager/SelectAndroidBuildCredentials.js +1 -1
  186. package/build/credentials/manager/SelectBuildProfileFromEasJson.js +1 -1
  187. package/build/credentials/utils/promptForCredentials.js +5 -6
  188. package/build/devices/actions/create/action.js +2 -2
  189. package/build/devices/actions/create/inputMethod.js +3 -3
  190. package/build/devices/actions/create/registrationUrlMethod.js +4 -4
  191. package/build/devices/manager.js +4 -4
  192. package/build/devices/utils/formatDevice.js +1 -1
  193. package/build/fetch.d.ts +7 -0
  194. package/build/fetch.js +21 -0
  195. package/build/graphql/client.js +2 -5
  196. package/build/graphql/generated.d.ts +770 -703
  197. package/build/graphql/generated.js +6 -1
  198. package/build/graphql/mutations/AppMutation.js +2 -2
  199. package/build/graphql/mutations/BuildMutation.js +2 -2
  200. package/build/graphql/mutations/EnvironmentSecretMutation.js +1 -1
  201. package/build/graphql/mutations/KeystoreGenerationUrlMutation.js +1 -1
  202. package/build/graphql/mutations/PublishMutation.d.ts +2 -1
  203. package/build/graphql/mutations/PublishMutation.js +26 -1
  204. package/build/graphql/mutations/SubmissionMutation.js +2 -2
  205. package/build/graphql/mutations/UploadSessionMutation.js +1 -1
  206. package/build/graphql/mutations/WebhookMutation.js +1 -1
  207. package/build/graphql/queries/BranchQuery.d.ts +7 -0
  208. package/build/graphql/queries/BranchQuery.js +29 -0
  209. package/build/graphql/queries/BuildQuery.js +1 -1
  210. package/build/graphql/queries/ChannelQuery.d.ts +4 -0
  211. package/build/graphql/queries/ChannelQuery.js +49 -0
  212. package/build/graphql/queries/EnvironmentSecretsQuery.js +1 -1
  213. package/build/graphql/queries/ProjectQuery.js +1 -1
  214. package/build/graphql/queries/PublishQuery.js +1 -1
  215. package/build/graphql/queries/SubmissionQuery.js +1 -1
  216. package/build/graphql/queries/UpdateQuery.js +1 -1
  217. package/build/graphql/queries/UserQuery.js +1 -1
  218. package/build/graphql/queries/WebhookQuery.js +1 -1
  219. package/build/graphql/types/App.js +1 -1
  220. package/build/graphql/types/Build.js +1 -1
  221. package/build/graphql/types/EnvironmentSecret.js +1 -1
  222. package/build/graphql/types/Submission.js +1 -1
  223. package/build/graphql/types/UpdateBranch.js +1 -1
  224. package/build/graphql/types/Webhook.js +1 -1
  225. package/build/graphql/types/credentials/AndroidAppBuildCredentials.js +1 -1
  226. package/build/graphql/types/credentials/AndroidAppCredentials.js +1 -1
  227. package/build/graphql/types/credentials/AndroidFcm.js +1 -1
  228. package/build/graphql/types/credentials/AndroidKeystore.js +1 -1
  229. package/build/graphql/types/credentials/AppStoreConnectApiKey.js +1 -1
  230. package/build/graphql/types/credentials/AppleAppIdentifier.js +1 -1
  231. package/build/graphql/types/credentials/AppleDevice.js +1 -1
  232. package/build/graphql/types/credentials/AppleDeviceRegistrationRequest.js +1 -1
  233. package/build/graphql/types/credentials/AppleDistributionCertificate.js +1 -1
  234. package/build/graphql/types/credentials/AppleProvisioningProfile.js +1 -1
  235. package/build/graphql/types/credentials/ApplePushKey.js +1 -1
  236. package/build/graphql/types/credentials/AppleTeam.js +1 -1
  237. package/build/graphql/types/credentials/GoogleServiceAccountKey.js +1 -1
  238. package/build/graphql/types/credentials/IosAppBuildCredentials.js +1 -1
  239. package/build/graphql/types/credentials/IosAppCredentials.js +1 -1
  240. package/build/log.js +4 -4
  241. package/build/ora.js +2 -2
  242. package/build/platform.js +1 -1
  243. package/build/project/android/applicationId.js +6 -6
  244. package/build/project/android/gradle.js +2 -2
  245. package/build/project/android/gradleUtils.js +2 -2
  246. package/build/project/ensureProjectExists.js +3 -3
  247. package/build/project/expoSdk.js +3 -3
  248. package/build/project/ios/bundleIdentifier.js +4 -4
  249. package/build/project/ios/scheme.js +3 -3
  250. package/build/project/metroConfig.js +3 -3
  251. package/build/project/projectUtils.d.ts +3 -5
  252. package/build/project/projectUtils.js +37 -38
  253. package/build/project/publish.js +8 -8
  254. package/build/project/workflow.js +2 -2
  255. package/build/prompts.js +1 -1
  256. package/build/submit/ArchiveSource.js +7 -6
  257. package/build/submit/BaseSubmitter.js +1 -1
  258. package/build/submit/android/AndroidSubmitCommand.js +3 -3
  259. package/build/submit/android/AndroidSubmitter.js +3 -3
  260. package/build/submit/android/ServiceAccountSource.js +4 -4
  261. package/build/submit/ios/AppProduce.js +2 -2
  262. package/build/submit/ios/AppSpecificPasswordSource.js +3 -4
  263. package/build/submit/ios/AscApiKeySource.js +2 -2
  264. package/build/submit/ios/CredentialsServiceSource.js +2 -2
  265. package/build/submit/ios/IosSubmitCommand.js +5 -5
  266. package/build/submit/ios/IosSubmitter.js +3 -3
  267. package/build/submit/ios/utils/language.js +1 -1
  268. package/build/submit/submit.js +4 -4
  269. package/build/submit/utils/errors.js +1 -1
  270. package/build/submit/utils/files.js +1 -1
  271. package/build/submit/utils/logs.js +5 -5
  272. package/build/submit/utils/summary.js +3 -3
  273. package/build/submit/utils/urls.js +2 -2
  274. package/build/submit/utils/wait.js +2 -2
  275. package/build/{build → update}/android/UpdatesModule.d.ts +0 -0
  276. package/build/{build → update}/android/UpdatesModule.js +4 -3
  277. package/build/{build → update}/ios/UpdatesModule.d.ts +0 -0
  278. package/build/{build → update}/ios/UpdatesModule.js +7 -8
  279. package/build/update/utils.d.ts +3 -0
  280. package/build/update/utils.js +20 -2
  281. package/build/uploads.d.ts +2 -10
  282. package/build/uploads.js +32 -12
  283. package/build/user/User.js +3 -5
  284. package/build/user/UserSettings.js +2 -2
  285. package/build/user/actions.js +5 -5
  286. package/build/user/otp.js +6 -8
  287. package/build/user/sessionStorage.js +1 -1
  288. package/build/utils/code-signing.d.ts +29 -0
  289. package/build/utils/code-signing.js +162 -0
  290. package/build/utils/expoCli.js +4 -4
  291. package/build/utils/files.js +3 -3
  292. package/build/utils/formatFields.js +1 -1
  293. package/build/utils/json.js +2 -2
  294. package/build/utils/paths.js +2 -2
  295. package/build/utils/plist.js +3 -3
  296. package/build/utils/profiles.js +2 -2
  297. package/build/utils/progress.d.ts +6 -3
  298. package/build/utils/progress.js +1 -1
  299. package/build/vcs/clients/git.js +3 -3
  300. package/build/vcs/clients/gitNoCommit.js +3 -3
  301. package/build/vcs/git.js +1 -1
  302. package/build/vcs/index.js +3 -3
  303. package/build/vcs/local.js +4 -4
  304. package/build/webhooks/formatWebhook.js +1 -1
  305. package/build/webhooks/input.js +2 -2
  306. package/oclif.manifest.json +1 -1
  307. package/package.json +42 -33
  308. package/build/ApiV2Error.d.ts +0 -16
  309. package/build/ApiV2Error.js +0 -14
  310. package/build/build/utils/updates.d.ts +0 -3
  311. package/build/build/utils/updates.js +0 -15
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
5
- const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
6
- const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
4
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
5
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
6
+ const log_1 = tslib_1.__importDefault(require("../../log"));
7
7
  const User_1 = require("../../user/User");
8
8
  class AccountView extends EasCommand_1.default {
9
9
  constructor() {
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const EasCommand_1 = (0, tslib_1.__importDefault)(require("../commandUtils/EasCommand"));
5
- const log_1 = (0, tslib_1.__importDefault)(require("../log"));
6
- const UserSettings_1 = (0, tslib_1.__importDefault)(require("../user/UserSettings"));
4
+ const EasCommand_1 = tslib_1.__importDefault(require("../commandUtils/EasCommand"));
5
+ const log_1 = tslib_1.__importDefault(require("../log"));
6
+ const UserSettings_1 = tslib_1.__importDefault(require("../user/UserSettings"));
7
7
  class AnalyticsView extends EasCommand_1.default {
8
8
  constructor() {
9
9
  super(...arguments);
@@ -22,5 +22,5 @@ class AnalyticsView extends EasCommand_1.default {
22
22
  }
23
23
  }
24
24
  exports.default = AnalyticsView;
25
- AnalyticsView.description = 'view or change analytics settings';
25
+ AnalyticsView.description = 'display or change analytics settings';
26
26
  AnalyticsView.args = [{ name: 'STATUS', options: ['on', 'off'] }];
@@ -4,11 +4,11 @@ exports.createUpdateBranchOnAppAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const config_1 = require("@expo/config");
6
6
  const core_1 = require("@oclif/core");
7
- const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
8
- const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
9
- const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
7
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
8
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
9
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
10
10
  const client_1 = require("../../graphql/client");
11
- const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
11
+ const log_1 = tslib_1.__importDefault(require("../../log"));
12
12
  const projectUtils_1 = require("../../project/projectUtils");
13
13
  const prompts_1 = require("../../prompts");
14
14
  const json_1 = require("../../utils/json");
@@ -70,7 +70,7 @@ class BranchCreate extends EasCommand_1.default {
70
70
  }
71
71
  }
72
72
  exports.default = BranchCreate;
73
- BranchCreate.description = 'Create a branch on the current project.';
73
+ BranchCreate.description = 'create a branch';
74
74
  BranchCreate.args = [
75
75
  {
76
76
  name: 'name',
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const config_1 = require("@expo/config");
5
5
  const core_1 = require("@oclif/core");
6
- const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
7
- const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
8
- const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
6
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
7
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
8
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
9
9
  const client_1 = require("../../graphql/client");
10
- const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
10
+ const log_1 = tslib_1.__importDefault(require("../../log"));
11
11
  const projectUtils_1 = require("../../project/projectUtils");
12
12
  const prompts_1 = require("../../prompts");
13
13
  const json_1 = require("../../utils/json");
@@ -99,7 +99,7 @@ class BranchDelete extends EasCommand_1.default {
99
99
  }
100
100
  }
101
101
  exports.default = BranchDelete;
102
- BranchDelete.description = 'Delete a branch on the current project';
102
+ BranchDelete.description = 'delete a branch';
103
103
  BranchDelete.args = [
104
104
  {
105
105
  name: 'name',
@@ -4,14 +4,14 @@ exports.listBranchesAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const config_1 = require("@expo/config");
6
6
  const core_1 = require("@oclif/core");
7
- const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
8
- const cli_table3_1 = (0, tslib_1.__importDefault)(require("cli-table3"));
7
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
8
+ const cli_table3_1 = tslib_1.__importDefault(require("cli-table3"));
9
9
  const graphql_1 = require("graphql");
10
- const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
11
- const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
10
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
11
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
12
12
  const client_1 = require("../../graphql/client");
13
13
  const UpdateBranch_1 = require("../../graphql/types/UpdateBranch");
14
- const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
14
+ const log_1 = tslib_1.__importDefault(require("../../log"));
15
15
  const projectUtils_1 = require("../../project/projectUtils");
16
16
  const utils_1 = require("../../update/utils");
17
17
  const json_1 = require("../../utils/json");
@@ -81,7 +81,7 @@ class BranchList extends EasCommand_1.default {
81
81
  }
82
82
  }
83
83
  exports.default = BranchList;
84
- BranchList.description = 'List all branches on this project.';
84
+ BranchList.description = 'list all branches';
85
85
  BranchList.flags = {
86
86
  json: core_1.Flags.boolean({
87
87
  description: 'return output as JSON',
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
4
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
5
5
  class BranchPublish extends EasCommand_1.default {
6
6
  async runAsync() {
7
7
  throw new Error(BranchPublish.description);
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const config_1 = require("@expo/config");
5
5
  const core_1 = require("@oclif/core");
6
- const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
7
- const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
8
- const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
6
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
7
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
8
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
9
9
  const client_1 = require("../../graphql/client");
10
- const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
10
+ const log_1 = tslib_1.__importDefault(require("../../log"));
11
11
  const projectUtils_1 = require("../../project/projectUtils");
12
12
  const prompts_1 = require("../../prompts");
13
13
  const json_1 = require("../../utils/json");
@@ -80,7 +80,7 @@ class BranchRename extends EasCommand_1.default {
80
80
  }
81
81
  }
82
82
  exports.default = BranchRename;
83
- BranchRename.description = 'Rename a branch.';
83
+ BranchRename.description = 'rename a branch';
84
84
  BranchRename.flags = {
85
85
  from: core_1.Flags.string({
86
86
  description: 'current name of the branch.',
@@ -3,16 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const config_1 = require("@expo/config");
5
5
  const core_1 = require("@oclif/core");
6
- const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
7
- const cli_table3_1 = (0, tslib_1.__importDefault)(require("cli-table3"));
8
- const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
6
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
7
+ const cli_table3_1 = tslib_1.__importDefault(require("cli-table3"));
8
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
9
9
  const UpdateQuery_1 = require("../../graphql/queries/UpdateQuery");
10
- const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
10
+ const log_1 = tslib_1.__importDefault(require("../../log"));
11
11
  const projectUtils_1 = require("../../project/projectUtils");
12
12
  const prompts_1 = require("../../prompts");
13
13
  const utils_1 = require("../../update/utils");
14
- const groupBy_1 = (0, tslib_1.__importDefault)(require("../../utils/expodash/groupBy"));
15
- const formatFields_1 = (0, tslib_1.__importDefault)(require("../../utils/formatFields"));
14
+ const groupBy_1 = tslib_1.__importDefault(require("../../utils/expodash/groupBy"));
15
+ const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields"));
16
16
  const json_1 = require("../../utils/json");
17
17
  class BranchView extends EasCommand_1.default {
18
18
  async runAsync() {
@@ -76,7 +76,7 @@ class BranchView extends EasCommand_1.default {
76
76
  }
77
77
  }
78
78
  exports.default = BranchView;
79
- BranchView.description = 'View a branch.';
79
+ BranchView.description = 'view a branch';
80
80
  BranchView.args = [
81
81
  {
82
82
  name: 'name',
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const config_1 = require("@expo/config");
5
- const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
6
- const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
7
- const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
5
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
8
8
  const client_1 = require("../../graphql/client");
9
9
  const generated_1 = require("../../graphql/generated");
10
10
  const BuildQuery_1 = require("../../graphql/queries/BuildQuery");
11
- const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
11
+ const log_1 = tslib_1.__importDefault(require("../../log"));
12
12
  const ora_1 = require("../../ora");
13
13
  const platform_1 = require("../../platform");
14
14
  const projectUtils_1 = require("../../project/projectUtils");
@@ -120,5 +120,5 @@ class BuildCancel extends EasCommand_1.default {
120
120
  }
121
121
  }
122
122
  exports.default = BuildCancel;
123
- BuildCancel.description = 'Cancel a build.';
123
+ BuildCancel.description = 'cancel a build';
124
124
  BuildCancel.args = [{ name: 'BUILD_ID' }];
@@ -4,18 +4,17 @@ const tslib_1 = require("tslib");
4
4
  const config_1 = require("@expo/config");
5
5
  const eas_build_job_1 = require("@expo/eas-build-job");
6
6
  const core_1 = require("@oclif/core");
7
- const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
8
- const UpdatesModule_1 = require("../../build/android/UpdatesModule");
7
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
9
8
  const syncProjectConfiguration_1 = require("../../build/android/syncProjectConfiguration");
10
9
  const configure_1 = require("../../build/configure");
11
- const UpdatesModule_2 = require("../../build/ios/UpdatesModule");
12
- const updates_1 = require("../../build/utils/updates");
13
- const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
14
- const log_1 = (0, tslib_1.__importStar)(require("../../log"));
10
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
11
+ const log_1 = tslib_1.__importStar(require("../../log"));
15
12
  const platform_1 = require("../../platform");
16
13
  const projectUtils_1 = require("../../project/projectUtils");
17
14
  const workflow_1 = require("../../project/workflow");
18
15
  const prompts_1 = require("../../prompts");
16
+ const UpdatesModule_1 = require("../../update/android/UpdatesModule");
17
+ const UpdatesModule_2 = require("../../update/ios/UpdatesModule");
19
18
  const vcs_1 = require("../../vcs");
20
19
  class BuildConfigure extends EasCommand_1.default {
21
20
  async runAsync() {
@@ -24,7 +23,7 @@ class BuildConfigure extends EasCommand_1.default {
24
23
  log_1.default.log('💡 The following process will configure your iOS and/or Android project to be compatible with EAS Build. These changes only apply to your local project files and you can safely revert them at any time.');
25
24
  await (0, vcs_1.getVcsClient)().ensureRepoExistsAsync();
26
25
  const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
27
- const expoUpdatesIsInstalled = (0, updates_1.isExpoUpdatesInstalled)(projectDir);
26
+ const expoUpdatesIsInstalled = (0, projectUtils_1.isExpoUpdatesInstalled)(projectDir);
28
27
  const platform = (_a = flags.platform) !== null && _a !== void 0 ? _a : (await promptForPlatformAsync());
29
28
  // clean up old Android configuration
30
29
  if ([platform_1.RequestedPlatform.Android, platform_1.RequestedPlatform.All].includes(platform)) {
@@ -63,7 +62,7 @@ class BuildConfigure extends EasCommand_1.default {
63
62
  }
64
63
  }
65
64
  exports.default = BuildConfigure;
66
- BuildConfigure.description = 'Configure the project to support EAS Build.';
65
+ BuildConfigure.description = 'configure the project to support EAS Build';
67
66
  BuildConfigure.flags = {
68
67
  platform: core_1.Flags.enum({
69
68
  description: 'Platform to configure',
@@ -4,21 +4,21 @@ exports.handleDeprecatedEasJsonAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const eas_json_1 = require("@expo/eas-json");
6
6
  const core_1 = require("@oclif/core");
7
- const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
8
- const figures_1 = (0, tslib_1.__importDefault)(require("figures"));
9
- const fs_extra_1 = (0, tslib_1.__importDefault)(require("fs-extra"));
10
- const path_1 = (0, tslib_1.__importDefault)(require("path"));
7
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
8
+ const figures_1 = tslib_1.__importDefault(require("figures"));
9
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
10
+ const path_1 = tslib_1.__importDefault(require("path"));
11
11
  const runBuildAndSubmit_1 = require("../../build/runBuildAndSubmit");
12
12
  const repository_1 = require("../../build/utils/repository");
13
- const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
14
- const log_1 = (0, tslib_1.__importStar)(require("../../log"));
13
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
14
+ const log_1 = tslib_1.__importStar(require("../../log"));
15
15
  const platform_1 = require("../../platform");
16
16
  const projectUtils_1 = require("../../project/projectUtils");
17
17
  const prompts_1 = require("../../prompts");
18
18
  const easCli_1 = require("../../utils/easCli");
19
19
  const json_1 = require("../../utils/json");
20
20
  const vcs_1 = require("../../vcs");
21
- const git_1 = (0, tslib_1.__importDefault)(require("../../vcs/clients/git"));
21
+ const git_1 = tslib_1.__importDefault(require("../../vcs/clients/git"));
22
22
  class Build extends EasCommand_1.default {
23
23
  async runAsync() {
24
24
  const { flags: rawFlags } = await this.parse(Build);
@@ -61,6 +61,10 @@ class Build extends EasCommand_1.default {
61
61
  log_1.default.warnDeprecatedFlag('skip-credentials-check', 'Build credentials validation is always skipped with the --non-interactive flag. You can also skip interactively.');
62
62
  log_1.default.newLine();
63
63
  }
64
+ if (flags['skip-project-configuration']) {
65
+ log_1.default.warnDeprecatedFlag('skip-project-configuration', 'Automatic configuration of native code is no longer optional.');
66
+ log_1.default.newLine();
67
+ }
64
68
  const profile = flags['profile'];
65
69
  return {
66
70
  requestedPlatform,
@@ -84,7 +88,7 @@ class Build extends EasCommand_1.default {
84
88
  }
85
89
  }
86
90
  exports.default = Build;
87
- Build.description = 'Start a build';
91
+ Build.description = 'start a build';
88
92
  Build.flags = {
89
93
  platform: core_1.Flags.enum({
90
94
  char: 'p',
@@ -100,7 +104,7 @@ Build.flags = {
100
104
  }),
101
105
  'skip-project-configuration': core_1.Flags.boolean({
102
106
  default: false,
103
- description: 'Skip project configuration',
107
+ hidden: true,
104
108
  }),
105
109
  profile: core_1.Flags.string({
106
110
  description: 'Name of the build profile from eas.json. Defaults to "production" if defined in eas.json.',
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const core_1 = require("@oclif/core");
5
- const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
6
- const fs_extra_1 = (0, tslib_1.__importDefault)(require("fs-extra"));
7
- const path_1 = (0, tslib_1.__importDefault)(require("path"));
5
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
7
+ const path_1 = tslib_1.__importDefault(require("path"));
8
8
  const uuid_1 = require("uuid");
9
9
  const runBuildAndSubmit_1 = require("../../build/runBuildAndSubmit");
10
- const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
11
- const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
10
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
11
+ const log_1 = tslib_1.__importDefault(require("../../log"));
12
12
  const ora_1 = require("../../ora");
13
13
  const platform_1 = require("../../platform");
14
14
  const projectUtils_1 = require("../../project/projectUtils");
@@ -101,7 +101,7 @@ class BuildInspect extends EasCommand_1.default {
101
101
  }
102
102
  }
103
103
  exports.default = BuildInspect;
104
- BuildInspect.description = 'Inspect the state of the project at specific build stages. Useful for troubleshooting.';
104
+ BuildInspect.description = 'inspect the state of the project at specific build stages, useful for troubleshooting';
105
105
  BuildInspect.flags = {
106
106
  platform: core_1.Flags.enum({
107
107
  char: 'p',
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const config_1 = require("@expo/config");
5
5
  const core_1 = require("@oclif/core");
6
- const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
6
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
7
7
  const types_1 = require("../../build/types");
8
8
  const formatBuild_1 = require("../../build/utils/formatBuild");
9
- const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
9
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
10
10
  const generated_1 = require("../../graphql/generated");
11
11
  const BuildQuery_1 = require("../../graphql/queries/BuildQuery");
12
- const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
12
+ const log_1 = tslib_1.__importDefault(require("../../log"));
13
13
  const ora_1 = require("../../ora");
14
14
  const platform_1 = require("../../platform");
15
15
  const projectUtils_1 = require("../../project/projectUtils");
@@ -4,9 +4,9 @@ const tslib_1 = require("tslib");
4
4
  const config_1 = require("@expo/config");
5
5
  const core_1 = require("@oclif/core");
6
6
  const formatBuild_1 = require("../../build/utils/formatBuild");
7
- const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
7
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
8
8
  const BuildQuery_1 = require("../../graphql/queries/BuildQuery");
9
- const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
9
+ const log_1 = tslib_1.__importDefault(require("../../log"));
10
10
  const ora_1 = require("../../ora");
11
11
  const projectUtils_1 = require("../../project/projectUtils");
12
12
  const json_1 = require("../../utils/json");
@@ -4,14 +4,15 @@ exports.createUpdateChannelOnAppAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const config_1 = require("@expo/config");
6
6
  const core_1 = require("@oclif/core");
7
- const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
8
- const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
9
- const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
7
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
8
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
9
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
10
10
  const client_1 = require("../../graphql/client");
11
- const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
11
+ const BranchQuery_1 = require("../../graphql/queries/BranchQuery");
12
+ const log_1 = tslib_1.__importDefault(require("../../log"));
12
13
  const projectUtils_1 = require("../../project/projectUtils");
13
14
  const prompts_1 = require("../../prompts");
14
- const formatFields_1 = (0, tslib_1.__importDefault)(require("../../utils/formatFields"));
15
+ const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields"));
15
16
  const json_1 = require("../../utils/json");
16
17
  const create_1 = require("../branch/create");
17
18
  async function createUpdateChannelOnAppAsync({ appId, channelName, branchId, }) {
@@ -62,15 +63,15 @@ class ChannelCreate extends EasCommand_1.default {
62
63
  }
63
64
  let branchId;
64
65
  let branchMessage;
65
- try {
66
- const existingBranch = await (0, projectUtils_1.getBranchByNameAsync)({
67
- appId: projectId,
68
- name: channelName,
69
- });
66
+ const existingBranch = await BranchQuery_1.BranchQuery.getBranchByNameAsync({
67
+ appId: projectId,
68
+ name: channelName,
69
+ });
70
+ if (existingBranch) {
70
71
  branchId = existingBranch.id;
71
72
  branchMessage = `We found a branch with the same name`;
72
73
  }
73
- catch (e) {
74
+ else {
74
75
  const newBranch = await (0, create_1.createUpdateBranchOnAppAsync)({
75
76
  appId: projectId,
76
77
  name: channelName,
@@ -108,7 +109,7 @@ class ChannelCreate extends EasCommand_1.default {
108
109
  }
109
110
  }
110
111
  exports.default = ChannelCreate;
111
- ChannelCreate.description = 'Create a channel on the current project.';
112
+ ChannelCreate.description = 'create a channel';
112
113
  ChannelCreate.args = [
113
114
  {
114
115
  name: 'name',
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const config_1 = require("@expo/config");
5
5
  const core_1 = require("@oclif/core");
6
- const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
7
- const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
6
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
8
8
  const client_1 = require("../../graphql/client");
9
- const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
9
+ const log_1 = tslib_1.__importDefault(require("../../log"));
10
10
  const projectUtils_1 = require("../../project/projectUtils");
11
11
  const prompts_1 = require("../../prompts");
12
12
  const json_1 = require("../../utils/json");
@@ -67,7 +67,7 @@ class ChannelDelete extends EasCommand_1.default {
67
67
  }
68
68
  exports.default = ChannelDelete;
69
69
  ChannelDelete.hidden = true;
70
- ChannelDelete.description = 'Delete a channel on the current project';
70
+ ChannelDelete.description = 'Delete a channel';
71
71
  ChannelDelete.args = [
72
72
  {
73
73
  name: 'name',
@@ -77,7 +77,7 @@ ChannelDelete.args = [
77
77
  ];
78
78
  ChannelDelete.flags = {
79
79
  json: core_1.Flags.boolean({
80
- description: `Delete a channel on the current project`,
80
+ description: 'print output as a JSON object',
81
81
  default: false,
82
82
  }),
83
83
  'non-interactive': core_1.Flags.boolean({
@@ -4,11 +4,12 @@ exports.updateChannelBranchMappingAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const config_1 = require("@expo/config");
6
6
  const core_1 = require("@oclif/core");
7
- const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
8
- const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
9
- const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
7
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
8
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
9
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
10
10
  const client_1 = require("../../graphql/client");
11
- const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
11
+ const BranchQuery_1 = require("../../graphql/queries/BranchQuery");
12
+ const log_1 = tslib_1.__importDefault(require("../../log"));
12
13
  const projectUtils_1 = require("../../project/projectUtils");
13
14
  const prompts_1 = require("../../prompts");
14
15
  const json_1 = require("../../utils/json");
@@ -62,42 +63,27 @@ async function updateChannelBranchMappingAsync({ channelId, branchMapping, }) {
62
63
  exports.updateChannelBranchMappingAsync = updateChannelBranchMappingAsync;
63
64
  class ChannelEdit extends EasCommand_1.default {
64
65
  async runAsync() {
65
- let { args: { name: channelName }, flags: { branch: branchName, json: jsonFlag }, } = await this.parse(ChannelEdit);
66
- if (jsonFlag) {
66
+ var _a, _b;
67
+ const { args, flags } = await this.parse(ChannelEdit);
68
+ if (flags.json) {
67
69
  (0, json_1.enableJsonOutput)();
68
70
  }
69
71
  const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
70
72
  const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
71
73
  const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
72
- if (!channelName) {
73
- const validationMessage = 'A channel name is required to edit a specific channel.';
74
- if (jsonFlag) {
75
- throw new Error(validationMessage);
76
- }
77
- ({ name: channelName } = await (0, prompts_1.promptAsync)({
78
- type: 'text',
79
- name: 'name',
80
- message: 'Please enter the name of the channel to edit:',
81
- validate: value => (value ? true : validationMessage),
82
- }));
83
- }
74
+ const channelName = (_a = args.name) !== null && _a !== void 0 ? _a : (await promptForChannelAsync());
84
75
  const existingChannel = await getChannelByNameForAppAsync({ appId: projectId, channelName });
85
76
  if (existingChannel.updateBranches.length > 1) {
86
77
  throw new Error('There is a rollout in progress. Please manage it with "channel:rollout" instead.');
87
78
  }
88
- if (!branchName) {
89
- const validationMessage = 'branch name may not be empty.';
90
- if (jsonFlag) {
91
- throw new Error(validationMessage);
92
- }
93
- ({ name: branchName } = await (0, prompts_1.promptAsync)({
94
- type: 'text',
95
- name: 'name',
96
- message: (0, chalk_1.default) `What branch should it change to?`,
97
- validate: value => (value ? true : validationMessage),
98
- }));
79
+ const branchName = (_b = flags.branch) !== null && _b !== void 0 ? _b : (await promptForBranchAsync());
80
+ const branch = await BranchQuery_1.BranchQuery.getBranchByNameAsync({
81
+ appId: projectId,
82
+ name: branchName,
83
+ });
84
+ if (!branch) {
85
+ throw new Error(`Could not find a branch named "${branchName}". Please check what branches exist on this project with ${chalk_1.default.bold('eas branch:list')}.`);
99
86
  }
100
- const branch = await (0, projectUtils_1.getBranchByNameAsync)({ appId: projectId, name: branchName });
101
87
  const channel = await updateChannelBranchMappingAsync({
102
88
  channelId: existingChannel.id,
103
89
  // todo: move branch mapping logic to utility
@@ -106,7 +92,7 @@ class ChannelEdit extends EasCommand_1.default {
106
92
  version: 0,
107
93
  }),
108
94
  });
109
- if (jsonFlag) {
95
+ if (flags.json) {
110
96
  (0, json_1.printJsonOnlyOutput)(channel);
111
97
  }
112
98
  else {
@@ -117,7 +103,7 @@ class ChannelEdit extends EasCommand_1.default {
117
103
  }
118
104
  }
119
105
  exports.default = ChannelEdit;
120
- ChannelEdit.description = 'Point a channel at a new branch.';
106
+ ChannelEdit.description = 'point a channel at a new branch';
121
107
  ChannelEdit.args = [
122
108
  {
123
109
  name: 'name',
@@ -130,7 +116,27 @@ ChannelEdit.flags = {
130
116
  description: 'Name of the branch to point to',
131
117
  }),
132
118
  json: core_1.Flags.boolean({
133
- description: 'print output as a JSON object with the channel ID, name and branch mapping.',
119
+ description: 'Print output as a JSON object with the channel ID, name and branch mapping',
134
120
  default: false,
135
121
  }),
136
122
  };
123
+ async function promptForChannelAsync() {
124
+ log_1.default.addNewLineIfNone();
125
+ const { name } = await (0, prompts_1.promptAsync)({
126
+ type: 'text',
127
+ name: 'name',
128
+ message: 'Please enter the name of the channel to edit:',
129
+ validate: value => (value ? true : 'The channel name may not be empty.'),
130
+ });
131
+ return name;
132
+ }
133
+ async function promptForBranchAsync() {
134
+ log_1.default.addNewLineIfNone();
135
+ const { name } = await (0, prompts_1.promptAsync)({
136
+ type: 'text',
137
+ name: 'name',
138
+ message: `To which branch should the channel link?`,
139
+ validate: value => (value ? true : 'The branch name may not be empty.'),
140
+ });
141
+ return name;
142
+ }
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const config_1 = require("@expo/config");
5
5
  const core_1 = require("@oclif/core");
6
- const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
7
- const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
6
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
8
8
  const client_1 = require("../../graphql/client");
9
- const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
9
+ const log_1 = tslib_1.__importDefault(require("../../log"));
10
10
  const projectUtils_1 = require("../../project/projectUtils");
11
- const formatFields_1 = (0, tslib_1.__importDefault)(require("../../utils/formatFields"));
11
+ const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields"));
12
12
  const json_1 = require("../../utils/json");
13
13
  const view_1 = require("./view");
14
14
  const CHANNEL_LIMIT = 10000;
@@ -84,7 +84,7 @@ class ChannelList extends EasCommand_1.default {
84
84
  }
85
85
  }
86
86
  exports.default = ChannelList;
87
- ChannelList.description = 'List all channels on the current project.';
87
+ ChannelList.description = 'list all channels';
88
88
  ChannelList.flags = {
89
89
  json: core_1.Flags.boolean({
90
90
  description: 'print output as a JSON object with the channel ID, name and branch mapping.',