mirror of
https://github.com/expo/eas-cli.git
synced 2026-11-15 03:38:08 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5932775cd4 | ||
|
|
d68d6c38d6 | ||
|
|
d690e10caf | ||
|
|
99ea613b39 | ||
|
|
13715317bd | ||
|
|
18d1ed441b | ||
|
|
db067c4757 | ||
|
|
51388f6adb | ||
|
|
fcbf363538 | ||
|
|
b4d7795006 |
No files matched your search
@@ -13,6 +13,11 @@ module.exports = {
|
||||
],
|
||||
'flowtype/no-types-missing-file-annotation': 'off',
|
||||
curly: 'warn',
|
||||
'import/no-cycle': 'error',
|
||||
'import/no-extraneous-dependencies': [
|
||||
'error',
|
||||
{ devDependencies: ['**/__tests__/**/*', '**/__mocks__/**/*'] },
|
||||
],
|
||||
'import/no-relative-packages': 'error',
|
||||
'no-restricted-imports': [
|
||||
'error',
|
||||
|
||||
+14
-2
@@ -8,6 +8,20 @@ This is the log of notable changes to EAS CLI and related packages.
|
||||
|
||||
### 🎉 New features
|
||||
|
||||
### 🐛 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-10
|
||||
|
||||
### 🎉 New features
|
||||
|
||||
- Use envs from build profile to resolve app config when auto-submitting. ([#614](https://github.com/expo/eas-cli/pull/614) by [@dsokal](https://github.com/dsokal))
|
||||
- Support multi flavor Android projects. ([#595](https://github.com/expo/eas-cli/pull/595) by [@wkozyra95](https://github.com/wkozyra95))
|
||||
- Improve experience when using the build details page as a build artifact URL in `eas submit`. ([#620](https://github.com/expo/eas-cli/pull/620) by [@dsokal](https://github.com/dsokal))
|
||||
@@ -16,8 +30,6 @@ This is the log of notable changes to EAS CLI and related packages.
|
||||
- Validate that project includes `expo-dev-client` when building with `developmentClient` flag. ([#627](https://github.com/expo/eas-cli/pull/627) by [@dsokal](https://github.com/dsokal))
|
||||
- Better experience when not logged in in non-interactive mode. ([#628](https://github.com/expo/eas-cli/pull/628) by [@dsokal](https://github.com/dsokal))
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Reduce `eas-cli` size by almost getting rid of `lodash` from dependencies. ([#605](https://github.com/expo/eas-cli/pull/605) by [@dsokal](https://github.com/dsokal))
|
||||
|
||||
@@ -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,4 +1,3 @@
|
||||
comment: false
|
||||
coverage:
|
||||
round: up
|
||||
precision: 2
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"version": "0.28.0"
|
||||
"version": "0.28.1"
|
||||
}
|
||||
@@ -1,9 +1,18 @@
|
||||
const rootEslintrc = require('../../.eslintrc.js');
|
||||
|
||||
module.exports = {
|
||||
rules: {
|
||||
'import/no-cycle': 'error',
|
||||
'import/no-extraneous-dependencies': [
|
||||
'no-restricted-imports': [
|
||||
'error',
|
||||
{ devDependencies: ['**/__tests__/**/*', '**/__mocks__/**/*'] },
|
||||
{
|
||||
paths: [
|
||||
...rootEslintrc.rules['no-restricted-imports'][1].paths,
|
||||
{
|
||||
name: 'ora',
|
||||
message: 'Import ora from src/ora.ts instead.',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
'graphql/template-strings': [
|
||||
'error',
|
||||
|
||||
+26
-26
@@ -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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/packages/eas-cli/src/commands/webhook/view.js)_
|
||||
<!-- commandsstop -->
|
||||
@@ -3,5 +3,7 @@ export default jest.fn().mockReturnValue({
|
||||
fail: jest.fn(),
|
||||
succeed: jest.fn(),
|
||||
}),
|
||||
stop: jest.fn(),
|
||||
stopAndPersist: jest.fn(),
|
||||
succeed: jest.fn(),
|
||||
});
|
||||
Generated
+619
-1823
File diff suppressed because it is too large.
Load diff
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "eas-cli",
|
||||
"description": "EAS command line tool",
|
||||
"version": "0.28.0",
|
||||
"version": "0.28.1",
|
||||
"author": "Expo <[email protected]>",
|
||||
"bin": {
|
||||
"eas": "./bin/run"
|
||||
|
||||
@@ -2,13 +2,12 @@ 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 ora from 'ora';
|
||||
|
||||
import { BuildFragment, BuildStatus, UploadSessionType } from '../graphql/generated';
|
||||
import { BuildResult } from '../graphql/mutations/BuildMutation';
|
||||
import { BuildQuery } from '../graphql/queries/BuildQuery';
|
||||
import Log, { learnMore } from '../log';
|
||||
import { ora } from '../ora';
|
||||
import { requestedPlatformDisplayNames } from '../platform';
|
||||
import { uploadAsync } from '../uploads';
|
||||
import { formatBytes } from '../utils/files';
|
||||
@@ -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');
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import chalk from 'chalk';
|
||||
import fs from 'fs-extra';
|
||||
import ora from 'ora';
|
||||
import path from 'path';
|
||||
import tar from 'tar';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
import Log from '../../log';
|
||||
import { ora } from '../../ora';
|
||||
import { confirmAsync, promptAsync } from '../../prompts';
|
||||
import { formatBytes } from '../../utils/files';
|
||||
import { getTmpDirectory } from '../../utils/paths';
|
||||
|
||||
@@ -5,7 +5,6 @@ import assert from 'assert';
|
||||
import chalk from 'chalk';
|
||||
import dateFormat from 'dateformat';
|
||||
import gql from 'graphql-tag';
|
||||
import ora from 'ora';
|
||||
|
||||
import EasCommand from '../../commandUtils/EasCommand';
|
||||
import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client';
|
||||
@@ -20,6 +19,7 @@ import {
|
||||
} from '../../graphql/generated';
|
||||
import { PublishMutation } from '../../graphql/mutations/PublishMutation';
|
||||
import Log from '../../log';
|
||||
import { ora } from '../../ora';
|
||||
import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils';
|
||||
import {
|
||||
PublishPlatform,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { getConfig } from '@expo/config';
|
||||
import chalk from 'chalk';
|
||||
import gql from 'graphql-tag';
|
||||
import ora from 'ora';
|
||||
|
||||
import EasCommand from '../../commandUtils/EasCommand';
|
||||
import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client';
|
||||
@@ -13,6 +12,7 @@ import {
|
||||
} from '../../graphql/generated';
|
||||
import { BuildQuery } from '../../graphql/queries/BuildQuery';
|
||||
import Log from '../../log';
|
||||
import { ora } from '../../ora';
|
||||
import { appPlatformEmojis } from '../../platform';
|
||||
import {
|
||||
findProjectRootAsync,
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { getConfig } from '@expo/config';
|
||||
import { flags } from '@oclif/command';
|
||||
import chalk from 'chalk';
|
||||
import ora from 'ora';
|
||||
|
||||
import { BuildDistributionType, BuildStatus } from '../../build/types';
|
||||
import { formatGraphQLBuild } from '../../build/utils/formatBuild';
|
||||
@@ -13,6 +12,7 @@ import {
|
||||
} from '../../graphql/generated';
|
||||
import { BuildQuery } from '../../graphql/queries/BuildQuery';
|
||||
import Log from '../../log';
|
||||
import { ora } from '../../ora';
|
||||
import { RequestedPlatform } from '../../platform';
|
||||
import {
|
||||
findProjectRootAsync,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { getConfig } from '@expo/config';
|
||||
import { flags } from '@oclif/command';
|
||||
import ora from 'ora';
|
||||
|
||||
import { formatGraphQLBuild } from '../../build/utils/formatBuild';
|
||||
import EasCommand from '../../commandUtils/EasCommand';
|
||||
import { BuildFragment } from '../../graphql/generated';
|
||||
import { BuildQuery } from '../../graphql/queries/BuildQuery';
|
||||
import Log from '../../log';
|
||||
import { ora } from '../../ora';
|
||||
import {
|
||||
findProjectRootAsync,
|
||||
getProjectFullNameAsync,
|
||||
|
||||
@@ -2,13 +2,13 @@ import { getConfig } from '@expo/config';
|
||||
import { flags } from '@oclif/command';
|
||||
import assert from 'assert';
|
||||
import chalk from 'chalk';
|
||||
import ora from 'ora';
|
||||
|
||||
import EasCommand from '../../commandUtils/EasCommand';
|
||||
import { AppleDeviceQuery } from '../../credentials/ios/api/graphql/queries/AppleDeviceQuery';
|
||||
import { AppleTeamQuery } from '../../credentials/ios/api/graphql/queries/AppleTeamQuery';
|
||||
import formatDevice from '../../devices/utils/formatDevice';
|
||||
import Log from '../../log';
|
||||
import { Ora, ora } from '../../ora';
|
||||
import { findProjectRootAsync, getProjectAccountNameAsync } from '../../project/projectUtils';
|
||||
import { promptAsync } from '../../prompts';
|
||||
|
||||
@@ -26,7 +26,7 @@ export default class BuildList extends EasCommand {
|
||||
const { exp } = getConfig(projectDir, { skipSDKVersionRequirement: true });
|
||||
const accountName = await getProjectAccountNameAsync(exp);
|
||||
|
||||
let spinner: ora.Ora;
|
||||
let spinner: Ora;
|
||||
|
||||
if (!appleTeamIdentifier) {
|
||||
spinner = ora().start('Fetching the list of teams for the project…');
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { getConfig } from '@expo/config';
|
||||
import ora from 'ora';
|
||||
|
||||
import EasCommand from '../../commandUtils/EasCommand';
|
||||
import { AppleDeviceQuery } from '../../credentials/ios/api/graphql/queries/AppleDeviceQuery';
|
||||
import formatDevice from '../../devices/utils/formatDevice';
|
||||
import Log from '../../log';
|
||||
import { ora } from '../../ora';
|
||||
import { findProjectRootAsync, getProjectAccountNameAsync } from '../../project/projectUtils';
|
||||
|
||||
export default class DeviceView extends EasCommand {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { getConfig } from '@expo/config';
|
||||
import { flags } from '@oclif/command';
|
||||
import ora from 'ora';
|
||||
|
||||
import EasCommand from '../../commandUtils/EasCommand';
|
||||
import { WebhookType } from '../../graphql/generated';
|
||||
import { WebhookMutation } from '../../graphql/mutations/WebhookMutation';
|
||||
import { ora } from '../../ora';
|
||||
import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils';
|
||||
import { prepareInputParamsAsync } from '../../webhooks/input';
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@ import { getConfig } from '@expo/config';
|
||||
import assert from 'assert';
|
||||
import chalk from 'chalk';
|
||||
import nullthrows from 'nullthrows';
|
||||
import ora from 'ora';
|
||||
|
||||
import EasCommand from '../../commandUtils/EasCommand';
|
||||
import { WebhookFragment } from '../../graphql/generated';
|
||||
import { WebhookMutation } from '../../graphql/mutations/WebhookMutation';
|
||||
import { WebhookQuery } from '../../graphql/queries/WebhookQuery';
|
||||
import Log from '../../log';
|
||||
import { ora } from '../../ora';
|
||||
import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils';
|
||||
import { promptAsync, toggleConfirmAsync } from '../../prompts';
|
||||
import { formatWebhook } from '../../webhooks/formatWebhook';
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { getConfig } from '@expo/config';
|
||||
import { flags } from '@oclif/command';
|
||||
import chalk from 'chalk';
|
||||
import ora from 'ora';
|
||||
|
||||
import EasCommand from '../../commandUtils/EasCommand';
|
||||
import { WebhookType } from '../../graphql/generated';
|
||||
import { WebhookQuery } from '../../graphql/queries/WebhookQuery';
|
||||
import Log from '../../log';
|
||||
import { ora } from '../../ora';
|
||||
import {
|
||||
findProjectRootAsync,
|
||||
getProjectFullNameAsync,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { flags } from '@oclif/command';
|
||||
import ora from 'ora';
|
||||
|
||||
import EasCommand from '../../commandUtils/EasCommand';
|
||||
import { WebhookType } from '../../graphql/generated';
|
||||
import { WebhookMutation } from '../../graphql/mutations/WebhookMutation';
|
||||
import { WebhookQuery } from '../../graphql/queries/WebhookQuery';
|
||||
import { ora } from '../../ora';
|
||||
import pick from '../../utils/expodash/pick';
|
||||
import { prepareInputParamsAsync } from '../../webhooks/input';
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import ora from 'ora';
|
||||
|
||||
import EasCommand from '../../commandUtils/EasCommand';
|
||||
import { WebhookQuery } from '../../graphql/queries/WebhookQuery';
|
||||
import Log from '../../log';
|
||||
import { ora } from '../../ora';
|
||||
import { formatWebhook } from '../../webhooks/formatWebhook';
|
||||
|
||||
export default class WebhookView extends EasCommand {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import assert from 'assert';
|
||||
import { nanoid } from 'nanoid';
|
||||
import ora from 'ora';
|
||||
|
||||
import { AndroidAppBuildCredentialsFragment } from '../../../graphql/generated';
|
||||
import { ora } from '../../../ora';
|
||||
import { getApplicationIdAsync } from '../../../project/android/applicationId';
|
||||
import { GradleBuildContext } from '../../../project/android/gradle';
|
||||
import { getProjectAccountName, getProjectConfigDescription } from '../../../project/projectUtils';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import nullthrows from 'nullthrows';
|
||||
import ora from 'ora';
|
||||
|
||||
import {
|
||||
AndroidAppBuildCredentialsFragment,
|
||||
AndroidKeystoreFragment,
|
||||
} from '../../../graphql/generated';
|
||||
import Log from '../../../log';
|
||||
import { ora } from '../../../ora';
|
||||
import { Context } from '../../context';
|
||||
import { MissingCredentialsNonInteractiveError } from '../../errors';
|
||||
import { AppLookupParams } from '../api/GraphqlClient';
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import assert from 'assert';
|
||||
import chalk from 'chalk';
|
||||
import ora from 'ora';
|
||||
|
||||
import {
|
||||
AppleDistributionCertificateFragment,
|
||||
AppleProvisioningProfileFragment,
|
||||
} from '../../../graphql/generated';
|
||||
import Log from '../../../log';
|
||||
import { ora } from '../../../ora';
|
||||
import { Context } from '../../context';
|
||||
import { MissingCredentialsNonInteractiveError } from '../../errors';
|
||||
import { AppLookupParams } from '../api/GraphqlClient';
|
||||
|
||||
-7
@@ -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,8 +1,8 @@
|
||||
import { ITCAgreements, RequestContext } from '@expo/apple-utils';
|
||||
import chalk from 'chalk';
|
||||
import { Ora } from 'ora';
|
||||
|
||||
import Log from '../../../log';
|
||||
import type { Ora } from '../../../ora';
|
||||
import { convertHTMLToASCII } from '../utils/convertHTMLToASCII';
|
||||
|
||||
async function getContractStatusAsync(
|
||||
|
||||
@@ -4,8 +4,8 @@ import {
|
||||
RequestContext,
|
||||
createCertificateAndP12Async,
|
||||
} from '@expo/apple-utils';
|
||||
import ora from 'ora';
|
||||
|
||||
import { ora } from '../../../ora';
|
||||
import { DistributionCertificate, DistributionCertificateStoreInfo } from './Credentials.types';
|
||||
import { AuthCtx, getRequestContext } from './authenticate';
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { App, BundleId } from '@expo/apple-utils';
|
||||
import { JSONObject } from '@expo/json-file';
|
||||
import chalk from 'chalk';
|
||||
import ora from 'ora';
|
||||
|
||||
import Log from '../../../log';
|
||||
import { ora } from '../../../ora';
|
||||
import { AuthCtx, getRequestContext } from './authenticate';
|
||||
import { syncCapabilitiesForEntitlementsAsync } from './bundleIdCapabilities';
|
||||
import { syncCapabilityIdentifiersForEntitlementsAsync } from './capabilityIdentifiers';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Profile, ProfileType, RequestContext } from '@expo/apple-utils';
|
||||
import ora from 'ora';
|
||||
|
||||
import { ora } from '../../../ora';
|
||||
import { findP12CertSerialNumber } from '../utils/p12Certificate';
|
||||
import {
|
||||
DistributionCertificate,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Device, Profile, ProfileState, ProfileType, RequestContext } from '@expo/apple-utils';
|
||||
import ora from 'ora';
|
||||
|
||||
import { ora } from '../../../ora';
|
||||
import { ProvisioningProfile } from './Credentials.types';
|
||||
import { AuthCtx, getRequestContext } from './authenticate';
|
||||
import { getBundleIdForIdentifierAsync, getProfilesForBundleIdAsync } from './bundleId';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Keys } from '@expo/apple-utils';
|
||||
import chalk from 'chalk';
|
||||
import dateformat from 'dateformat';
|
||||
import ora from 'ora';
|
||||
|
||||
import Log from '../../../log';
|
||||
import { ora } from '../../../ora';
|
||||
import { PushKey, PushKeyStoreInfo } from './Credentials.types';
|
||||
import { AuthCtx, getRequestContext } from './authenticate';
|
||||
|
||||
|
||||
+1
-1
@@ -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) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import chalk from 'chalk';
|
||||
import Table from 'cli-table3';
|
||||
import ora from 'ora';
|
||||
|
||||
import { AppleDeviceMutation } from '../../../credentials/ios/api/graphql/mutations/AppleDeviceMutation';
|
||||
import { AppleDeviceClass, AppleTeam } from '../../../graphql/generated';
|
||||
import Log from '../../../log';
|
||||
import { ora } from '../../../ora';
|
||||
import { confirmAsync, promptAsync } from '../../../prompts';
|
||||
import { isValidUDID, normalizeUDID } from '../../udids';
|
||||
|
||||
|
||||
+6
-9
@@ -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`
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/* eslint-disable no-console */
|
||||
import chalk from 'chalk';
|
||||
import figures from 'figures';
|
||||
import { boolish } from 'getenv';
|
||||
import ora from 'ora';
|
||||
import terminalLink from 'terminal-link';
|
||||
|
||||
type Color = (...text: string[]) => string;
|
||||
@@ -47,7 +45,7 @@ export default class Log {
|
||||
}
|
||||
|
||||
public static succeed(message: string): void {
|
||||
ora().succeed(message);
|
||||
Log.log(`${chalk.green('√')} ${message}`);
|
||||
}
|
||||
|
||||
public static withTick(...args: any[]): void {
|
||||
@@ -56,16 +54,19 @@ export default class Log {
|
||||
|
||||
private static consoleLog(...args: any[]): void {
|
||||
Log.updateIsLastLineNewLine(args);
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(...args);
|
||||
}
|
||||
|
||||
private static consoleWarn(...args: any[]): void {
|
||||
Log.updateIsLastLineNewLine(args);
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(...args);
|
||||
}
|
||||
|
||||
private static consoleError(...args: any[]): void {
|
||||
Log.updateIsLastLineNewLine(args);
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(...args);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
// eslint-disable-next-line
|
||||
import oraReal, { Options, Ora } from 'ora';
|
||||
|
||||
import Log from './log';
|
||||
|
||||
export { Ora, Options };
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
const logReal = console.log;
|
||||
// eslint-disable-next-line no-console
|
||||
const infoReal = console.info;
|
||||
// eslint-disable-next-line no-console
|
||||
const warnReal = console.warn;
|
||||
// eslint-disable-next-line no-console
|
||||
const errorReal = console.error;
|
||||
|
||||
/**
|
||||
* A custom ora spinner that sends the stream to stdout in CI, or non-TTY, instead of stderr (the default).
|
||||
*
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
export function ora(options?: Options | string): Ora {
|
||||
const inputOptions = typeof options === 'string' ? { text: options } : options ?? {};
|
||||
const disabled = Log.isDebug || !process.stdin.isTTY;
|
||||
const spinner = oraReal({
|
||||
// Ensure our non-interactive mode emulates CI mode.
|
||||
isEnabled: !disabled,
|
||||
// In non-interactive mode, send the stream to stdout so it prevents looking like an error.
|
||||
stream: disabled ? process.stdout : process.stderr,
|
||||
...inputOptions,
|
||||
});
|
||||
|
||||
const oraStart = spinner.start.bind(spinner);
|
||||
const oraStop = spinner.stop.bind(spinner);
|
||||
const oraStopAndPersist = spinner.stopAndPersist.bind(spinner);
|
||||
|
||||
const logWrap = (method: any, args: any[]): void => {
|
||||
oraStop();
|
||||
method(...args);
|
||||
spinner.start();
|
||||
};
|
||||
|
||||
const wrapNativeLogs = (): void => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log = (...args: any) => logWrap(logReal, args);
|
||||
// eslint-disable-next-line no-console
|
||||
console.info = (...args: any) => logWrap(infoReal, args);
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn = (...args: any) => logWrap(warnReal, args);
|
||||
// eslint-disable-next-line no-console
|
||||
console.error = (...args: any) => logWrap(errorReal, args);
|
||||
};
|
||||
|
||||
const resetNativeLogs = (): void => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log = logReal;
|
||||
// eslint-disable-next-line no-console
|
||||
console.info = logReal;
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn = warnReal;
|
||||
// eslint-disable-next-line no-console
|
||||
console.error = errorReal;
|
||||
};
|
||||
|
||||
spinner.start = (text): Ora => {
|
||||
wrapNativeLogs();
|
||||
return oraStart(text);
|
||||
};
|
||||
|
||||
spinner.stopAndPersist = (options): Ora => {
|
||||
const result = oraStopAndPersist(options);
|
||||
resetNativeLogs();
|
||||
return result;
|
||||
};
|
||||
|
||||
spinner.stop = (): Ora => {
|
||||
const result = oraStop();
|
||||
resetNativeLogs();
|
||||
return result;
|
||||
};
|
||||
|
||||
return spinner;
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
import assert from 'assert';
|
||||
import chalk from 'chalk';
|
||||
import ora from 'ora';
|
||||
import terminalLink from 'terminal-link';
|
||||
|
||||
import { getProjectDashboardUrl } from '../build/utils/url';
|
||||
import { AppPrivacy } from '../graphql/generated';
|
||||
import { AppMutation } from '../graphql/mutations/AppMutation';
|
||||
import { ProjectQuery } from '../graphql/queries/ProjectQuery';
|
||||
import { ora } from '../ora';
|
||||
import { findAccountByName } from '../user/Account';
|
||||
import { ensureLoggedInAsync } from '../user/actions';
|
||||
|
||||
|
||||
File renamed without changes.
+1
-1
@@ -1,5 +1,4 @@
|
||||
import { Platform } from '@expo/eas-build-job';
|
||||
import ora from 'ora';
|
||||
|
||||
import {
|
||||
AndroidSubmissionConfigInput,
|
||||
@@ -8,6 +7,7 @@ import {
|
||||
} from '../graphql/generated';
|
||||
import { toAppPlatform } from '../graphql/types/AppPlatform';
|
||||
import Log from '../log';
|
||||
import { ora } from '../ora';
|
||||
import { appPlatformDisplayNames } from '../platform';
|
||||
import { SubmissionContext } from './context';
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+37
-16
@@ -1,8 +1,9 @@
|
||||
import ora from 'ora';
|
||||
import nullthrows from 'nullthrows';
|
||||
|
||||
import { AppPlatform, SubmissionFragment, SubmissionStatus } from '../../graphql/generated';
|
||||
import { SubmissionQuery } from '../../graphql/queries/SubmissionQuery';
|
||||
import Log from '../../log';
|
||||
import { ora } from '../../ora';
|
||||
import { sleepAsync } from '../../utils/promise';
|
||||
|
||||
const APP_STORE_NAMES: Record<AppPlatform, string> = {
|
||||
@@ -28,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);
|
||||
@@ -57,7 +72,7 @@ export async function waitForSubmissionsEndAsync(
|
||||
} else {
|
||||
spinner.fail('Some submissions were canceled or failed');
|
||||
}
|
||||
return submissions;
|
||||
return submissions.map(s => nullthrows(s));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,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}`,
|
||||
@@ -101,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,7 +1,7 @@
|
||||
import chalk from 'chalk';
|
||||
import { Progress } from 'got';
|
||||
import ora from 'ora';
|
||||
|
||||
import { Ora, ora } from '../ora';
|
||||
import { endTimer, formatMilliseconds, startTimer } from './timer';
|
||||
|
||||
type ProgressHandler = (props: {
|
||||
@@ -19,7 +19,7 @@ function createProgressTracker({
|
||||
message: string | ((ratio: number) => string);
|
||||
completedMessage: string | ((duration: string) => string);
|
||||
}): ProgressHandler {
|
||||
let bar: ora.Ora | null = null;
|
||||
let bar: Ora | null = null;
|
||||
let calcTotal: number = total ?? 0;
|
||||
let transferredSoFar = 0;
|
||||
let current = 0;
|
||||
|
||||
Reference in new issue
Block a user