Compare commits

...
Author SHA1 Message Date
Dominik Sokal fedfdb3364 v0.28.2 2021-09-23 11:36:29 +02:00
Dominik Sokal 028f0ab74b fix auto-submitting in fresh project (#640)
* fix auto-submitting in fresh project

* update CHANGELOG
2021-09-23 11:34:22 +02:00
Dominik Sokal cd278155e2 clean up tests output - mock console.log 2021-09-23 11:07:54 +02:00
Dominik Sokal 1e419ab49d use log-symbols to unify green ticks style (#639)
* use log-symbols to unify green ticks style

* update CHANGELOG
2021-09-23 10:14:29 +02:00
Dominik Sokal 2f57fd199d update CHANGELOG 2021-09-22 15:40:42 +02:00
Dominik Sokal 5932775cd4 v0.28.1 2021-09-22 15:33:39 +02:00
Dominik Sokal d68d6c38d6 do not fail in case of transient network errors (#638)
* do not fail in case of transient network errors

* update CHANGELOG
2021-09-22 14:29:52 +02:00
Evan BaconandEvan Bacon d690e10caf Forward props (#636)
Co-authored-by: Evan Bacon <[email protected]>
2021-09-22 13:16:33 +02:00
Quinlan JungandDominik Sokal 99ea613b39 [eas-cli] add google service account key fragment (#632)
* [eas-cli] add google service account key fragment

* fix lint

* update changelog

* Update CHANGELOG.md

Co-authored-by: Dominik Sokal <[email protected]>

Co-authored-by: Dominik Sokal <[email protected]>
2021-09-21 17:02:16 -07:00
Quinlan JungandDominik Sokal 13715317bd [eas-cli] remove graphql support for app specific password (#633)
* [eas-cli] remove graphql support for app specific password

* fix tests

* changelog stuff

* Update CHANGELOG.md

Co-authored-by: Dominik Sokal <[email protected]>

Co-authored-by: Dominik Sokal <[email protected]>
2021-09-21 17:01:08 -07:00
Dominik Sokal 18d1ed441b add CODEOWNERS 2021-09-21 11:39:54 +02:00
Dominik Sokal db067c4757 rename directory submissions -> submit (#631) 2021-09-20 16:55:46 +02:00
56 changed files with 819 additions and 2008 deletions

No files matched your search

+15 -2
View File
@@ -10,11 +10,24 @@ This is the log of notable changes to EAS CLI and related packages.
### 🐛 Bug fixes
- Prevent ora spinners breaking when debug logs are enabled. ([#575](https://github.com/expo/eas-cli/pull/575) by [@EvanBacon](https://github.com/EvanBacon))
- Use `log-symbols` to unify green ticks style. ([#639](https://github.com/expo/eas-cli/pull/639) by [@dsokal](https://github.com/dsokal))
- Fix `eas build --auto-submit` in fresh projects. ([#640](https://github.com/expo/eas-cli/pull/640) by [@dsokal](https://github.com/dsokal))
### 🧹 Chores
## [0.28.0](https://github.com/expo/eas-cli/releases/tag/v0.28.0) - 2021-09-10
## [0.28.1](https://github.com/expo/eas-cli/releases/tag/v0.28.1) - 2021-09-22
### 🐛 Bug fixes
- Prevent ora spinners breaking when debug logs are enabled. ([#575](https://github.com/expo/eas-cli/pull/575) by [@EvanBacon](https://github.com/EvanBacon))
- Do not fail `eas build` when transient network errors occur. ([#638](https://github.com/expo/eas-cli/pull/638) by [@dsokal](https://github.com/dsokal))
### 🧹 Chores
- Add GraphQL support for GoogleServiceAccountKey. ([#632](https://github.com/expo/eas-cli/pull/632) by [@quinlanj](https://github.com/quinlanj))
- Remove GraphQL support for the App Specific Password. ([#633](https://github.com/expo/eas-cli/pull/633) by [@quinlanj](https://github.com/quinlanj))
## [0.28.0](https://github.com/expo/eas-cli/releases/tag/v0.28.0) - 2021-09-20
### 🎉 New features
+7
View File
@@ -0,0 +1,7 @@
packages/eas-cli/src/build @dsokal @wkozyra95
packages/eas-cli/src/commands/build @dsokal @wkozyra95
packages/eas-cli/src/submit @barthap @dsokal
packages/eas-cli/src/commands/submit.ts @barthap @dsokal
packages/eas-json @dsokal @wkozyra95
+1 -1
View File
@@ -1,5 +1,5 @@
{
"npmClient": "yarn",
"useWorkspaces": true,
"version": "0.28.0"
"version": "0.28.2"
}
+26 -26
View File
@@ -73,7 +73,7 @@ ALIASES
$ eas login
```
_See code: [src/commands/account/login.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/account/login.js)_
_See code: [src/commands/account/login.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/account/login.js)_
## `eas account:logout`
@@ -87,7 +87,7 @@ ALIASES
$ eas logout
```
_See code: [src/commands/account/logout.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/account/logout.js)_
_See code: [src/commands/account/logout.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/account/logout.js)_
## `eas account:view`
@@ -101,7 +101,7 @@ ALIASES
$ eas whoami
```
_See code: [src/commands/account/view.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/account/view.js)_
_See code: [src/commands/account/view.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/account/view.js)_
## `eas analytics [STATUS]`
@@ -112,7 +112,7 @@ USAGE
$ eas analytics [STATUS]
```
_See code: [src/commands/analytics.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/analytics.js)_
_See code: [src/commands/analytics.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/analytics.js)_
## `eas build`
@@ -145,7 +145,7 @@ OPTIONS
--[no-]wait Wait for build(s) to complete
```
_See code: [src/commands/build/index.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/build/index.js)_
_See code: [src/commands/build/index.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/build/index.js)_
## `eas build:cancel [BUILD_ID]`
@@ -156,7 +156,7 @@ USAGE
$ eas build:cancel [BUILD_ID]
```
_See code: [src/commands/build/cancel.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/build/cancel.js)_
_See code: [src/commands/build/cancel.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/build/cancel.js)_
## `eas build:configure`
@@ -170,7 +170,7 @@ OPTIONS
-p, --platform=(android|ios|all) Platform to configure
```
_See code: [src/commands/build/configure.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/build/configure.js)_
_See code: [src/commands/build/configure.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/build/configure.js)_
## `eas build:list`
@@ -203,7 +203,7 @@ OPTIONS
--status=(new|in-queue|in-progress|errored|finished|canceled)
```
_See code: [src/commands/build/list.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/build/list.js)_
_See code: [src/commands/build/list.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/build/list.js)_
## `eas build:view [BUILD_ID]`
@@ -217,7 +217,7 @@ OPTIONS
--json Enable JSON output, non-JSON messages will be printed to stderr
```
_See code: [src/commands/build/view.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/build/view.js)_
_See code: [src/commands/build/view.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/build/view.js)_
## `eas config`
@@ -232,7 +232,7 @@ OPTIONS
--profile=profile
```
_See code: [src/commands/config.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/config.js)_
_See code: [src/commands/config.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/config.js)_
## `eas credentials`
@@ -243,7 +243,7 @@ USAGE
$ eas credentials
```
_See code: [src/commands/credentials.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/credentials.js)_
_See code: [src/commands/credentials.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/credentials.js)_
## `eas device:create`
@@ -254,7 +254,7 @@ USAGE
$ eas device:create
```
_See code: [src/commands/device/create.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/device/create.js)_
_See code: [src/commands/device/create.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/device/create.js)_
## `eas device:list`
@@ -268,7 +268,7 @@ OPTIONS
--apple-team-id=apple-team-id
```
_See code: [src/commands/device/list.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/device/list.js)_
_See code: [src/commands/device/list.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/device/list.js)_
## `eas device:view [UDID]`
@@ -279,7 +279,7 @@ USAGE
$ eas device:view [UDID]
```
_See code: [src/commands/device/view.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/device/view.js)_
_See code: [src/commands/device/view.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/device/view.js)_
## `eas diagnostics`
@@ -290,7 +290,7 @@ USAGE
$ eas diagnostics
```
_See code: [src/commands/diagnostics.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/diagnostics.js)_
_See code: [src/commands/diagnostics.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/diagnostics.js)_
## `eas help [COMMAND]`
@@ -318,7 +318,7 @@ USAGE
$ eas project:info
```
_See code: [src/commands/project/info.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/project/info.js)_
_See code: [src/commands/project/info.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/project/info.js)_
## `eas project:init`
@@ -332,7 +332,7 @@ ALIASES
$ eas init
```
_See code: [src/commands/project/init.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/project/init.js)_
_See code: [src/commands/project/init.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/project/init.js)_
## `eas secret:create`
@@ -349,7 +349,7 @@ OPTIONS
--value=value Value of the secret
```
_See code: [src/commands/secret/create.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/secret/create.js)_
_See code: [src/commands/secret/create.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/secret/create.js)_
## `eas secret:delete`
@@ -366,7 +366,7 @@ DESCRIPTION
Unsure where to find the secret's ID? Run eas secrets:list
```
_See code: [src/commands/secret/delete.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/secret/delete.js)_
_See code: [src/commands/secret/delete.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/secret/delete.js)_
## `eas secret:list`
@@ -377,7 +377,7 @@ USAGE
$ eas secret:list
```
_See code: [src/commands/secret/list.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/secret/list.js)_
_See code: [src/commands/secret/list.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/secret/list.js)_
## `eas submit`
@@ -410,7 +410,7 @@ ALIASES
$ eas build:submit
```
_See code: [src/commands/submit.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/submit.js)_
_See code: [src/commands/submit.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/submit.js)_
## `eas webhook:create`
@@ -429,7 +429,7 @@ OPTIONS
--url=url Webhook URL
```
_See code: [src/commands/webhook/create.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/webhook/create.js)_
_See code: [src/commands/webhook/create.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/webhook/create.js)_
## `eas webhook:delete [ID]`
@@ -443,7 +443,7 @@ ARGUMENTS
ID ID of the webhook to delete
```
_See code: [src/commands/webhook/delete.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/webhook/delete.js)_
_See code: [src/commands/webhook/delete.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/webhook/delete.js)_
## `eas webhook:list`
@@ -457,7 +457,7 @@ OPTIONS
--event=(BUILD) Event type that triggers the webhook
```
_See code: [src/commands/webhook/list.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/webhook/list.js)_
_See code: [src/commands/webhook/list.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/webhook/list.js)_
## `eas webhook:update`
@@ -477,7 +477,7 @@ OPTIONS
--url=url Webhook URL
```
_See code: [src/commands/webhook/update.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/webhook/update.js)_
_See code: [src/commands/webhook/update.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/webhook/update.js)_
## `eas webhook:view ID`
@@ -491,5 +491,5 @@ ARGUMENTS
ID ID of the webhook to view
```
_See code: [src/commands/webhook/view.js](https://github.com/expo/eas-cli/blob/v0.28.0/packages/eas-cli/src/commands/webhook/view.js)_
_See code: [src/commands/webhook/view.js](https://github.com/expo/eas-cli/blob/v0.28.2/packages/eas-cli/src/commands/webhook/view.js)_
<!-- commandsstop -->
+619 -1823
View File
File diff suppressed because it is too large. Load diff
+3 -2
View File
@@ -1,7 +1,7 @@
{
"name": "eas-cli",
"description": "EAS command line tool",
"version": "0.28.0",
"version": "0.28.2",
"author": "Expo <[email protected]>",
"bin": {
"eas": "./bin/run"
@@ -12,7 +12,7 @@
"@expo/config": "5.0.9",
"@expo/config-plugins": "3.1.0",
"@expo/eas-build-job": "0.2.46",
"@expo/eas-json": "^0.28.0",
"@expo/eas-json": "^0.28.2",
"@expo/json-file": "8.2.33",
"@expo/pkcs12": "0.0.4",
"@expo/plist": "0.0.14",
@@ -48,6 +48,7 @@
"jks-js": "1.0.1",
"joi": "17.4.2",
"keychain": "1.3.0",
"log-symbols": "4.1.0",
"mime": "2.5.2",
"minimatch": "3.0.4",
"nanoid": "3.1.25",
@@ -1,4 +1,4 @@
export default jest.fn().mockReturnValue({
export const ora = jest.fn().mockReturnValue({
start: jest.fn().mockReturnValue({
fail: jest.fn(),
succeed: jest.fn(),
+36 -30
View File
@@ -2,7 +2,6 @@ import { ArchiveSource, ArchiveSourceType, Job, Metadata, Platform } from '@expo
import { CredentialsSource } from '@expo/eas-json';
import chalk from 'chalk';
import fs from 'fs-extra';
import nullthrows from 'nullthrows';
import { BuildFragment, BuildStatus, UploadSessionType } from '../graphql/generated';
import { BuildResult } from '../graphql/mutations/BuildMutation';
@@ -245,39 +244,46 @@ export async function waitForBuildEndAsync(
try {
return await BuildQuery.byIdAsync(buildId, { useCache: false });
} catch (err) {
Log.debug('Failed to fetch the build status', err);
return null;
}
})
);
if (builds.length === 1) {
const build = nullthrows(builds[0]);
switch (build.status) {
case BuildStatus.Finished:
spinner.succeed('Build finished');
return builds;
case BuildStatus.New:
spinner.text = 'Build created';
break;
case BuildStatus.InQueue:
spinner.text = 'Build queued...';
break;
case BuildStatus.Canceled:
spinner.text = 'Build canceled';
spinner.stopAndPersist();
return builds;
case BuildStatus.InProgress:
spinner.text = 'Build in progress...';
break;
case BuildStatus.Errored:
spinner.fail('Build failed');
if (build.error) {
const [build] = builds;
if (build !== null) {
switch (build.status) {
case BuildStatus.Finished:
spinner.succeed('Build finished');
return builds;
} else {
throw new Error(`Standalone build failed!`);
}
default:
spinner.warn('Unknown status.');
throw new Error(`Unknown status: ${builds} - aborting!`);
case BuildStatus.New:
spinner.text = 'Build created';
break;
case BuildStatus.InQueue:
spinner.text = 'Build queued...';
break;
case BuildStatus.Canceled:
spinner.text = 'Build canceled';
spinner.stopAndPersist();
return builds;
case BuildStatus.InProgress:
spinner.text = 'Build in progress...';
break;
case BuildStatus.Errored:
spinner.fail('Build failed');
if (build.error) {
return builds;
} else {
throw new Error(`Standalone build failed!`);
}
default:
spinner.warn('Unknown status');
throw new Error(`Unknown build status: ${build.status} - aborting!`);
}
} else {
if (!spinner.text) {
spinner.text = 'Could not fetch the build status. Check your network connection.';
}
}
} else {
if (builds.filter(build => build?.status === BuildStatus.Finished).length === builds.length) {
@@ -301,7 +307,7 @@ export async function waitForBuildEndAsync(
const errored = builds.filter(build => build?.status === BuildStatus.Errored).length;
const finished = builds.filter(build => build?.status === BuildStatus.Finished).length;
const canceled = builds.filter(build => build?.status === BuildStatus.Canceled).length;
const unknownState = builds.length - newBuilds - inQueue - inProgress - errored - finished;
const unknown = builds.length - newBuilds - inQueue - inProgress - errored - finished;
spinner.text = [
newBuilds && `Builds created: ${newBuilds}`,
inQueue && `Builds in queue: ${inQueue}`,
@@ -309,7 +315,7 @@ export async function waitForBuildEndAsync(
canceled && `Builds canceled: ${canceled}`,
errored && chalk.red(`Builds failed: ${errored}`),
finished && chalk.green(`Builds finished: ${finished}`),
unknownState && chalk.red(`Builds in unknown state: ${unknownState}`),
unknown && chalk.red(`Builds with unknown status: ${unknown}`),
]
.filter(i => i)
.join('\t');
+3 -3
View File
@@ -35,12 +35,12 @@ import {
import { validateMetroConfigForManagedWorkflowAsync } from '../../project/metroConfig';
import { findProjectRootAsync } from '../../project/projectUtils';
import { confirmAsync } from '../../prompts';
import { createSubmissionContext } from '../../submissions/context';
import { createSubmissionContext } from '../../submit/context';
import {
submitAsync,
waitToCompleteAsync as waitForSubmissionsToCompleteAsync,
} from '../../submissions/submit';
import { printSubmissionDetailsUrls } from '../../submissions/utils/urls';
} from '../../submit/submit';
import { printSubmissionDetailsUrls } from '../../submit/utils/urls';
import { enableJsonOutput } from '../../utils/json';
import vcs from '../../vcs';
+3 -3
View File
@@ -17,9 +17,9 @@ import {
} from '../platform';
import { isEasEnabledForProjectAsync, warnEasUnavailable } from '../project/isEasEnabledForProject';
import { findProjectRootAsync, getProjectIdAsync } from '../project/projectUtils';
import { SubmitArchiveFlags, createSubmissionContext } from '../submissions/context';
import { submitAsync, waitToCompleteAsync } from '../submissions/submit';
import { printSubmissionDetailsUrls } from '../submissions/utils/urls';
import { SubmitArchiveFlags, createSubmissionContext } from '../submit/context';
import { submitAsync, waitToCompleteAsync } from '../submit/submit';
import { printSubmissionDetailsUrls } from '../submit/utils/urls';
interface RawFlags {
platform?: string;
@@ -14,6 +14,7 @@ import {
promptUserAndCopyLegacyCredentialsAsync,
} from '../BuildCredentialsUtils';
jest.mock('../../../../ora');
jest.mock('../../../../prompts');
(confirmAsync as jest.Mock).mockImplementation(() => true);
@@ -11,6 +11,7 @@ import { generateRandomKeystoreAsync } from '../../utils/keystore';
import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils';
import { SetupBuildCredentials } from '../SetupBuildCredentials';
jest.mock('../../../../ora');
jest.mock('../../../../project/ensureProjectExists');
jest.mock('../../../../user/actions', () => ({ ensureLoggedInAsync: jest.fn(() => mockJester) }));
jest.mock('../../../../prompts', () => ({ confirmAsync: jest.fn(() => true) }));
@@ -11,6 +11,8 @@ import {
import { MissingCredentialsNonInteractiveError } from '../../../errors';
import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils';
import { ConfigureProvisioningProfile } from '../ConfigureProvisioningProfile';
jest.mock('../../../../ora');
jest.mock('../../../../prompts');
(confirmAsync as jest.Mock).mockImplementation(() => true);
@@ -30,13 +30,6 @@ const IosAppCredentialsQuery = {
},
__typename: 'ApplePushKey',
},
appSpecificPassword: {
id: '64bdd007-da7b-4190-a571-edb87e9324a1',
appleIdUsername: '[email protected]',
passwordLabel: 'description for super secret password',
updatedAt: '2020-10-13T18:39:04.463Z',
__typename: 'AppleAppSpecificPassword',
},
iosAppBuildCredentialsList: [
{
id: '6f8d0175-0caf-4922-b09b-eae757b83144',
@@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`print credentials prints the IosAppCredentials map 1`] = `"iOS Credentials Project: @quinlanj/test52 Bundle Identifier: com.quinlanj.test52 Apple Team: test-apple-identifier Push Key: Developer Portal ID: 9839M6AY8W Apple Team: 77KQ969CHE Updated 6 months ago App Specific Password: Apple ID Username: [email protected] Password Label: description for super secret password Updated 6 months ago Configuration: App Store Distribution Certificate: Serial Number: test-serial Expiration Date: Wed, 13 Oct 2021 18:28:44 UTC Apple Team: test-apple-identifier Updated 6 months ago Provisioning Profile: Developer Portal ID: test-profile-id Status: active Expiration Date: Wed, 13 Oct 2021 18:28:44 UTC Apple Team: test-apple-identifier Updated 5 months ago Configuration: Ad Hoc Distribution Certificate: Serial Number: test-serial Expiration Date: Wed, 13 Oct 2021 18:28:44 UTC Apple Team: test-apple-identifier Updated 6 months ago Provisioning Profile: Developer Portal ID: test-profile-id Status: active Expiration Date: Wed, 13 Oct 2021 18:28:44 UTC Apple Team: test-apple-identifier Updated 5 months ago"`;
exports[`print credentials prints the IosAppCredentials map 1`] = `"iOS Credentials Project: @quinlanj/test52 Bundle Identifier: com.quinlanj.test52 Apple Team: test-apple-identifier Push Key: Developer Portal ID: 9839M6AY8W Apple Team: 77KQ969CHE Updated 6 months ago Configuration: App Store Distribution Certificate: Serial Number: test-serial Expiration Date: Wed, 13 Oct 2021 18:28:44 UTC Apple Team: test-apple-identifier Updated 6 months ago Provisioning Profile: Developer Portal ID: test-profile-id Status: active Expiration Date: Wed, 13 Oct 2021 18:28:44 UTC Apple Team: test-apple-identifier Updated 5 months ago Configuration: Ad Hoc Distribution Certificate: Serial Number: test-serial Expiration Date: Wed, 13 Oct 2021 18:28:44 UTC Apple Team: test-apple-identifier Updated 6 months ago Provisioning Profile: Developer Portal ID: test-profile-id Status: active Expiration Date: Wed, 13 Oct 2021 18:28:44 UTC Apple Team: test-apple-identifier Updated 5 months ago"`;
@@ -2,7 +2,6 @@ import chalk from 'chalk';
import dateformat from 'dateformat';
import {
AppleAppSpecificPasswordFragment,
AppleDeviceFragment,
ApplePushKeyFragment,
IosAppBuildCredentialsFragment,
@@ -85,7 +84,7 @@ export function displayIosCredentials(
continue;
}
const { appleTeam, pushKey, appSpecificPassword } = targetAppCredentials;
const { appleTeam, pushKey } = targetAppCredentials;
if (appleTeam) {
const { appleTeamIdentifier, appleTeamName } = appleTeam;
Log.log(` Apple Team: ${appleTeamIdentifier} ${appleTeamName ? `(${appleTeamName})` : ''}`);
@@ -96,10 +95,6 @@ export function displayIosCredentials(
displayApplePushKey(pushKey);
}
if (appSpecificPassword) {
displayAppSpecificPassword(appSpecificPassword);
}
const sortedIosAppBuildCredentialsList = sortBuildCredentialsByDistributionType(
targetAppCredentials.iosAppBuildCredentialsList
);
@@ -188,23 +183,6 @@ function displayIosAppBuildCredentials(buildCredentials: IosAppBuildCredentialsF
Log.newLine();
}
function displayAppSpecificPassword(
maybeAppSpecificPassword: AppleAppSpecificPasswordFragment | null
): void {
Log.log(` App Specific Password:`);
if (maybeAppSpecificPassword) {
const { appleIdUsername, passwordLabel, updatedAt } = maybeAppSpecificPassword;
Log.log(` Apple ID Username: ${appleIdUsername}`);
if (passwordLabel) {
Log.log(` Password Label: ${passwordLabel}`);
}
Log.log(` Updated ${fromNow(new Date(updatedAt))} ago`);
} else {
Log.log(` None assigned yet`);
}
Log.newLine();
}
function displayApplePushKey(maybePushKey: ApplePushKeyFragment | null): void {
Log.log(` Push Key:`);
if (maybePushKey) {
@@ -5,8 +5,8 @@ import { AppleDeviceMutation } from '../../../../credentials/ios/api/graphql/mut
import { AppleDeviceClass, AppleTeam } from '../../../../graphql/generated';
import { runInputMethodAsync } from '../inputMethod';
jest.mock('prompts');
jest.mock('../../../../credentials/ios/api/graphql/mutations/AppleDeviceMutation');
jest.mock('../../../../ora');
beforeEach(() => {
asMock(prompts).mockReset();
+6 -9
View File
@@ -877,6 +877,7 @@ export type BuildArtifacts = {
export type BuildMetrics = {
__typename?: 'BuildMetrics';
buildWaitTime?: Maybe<Scalars['Int']>;
buildQueueTime?: Maybe<Scalars['Int']>;
buildDuration?: Maybe<Scalars['Int']>;
};
@@ -5248,11 +5249,6 @@ export type AppleAppIdentifierFragment = (
& Pick<AppleAppIdentifier, 'id' | 'bundleIdentifier'>
);
export type AppleAppSpecificPasswordFragment = (
{ __typename?: 'AppleAppSpecificPassword' }
& Pick<AppleAppSpecificPassword, 'id' | 'appleIdUsername' | 'passwordLabel' | 'updatedAt'>
);
export type AppleDeviceFragment = (
{ __typename?: 'AppleDevice' }
& Pick<AppleDevice, 'id' | 'identifier' | 'name' | 'model' | 'deviceClass'>
@@ -5339,6 +5335,11 @@ export type AppleTeamFragment = (
& Pick<AppleTeam, 'id' | 'appleTeamIdentifier' | 'appleTeamName'>
);
export type GoogleServiceAccountKeyFragment = (
{ __typename?: 'GoogleServiceAccountKey' }
& Pick<GoogleServiceAccountKey, 'id' | 'projectIdentifier' | 'privateKeyIdentifier' | 'clientEmail' | 'clientIdentifier' | 'createdAt' | 'updatedAt'>
);
export type IosAppBuildCredentialsFragment = (
{ __typename?: 'IosAppBuildCredentials' }
& Pick<IosAppBuildCredentials, 'id' | 'iosDistributionType'>
@@ -5372,10 +5373,6 @@ export type CommonIosAppCredentialsWithoutBuildCredentialsFragment = (
{ __typename?: 'ApplePushKey' }
& Pick<ApplePushKey, 'id'>
& ApplePushKeyFragment
)>, appSpecificPassword?: Maybe<(
{ __typename?: 'AppleAppSpecificPassword' }
& Pick<AppleAppSpecificPassword, 'id'>
& AppleAppSpecificPasswordFragment
)> }
);
@@ -1,10 +0,0 @@
import gql from 'graphql-tag';
export const AppleAppSpecificPasswordFragmentNode = gql`
fragment AppleAppSpecificPasswordFragment on AppleAppSpecificPassword {
id
appleIdUsername
passwordLabel
updatedAt
}
`;
@@ -0,0 +1,13 @@
import gql from 'graphql-tag';
export const GoogleServiceAccountKeyFragmentNode = gql`
fragment GoogleServiceAccountKeyFragment on GoogleServiceAccountKey {
id
projectIdentifier
privateKeyIdentifier
clientEmail
clientIdentifier
createdAt
updatedAt
}
`;
@@ -2,7 +2,6 @@ import gql from 'graphql-tag';
import { AppFragmentNode } from '../App';
import { AppleAppIdentifierFragmentNode } from './AppleAppIdentifier';
import { AppleAppSpecificPasswordFragmentNode } from './AppleAppSpecificPassword';
import { ApplePushKeyFragmentNode } from './ApplePushKey';
import { AppleTeamFragmentNode } from './AppleTeam';
import { IosAppBuildCredentialsFragmentNode } from './IosAppBuildCredentials';
@@ -26,16 +25,11 @@ export const CommonIosAppCredentialsWithoutBuildCredentialsFragmentNode = gql`
id
...ApplePushKeyFragment
}
appSpecificPassword {
id
...AppleAppSpecificPasswordFragment
}
}
${AppFragmentNode}
${AppleTeamFragmentNode}
${AppleAppIdentifierFragmentNode}
${ApplePushKeyFragmentNode}
${AppleAppSpecificPasswordFragmentNode}
`;
export const CommonIosAppCredentialsFragmentNode = gql`
+2 -1
View File
@@ -1,6 +1,7 @@
import chalk from 'chalk';
import figures from 'figures';
import { boolish } from 'getenv';
import logSymbols from 'log-symbols';
import terminalLink from 'terminal-link';
type Color = (...text: string[]) => string;
@@ -45,7 +46,7 @@ export default class Log {
}
public static succeed(message: string): void {
Log.log(`${chalk.green('√')} ${message}`);
Log.log(`${chalk.green(logSymbols.success)} ${message}`);
}
public static withTick(...args: any[]): void {
+4 -4
View File
@@ -63,13 +63,13 @@ export function ora(options?: Options | string): Ora {
console.error = errorReal;
};
spinner.start = (): Ora => {
spinner.start = (text): Ora => {
wrapNativeLogs();
return oraStart();
return oraStart(text);
};
spinner.stopAndPersist = (): Ora => {
const result = oraStopAndPersist();
spinner.stopAndPersist = (options): Ora => {
const result = oraStopAndPersist(options);
resetNativeLogs();
return result;
};
@@ -19,7 +19,7 @@ import { getLatestBuildForSubmissionAsync } from '../../utils/builds';
import AndroidSubmitCommand from '../AndroidSubmitCommand';
jest.mock('fs');
jest.mock('ora');
jest.mock('../../../ora');
jest.mock('../../../graphql/mutations/SubmissionMutation', () => ({
SubmissionMutation: {
createAndroidSubmissionAsync: jest.fn(),
@@ -11,7 +11,7 @@ import { createSubmissionContext } from '../../context';
import IosSubmitCommand from '../IosSubmitCommand';
jest.mock('fs');
jest.mock('ora');
jest.mock('../../../ora');
jest.mock('../../../graphql/mutations/SubmissionMutation', () => ({
SubmissionMutation: {
createIosSubmissionAsync: jest.fn(),
@@ -1,3 +1,5 @@
import nullthrows from 'nullthrows';
import { AppPlatform, SubmissionFragment, SubmissionStatus } from '../../graphql/generated';
import { SubmissionQuery } from '../../graphql/queries/SubmissionQuery';
import Log from '../../log';
@@ -27,21 +29,35 @@ export async function waitForSubmissionsEndAsync(
const timeoutTime = time + CHECK_TIMEOUT_MS;
while (time <= timeoutTime) {
const submissions = await Promise.all(
initialSubmissions.map(({ id }) => SubmissionQuery.byIdAsync(id, { useCache: false }))
initialSubmissions.map(({ id }) => {
try {
return SubmissionQuery.byIdAsync(id, { useCache: false });
} catch (err) {
Log.debug('Failed to fetch the submission status', err);
return null;
}
})
);
if (submissions.length === 1) {
const [submission] = submissions;
spinner.text = getSingleSpinnerText(submission);
if (submission.status === SubmissionStatus.Finished) {
spinner.succeed();
return submissions;
} else if (submission.status === SubmissionStatus.Errored) {
spinner.fail();
return submissions;
} else if (submission.status === SubmissionStatus.Canceled) {
spinner.warn();
return submissions;
if (submission !== null) {
spinner.text = getSingleSpinnerText(submission);
if (submission.status === SubmissionStatus.Finished) {
spinner.succeed();
return [submission];
} else if (submission.status === SubmissionStatus.Errored) {
spinner.fail();
return [submission];
} else if (submission.status === SubmissionStatus.Canceled) {
spinner.warn();
return [submission];
}
} else {
if (!spinner.text) {
spinner.text =
'Could not fetch the submission status. Check your network connection. If the problem persists re-run the command with the EXPO_DEBUG=1 environment variable.';
}
}
} else {
spinner.text = getMultipleSpinnerText(submissions);
@@ -56,7 +72,7 @@ export async function waitForSubmissionsEndAsync(
} else {
spinner.fail('Some submissions were canceled or failed');
}
return submissions;
return submissions.map(s => nullthrows(s));
}
}
@@ -86,13 +102,15 @@ function getSingleSpinnerText(submission: SubmissionFragment): string {
}
}
function getMultipleSpinnerText(submissions: SubmissionFragment[]): string {
function getMultipleSpinnerText(submissions: (SubmissionFragment | null)[]): string {
const awaitingSubmissions = countWithStatus(submissions, SubmissionStatus.AwaitingBuild);
const inQueue = countWithStatus(submissions, SubmissionStatus.InQueue);
const inProgress = countWithStatus(submissions, SubmissionStatus.InProgress);
const finished = countWithStatus(submissions, SubmissionStatus.Finished);
const errored = countWithStatus(submissions, SubmissionStatus.Errored);
const canceled = countWithStatus(submissions, SubmissionStatus.Canceled);
const unknown =
submissions.length - awaitingSubmissions - inQueue - inProgress - finished - errored - canceled;
const text = [
awaitingSubmissions && `Awaiting submissions: ${awaitingSubmissions}`,
inQueue && `Submissions in queue: ${inQueue}`,
@@ -100,12 +118,16 @@ function getMultipleSpinnerText(submissions: SubmissionFragment[]): string {
canceled && `Canceled submissions: ${canceled}`,
errored && `Failed submissions: ${errored}`,
finished && `Finished submissions: ${finished}`,
unknown && `Submissions with unknown status: ${unknown}`,
]
.filter(i => i)
.join('\t');
return text;
}
function countWithStatus(submissions: SubmissionFragment[], status: SubmissionStatus): number {
return submissions.filter(submission => submission.status === status).length;
function countWithStatus(
submissions: (SubmissionFragment | null)[],
status: SubmissionStatus
): number {
return submissions.filter(submission => submission?.status === status).length;
}
+1 -3
View File
@@ -10,7 +10,7 @@ type ProgressHandler = (props: {
error?: Error;
}) => void;
function createProgressTracker({
export function createProgressTracker({
total,
message,
completedMessage,
@@ -75,5 +75,3 @@ function createProgressTracker({
}
};
}
export { createProgressTracker };
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@expo/eas-json",
"description": "A library for interacting with the eas.json",
"version": "0.28.0",
"version": "0.28.2",
"author": "Expo <[email protected]>",
"bugs": "https://github.com/expo/eas-cli/issues",
"dependencies": {
+6 -4
View File
@@ -1,3 +1,5 @@
import { Platform } from '@expo/eas-build-job';
import { AndroidBuildProfile, CommonBuildProfile, IosBuildProfile } from './EasBuild.types';
import { AndroidSubmitProfile, IosSubmitProfile } from './EasSubmit.types';
@@ -8,13 +10,13 @@ export enum CredentialsSource {
export interface RawBuildProfile extends Partial<CommonBuildProfile> {
extends?: string;
android?: Partial<AndroidBuildProfile>;
ios?: Partial<IosBuildProfile>;
[Platform.ANDROID]?: Partial<AndroidBuildProfile>;
[Platform.IOS]?: Partial<IosBuildProfile>;
}
export interface EasSubmitConfiguration {
android?: AndroidSubmitProfile;
ios?: IosSubmitProfile;
[Platform.ANDROID]?: AndroidSubmitProfile;
[Platform.IOS]?: IosSubmitProfile;
}
export interface EasJson {
+10 -5
View File
@@ -94,11 +94,16 @@ export class EasJsonReader {
}
}
const easJson = await this.readAndValidateAsync();
const profile = easJson?.submit?.[profileName]?.[platform];
const profile = easJson?.submit?.[profileName];
if (!profile) {
throw new Error(`There is no profile named ${profileName} in eas.json for ${platform}.`);
throw new Error(`There is no profile named ${profileName} in eas.json`);
}
const platformProfile = profile[platform];
if (platformProfile) {
return this.evaluateFields(platform, platformProfile as SubmitProfile<T>);
} else {
return getDefaultSubmitProfile(platform);
}
return this.evaluateFields(platform, profile as SubmitProfile<T>);
}
public async readAndValidateAsync(): Promise<EasJson> {
@@ -144,7 +149,7 @@ export class EasJsonReader {
}
const buildProfile = easJson.build[profileName];
if (!buildProfile) {
throw new Error(`There is no profile named ${profileName}`);
throw new Error(`There is no profile named ${profileName} in eas.json`);
}
const { extends: baseProfileName, ...buildProfileRest } = buildProfile;
if (baseProfileName) {
@@ -159,7 +164,7 @@ export class EasJsonReader {
private ensureBuildProfileExists(easJson: EasJson, profileName: string): void {
if (!easJson.build || !easJson.build[profileName]) {
throw new Error(`There is no profile named ${profileName} in eas.json.`);
throw new Error(`There is no profile named ${profileName} in eas.json`);
}
}
@@ -225,7 +225,7 @@ test('valid eas.json with missing profile', async () => {
const reader = new EasJsonReader('/project');
const promise = reader.readBuildProfileAsync(Platform.ANDROID, 'debug');
await expect(promise).rejects.toThrowError('There is no profile named debug in eas.json.');
await expect(promise).rejects.toThrowError('There is no profile named debug in eas.json');
});
test('invalid eas.json when using wrong buildType', async () => {
@@ -247,7 +247,7 @@ test('empty json', async () => {
const reader = new EasJsonReader('/project');
const promise = reader.readBuildProfileAsync(Platform.ANDROID, 'release');
await expect(promise).rejects.toThrowError('There is no profile named release in eas.json.');
await expect(promise).rejects.toThrowError('There is no profile named release in eas.json');
});
test('invalid semver value', async () => {
@@ -14,10 +14,7 @@ beforeEach(async () => {
test('minimal allowed eas.json for both platforms', async () => {
await fs.writeJson('/project/eas.json', {
submit: {
release: {
android: {},
ios: {},
},
release: {},
},
});
@@ -111,22 +108,3 @@ test('ios config with all required values', async () => {
language: 'en-US',
});
});
test('missing ios profile', async () => {
await fs.writeJson('/project/eas.json', {
submit: {
release: {
android: {
serviceAccountKeyPath: './path.json',
track: 'beta',
releaseStatus: 'completed',
},
},
},
});
const reader = new EasJsonReader('/project');
const promise = reader.readSubmitProfileAsync(Platform.IOS, 'release');
expect(promise).rejects.toThrow('There is no profile named release in eas.json for ios.');
});
Generated
+13
View File
@@ -6625,6 +6625,11 @@ is-unc-path@^1.0.0:
dependencies:
unc-path-regex "^0.1.2"
is-unicode-supported@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7"
integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==
is-windows@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
@@ -7710,6 +7715,14 @@ lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@~4.17
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
[email protected]:
version "4.1.0"
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503"
integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==
dependencies:
chalk "^4.1.0"
is-unicode-supported "^0.1.0"
log-symbols@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18"