eas-cli 7.8.0 → 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 (26) hide show
  1. package/README.md +61 -61
  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 -187
  18. package/build/graphql/types/Build.js +0 -1
  19. package/build/project/publish.js +5 -4
  20. package/build/project/resolveRuntimeVersionAsync.js +5 -4
  21. package/build/utils/expoUpdatesCli.d.ts +2 -0
  22. package/build/utils/expoUpdatesCli.js +12 -4
  23. package/build/utils/relay.d.ts +6 -0
  24. package/build/utils/relay.js +40 -1
  25. package/oclif.manifest.json +1 -1
  26. package/package.json +4 -4
@@ -14,16 +14,17 @@ async function resolveRuntimeVersionAsync({ exp, platform, projectDir, }) {
14
14
  return await config_plugins_1.Updates.getRuntimeVersionNullableAsync(projectDir, exp, platform);
15
15
  }
16
16
  try {
17
+ log_1.default.debug('Using expo-updates runtimeversion:resolve CLI for runtime version resolution');
18
+ const extraArgs = log_1.default.isDebug ? ['--debug'] : [];
17
19
  const resolvedRuntimeVersionJSONResult = await (0, expoUpdatesCli_1.expoUpdatesCommandAsync)(projectDir, [
18
20
  'runtimeversion:resolve',
19
21
  '--platform',
20
22
  platform,
23
+ ...extraArgs,
21
24
  ]);
22
25
  const runtimeVersionResult = JSON.parse(resolvedRuntimeVersionJSONResult);
23
- if (runtimeVersionResult.fingerprintSources) {
24
- log_1.default.debug(`Resolved fingeprint runtime version for platform "${platform}". Sources:`);
25
- log_1.default.debug(runtimeVersionResult.fingerprintSources);
26
- }
26
+ log_1.default.debug('runtimeversion:resolve output:');
27
+ log_1.default.debug(resolvedRuntimeVersionJSONResult);
27
28
  return (_a = runtimeVersionResult.runtimeVersion) !== null && _a !== void 0 ? _a : null;
28
29
  }
29
30
  catch (e) {
@@ -2,4 +2,6 @@ export declare class ExpoUpdatesCLIModuleNotFoundError extends Error {
2
2
  }
3
3
  export declare class ExpoUpdatesCLIInvalidCommandError extends Error {
4
4
  }
5
+ export declare class ExpoUpdatesCLICommandFailedError extends Error {
6
+ }
5
7
  export declare function expoUpdatesCommandAsync(projectDir: string, args: string[]): Promise<string>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.expoUpdatesCommandAsync = exports.ExpoUpdatesCLIInvalidCommandError = exports.ExpoUpdatesCLIModuleNotFoundError = void 0;
3
+ exports.expoUpdatesCommandAsync = exports.ExpoUpdatesCLICommandFailedError = exports.ExpoUpdatesCLIInvalidCommandError = exports.ExpoUpdatesCLIModuleNotFoundError = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const spawn_async_1 = tslib_1.__importDefault(require("@expo/spawn-async"));
6
6
  const resolve_from_1 = tslib_1.__importStar(require("resolve-from"));
@@ -11,6 +11,9 @@ exports.ExpoUpdatesCLIModuleNotFoundError = ExpoUpdatesCLIModuleNotFoundError;
11
11
  class ExpoUpdatesCLIInvalidCommandError extends Error {
12
12
  }
13
13
  exports.ExpoUpdatesCLIInvalidCommandError = ExpoUpdatesCLIInvalidCommandError;
14
+ class ExpoUpdatesCLICommandFailedError extends Error {
15
+ }
16
+ exports.ExpoUpdatesCLICommandFailedError = ExpoUpdatesCLICommandFailedError;
14
17
  async function expoUpdatesCommandAsync(projectDir, args) {
15
18
  var _a;
16
19
  let expoUpdatesCli;
@@ -25,11 +28,16 @@ async function expoUpdatesCommandAsync(projectDir, args) {
25
28
  throw e;
26
29
  }
27
30
  try {
28
- return (await (0, spawn_async_1.default)(expoUpdatesCli, args)).stdout;
31
+ return (await (0, spawn_async_1.default)(expoUpdatesCli, args, { stdio: 'pipe' })).stdout;
29
32
  }
30
33
  catch (e) {
31
- if (e.stderr && typeof e.stderr === 'string' && e.stderr.includes('Invalid command')) {
32
- throw new ExpoUpdatesCLIInvalidCommandError(`The command specified by ${args} was not valid in the \`expo-updates\` CLI.`);
34
+ if (e.stderr && typeof e.stderr === 'string') {
35
+ if (e.stderr.includes('Invalid command')) {
36
+ throw new ExpoUpdatesCLIInvalidCommandError(`The command specified by ${args} was not valid in the \`expo-updates\` CLI.`);
37
+ }
38
+ else {
39
+ throw new ExpoUpdatesCLICommandFailedError(e.stderr);
40
+ }
33
41
  }
34
42
  throw e;
35
43
  }
@@ -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.0",
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.0",
4
+ "version": "7.8.2",
5
5
  "author": "Expo <support@expo.dev>",
6
6
  "bin": {
7
7
  "eas": "./bin/run"
@@ -28,7 +28,7 @@
28
28
  "@expo/results": "1.0.0",
29
29
  "@expo/rudder-sdk-node": "1.1.1",
30
30
  "@expo/spawn-async": "1.7.0",
31
- "@expo/steps": "1.0.92",
31
+ "@expo/steps": "1.0.95",
32
32
  "@expo/timeago.js": "1.0.0",
33
33
  "@oclif/core": "^1.26.2",
34
34
  "@oclif/plugin-autocomplete": "^2.3.10",
@@ -77,7 +77,7 @@
77
77
  "resolve-from": "5.0.0",
78
78
  "semver": "7.5.4",
79
79
  "slash": "3.0.0",
80
- "tar": "6.2.0",
80
+ "tar": "6.2.1",
81
81
  "terminal-link": "2.1.1",
82
82
  "tslib": "2.6.2",
83
83
  "turndown": "7.1.2",
@@ -223,5 +223,5 @@
223
223
  "node": "20.11.0",
224
224
  "yarn": "1.22.21"
225
225
  },
226
- "gitHead": "4c97fc31f8ec549a7d4fd367188bc29d88bd4a65"
226
+ "gitHead": "baeb88f5be9685419408ce9deb8dcf4c7ad94a27"
227
227
  }