eas-cli 7.8.1 → 7.8.2

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 (25) hide show
  1. package/README.md +59 -59
  2. package/build/build/local.js +1 -1
  3. package/build/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.d.ts +7 -1
  4. package/build/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.js +41 -5
  5. package/build/credentials/ios/api/GraphqlClient.js +1 -1
  6. package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.d.ts +7 -1
  7. package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.js +41 -5
  8. package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.d.ts +11 -3
  9. package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +77 -53
  10. package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.d.ts +7 -1
  11. package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.js +41 -5
  12. package/build/credentials/ios/api/graphql/queries/ApplePushKeyQuery.d.ts +7 -1
  13. package/build/credentials/ios/api/graphql/queries/ApplePushKeyQuery.js +41 -5
  14. package/build/devices/actions/create/action.js +1 -1
  15. package/build/devices/actions/create/developerPortalMethod.d.ts +2 -2
  16. package/build/devices/actions/create/developerPortalMethod.js +5 -5
  17. package/build/graphql/generated.d.ts +279 -178
  18. package/build/project/publish.js +5 -4
  19. package/build/project/resolveRuntimeVersionAsync.js +5 -4
  20. package/build/utils/expoUpdatesCli.d.ts +2 -0
  21. package/build/utils/expoUpdatesCli.js +12 -4
  22. package/build/utils/relay.d.ts +6 -0
  23. package/build/utils/relay.js +40 -1
  24. package/oclif.manifest.json +1 -1
  25. package/package.json +2 -2
@@ -96,3 +96,9 @@ export declare const NEXT_PAGE_OPTION: {
96
96
  value: symbol;
97
97
  title: string;
98
98
  };
99
+ export type PaginatedGetterAsync<Node> = (relayArgs: QueryParams) => Promise<Connection<Node>>;
100
+ export declare const PAGE_SIZE = 20;
101
+ export declare function fetchEntireDatasetAsync<Node>({ paginatedGetterAsync, progressBarLabel, }: {
102
+ paginatedGetterAsync: PaginatedGetterAsync<Node>;
103
+ progressBarLabel?: string;
104
+ }): Promise<Node[]>;
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NEXT_PAGE_OPTION = exports.PREV_PAGE_OPTION = exports.selectPaginatedAsync = exports.FilterPagination = void 0;
3
+ exports.fetchEntireDatasetAsync = exports.PAGE_SIZE = exports.NEXT_PAGE_OPTION = exports.PREV_PAGE_OPTION = exports.selectPaginatedAsync = exports.FilterPagination = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const assert_1 = tslib_1.__importDefault(require("assert"));
6
+ const cli_progress_1 = tslib_1.__importDefault(require("cli-progress"));
6
7
  const prompts_1 = require("../prompts");
7
8
  /**
8
9
  *
@@ -218,3 +219,41 @@ async function selectPaginatedInternalAsync({ queryAsync, getTitleAsync, printed
218
219
  return selectedItem;
219
220
  }
220
221
  }
222
+ exports.PAGE_SIZE = 20;
223
+ async function fetchEntireDatasetAsync({ paginatedGetterAsync, progressBarLabel, }) {
224
+ var _a;
225
+ // No way to know the total count of items beforehand
226
+ let totalEstimatedWork = 10;
227
+ const queueProgressBar = new cli_progress_1.default.SingleBar({ format: `|{bar}| ${progressBarLabel}` }, cli_progress_1.default.Presets.rect);
228
+ const data = [];
229
+ let cursor = undefined;
230
+ let didStartProgressBar = false;
231
+ let progress = 0;
232
+ while (true) {
233
+ const connection = await paginatedGetterAsync({ first: exports.PAGE_SIZE, after: cursor });
234
+ const nodes = connection.edges.map(edge => edge.node);
235
+ const hasNextPage = connection.pageInfo.hasNextPage;
236
+ data.push(...nodes);
237
+ if (!hasNextPage) {
238
+ break;
239
+ }
240
+ cursor = (_a = connection.pageInfo.endCursor) !== null && _a !== void 0 ? _a : undefined;
241
+ if (!didStartProgressBar) {
242
+ // only show the progress bar if user has more than 1 page of items
243
+ queueProgressBar.start(totalEstimatedWork, 0);
244
+ didStartProgressBar = true;
245
+ }
246
+ progress++;
247
+ queueProgressBar.update(progress);
248
+ if (progress >= totalEstimatedWork) {
249
+ totalEstimatedWork = 8 * totalEstimatedWork;
250
+ queueProgressBar.setTotal(totalEstimatedWork);
251
+ }
252
+ }
253
+ if (didStartProgressBar) {
254
+ queueProgressBar.update(totalEstimatedWork);
255
+ queueProgressBar.stop();
256
+ }
257
+ return data;
258
+ }
259
+ exports.fetchEntireDatasetAsync = fetchEntireDatasetAsync;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "7.8.1",
2
+ "version": "7.8.2",
3
3
  "commands": {
4
4
  "analytics": {
5
5
  "id": "analytics",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eas-cli",
3
3
  "description": "EAS command line tool",
4
- "version": "7.8.1",
4
+ "version": "7.8.2",
5
5
  "author": "Expo <support@expo.dev>",
6
6
  "bin": {
7
7
  "eas": "./bin/run"
@@ -223,5 +223,5 @@
223
223
  "node": "20.11.0",
224
224
  "yarn": "1.22.21"
225
225
  },
226
- "gitHead": "8b7d977b5b98db9f9a077c3cd4ba96da4bbefe19"
226
+ "gitHead": "baeb88f5be9685419408ce9deb8dcf4c7ad94a27"
227
227
  }