eas-cli 2.1.0 → 2.2.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 (293) hide show
  1. package/README.md +6 -1047
  2. package/build/branch/queries.d.ts +10 -2
  3. package/build/branch/queries.js +30 -30
  4. package/build/branch/utils.d.ts +4 -0
  5. package/build/branch/utils.js +15 -0
  6. package/build/build/android/build.js +3 -3
  7. package/build/build/android/prepareJob.js +1 -2
  8. package/build/build/android/syncProjectConfiguration.d.ts +2 -1
  9. package/build/build/android/syncProjectConfiguration.js +2 -2
  10. package/build/build/build.js +15 -4
  11. package/build/build/configure.js +2 -2
  12. package/build/build/createContext.d.ts +5 -1
  13. package/build/build/createContext.js +8 -14
  14. package/build/build/ios/build.js +2 -1
  15. package/build/build/ios/credentials.js +1 -1
  16. package/build/build/ios/prepareJob.js +1 -2
  17. package/build/build/ios/syncProjectConfiguration.d.ts +2 -1
  18. package/build/build/ios/syncProjectConfiguration.js +2 -2
  19. package/build/build/local.js +1 -1
  20. package/build/build/metadata.js +1 -2
  21. package/build/build/queries.d.ts +9 -0
  22. package/build/build/queries.js +51 -0
  23. package/build/build/runBuildAndSubmit.d.ts +3 -1
  24. package/build/build/runBuildAndSubmit.js +15 -7
  25. package/build/build/utils/repository.js +5 -1
  26. package/build/channel/queries.d.ts +17 -0
  27. package/build/channel/queries.js +137 -0
  28. package/build/channel/utils.d.ts +22 -0
  29. package/build/channel/utils.js +87 -0
  30. package/build/commandUtils/EasCommand.d.ts +68 -7
  31. package/build/commandUtils/EasCommand.js +60 -79
  32. package/build/commandUtils/context/ActorContextField.d.ts +5 -0
  33. package/build/commandUtils/context/ActorContextField.js +11 -0
  34. package/build/commandUtils/context/ContextField.d.ts +6 -0
  35. package/build/commandUtils/context/ContextField.js +5 -0
  36. package/build/commandUtils/context/DynamicProjectConfigContextField.d.ts +11 -0
  37. package/build/commandUtils/context/DynamicProjectConfigContextField.js +27 -0
  38. package/build/commandUtils/context/OptionalProjectConfigContextField.d.ts +13 -0
  39. package/build/commandUtils/context/OptionalProjectConfigContextField.js +37 -0
  40. package/build/commandUtils/context/ProjectConfigContextField.d.ts +13 -0
  41. package/build/commandUtils/context/ProjectConfigContextField.js +23 -0
  42. package/build/commandUtils/context/ProjectDirContextField.d.ts +4 -0
  43. package/build/commandUtils/context/ProjectDirContextField.js +11 -0
  44. package/build/commandUtils/context/contextUtils/ensureLoggedInAsync.d.ts +21 -0
  45. package/build/commandUtils/context/contextUtils/ensureLoggedInAsync.js +75 -0
  46. package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.d.ts +17 -0
  47. package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.js +102 -0
  48. package/build/commandUtils/context/contextUtils/getProjectIdAsync.d.ts +24 -0
  49. package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +108 -0
  50. package/build/commandUtils/flags.d.ts +10 -0
  51. package/build/commandUtils/flags.js +23 -0
  52. package/build/commandUtils/pagination.d.ts +7 -4
  53. package/build/commandUtils/pagination.js +11 -15
  54. package/build/commands/account/login.d.ts +0 -2
  55. package/build/commands/account/login.js +2 -7
  56. package/build/commands/account/logout.d.ts +0 -2
  57. package/build/commands/account/logout.js +0 -5
  58. package/build/commands/account/view.d.ts +0 -2
  59. package/build/commands/account/view.js +0 -5
  60. package/build/commands/analytics.d.ts +0 -1
  61. package/build/commands/analytics.js +0 -4
  62. package/build/commands/branch/create.d.ts +4 -0
  63. package/build/commands/branch/create.js +18 -18
  64. package/build/commands/branch/delete.d.ts +4 -0
  65. package/build/commands/branch/delete.js +29 -26
  66. package/build/commands/branch/list.d.ts +5 -2
  67. package/build/commands/branch/list.js +13 -8
  68. package/build/commands/branch/rename.d.ts +5 -1
  69. package/build/commands/branch/rename.js +15 -13
  70. package/build/commands/branch/view.d.ts +5 -2
  71. package/build/commands/branch/view.js +31 -13
  72. package/build/commands/build/cancel.d.ts +7 -0
  73. package/build/commands/build/cancel.js +50 -23
  74. package/build/commands/build/configure.d.ts +3 -0
  75. package/build/commands/build/configure.js +12 -7
  76. package/build/commands/build/index.d.ts +7 -2
  77. package/build/commands/build/index.js +31 -23
  78. package/build/commands/build/inspect.d.ts +5 -0
  79. package/build/commands/build/inspect.js +12 -3
  80. package/build/commands/build/list.d.ts +7 -2
  81. package/build/commands/build/list.js +36 -59
  82. package/build/commands/build/version/set.d.ts +5 -0
  83. package/build/commands/build/version/set.js +22 -14
  84. package/build/commands/build/version/sync.d.ts +5 -0
  85. package/build/commands/build/version/sync.js +22 -13
  86. package/build/commands/build/view.d.ts +3 -0
  87. package/build/commands/build/view.js +20 -14
  88. package/build/commands/channel/create.d.ts +4 -0
  89. package/build/commands/channel/create.js +32 -25
  90. package/build/commands/channel/delete.d.ts +3 -0
  91. package/build/commands/channel/delete.js +36 -59
  92. package/build/commands/channel/edit.d.ts +7 -7
  93. package/build/commands/channel/edit.js +39 -72
  94. package/build/commands/channel/list.d.ts +6 -0
  95. package/build/commands/channel/list.js +20 -76
  96. package/build/commands/channel/rollout.d.ts +5 -1
  97. package/build/commands/channel/rollout.js +34 -35
  98. package/build/commands/channel/view.d.ts +6 -33
  99. package/build/commands/channel/view.js +31 -132
  100. package/build/commands/config.d.ts +6 -2
  101. package/build/commands/config.js +22 -13
  102. package/build/commands/credentials.d.ts +4 -0
  103. package/build/commands/credentials.js +10 -1
  104. package/build/commands/device/create.d.ts +4 -0
  105. package/build/commands/device/create.js +15 -3
  106. package/build/commands/device/delete.d.ts +13 -8
  107. package/build/commands/device/delete.js +81 -130
  108. package/build/commands/device/list.d.ts +7 -0
  109. package/build/commands/device/list.js +42 -63
  110. package/build/commands/device/view.d.ts +3 -0
  111. package/build/commands/device/view.js +10 -5
  112. package/build/commands/diagnostics.d.ts +3 -1
  113. package/build/commands/diagnostics.js +10 -8
  114. package/build/commands/metadata/pull.d.ts +4 -0
  115. package/build/commands/metadata/pull.js +13 -8
  116. package/build/commands/metadata/push.d.ts +4 -0
  117. package/build/commands/metadata/push.js +13 -8
  118. package/build/commands/open.d.ts +3 -0
  119. package/build/commands/open.js +11 -9
  120. package/build/commands/project/info.d.ts +3 -0
  121. package/build/commands/project/info.js +9 -6
  122. package/build/commands/project/init.d.ts +12 -0
  123. package/build/commands/project/init.js +155 -8
  124. package/build/commands/secret/create.d.ts +6 -0
  125. package/build/commands/secret/create.js +87 -30
  126. package/build/commands/secret/delete.d.ts +4 -0
  127. package/build/commands/secret/delete.js +28 -19
  128. package/build/commands/secret/list.d.ts +3 -0
  129. package/build/commands/secret/list.js +19 -13
  130. package/build/commands/submit.d.ts +5 -0
  131. package/build/commands/submit.js +16 -7
  132. package/build/commands/update/configure.d.ts +3 -0
  133. package/build/commands/update/configure.js +22 -16
  134. package/build/commands/update/delete.d.ts +1 -0
  135. package/build/commands/update/delete.js +4 -7
  136. package/build/commands/update/index.d.ts +8 -12
  137. package/build/commands/update/index.js +90 -166
  138. package/build/commands/update/list.d.ts +8 -2
  139. package/build/commands/update/list.js +51 -81
  140. package/build/commands/update/view.d.ts +0 -4
  141. package/build/commands/update/view.js +14 -51
  142. package/build/commands/webhook/create.d.ts +4 -0
  143. package/build/commands/webhook/create.js +10 -5
  144. package/build/commands/webhook/delete.d.ts +6 -0
  145. package/build/commands/webhook/delete.js +26 -14
  146. package/build/commands/webhook/list.d.ts +3 -0
  147. package/build/commands/webhook/list.js +13 -9
  148. package/build/commands/webhook/update.d.ts +1 -0
  149. package/build/commands/webhook/update.js +3 -1
  150. package/build/credentials/android/actions/BuildCredentialsUtils.js +2 -6
  151. package/build/credentials/android/actions/CreateFcm.d.ts +2 -3
  152. package/build/credentials/android/actions/CreateGoogleServiceAccountKey.d.ts +2 -3
  153. package/build/credentials/android/actions/CreateKeystore.d.ts +2 -3
  154. package/build/credentials/android/actions/CreateKeystore.js +1 -2
  155. package/build/credentials/android/actions/RemoveGoogleServiceAccountKey.d.ts +2 -3
  156. package/build/credentials/android/actions/UseExistingGoogleServiceAccountKey.d.ts +2 -3
  157. package/build/credentials/android/api/GraphqlClient.d.ts +6 -7
  158. package/build/credentials/context.d.ts +8 -4
  159. package/build/credentials/context.js +8 -23
  160. package/build/credentials/ios/IosCredentialsProvider.js +11 -6
  161. package/build/credentials/ios/actions/AppleTeamFormatting.d.ts +2 -0
  162. package/build/credentials/ios/actions/AppleTeamFormatting.js +7 -0
  163. package/build/credentials/ios/actions/AppleTeamUtils.d.ts +1 -2
  164. package/build/credentials/ios/actions/AppleTeamUtils.js +1 -5
  165. package/build/credentials/ios/actions/AscApiKeyUtils.d.ts +3 -4
  166. package/build/credentials/ios/actions/AscApiKeyUtils.js +2 -2
  167. package/build/credentials/ios/actions/AssignAscApiKey.d.ts +1 -1
  168. package/build/credentials/ios/actions/AssignPushKey.d.ts +1 -1
  169. package/build/credentials/ios/actions/BuildCredentialsUtils.d.ts +3 -3
  170. package/build/credentials/ios/actions/BuildCredentialsUtils.js +8 -12
  171. package/build/credentials/ios/actions/ConfigureProvisioningProfile.d.ts +1 -1
  172. package/build/credentials/ios/actions/CreateAscApiKey.d.ts +2 -3
  173. package/build/credentials/ios/actions/CreateDistributionCertificate.d.ts +2 -2
  174. package/build/credentials/ios/actions/CreateProvisioningProfile.d.ts +1 -1
  175. package/build/credentials/ios/actions/CreatePushKey.d.ts +2 -3
  176. package/build/credentials/ios/actions/DeviceUtils.d.ts +0 -1
  177. package/build/credentials/ios/actions/DeviceUtils.js +3 -19
  178. package/build/credentials/ios/actions/DistributionCertificateUtils.d.ts +3 -4
  179. package/build/credentials/ios/actions/DistributionCertificateUtils.js +2 -2
  180. package/build/credentials/ios/actions/PushKeyUtils.d.ts +2 -3
  181. package/build/credentials/ios/actions/PushKeyUtils.js +2 -2
  182. package/build/credentials/ios/actions/RemoveAscApiKey.d.ts +2 -3
  183. package/build/credentials/ios/actions/RemoveDistributionCertificate.d.ts +3 -4
  184. package/build/credentials/ios/actions/RemoveProvisioningProfile.d.ts +1 -1
  185. package/build/credentials/ios/actions/RemovePushKey.d.ts +2 -3
  186. package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.d.ts +1 -1
  187. package/build/credentials/ios/actions/SetUpAscApiKey.d.ts +1 -1
  188. package/build/credentials/ios/actions/SetUpDistributionCertificate.d.ts +1 -1
  189. package/build/credentials/ios/actions/SetUpInternalProvisioningProfile.d.ts +1 -1
  190. package/build/credentials/ios/actions/SetUpProvisioningProfile.d.ts +1 -1
  191. package/build/credentials/ios/actions/SetUpPushKey.d.ts +1 -1
  192. package/build/credentials/ios/actions/SetUpSubmissionCredentials.d.ts +1 -1
  193. package/build/credentials/ios/actions/SetUpTargetBuildCredentials.d.ts +1 -1
  194. package/build/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.d.ts +1 -1
  195. package/build/credentials/ios/api/GraphqlClient.d.ts +9 -15
  196. package/build/credentials/ios/api/graphql/mutations/AppleTeamMutation.d.ts +2 -3
  197. package/build/credentials/ios/api/graphql/mutations/AppleTeamMutation.js +3 -1
  198. package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.d.ts +3 -3
  199. package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +20 -6
  200. package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.d.ts +2 -2
  201. package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +8 -7
  202. package/build/credentials/ios/api/graphql/types/AppLookupParams.d.ts +7 -0
  203. package/build/credentials/ios/api/graphql/types/AppLookupParams.js +2 -0
  204. package/build/credentials/ios/types.d.ts +2 -3
  205. package/build/credentials/ios/utils/printCredentials.d.ts +1 -1
  206. package/build/credentials/ios/validators/validateProvisioningProfile.d.ts +1 -1
  207. package/build/credentials/manager/HelperActions.d.ts +4 -1
  208. package/build/credentials/manager/ManageAndroid.js +4 -14
  209. package/build/credentials/manager/ManageIos.js +12 -15
  210. package/build/credentials/manager/SelectBuildProfileFromEasJson.d.ts +1 -1
  211. package/build/credentials/manager/SelectBuildProfileFromEasJson.js +3 -3
  212. package/build/credentials/manager/SelectPlatform.d.ts +5 -1
  213. package/build/credentials/manager/SelectPlatform.js +5 -3
  214. package/build/devices/actions/create/action.d.ts +2 -3
  215. package/build/devices/context.d.ts +3 -5
  216. package/build/devices/context.js +2 -11
  217. package/build/devices/manager.d.ts +4 -5
  218. package/build/devices/manager.js +9 -16
  219. package/build/devices/queries.d.ts +21 -0
  220. package/build/devices/queries.js +121 -0
  221. package/build/devices/utils/errors.d.ts +3 -0
  222. package/build/devices/utils/errors.js +9 -0
  223. package/build/devices/utils/formatDevice.d.ts +3 -3
  224. package/build/devices/utils/formatDevice.js +8 -3
  225. package/build/graphql/generated.d.ts +1101 -191
  226. package/build/graphql/generated.js +13 -2
  227. package/build/graphql/mutations/EnvironmentSecretMutation.d.ts +3 -1
  228. package/build/graphql/queries/AppQuery.d.ts +1 -0
  229. package/build/graphql/queries/AppQuery.js +19 -0
  230. package/build/graphql/queries/BranchQuery.d.ts +5 -6
  231. package/build/graphql/queries/BranchQuery.js +44 -3
  232. package/build/graphql/queries/BuildQuery.d.ts +2 -20
  233. package/build/graphql/queries/BuildQuery.js +2 -2
  234. package/build/graphql/queries/ChannelQuery.d.ts +5 -2
  235. package/build/graphql/queries/ChannelQuery.js +45 -19
  236. package/build/graphql/queries/EnvironmentSecretsQuery.d.ts +5 -3
  237. package/build/graphql/queries/EnvironmentSecretsQuery.js +14 -28
  238. package/build/graphql/queries/UpdateQuery.d.ts +4 -6
  239. package/build/graphql/queries/UpdateQuery.js +59 -50
  240. package/build/graphql/queries/UserQuery.js +8 -1
  241. package/build/graphql/types/Account.d.ts +1 -0
  242. package/build/graphql/types/Account.js +17 -0
  243. package/build/graphql/types/App.js +7 -0
  244. package/build/graphql/types/EnvironmentSecret.d.ts +7 -0
  245. package/build/graphql/types/EnvironmentSecret.js +16 -1
  246. package/build/graphql/types/Update.d.ts +1 -0
  247. package/build/graphql/types/Update.js +30 -0
  248. package/build/graphql/types/UpdateBranch.js +4 -15
  249. package/build/metadata/context.d.ts +1 -1
  250. package/build/metadata/context.js +7 -9
  251. package/build/project/android/applicationId.d.ts +2 -1
  252. package/build/project/android/applicationId.js +7 -7
  253. package/build/project/android/versions.js +1 -1
  254. package/build/project/applicationIdentifier.d.ts +2 -1
  255. package/build/project/applicationIdentifier.js +2 -2
  256. package/build/project/expoConfig.d.ts +3 -3
  257. package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.d.ts +22 -0
  258. package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.js +93 -0
  259. package/build/project/ios/bundleIdentifier.d.ts +2 -1
  260. package/build/project/ios/bundleIdentifier.js +7 -7
  261. package/build/project/ios/scheme.d.ts +1 -1
  262. package/build/project/projectUtils.d.ts +4 -31
  263. package/build/project/projectUtils.js +13 -123
  264. package/build/project/remoteVersionSource.d.ts +2 -2
  265. package/build/project/remoteVersionSource.js +8 -7
  266. package/build/submit/android/ServiceAccountSource.js +1 -2
  267. package/build/submit/context.d.ts +3 -1
  268. package/build/submit/context.js +12 -14
  269. package/build/submit/ios/CredentialsServiceSource.js +1 -2
  270. package/build/submit/utils/builds.js +3 -1
  271. package/build/update/android/UpdatesModule.d.ts +1 -1
  272. package/build/update/android/UpdatesModule.js +2 -3
  273. package/build/update/ios/UpdatesModule.d.ts +1 -1
  274. package/build/update/ios/UpdatesModule.js +2 -3
  275. package/build/update/queries.d.ts +16 -1
  276. package/build/update/queries.js +96 -30
  277. package/build/update/utils.d.ts +21 -8
  278. package/build/update/utils.js +75 -14
  279. package/build/user/actions.d.ts +2 -8
  280. package/build/user/actions.js +4 -63
  281. package/build/utils/profiles.d.ts +3 -3
  282. package/build/utils/profiles.js +6 -5
  283. package/build/vcs/clients/git.d.ts +1 -1
  284. package/build/vcs/clients/git.js +1 -1
  285. package/build/vcs/vcs.d.ts +1 -1
  286. package/build/webhooks/input.d.ts +2 -1
  287. package/build/webhooks/input.js +10 -1
  288. package/oclif.manifest.json +1 -1
  289. package/package.json +4 -4
  290. package/build/project/ensureProjectExists.d.ts +0 -21
  291. package/build/project/ensureProjectExists.js +0 -88
  292. package/build/user/Account.d.ts +0 -3
  293. package/build/user/Account.js +0 -7
@@ -1,5 +1,13 @@
1
1
  import { PaginatedQueryOptions } from '../commandUtils/pagination';
2
2
  import { UpdateBranchFragment } from '../graphql/generated';
3
3
  export declare const BRANCHES_LIMIT = 50;
4
- export declare function selectBranchFromPaginatedQueryAsync(projectId: string, promptTitle: string, options: PaginatedQueryOptions): Promise<UpdateBranchFragment>;
5
- export declare function listAndRenderPaginatedBranchesAsync(projectId: string, options: PaginatedQueryOptions): Promise<void>;
4
+ export declare function selectBranchOnAppAsync({ projectId, promptTitle, displayTextForListItem, paginatedQueryOptions, }: {
5
+ projectId: string;
6
+ displayTextForListItem: (queryItem: UpdateBranchFragment) => string;
7
+ promptTitle: string;
8
+ paginatedQueryOptions: PaginatedQueryOptions;
9
+ }): Promise<UpdateBranchFragment>;
10
+ export declare function listAndRenderBranchesOnAppAsync({ projectId, paginatedQueryOptions, }: {
11
+ projectId: string;
12
+ paginatedQueryOptions: PaginatedQueryOptions;
13
+ }): Promise<void>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.listAndRenderPaginatedBranchesAsync = exports.selectBranchFromPaginatedQueryAsync = exports.BRANCHES_LIMIT = void 0;
3
+ exports.listAndRenderBranchesOnAppAsync = exports.selectBranchOnAppAsync = exports.BRANCHES_LIMIT = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
6
  const cli_table3_1 = tslib_1.__importDefault(require("cli-table3"));
@@ -10,19 +10,19 @@ const utils_1 = require("../update/utils");
10
10
  const json_1 = require("../utils/json");
11
11
  const queries_1 = require("../utils/queries");
12
12
  exports.BRANCHES_LIMIT = 50;
13
- async function selectBranchFromPaginatedQueryAsync(projectId, promptTitle, options) {
13
+ async function selectBranchOnAppAsync({ projectId, promptTitle, displayTextForListItem, paginatedQueryOptions, }) {
14
14
  var _a;
15
- if (options.nonInteractive) {
15
+ if (paginatedQueryOptions.nonInteractive) {
16
16
  throw new Error('Unable to select a branch in non-interactive mode.');
17
17
  }
18
18
  const selectedBranch = await (0, queries_1.paginatedQueryWithSelectPromptAsync)({
19
- limit: (_a = options.limit) !== null && _a !== void 0 ? _a : exports.BRANCHES_LIMIT,
20
- offset: options.offset,
21
- queryToPerform: (limit, offset) => queryBranchesForProjectAsync(limit, offset, projectId),
19
+ limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.BRANCHES_LIMIT,
20
+ offset: paginatedQueryOptions.offset,
21
+ queryToPerform: (limit, offset) => queryBranchesOnProjectAsync(limit, offset, projectId),
22
22
  promptOptions: {
23
23
  title: promptTitle,
24
24
  getIdentifierForQueryItem: updateBranchFragment => updateBranchFragment.id,
25
- createDisplayTextForSelectionPromptListItem: updateBranchFragment => updateBranchFragment.name,
25
+ createDisplayTextForSelectionPromptListItem: displayTextForListItem,
26
26
  },
27
27
  });
28
28
  if (!selectedBranch) {
@@ -30,28 +30,28 @@ async function selectBranchFromPaginatedQueryAsync(projectId, promptTitle, optio
30
30
  }
31
31
  return selectedBranch;
32
32
  }
33
- exports.selectBranchFromPaginatedQueryAsync = selectBranchFromPaginatedQueryAsync;
34
- async function listAndRenderPaginatedBranchesAsync(projectId, options) {
33
+ exports.selectBranchOnAppAsync = selectBranchOnAppAsync;
34
+ async function listAndRenderBranchesOnAppAsync({ projectId, paginatedQueryOptions, }) {
35
35
  var _a, _b;
36
- if (options.nonInteractive) {
37
- const branches = await queryBranchesForProjectAsync((_a = options.limit) !== null && _a !== void 0 ? _a : exports.BRANCHES_LIMIT, options.offset, projectId);
38
- renderPageOfBranches(branches, options);
36
+ if (paginatedQueryOptions.nonInteractive) {
37
+ const branches = await queryBranchesOnProjectAsync((_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.BRANCHES_LIMIT, paginatedQueryOptions.offset, projectId);
38
+ renderPageOfBranches(branches, paginatedQueryOptions);
39
39
  }
40
40
  else {
41
41
  await (0, queries_1.paginatedQueryWithConfirmPromptAsync)({
42
- limit: (_b = options.limit) !== null && _b !== void 0 ? _b : exports.BRANCHES_LIMIT,
43
- offset: options.offset,
44
- queryToPerform: (limit, offset) => queryBranchesForProjectAsync(limit, offset, projectId),
42
+ limit: (_b = paginatedQueryOptions.limit) !== null && _b !== void 0 ? _b : exports.BRANCHES_LIMIT,
43
+ offset: paginatedQueryOptions.offset,
44
+ queryToPerform: (limit, offset) => queryBranchesOnProjectAsync(limit, offset, projectId),
45
45
  promptOptions: {
46
46
  title: 'Load more branches?',
47
- renderListItems: branches => renderPageOfBranches(branches, options),
47
+ renderListItems: branches => renderPageOfBranches(branches, paginatedQueryOptions),
48
48
  },
49
49
  });
50
50
  }
51
51
  }
52
- exports.listAndRenderPaginatedBranchesAsync = listAndRenderPaginatedBranchesAsync;
53
- async function queryBranchesForProjectAsync(limit, offset, projectId) {
54
- return await BranchQuery_1.BranchQuery.listBranchesAsync({
52
+ exports.listAndRenderBranchesOnAppAsync = listAndRenderBranchesOnAppAsync;
53
+ async function queryBranchesOnProjectAsync(limit, offset, projectId) {
54
+ return await BranchQuery_1.BranchQuery.listBranchesOnAppAsync({
55
55
  appId: projectId,
56
56
  limit,
57
57
  offset,
@@ -67,19 +67,19 @@ function renderPageOfBranches(currentPage, { json }) {
67
67
  wordWrap: true,
68
68
  });
69
69
  table.push(...currentPage.map(branch => {
70
- var _a, _b;
71
- const update = branch.updates[0];
70
+ if (branch.updates.length === 0) {
71
+ return [branch.name, 'N/A', 'N/A', 'N/A', 'N/A'];
72
+ }
73
+ const latestUpdateOnBranch = branch.updates[0];
72
74
  return [
73
75
  branch.name,
74
- (0, utils_1.formatUpdate)(update),
75
- (_a = update === null || update === void 0 ? void 0 : update.runtimeVersion) !== null && _a !== void 0 ? _a : 'N/A',
76
- (_b = update === null || update === void 0 ? void 0 : update.group) !== null && _b !== void 0 ? _b : 'N/A',
77
- (update === null || update === void 0 ? void 0 : update.group)
78
- ? (0, utils_1.getPlatformsForGroup)({
79
- updates: branch.updates,
80
- group: update.group,
81
- })
82
- : 'N/A',
76
+ (0, utils_1.formatUpdateMessage)(latestUpdateOnBranch),
77
+ latestUpdateOnBranch.runtimeVersion,
78
+ latestUpdateOnBranch.group,
79
+ (0, utils_1.getPlatformsForGroup)({
80
+ group: latestUpdateOnBranch.group,
81
+ updates: branch.updates,
82
+ }),
83
83
  ];
84
84
  }));
85
85
  log_1.default.addNewLineIfNone();
@@ -0,0 +1,4 @@
1
+ export declare function getDefaultBranchNameAsync(): Promise<string>;
2
+ export declare class BranchNotFoundError extends Error {
3
+ constructor(message?: string);
4
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BranchNotFoundError = exports.getDefaultBranchNameAsync = void 0;
4
+ const vcs_1 = require("../vcs");
5
+ async function getDefaultBranchNameAsync() {
6
+ return ((await (0, vcs_1.getVcsClient)().getBranchNameAsync()) ||
7
+ `branch-${Math.random().toString(36).substring(2, 4)}`);
8
+ }
9
+ exports.getDefaultBranchNameAsync = getDefaultBranchNameAsync;
10
+ class BranchNotFoundError extends Error {
11
+ constructor(message) {
12
+ super(message !== null && message !== void 0 ? message : 'Branch not found.');
13
+ }
14
+ }
15
+ exports.BranchNotFoundError = BranchNotFoundError;
@@ -12,7 +12,6 @@ const log_1 = tslib_1.__importDefault(require("../../log"));
12
12
  const applicationId_1 = require("../../project/android/applicationId");
13
13
  const gradle_1 = require("../../project/android/gradle");
14
14
  const prompts_1 = require("../../prompts");
15
- const Account_1 = require("../../user/Account");
16
15
  const build_1 = require("../build");
17
16
  const graphql_1 = require("../graphql");
18
17
  const credentials_1 = require("../utils/credentials");
@@ -39,7 +38,7 @@ This means that it will most likely produce an AAB and you will not be able to i
39
38
  await (0, validate_1.checkGoogleServicesFileAsync)(ctx);
40
39
  const gradleContext = await (0, gradle_1.resolveGradleBuildContextAsync)(ctx.projectDir, buildProfile);
41
40
  if (ctx.workflow === eas_build_job_1.Workflow.MANAGED) {
42
- await (0, applicationId_1.ensureApplicationIdIsDefinedForManagedProjectAsync)(ctx.projectDir, ctx.exp);
41
+ await (0, applicationId_1.ensureApplicationIdIsDefinedForManagedProjectAsync)(ctx.projectDir, ctx.exp, ctx.user);
43
42
  }
44
43
  const applicationId = await (0, applicationId_1.getApplicationIdAsync)(ctx.projectDir, ctx.exp, gradleContext);
45
44
  const versionCodeOverride = ((_b = ctx.easJsonCliConfig) === null || _b === void 0 ? void 0 : _b.appVersionSource) === eas_json_1.AppVersionSource.REMOTE
@@ -68,6 +67,7 @@ async function prepareAndroidBuildAsync(ctx) {
68
67
  localAutoIncrement: ((_a = ctx.easJsonCliConfig) === null || _a === void 0 ? void 0 : _a.appVersionSource) === eas_json_1.AppVersionSource.REMOTE
69
68
  ? false
70
69
  : ctx.buildProfile.autoIncrement,
70
+ projectId: ctx.projectId,
71
71
  });
72
72
  },
73
73
  prepareJobAsync: async (ctx, jobData) => {
@@ -96,7 +96,7 @@ async function ensureAndroidCredentialsAsync(ctx) {
96
96
  const androidApplicationIdentifier = await (0, applicationId_1.getApplicationIdAsync)(ctx.projectDir, ctx.exp, ctx.android.gradleContext);
97
97
  const provider = new AndroidCredentialsProvider_1.default(ctx.credentialsCtx, {
98
98
  app: {
99
- account: (0, nullthrows_1.default)((0, Account_1.findAccountByName)(ctx.user.accounts, ctx.accountName), `You do not have access to account: ${ctx.accountName}`),
99
+ account: (0, nullthrows_1.default)(ctx.user.accounts.find(a => a.name === ctx.accountName), `You do not have access to account: ${ctx.accountName}`),
100
100
  projectName: ctx.projectName,
101
101
  androidApplicationIdentifier,
102
102
  },
@@ -6,7 +6,6 @@ const eas_build_job_1 = require("@expo/eas-build-job");
6
6
  const path_1 = tslib_1.__importDefault(require("path"));
7
7
  const slash_1 = tslib_1.__importDefault(require("slash"));
8
8
  const projectUtils_1 = require("../../project/projectUtils");
9
- const actions_1 = require("../../user/actions");
10
9
  const vcs_1 = require("../../vcs");
11
10
  const cacheDefaults = {
12
11
  disabled: false,
@@ -15,7 +14,7 @@ const cacheDefaults = {
15
14
  };
16
15
  async function prepareJobAsync(ctx, jobData) {
17
16
  var _a;
18
- const username = (0, projectUtils_1.getUsername)(ctx.exp, await (0, actions_1.ensureLoggedInAsync)());
17
+ const username = (0, projectUtils_1.getUsername)(ctx.exp, ctx.user);
19
18
  const buildProfile = ctx.buildProfile;
20
19
  const projectRootDirectory = (0, slash_1.default)(path_1.default.relative(await (0, vcs_1.getVcsClient)().getRootPathAsync(), ctx.projectDir)) || '.';
21
20
  const { credentials } = jobData;
@@ -1,8 +1,9 @@
1
1
  import { ExpoConfig } from '@expo/config';
2
2
  import { AndroidVersionAutoIncrement } from '@expo/eas-json';
3
- export declare function syncProjectConfigurationAsync({ projectDir, exp, localAutoIncrement, }: {
3
+ export declare function syncProjectConfigurationAsync({ projectDir, exp, localAutoIncrement, projectId, }: {
4
4
  projectDir: string;
5
5
  exp: ExpoConfig;
6
6
  localAutoIncrement?: AndroidVersionAutoIncrement;
7
+ projectId: string;
7
8
  }): Promise<void>;
8
9
  export declare function cleanUpOldEasBuildGradleScriptAsync(projectDir: string): Promise<void>;
@@ -12,13 +12,13 @@ const projectUtils_1 = require("../../project/projectUtils");
12
12
  const workflow_1 = require("../../project/workflow");
13
13
  const UpdatesModule_1 = require("../../update/android/UpdatesModule");
14
14
  const version_1 = require("./version");
15
- async function syncProjectConfigurationAsync({ projectDir, exp, localAutoIncrement, }) {
15
+ async function syncProjectConfigurationAsync({ projectDir, exp, localAutoIncrement, projectId, }) {
16
16
  const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID);
17
17
  const versionBumpStrategy = resolveVersionBumpStrategy(localAutoIncrement !== null && localAutoIncrement !== void 0 ? localAutoIncrement : false);
18
18
  if (workflow === eas_build_job_1.Workflow.GENERIC) {
19
19
  await cleanUpOldEasBuildGradleScriptAsync(projectDir);
20
20
  if ((0, projectUtils_1.isExpoUpdatesInstalled)(projectDir)) {
21
- await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(projectDir, exp);
21
+ await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(projectDir, exp, projectId);
22
22
  }
23
23
  await (0, version_1.bumpVersionAsync)({ projectDir, exp, bumpStrategy: versionBumpStrategy });
24
24
  }
@@ -79,20 +79,28 @@ async function prepareBuildRequestForPlatformAsync(builder) {
79
79
  }
80
80
  exports.prepareBuildRequestForPlatformAsync = prepareBuildRequestForPlatformAsync;
81
81
  function handleBuildRequestError(error, platform) {
82
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
82
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
83
83
  if (((_c = (_b = (_a = error === null || error === void 0 ? void 0 : error.graphQLErrors) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.extensions) === null || _c === void 0 ? void 0 : _c.errorCode) === 'TURTLE_DEPRECATED_JOB_FORMAT') {
84
84
  log_1.default.error('EAS Build API has changed. Upgrade to the latest eas-cli version.');
85
85
  throw new Error('Build request failed.');
86
86
  }
87
87
  else if (((_f = (_e = (_d = error === null || error === void 0 ? void 0 : error.graphQLErrors) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.extensions) === null || _f === void 0 ? void 0 : _f.errorCode) === 'EAS_BUILD_DOWN_FOR_MAINTENANCE') {
88
- log_1.default.error('EAS Build is down for maintenance. Try again later. Check https://status.expo.dev/ for updates.');
88
+ log_1.default.error(`EAS Build is down for maintenance. Try again later. Check ${(0, log_1.link)('https://status.expo.dev/')} for updates.`);
89
89
  throw new Error('Build request failed.');
90
90
  }
91
91
  else if (((_j = (_h = (_g = error === null || error === void 0 ? void 0 : error.graphQLErrors) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.extensions) === null || _j === void 0 ? void 0 : _j.errorCode) === 'EAS_BUILD_FREE_TIER_DISABLED') {
92
- log_1.default.error('EAS Build free tier is temporarily disabled. Try again later. Check https://status.expo.dev/ for updates.');
92
+ log_1.default.error(`EAS Build free tier is temporarily disabled and we are not accepting any new builds. Try again later. ${(0, log_1.learnMore)('https://expo.fyi/eas-build-queues')}`);
93
93
  throw new Error('Build request failed.');
94
94
  }
95
- else if (((_m = (_l = (_k = error === null || error === void 0 ? void 0 : error.graphQLErrors) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.extensions) === null || _m === void 0 ? void 0 : _m.errorCode) === 'EAS_BUILD_TOO_MANY_PENDING_BUILDS') {
95
+ else if (((_m = (_l = (_k = error === null || error === void 0 ? void 0 : error.graphQLErrors) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.extensions) === null || _m === void 0 ? void 0 : _m.errorCode) === 'EAS_BUILD_FREE_TIER_DISABLED_IOS') {
96
+ log_1.default.error(`EAS Build free tier is temporarily disabled for iOS and we are not accepting any new builds. Try again later. ${(0, log_1.learnMore)('https://expo.fyi/eas-build-queues')}`);
97
+ throw new Error('Build request failed.');
98
+ }
99
+ else if (((_q = (_p = (_o = error === null || error === void 0 ? void 0 : error.graphQLErrors) === null || _o === void 0 ? void 0 : _o[0]) === null || _p === void 0 ? void 0 : _p.extensions) === null || _q === void 0 ? void 0 : _q.errorCode) === 'EAS_BUILD_FREE_TIER_DISABLED_ANDROID') {
100
+ log_1.default.error(`EAS Build free tier is temporarily disabled for Android and we are not accepting any new builds. Try again later. ${(0, log_1.learnMore)('https://expo.fyi/eas-build-queues')}`);
101
+ throw new Error('Build request failed.');
102
+ }
103
+ else if (((_t = (_s = (_r = error === null || error === void 0 ? void 0 : error.graphQLErrors) === null || _r === void 0 ? void 0 : _r[0]) === null || _s === void 0 ? void 0 : _s.extensions) === null || _t === void 0 ? void 0 : _t.errorCode) === 'EAS_BUILD_TOO_MANY_PENDING_BUILDS') {
96
104
  log_1.default.error(`You have already reached the maximum number of pending ${platform_1.requestedPlatformDisplayNames[platform]} builds for your account. Try again later.`);
97
105
  throw new Error('Build request failed.');
98
106
  }
@@ -108,6 +116,9 @@ async function uploadProjectAsync(ctx) {
108
116
  log_1.default.newLine();
109
117
  log_1.default.log(`Compressing project files and uploading to EAS Build. ${(0, log_1.learnMore)('https://expo.fyi/eas-build-archive')}`);
110
118
  const projectTarball = await (0, repository_1.makeProjectTarballAsync)();
119
+ if (projectTarball.size > 1024 * 1024 * 100) {
120
+ log_1.default.warn(`Your project archive is ${(0, files_1.formatBytes)(projectTarball.size)}. You can reduce its size and the time it takes to upload by excluding files that are unnecessary for the build process in ${chalk_1.default.bold('.easignore')} file. ${(0, log_1.learnMore)('https://expo.fyi/eas-build-archive')}`);
121
+ }
111
122
  projectTarballPath = projectTarball.path;
112
123
  const { bucketKey } = await (0, uploads_1.uploadFileAtPathToS3Async)(generated_1.UploadSessionType.EasBuildProjectSources, projectTarball.path, (0, progress_1.createProgressTracker)({
113
124
  total: projectTarball.size,
@@ -19,7 +19,7 @@ const repository_1 = require("./utils/repository");
19
19
  * - true - if eas.json was created by the function
20
20
  */
21
21
  async function ensureProjectConfiguredAsync(configureParams) {
22
- if (await fs_extra_1.default.pathExists(eas_json_1.EasJsonReader.formatEasJsonPath(configureParams.projectDir))) {
22
+ if (await fs_extra_1.default.pathExists(eas_json_1.EasJsonAccessor.formatEasJsonPath(configureParams.projectDir))) {
23
23
  return false;
24
24
  }
25
25
  await configureAsync(configureParams);
@@ -78,7 +78,7 @@ const EAS_JSON_BARE_DEFAULT = {
78
78
  },
79
79
  };
80
80
  async function createEasJsonAsync(projectDir) {
81
- const easJsonPath = eas_json_1.EasJsonReader.formatEasJsonPath(projectDir);
81
+ const easJsonPath = eas_json_1.EasJsonAccessor.formatEasJsonPath(projectDir);
82
82
  const hasAndroidNativeProject = (await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID)) === eas_build_job_1.Workflow.GENERIC;
83
83
  const hasIosNativeProject = (await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS)) === eas_build_job_1.Workflow.GENERIC;
84
84
  const easJson = hasAndroidNativeProject || hasIosNativeProject
@@ -1,9 +1,11 @@
1
1
  import { Platform } from '@expo/eas-build-job';
2
2
  import { BuildProfile, EasJson } from '@expo/eas-json';
3
+ import { DynamicConfigContextFn } from '../commandUtils/context/DynamicProjectConfigContextField';
3
4
  import { BuildResourceClass } from '../graphql/generated';
5
+ import { Actor } from '../user/User';
4
6
  import { BuildContext } from './context';
5
7
  import { LocalBuildOptions } from './local';
6
- export declare function createBuildContextAsync<T extends Platform>({ buildProfileName, buildProfile, easJsonCliConfig, clearCache, localBuildOptions, nonInteractive, noWait, platform, projectDir, resourceClass, message, }: {
8
+ export declare function createBuildContextAsync<T extends Platform>({ buildProfileName, buildProfile, easJsonCliConfig, clearCache, localBuildOptions, nonInteractive, noWait, platform, projectDir, resourceClass, message, actor, getDynamicProjectConfigAsync, }: {
7
9
  buildProfileName: string;
8
10
  buildProfile: BuildProfile<T>;
9
11
  easJsonCliConfig: EasJson['cli'];
@@ -15,4 +17,6 @@ export declare function createBuildContextAsync<T extends Platform>({ buildProfi
15
17
  projectDir: string;
16
18
  resourceClass: BuildResourceClass;
17
19
  message?: string;
20
+ actor: Actor;
21
+ getDynamicProjectConfigAsync: DynamicConfigContextFn;
18
22
  }): Promise<BuildContext<T>>;
@@ -9,28 +9,22 @@ const resolve_from_1 = tslib_1.__importDefault(require("resolve-from"));
9
9
  const uuid_1 = require("uuid");
10
10
  const events_1 = require("../analytics/events");
11
11
  const context_1 = require("../credentials/context");
12
- const expoConfig_1 = require("../project/expoConfig");
13
12
  const projectUtils_1 = require("../project/projectUtils");
14
13
  const workflow_1 = require("../project/workflow");
15
- const Account_1 = require("../user/Account");
16
- const actions_1 = require("../user/actions");
17
14
  const build_1 = require("./android/build");
18
15
  const build_2 = require("./ios/build");
19
- async function createBuildContextAsync({ buildProfileName, buildProfile, easJsonCliConfig, clearCache = false, localBuildOptions, nonInteractive, noWait, platform, projectDir, resourceClass, message, }) {
20
- var _a;
21
- const exp = (0, expoConfig_1.getExpoConfig)(projectDir, { env: buildProfile.env });
22
- const user = await (0, actions_1.ensureLoggedInAsync)();
23
- const accountName = (0, projectUtils_1.getProjectAccountName)(exp, user);
16
+ async function createBuildContextAsync({ buildProfileName, buildProfile, easJsonCliConfig, clearCache = false, localBuildOptions, nonInteractive, noWait, platform, projectDir, resourceClass, message, actor, getDynamicProjectConfigAsync, }) {
17
+ const { exp, projectId } = await getDynamicProjectConfigAsync({ env: buildProfile.env });
24
18
  const projectName = exp.slug;
25
- const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp, { env: buildProfile.env });
19
+ const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(projectId);
26
20
  const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, platform);
27
- const accountId = (_a = (0, Account_1.findAccountByName)(user.accounts, accountName)) === null || _a === void 0 ? void 0 : _a.id;
21
+ const accountId = account.id;
28
22
  const runFromCI = getenv_1.default.boolish('CI', false);
29
23
  const credentialsCtx = new context_1.CredentialsContext({
30
- exp,
24
+ projectInfo: { exp, projectId },
31
25
  nonInteractive,
32
26
  projectDir,
33
- user,
27
+ user: actor,
34
28
  env: buildProfile.env,
35
29
  easJsonCliConfig,
36
30
  });
@@ -51,7 +45,7 @@ async function createBuildContextAsync({ buildProfileName, buildProfile, easJson
51
45
  };
52
46
  events_1.Analytics.logEvent(events_1.BuildEvent.BUILD_COMMAND, trackingCtx);
53
47
  const commonContext = {
54
- accountName,
48
+ accountName: account.name,
55
49
  buildProfile,
56
50
  buildProfileName,
57
51
  resourceClass,
@@ -67,7 +61,7 @@ async function createBuildContextAsync({ buildProfileName, buildProfile, easJson
67
61
  projectId,
68
62
  projectName,
69
63
  trackingCtx,
70
- user,
64
+ user: actor,
71
65
  workflow,
72
66
  message,
73
67
  runFromCI,
@@ -19,7 +19,7 @@ async function createIosContextAsync(ctx) {
19
19
  var _a;
20
20
  const { buildProfile } = ctx;
21
21
  if (ctx.workflow === eas_build_job_1.Workflow.MANAGED) {
22
- await (0, bundleIdentifier_1.ensureBundleIdentifierIsDefinedForManagedProjectAsync)(ctx.projectDir, ctx.exp);
22
+ await (0, bundleIdentifier_1.ensureBundleIdentifierIsDefinedForManagedProjectAsync)(ctx.projectDir, ctx.exp, ctx.user);
23
23
  }
24
24
  (0, validate_1.checkNodeEnvVariable)(ctx);
25
25
  await (0, validate_1.checkGoogleServicesFileAsync)(ctx);
@@ -68,6 +68,7 @@ async function prepareIosBuildAsync(ctx) {
68
68
  localAutoIncrement: ((_a = ctx.easJsonCliConfig) === null || _a === void 0 ? void 0 : _a.appVersionSource) === eas_json_1.AppVersionSource.REMOTE
69
69
  ? false
70
70
  : ctx.buildProfile.autoIncrement,
71
+ projectId: ctx.projectId,
71
72
  });
72
73
  },
73
74
  prepareJobAsync: async (ctx, jobData) => {
@@ -12,7 +12,7 @@ async function ensureIosCredentialsAsync(buildCtx, targets) {
12
12
  return;
13
13
  }
14
14
  const provider = new IosCredentialsProvider_1.default(buildCtx.credentialsCtx, {
15
- app: (0, BuildCredentialsUtils_1.getAppFromContext)(buildCtx.credentialsCtx),
15
+ app: await (0, BuildCredentialsUtils_1.getAppFromContextAsync)(buildCtx.credentialsCtx),
16
16
  targets,
17
17
  distribution: (_a = buildCtx.buildProfile.distribution) !== null && _a !== void 0 ? _a : 'store',
18
18
  enterpriseProvisioning: buildCtx.buildProfile.enterpriseProvisioning,
@@ -6,7 +6,6 @@ const eas_build_job_1 = require("@expo/eas-build-job");
6
6
  const path_1 = tslib_1.__importDefault(require("path"));
7
7
  const slash_1 = tslib_1.__importDefault(require("slash"));
8
8
  const projectUtils_1 = require("../../project/projectUtils");
9
- const actions_1 = require("../../user/actions");
10
9
  const vcs_1 = require("../../vcs");
11
10
  const cacheDefaults = {
12
11
  disabled: false,
@@ -16,7 +15,7 @@ const cacheDefaults = {
16
15
  async function prepareJobAsync(ctx, jobData) {
17
16
  var _a;
18
17
  const projectRootDirectory = (0, slash_1.default)(path_1.default.relative(await (0, vcs_1.getVcsClient)().getRootPathAsync(), ctx.projectDir)) || '.';
19
- const username = (0, projectUtils_1.getUsername)(ctx.exp, await (0, actions_1.ensureLoggedInAsync)());
18
+ const username = (0, projectUtils_1.getUsername)(ctx.exp, ctx.user);
20
19
  const buildCredentials = {};
21
20
  if (jobData.credentials) {
22
21
  const targetNames = Object.keys(jobData.credentials);
@@ -1,9 +1,10 @@
1
1
  import { ExpoConfig } from '@expo/config';
2
2
  import { IosVersionAutoIncrement } from '@expo/eas-json';
3
3
  import { Target } from '../../credentials/ios/types';
4
- export declare function syncProjectConfigurationAsync({ projectDir, exp, targets, localAutoIncrement, }: {
4
+ export declare function syncProjectConfigurationAsync({ projectDir, exp, targets, localAutoIncrement, projectId, }: {
5
5
  projectDir: string;
6
6
  exp: ExpoConfig;
7
7
  targets: Target[];
8
8
  localAutoIncrement?: IosVersionAutoIncrement;
9
+ projectId: string;
9
10
  }): Promise<void>;
@@ -6,12 +6,12 @@ const projectUtils_1 = require("../../project/projectUtils");
6
6
  const workflow_1 = require("../../project/workflow");
7
7
  const UpdatesModule_1 = require("../../update/ios/UpdatesModule");
8
8
  const version_1 = require("./version");
9
- async function syncProjectConfigurationAsync({ projectDir, exp, targets, localAutoIncrement, }) {
9
+ async function syncProjectConfigurationAsync({ projectDir, exp, targets, localAutoIncrement, projectId, }) {
10
10
  const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS);
11
11
  const versionBumpStrategy = resolveVersionBumpStrategy(localAutoIncrement !== null && localAutoIncrement !== void 0 ? localAutoIncrement : false);
12
12
  if (workflow === eas_build_job_1.Workflow.GENERIC) {
13
13
  if ((0, projectUtils_1.isExpoUpdatesInstalled)(projectDir)) {
14
- await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(projectDir, exp);
14
+ await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(projectDir, exp, projectId);
15
15
  }
16
16
  await (0, version_1.bumpVersionAsync)({ projectDir, exp, bumpStrategy: versionBumpStrategy, targets });
17
17
  }
@@ -6,7 +6,7 @@ const spawn_async_1 = tslib_1.__importDefault(require("@expo/spawn-async"));
6
6
  const semver_1 = tslib_1.__importDefault(require("semver"));
7
7
  const ora_1 = require("../ora");
8
8
  const PLUGIN_PACKAGE_NAME = 'eas-cli-local-build-plugin';
9
- const PLUGIN_PACKAGE_VERSION = '0.0.99';
9
+ const PLUGIN_PACKAGE_VERSION = '0.0.110';
10
10
  async function runLocalBuildAsync(job, metadata, options) {
11
11
  var _a;
12
12
  const { command, args } = await getCommandAndArgsAsync(job, metadata);
@@ -10,7 +10,6 @@ const log_1 = tslib_1.__importDefault(require("../log"));
10
10
  const projectUtils_1 = require("../project/projectUtils");
11
11
  const UpdatesModule_1 = require("../update/android/UpdatesModule");
12
12
  const UpdatesModule_2 = require("../update/ios/UpdatesModule");
13
- const actions_1 = require("../user/actions");
14
13
  const easCli_1 = require("../utils/easCli");
15
14
  const vcs_1 = require("../vcs");
16
15
  const version_1 = require("./android/version");
@@ -39,7 +38,7 @@ async function collectMetadataAsync(ctx) {
39
38
  gitCommitHash: await vcsClient.getCommitHashAsync(),
40
39
  gitCommitMessage: truncateGitCommitMessage((_c = (await vcsClient.getLastCommitMessageAsync())) !== null && _c !== void 0 ? _c : undefined),
41
40
  isGitWorkingTreeDirty: await vcsClient.hasUncommittedChangesAsync(),
42
- username: (0, projectUtils_1.getUsername)(ctx.exp, await (0, actions_1.ensureLoggedInAsync)()),
41
+ username: (0, projectUtils_1.getUsername)(ctx.exp, ctx.user),
43
42
  message: ctx.message,
44
43
  ...(ctx.platform === eas_build_job_1.Platform.IOS && {
45
44
  iosEnterpriseProvisioning: resolveIosEnterpriseProvisioning(ctx),
@@ -0,0 +1,9 @@
1
+ import { PaginatedQueryOptions } from '../commandUtils/pagination';
2
+ import { BuildFilter } from '../graphql/generated';
3
+ export declare const BUILDS_LIMIT = 50;
4
+ export declare function listAndRenderBuildsOnAppAsync({ projectId, projectDisplayName, filter, paginatedQueryOptions, }: {
5
+ projectId: string;
6
+ projectDisplayName: string;
7
+ filter?: BuildFilter;
8
+ paginatedQueryOptions: PaginatedQueryOptions;
9
+ }): Promise<void>;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.listAndRenderBuildsOnAppAsync = exports.BUILDS_LIMIT = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
+ const BuildQuery_1 = require("../graphql/queries/BuildQuery");
7
+ const log_1 = tslib_1.__importDefault(require("../log"));
8
+ const json_1 = require("../utils/json");
9
+ const queries_1 = require("../utils/queries");
10
+ const formatBuild_1 = require("./utils/formatBuild");
11
+ exports.BUILDS_LIMIT = 50;
12
+ async function listAndRenderBuildsOnAppAsync({ projectId, projectDisplayName, filter, paginatedQueryOptions, }) {
13
+ var _a, _b;
14
+ if (paginatedQueryOptions.nonInteractive) {
15
+ const builds = await BuildQuery_1.BuildQuery.viewBuildsOnAppAsync({
16
+ appId: projectId,
17
+ limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.BUILDS_LIMIT,
18
+ offset: paginatedQueryOptions.offset,
19
+ filter,
20
+ });
21
+ renderPageOfBuilds({ builds, projectDisplayName, paginatedQueryOptions });
22
+ }
23
+ else {
24
+ await (0, queries_1.paginatedQueryWithConfirmPromptAsync)({
25
+ limit: (_b = paginatedQueryOptions.limit) !== null && _b !== void 0 ? _b : exports.BUILDS_LIMIT,
26
+ offset: paginatedQueryOptions.offset,
27
+ queryToPerform: (limit, offset) => BuildQuery_1.BuildQuery.viewBuildsOnAppAsync({
28
+ appId: projectId,
29
+ limit,
30
+ offset,
31
+ filter,
32
+ }),
33
+ promptOptions: {
34
+ title: 'Load more builds?',
35
+ renderListItems: builds => renderPageOfBuilds({ builds, projectDisplayName, paginatedQueryOptions }),
36
+ },
37
+ });
38
+ }
39
+ }
40
+ exports.listAndRenderBuildsOnAppAsync = listAndRenderBuildsOnAppAsync;
41
+ function renderPageOfBuilds({ builds, projectDisplayName, paginatedQueryOptions, }) {
42
+ if (paginatedQueryOptions.json) {
43
+ (0, json_1.printJsonOnlyOutput)(builds);
44
+ }
45
+ else {
46
+ const list = builds.map(build => (0, formatBuild_1.formatGraphQLBuild)(build)).join(`\n\n${chalk_1.default.dim('———')}\n\n`);
47
+ log_1.default.addNewLineIfNone();
48
+ log_1.default.log(chalk_1.default.bold(`Builds for ${projectDisplayName}:`));
49
+ log_1.default.log(`\n${list}`);
50
+ }
51
+ }
@@ -1,4 +1,6 @@
1
+ import { DynamicConfigContextFn } from '../commandUtils/context/DynamicProjectConfigContextField';
1
2
  import { RequestedPlatform } from '../platform';
3
+ import { Actor } from '../user/User';
2
4
  import { LocalBuildOptions } from './local';
3
5
  import { UserInputResourceClass } from './types';
4
6
  export interface BuildFlags {
@@ -14,4 +16,4 @@ export interface BuildFlags {
14
16
  userInputResourceClass?: UserInputResourceClass;
15
17
  message?: string;
16
18
  }
17
- export declare function runBuildAndSubmitAsync(projectDir: string, flags: BuildFlags): Promise<void>;
19
+ export declare function runBuildAndSubmitAsync(projectDir: string, flags: BuildFlags, actor: Actor, getDynamicProjectConfigAsync: DynamicConfigContextFn): Promise<void>;