Compare commits

..
Author SHA1 Message Date
Will Schurman f16e87c0a7 [24/n][eas-cli] Move graphql and session into context 2022-10-11 13:45:08 -07:00
22 changed files with 164 additions and 184 deletions

No files matched your search

-14
View File
@@ -10,22 +10,8 @@ This is the log of notable changes to EAS CLI and related packages.
### 🐛 Bug fixes
- Bump `eas-cli-local-build-plugin` to 0.0.144 to not require `yarn` for local builds. ([c05ef](https://github.com/expo/eas-cli/commit/c05ef9cccaa819d8e5fb84858cb09cadaae90134) by [@dsokal](https://github.com/dsokal))
### 🧹 Chores
- Remove EAS Submit errors from codebase. The errors have been moved to the server side. ([#1443](https://github.com/expo/eas-cli/pull/1443) by [@dsokal](https://github.com/dsokal))
## [2.4.0](https://github.com/expo/eas-cli/releases/tag/v2.4.0) - 2022-10-14
### 🎉 New features
- Handle more common errors for EAS Submit. ([#1440](https://github.com/expo/eas-cli/pull/1440) by [@dsokal](https://github.com/dsokal))
### 🧹 Chores
- Move graphql and session into command context. ([#1435](https://github.com/expo/eas-cli/pull/1435), [#1436](https://github.com/expo/eas-cli/pull/1436) by [@wschurman](https://github.com/wschurman))
## [2.3.0](https://github.com/expo/eas-cli/releases/tag/v2.3.0) - 2022-10-10
### 🎉 New features
+1 -1
View File
@@ -1,4 +1,4 @@
## Releasing a new version
1. Run `yarn release` in the repository root folder. The next version is chosen automatically based on the changelog entries. If you want to use different version, pass the version string as a positional argument to the command, e.g. `yarn release 1.2.3`.
1. Run `yarn release` in the repository root folder.
2. That's it! GitHub Actions is going to take care of the rest. Watch the #eas-cli Slack channel for a successful release notification.
+1 -1
View File
@@ -1,5 +1,5 @@
{
"npmClient": "yarn",
"useWorkspaces": true,
"version": "2.4.1"
"version": "2.3.0"
}
+1 -1
View File
@@ -12,7 +12,7 @@
"watch": "yarn start",
"eas": "packages/eas-cli/bin/run",
"lint": "eslint .",
"release": "./scripts/bin/run release",
"release": "./scripts/bin/run update-local-plugin && lerna version --exact",
"test": "jest",
"clean": "lerna run clean && rm -rf node_modules coverage"
},
+47 -47
View File
@@ -125,7 +125,7 @@ ALIASES
$ eas login
```
_See code: [src/commands/account/login.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/account/login.ts)_
_See code: [src/commands/account/login.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/account/login.ts)_
## `eas account:logout`
@@ -142,7 +142,7 @@ ALIASES
$ eas logout
```
_See code: [src/commands/account/logout.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/account/logout.ts)_
_See code: [src/commands/account/logout.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/account/logout.ts)_
## `eas account:view`
@@ -159,7 +159,7 @@ ALIASES
$ eas whoami
```
_See code: [src/commands/account/view.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/account/view.ts)_
_See code: [src/commands/account/view.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/account/view.ts)_
## `eas analytics [STATUS]`
@@ -173,7 +173,7 @@ DESCRIPTION
display or change analytics settings
```
_See code: [src/commands/analytics.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/analytics.ts)_
_See code: [src/commands/analytics.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/analytics.ts)_
## `eas autocomplete [SHELL]`
@@ -223,7 +223,7 @@ DESCRIPTION
create a branch
```
_See code: [src/commands/branch/create.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/branch/create.ts)_
_See code: [src/commands/branch/create.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/branch/create.ts)_
## `eas branch:delete [NAME]`
@@ -244,7 +244,7 @@ DESCRIPTION
delete a branch
```
_See code: [src/commands/branch/delete.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/branch/delete.ts)_
_See code: [src/commands/branch/delete.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/branch/delete.ts)_
## `eas branch:list`
@@ -264,7 +264,7 @@ DESCRIPTION
list all branches
```
_See code: [src/commands/branch/list.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/branch/list.ts)_
_See code: [src/commands/branch/list.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/branch/list.ts)_
## `eas branch:rename`
@@ -284,7 +284,7 @@ DESCRIPTION
rename a branch
```
_See code: [src/commands/branch/rename.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/branch/rename.ts)_
_See code: [src/commands/branch/rename.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/branch/rename.ts)_
## `eas branch:view [NAME]`
@@ -307,7 +307,7 @@ DESCRIPTION
view a branch
```
_See code: [src/commands/branch/view.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/branch/view.ts)_
_See code: [src/commands/branch/view.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/branch/view.ts)_
## `eas build`
@@ -337,7 +337,7 @@ DESCRIPTION
start a build
```
_See code: [src/commands/build/index.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/build/index.ts)_
_See code: [src/commands/build/index.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/build/index.ts)_
## `eas build:cancel [BUILD_ID]`
@@ -354,7 +354,7 @@ DESCRIPTION
cancel a build
```
_See code: [src/commands/build/cancel.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/build/cancel.ts)_
_See code: [src/commands/build/cancel.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/build/cancel.ts)_
## `eas build:configure`
@@ -371,7 +371,7 @@ DESCRIPTION
configure the project to support EAS Build
```
_See code: [src/commands/build/configure.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/build/configure.ts)_
_See code: [src/commands/build/configure.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/build/configure.ts)_
## `eas build:inspect`
@@ -406,7 +406,7 @@ DESCRIPTION
inspect the state of the project at specific build stages, useful for troubleshooting
```
_See code: [src/commands/build/inspect.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/build/inspect.ts)_
_See code: [src/commands/build/inspect.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/build/inspect.ts)_
## `eas build:list`
@@ -443,7 +443,7 @@ DESCRIPTION
list all builds for your project
```
_See code: [src/commands/build/list.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/build/list.ts)_
_See code: [src/commands/build/list.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/build/list.ts)_
## `eas build:submit`
@@ -490,7 +490,7 @@ DESCRIPTION
Update version of an app.
```
_See code: [src/commands/build/version/set.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/build/version/set.ts)_
_See code: [src/commands/build/version/set.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/build/version/set.ts)_
## `eas build:version:sync`
@@ -509,7 +509,7 @@ DESCRIPTION
Update a version in native code with a value stored on EAS servers
```
_See code: [src/commands/build/version/sync.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/build/version/sync.ts)_
_See code: [src/commands/build/version/sync.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/build/version/sync.ts)_
## `eas build:view [BUILD_ID]`
@@ -526,7 +526,7 @@ DESCRIPTION
view a build for your project
```
_See code: [src/commands/build/view.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/build/view.ts)_
_See code: [src/commands/build/view.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/build/view.ts)_
## `eas channel:create [NAME]`
@@ -547,7 +547,7 @@ DESCRIPTION
create a channel
```
_See code: [src/commands/channel/create.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/channel/create.ts)_
_See code: [src/commands/channel/create.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/channel/create.ts)_
## `eas channel:edit [NAME]`
@@ -569,7 +569,7 @@ DESCRIPTION
point a channel at a new branch
```
_See code: [src/commands/channel/edit.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/channel/edit.ts)_
_See code: [src/commands/channel/edit.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/channel/edit.ts)_
## `eas channel:list`
@@ -589,7 +589,7 @@ DESCRIPTION
list all channels
```
_See code: [src/commands/channel/list.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/channel/list.ts)_
_See code: [src/commands/channel/list.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/channel/list.ts)_
## `eas channel:view [NAME]`
@@ -612,7 +612,7 @@ DESCRIPTION
view a channel
```
_See code: [src/commands/channel/view.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/channel/view.ts)_
_See code: [src/commands/channel/view.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/channel/view.ts)_
## `eas config`
@@ -631,7 +631,7 @@ DESCRIPTION
display project configuration (app.json + eas.json)
```
_See code: [src/commands/config.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/config.ts)_
_See code: [src/commands/config.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/config.ts)_
## `eas credentials`
@@ -648,7 +648,7 @@ DESCRIPTION
manage credentials
```
_See code: [src/commands/credentials.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/credentials.ts)_
_See code: [src/commands/credentials.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/credentials.ts)_
## `eas device:create`
@@ -662,7 +662,7 @@ DESCRIPTION
register new Apple Devices to use for internal distribution
```
_See code: [src/commands/device/create.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/device/create.ts)_
_See code: [src/commands/device/create.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/device/create.ts)_
## `eas device:delete`
@@ -682,7 +682,7 @@ DESCRIPTION
remove a registered device from your account
```
_See code: [src/commands/device/delete.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/device/delete.ts)_
_See code: [src/commands/device/delete.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/device/delete.ts)_
## `eas device:list`
@@ -703,7 +703,7 @@ DESCRIPTION
list all registered devices for your account
```
_See code: [src/commands/device/list.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/device/list.ts)_
_See code: [src/commands/device/list.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/device/list.ts)_
## `eas device:view [UDID]`
@@ -717,7 +717,7 @@ DESCRIPTION
view a device for your project
```
_See code: [src/commands/device/view.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/device/view.ts)_
_See code: [src/commands/device/view.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/device/view.ts)_
## `eas diagnostics`
@@ -731,7 +731,7 @@ DESCRIPTION
display environment info
```
_See code: [src/commands/diagnostics.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/diagnostics.ts)_
_See code: [src/commands/diagnostics.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/diagnostics.ts)_
## `eas help [COMMAND]`
@@ -818,7 +818,7 @@ DESCRIPTION
generate the local store configuration from the app stores
```
_See code: [src/commands/metadata/pull.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/metadata/pull.ts)_
_See code: [src/commands/metadata/pull.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/metadata/pull.ts)_
## `eas metadata:push`
@@ -835,7 +835,7 @@ DESCRIPTION
sync the local store configuration to the app stores
```
_See code: [src/commands/metadata/push.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/metadata/push.ts)_
_See code: [src/commands/metadata/push.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/metadata/push.ts)_
## `eas open`
@@ -849,7 +849,7 @@ DESCRIPTION
open the project page in a web browser
```
_See code: [src/commands/open.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/open.ts)_
_See code: [src/commands/open.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/open.ts)_
## `eas project:info`
@@ -863,7 +863,7 @@ DESCRIPTION
information about the current project
```
_See code: [src/commands/project/info.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/project/info.ts)_
_See code: [src/commands/project/info.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/project/info.ts)_
## `eas project:init`
@@ -885,7 +885,7 @@ ALIASES
$ eas init
```
_See code: [src/commands/project/init.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/project/init.ts)_
_See code: [src/commands/project/init.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/project/init.ts)_
## `eas secret:create`
@@ -908,7 +908,7 @@ DESCRIPTION
create an environment secret on the current project or owner account
```
_See code: [src/commands/secret/create.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/secret/create.ts)_
_See code: [src/commands/secret/create.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/secret/create.ts)_
## `eas secret:delete`
@@ -926,7 +926,7 @@ DESCRIPTION
delete an environment secret by ID
```
_See code: [src/commands/secret/delete.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/secret/delete.ts)_
_See code: [src/commands/secret/delete.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/secret/delete.ts)_
## `eas secret:list`
@@ -940,7 +940,7 @@ DESCRIPTION
list environment secrets available for your current app
```
_See code: [src/commands/secret/list.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/secret/list.ts)_
_See code: [src/commands/secret/list.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/secret/list.ts)_
## `eas submit`
@@ -970,7 +970,7 @@ ALIASES
$ eas build:submit
```
_See code: [src/commands/submit.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/submit.ts)_
_See code: [src/commands/submit.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/submit.ts)_
## `eas update`
@@ -1000,7 +1000,7 @@ DESCRIPTION
publish an update group
```
_See code: [src/commands/update/index.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/update/index.ts)_
_See code: [src/commands/update/index.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/update/index.ts)_
## `eas update:configure`
@@ -1017,7 +1017,7 @@ DESCRIPTION
configure the project to support EAS Update
```
_See code: [src/commands/update/configure.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/update/configure.ts)_
_See code: [src/commands/update/configure.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/update/configure.ts)_
## `eas update:delete GROUPID`
@@ -1038,7 +1038,7 @@ DESCRIPTION
delete all the updates in an update group
```
_See code: [src/commands/update/delete.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/update/delete.ts)_
_See code: [src/commands/update/delete.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/update/delete.ts)_
## `eas update:list`
@@ -1060,7 +1060,7 @@ DESCRIPTION
view the recent updates
```
_See code: [src/commands/update/list.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/update/list.ts)_
_See code: [src/commands/update/list.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/update/list.ts)_
## `eas update:view GROUPID`
@@ -1080,7 +1080,7 @@ DESCRIPTION
update group details
```
_See code: [src/commands/update/view.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/update/view.ts)_
_See code: [src/commands/update/view.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/update/view.ts)_
## `eas webhook:create`
@@ -1101,7 +1101,7 @@ DESCRIPTION
create a webhook
```
_See code: [src/commands/webhook/create.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/webhook/create.ts)_
_See code: [src/commands/webhook/create.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/webhook/create.ts)_
## `eas webhook:delete [ID]`
@@ -1121,7 +1121,7 @@ DESCRIPTION
delete a webhook
```
_See code: [src/commands/webhook/delete.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/webhook/delete.ts)_
_See code: [src/commands/webhook/delete.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/webhook/delete.ts)_
## `eas webhook:list`
@@ -1138,7 +1138,7 @@ DESCRIPTION
list webhooks
```
_See code: [src/commands/webhook/list.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/webhook/list.ts)_
_See code: [src/commands/webhook/list.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/webhook/list.ts)_
## `eas webhook:update`
@@ -1160,7 +1160,7 @@ DESCRIPTION
update a webhook
```
_See code: [src/commands/webhook/update.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/webhook/update.ts)_
_See code: [src/commands/webhook/update.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/webhook/update.ts)_
## `eas webhook:view ID`
@@ -1177,7 +1177,7 @@ DESCRIPTION
view a webhook
```
_See code: [src/commands/webhook/view.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/webhook/view.ts)_
_See code: [src/commands/webhook/view.ts](https://github.com/expo/eas-cli/blob/v2.3.0/packages/eas-cli/src/commands/webhook/view.ts)_
## `eas whoami`
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "eas-cli",
"description": "EAS command line tool",
"version": "2.4.1",
"version": "2.3.0",
"author": "Expo <[email protected]>",
"bin": {
"eas": "./bin/run"
@@ -45,15 +45,15 @@ describe(selectBuildToCancelAsync.name, () => {
});
it('does not return build id when confirmation is rejected', async () => {
const graphqlClient = instance(mock<ExpoGraphqlClient>());
jest.mocked(confirmAsync).mockResolvedValueOnce(false);
const graphqlClient = instance(mock<ExpoGraphqlClient>());
expect(selectBuildToCancelAsync(graphqlClient, projectId, 'blah')).resolves.toEqual(null);
});
it('returns build id when confirmation is confirmed', async () => {
const graphqlClient = instance(mock<ExpoGraphqlClient>());
jest.mocked(selectAsync).mockResolvedValueOnce(selectedBuildId);
jest.mocked(confirmAsync).mockResolvedValueOnce(true);
const graphqlClient = instance(mock<ExpoGraphqlClient>());
expect(selectBuildToCancelAsync(graphqlClient, projectId, 'blah')).resolves.toEqual(
selectedBuildId
);
+3 -1
View File
@@ -3,6 +3,7 @@ import { AppVersionSource } from '@expo/eas-json';
import chalk from 'chalk';
import nullthrows from 'nullthrows';
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
import AndroidCredentialsProvider, {
AndroidCredentials,
} from '../../credentials/android/AndroidCredentialsProvider';
@@ -101,6 +102,7 @@ export async function prepareAndroidBuildAsync(
return await prepareJobAsync(ctx, jobData);
},
sendBuildRequestAsync: async (
graphqlClient: ExpoGraphqlClient,
appId: string,
job: Android.Job,
metadata: Metadata,
@@ -108,7 +110,7 @@ export async function prepareAndroidBuildAsync(
): Promise<BuildResult> => {
const graphqlMetadata = transformMetadata(metadata);
const graphqlJob = transformJob(job);
return await BuildMutation.createAndroidBuildAsync(ctx.graphqlClient, {
return await BuildMutation.createAndroidBuildAsync(graphqlClient, {
appId,
job: graphqlJob,
metadata: graphqlMetadata,
+2
View File
@@ -56,6 +56,7 @@ interface Builder<TPlatform extends Platform, Credentials, TJob extends Job> {
syncProjectConfigurationAsync(ctx: BuildContext<TPlatform>): Promise<void>;
prepareJobAsync(ctx: BuildContext<TPlatform>, jobData: JobData<Credentials>): Promise<Job>;
sendBuildRequestAsync(
graphqlClient: ExpoGraphqlClient,
appId: string,
job: TJob,
metadata: Metadata,
@@ -256,6 +257,7 @@ async function sendBuildRequestAsync<TPlatform extends Platform, Credentials, TJ
}
const { build, deprecationInfo } = await builder.sendBuildRequestAsync(
ctx.graphqlClient,
ctx.projectId,
job,
metadata,
+3 -1
View File
@@ -1,6 +1,7 @@
import { Ios, Job, Metadata, Platform, Workflow } from '@expo/eas-build-job';
import { AppVersionSource } from '@expo/eas-json';
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
import { IosCredentials } from '../../credentials/ios/types';
import { BuildParamsInput } from '../../graphql/generated';
import { BuildMutation, BuildResult } from '../../graphql/mutations/BuildMutation';
@@ -93,6 +94,7 @@ export async function prepareIosBuildAsync(
});
},
sendBuildRequestAsync: async (
graphqlClient: ExpoGraphqlClient,
appId: string,
job: Ios.Job,
metadata: Metadata,
@@ -100,7 +102,7 @@ export async function prepareIosBuildAsync(
): Promise<BuildResult> => {
const graphqlMetadata = transformMetadata(metadata);
const graphqlJob = transformJob(job);
return await BuildMutation.createIosBuildAsync(ctx.graphqlClient, {
return await BuildMutation.createIosBuildAsync(graphqlClient, {
appId,
job: graphqlJob,
metadata: graphqlMetadata,
+1 -1
View File
@@ -6,7 +6,7 @@ import semver from 'semver';
import { ora } from '../ora';
const PLUGIN_PACKAGE_NAME = 'eas-cli-local-build-plugin';
const PLUGIN_PACKAGE_VERSION = '0.0.114';
const PLUGIN_PACKAGE_VERSION = '0.0.110';
export interface LocalBuildOptions {
enable: boolean;
@@ -15,14 +15,13 @@ export default class WebhookView extends EasCommand {
},
];
static override contextDefinition = {
...this.ContextOptions.LoggedIn,
};
static override contextDefinition = { ...this.ContextOptions.LoggedIn };
async runAsync(): Promise<void> {
const {
args: { ID: webhookId },
} = await this.parse(WebhookView);
const {
loggedIn: { graphqlClient },
} = await this.getContextAsync(WebhookView, { nonInteractive: true });
@@ -60,11 +60,10 @@ describe(AccountResolver, () => {
});
it('returns the account defined in app.json/app.config.js if user confirms', async () => {
const graphqlClient = instance(mock<ExpoGraphqlClient>());
jest.mocked(prompts).mockImplementationOnce(async () => ({
value: true,
}));
const graphqlClient = instance(mock<ExpoGraphqlClient>());
const resolver = new AccountResolver(graphqlClient, '1234', user);
const account = await resolver.resolveAccountAsync();
expect(account).toEqual({
@@ -75,14 +74,13 @@ describe(AccountResolver, () => {
});
it('asks the user to choose the account from his account list if he rejects to use the one defined in app.json / app.config.js', async () => {
const graphqlClient = instance(mock<ExpoGraphqlClient>());
jest.mocked(prompts).mockImplementationOnce(async () => ({
useProjectAccount: false,
}));
jest.mocked(prompts).mockImplementationOnce(async () => ({
account: user.accounts[0],
}));
const graphqlClient = instance(mock<ExpoGraphqlClient>());
const resolver = new AccountResolver(graphqlClient, '1234', user);
const account = await resolver.resolveAccountAsync();
expect(account).toEqual(user.accounts[0]);
@@ -91,11 +89,10 @@ describe(AccountResolver, () => {
describe('when outside project dir', () => {
it('asks the user to choose the account from his account list', async () => {
const graphqlClient = instance(mock<ExpoGraphqlClient>());
jest.mocked(prompts).mockImplementationOnce(async () => ({
account: user.accounts[0],
}));
const graphqlClient = instance(mock<ExpoGraphqlClient>());
const resolver = new AccountResolver(graphqlClient, null, user);
const account = await resolver.resolveAccountAsync();
expect(account).toEqual(user.accounts[0]);
+1 -1
View File
@@ -3,9 +3,9 @@ import AppStoreApi from '../credentials/ios/appstore/AppStoreApi';
import { Actor } from '../user/User';
export interface DeviceManagerContext {
graphqlClient: ExpoGraphqlClient;
appStore: AppStoreApi;
user: Actor;
graphqlClient: ExpoGraphqlClient;
projectId: string | null;
}
@@ -323,7 +323,6 @@ describe(collectAssetsAsync, () => {
describe(filterOutAssetsThatAlreadyExistAsync, () => {
it('gets a missing asset', async () => {
const graphqlClient = instance(mock<ExpoGraphqlClient>());
jest.spyOn(PublishQuery, 'getAssetMetadataAsync').mockImplementation(async () => {
return [
{
@@ -333,6 +332,7 @@ describe(filterOutAssetsThatAlreadyExistAsync, () => {
},
];
});
const graphqlClient = instance(mock<ExpoGraphqlClient>());
expect(
(await filterOutAssetsThatAlreadyExistAsync(graphqlClient, [{ storageKey: 'blah' } as any]))
@@ -340,7 +340,6 @@ describe(filterOutAssetsThatAlreadyExistAsync, () => {
).toBe(1);
});
it('ignores an asset that exists', async () => {
const graphqlClient = instance(mock<ExpoGraphqlClient>());
jest.spyOn(PublishQuery, 'getAssetMetadataAsync').mockImplementation(async () => {
return [
{
@@ -350,6 +349,7 @@ describe(filterOutAssetsThatAlreadyExistAsync, () => {
},
];
});
const graphqlClient = instance(mock<ExpoGraphqlClient>());
expect(
(await filterOutAssetsThatAlreadyExistAsync(graphqlClient, [{ storageKey: 'blah' } as any]))
@@ -427,7 +427,6 @@ describe(uploadAssetsAsync, () => {
.mockImplementation(async () => expectedAssetLimit);
it('resolves if the assets are already uploaded', async () => {
const graphqlClient = instance(mock<ExpoGraphqlClient>());
jest.spyOn(PublishQuery, 'getAssetMetadataAsync').mockImplementation(async () => {
const status = AssetMetadataStatus.Exists;
jest.runAllTimers();
@@ -449,6 +448,7 @@ describe(uploadAssetsAsync, () => {
}, // ios.code
];
});
const graphqlClient = instance(mock<ExpoGraphqlClient>());
mockdate.set(0);
await expect(
@@ -461,7 +461,6 @@ describe(uploadAssetsAsync, () => {
});
});
it('resolves if the assets are eventually uploaded', async () => {
const graphqlClient = instance(mock<ExpoGraphqlClient>());
jest.spyOn(PublishQuery, 'getAssetMetadataAsync').mockImplementation(async () => {
const status =
Date.now() === 0 ? AssetMetadataStatus.DoesNotExist : AssetMetadataStatus.Exists;
@@ -485,6 +484,7 @@ describe(uploadAssetsAsync, () => {
}, // ios.code
];
});
const graphqlClient = instance(mock<ExpoGraphqlClient>());
mockdate.set(0);
await expect(
@@ -498,7 +498,6 @@ describe(uploadAssetsAsync, () => {
});
it('updates spinner text throughout execution', async () => {
const graphqlClient = instance(mock<ExpoGraphqlClient>());
jest.spyOn(PublishQuery, 'getAssetMetadataAsync').mockImplementation(async () => {
const status =
Date.now() === 0 ? AssetMetadataStatus.DoesNotExist : AssetMetadataStatus.Exists;
@@ -523,6 +522,7 @@ describe(uploadAssetsAsync, () => {
];
});
const updateSpinnerFn = jest.fn((_totalAssets, _missingAssets) => {});
const graphqlClient = instance(mock<ExpoGraphqlClient>());
mockdate.set(0);
await uploadAssetsAsync(
@@ -62,7 +62,6 @@ describe(getArchiveAsync, () => {
jest.mocked(confirmAsync).mockImplementation(async () => {
throw new Error(`unhandled prompts call - this shouldn't happen - fix tests!`);
});
graphqlClient = {} as any as ExpoGraphqlClient;
});
@@ -140,10 +140,10 @@ describe(AndroidSubmitCommand, () => {
it('assigns the build ID to submission', async () => {
const projectId = uuidv4();
const graphqlClient = {} as any as ExpoGraphqlClient;
jest
.mocked(getRecentBuildsForSubmissionAsync)
.mockResolvedValueOnce([fakeBuildFragment as BuildFragment]);
const graphqlClient = {} as any as ExpoGraphqlClient;
const ctx = await createSubmissionContextAsync({
platform: Platform.ANDROID,
+89 -14
View File
@@ -1,21 +1,96 @@
import { SubmissionError } from '../../graphql/generated';
import Log from '../../log';
import Log, { learnMore } from '../../log';
const UNKNOWN_ERROR_CODES = [
'SUBMISSION_SERVICE_ANDROID_UNKNOWN_ERROR',
'SUBMISSION_SERVICE_IOS_UNKNOWN_ERROR',
];
enum SubmissionErrorCode {
ARCHIVE_DOWNLOAD_NOT_FOUND_ERROR = 'SUBMISSION_SERVICE_COMMON_ARCHIVE_DOWNLOAD_NOT_FOUND_ERROR',
ARCHIVE_DOWNLOAD_FORBIDDEN_ERROR = 'SUBMISSION_SERVICE_COMMON_ARCHIVE_DOWNLOAD_FORBIDDEN_ERROR',
ARCHIVE_EXTRACT_NO_FILES_FOUND_ERROR = 'SUBMISSION_SERVICE_COMMON_ARCHIVE_EXTRACT_NO_FILES_FOUND_ERROR',
ARCHIVE_EXTRACT_CORRUPT_ARCHIVE_ERROR = 'SUBMISSION_SERVICE_COMMON_ARCHIVE_EXTRACT_CORRUPT_ARCHIVE_ERROR',
UPLOAD_TAKING_TOO_LONG_ERROR = 'SUBMISSION_SERVICE_COMMON_UPLOAD_TAKING_TOO_LONG_ERROR',
ANDROID_UNKNOWN_ERROR = 'SUBMISSION_SERVICE_ANDROID_UNKNOWN_ERROR',
ANDROID_FIRST_UPLOAD_ERROR = 'SUBMISSION_SERVICE_ANDROID_FIRST_UPLOAD_ERROR',
ANDROID_OLD_VERSION_CODE_ERROR = 'SUBMISSION_SERVICE_ANDROID_OLD_VERSION_CODE_ERROR',
ANDROID_MISSING_PRIVACY_POLICY = 'SUBMISSION_SERVICE_ANDROID_MISSING_PRIVACY_POLICY',
IOS_OLD_VERSION_CODE_ERROR = 'SUBMISSION_SERVICE_IOS_OLD_VERSION_CODE_ERROR',
IOS_UNKNOWN_ERROR = 'SUBMISSION_SERVICE_IOS_UNKNOWN_ERROR',
IOS_MISSING_APP_ICON = 'SUBMISSION_SERVICE_IOS_MISSING_APP_ICON',
IOS_INVALID_SIGNATURE = 'SUBMISSION_SERVICE_IOS_INVALID_SIGNATURE',
IOS_INCORRECT_CREDENTIALS = 'SUBMISSION_SERVICE_IOS_INVALID_CREDENTIALS',
IOS_IPAD_INVALID_ORIENTATION = 'SUBMISSION_SERVICE_IOS_IPAD_INVALID_ORIENTATION',
IOS_APPLE_MAINTENANCE = 'SUBMISSION_SERVICE_IOS_APPLE_MAINTENANCE',
IOS_INVALID_PROVISIONING_PROFILE_SIGNATURE = 'SUBMISSION_SERVICE_IOS_INVALID_PROVISIONING_PROFILE_SIGNATURE',
IOS_SIGNED_WITH_ADHOC_PROFILE = 'SUBMISSION_SERVICE_IOS_SIGNED_WITH_ADHOC_PROFILE',
}
const SubmissionErrorMessages: Record<SubmissionErrorCode, string> = {
[SubmissionErrorCode.ARCHIVE_DOWNLOAD_NOT_FOUND_ERROR]:
"Failed to download the archive file (Response code: 404 Not Found). Make sure the URL you've provided is correct.",
[SubmissionErrorCode.ARCHIVE_DOWNLOAD_FORBIDDEN_ERROR]:
'Failed to download the archive file (Response code: 403 Forbidden). This is most probably caused by trying to upload an expired build artifact. All EAS build artifacts expire after 30 days.',
[SubmissionErrorCode.ARCHIVE_EXTRACT_CORRUPT_ARCHIVE_ERROR]:
'The compressed archive is corrupt, in an unsupported format, or contains an invalid application format. Supported files include .apk, .aab, and .ipa files and one of these files compressed into a .tar.gz archive.',
[SubmissionErrorCode.ARCHIVE_EXTRACT_NO_FILES_FOUND_ERROR]:
"EAS Submit couldn't find a valid build artifact within provided compressed archive.\n" +
'If you provide a tar.gz archive, it should contain at least one .apk/.aab/.ipa file, depending on the submission platform.',
[SubmissionErrorCode.ANDROID_UNKNOWN_ERROR]:
"We couldn't figure out what went wrong. See logs to learn more.",
[SubmissionErrorCode.ANDROID_FIRST_UPLOAD_ERROR]:
"You haven't submitted this app to Google Play Store yet. The first submission of the app needs to be performed manually.\n" +
`${learnMore('https://expo.fyi/first-android-submission')}.`,
[SubmissionErrorCode.ANDROID_OLD_VERSION_CODE_ERROR]:
"You've already submitted this version of the app.\n" +
'Versions are identified by Android version code (expo.android.versionCode in app.json).\n' +
"If you're submitting a managed Expo project, increment the version code in app.json and build the project with eas build.\n" +
`${learnMore('https://expo.fyi/bumping-android-version-code')}.`,
[SubmissionErrorCode.ANDROID_MISSING_PRIVACY_POLICY]:
'The app has permissions that require a privacy policy set for the app.\n' +
`${learnMore('https://expo.fyi/missing-privacy-policy')}.`,
[SubmissionErrorCode.IOS_OLD_VERSION_CODE_ERROR]:
"You've already submitted this version of the app.\n" +
'Versions are identified by Build Numbers (expo.ios.buildNumber in app.json).\n' +
"If you're submitting an Expo project built with EAS Build, increment the build number in app.json and build the project again.\n" +
`${learnMore('https://expo.fyi/bumping-ios-build-number')}.`,
[SubmissionErrorCode.IOS_UNKNOWN_ERROR]:
"We couldn't figure out what went wrong. See logs to learn more.",
[SubmissionErrorCode.IOS_MISSING_APP_ICON]:
'Your iOS app icon is missing or is an invalid format. The icon must be a 1024x1024 PNG image with no transparency.\n' +
'Check your icon image and icon configuration in app.json.\n' +
`${learnMore('https://docs.expo.dev/guides/app-icons/')}`,
[SubmissionErrorCode.IOS_INVALID_SIGNATURE]:
'Your app signature seems to be invalid.\n' +
"Check your iOS Distribution Certificate and your app's Provisioning Profile.\n" +
`${learnMore('https://docs.expo.dev/distribution/app-signing')}`,
[SubmissionErrorCode.IOS_INCORRECT_CREDENTIALS]:
'Your Apple ID or app-specific password is incorrect. Verify that you entered them correctly and try again.',
[SubmissionErrorCode.IOS_IPAD_INVALID_ORIENTATION]:
"Your app doesn't support iPad multitasking and has to require full screen.\n" +
"If you're submitting a managed Expo project, set the `expo.ios.requireFullScreen` to true in app.json and build the project again.\n" +
`${learnMore('https://expo.fyi/ipad-requires-fullscreen')}`,
[SubmissionErrorCode.IOS_APPLE_MAINTENANCE]:
'It looks like Apple servers are undergoing an unscheduled maintenance. Try again later.',
[SubmissionErrorCode.IOS_INVALID_PROVISIONING_PROFILE_SIGNATURE]:
'Invalid Provisioning Profile Signature (ITMS-90165)\n' +
"Some of Apple's certificates have expired.\n" +
'Delete your Provisioning Profile from your account. Then rebuild the app interactively to generate a new one, and try submitting it to the App Store again.',
[SubmissionErrorCode.UPLOAD_TAKING_TOO_LONG_ERROR]:
'Submission has reached the timeout limit. Try again.',
[SubmissionErrorCode.IOS_SIGNED_WITH_ADHOC_PROFILE]:
'Invalid Provisioning Profile for Apple App Store distribution. The application was signed with an Ad Hoc/Enterprise Provisioning Profile, which is meant for "Internal Distribution". In order to distribute an app on the store, it must be signed with a Distribution Provisioning Profile. Ensure that you are submitting the correct build, or rebuild the application with a Distribution Provisioning Profile and submit that new build.',
};
/**
* Returns a boolean indicating whether the submission logs should be printed.
*/
export function printSubmissionError(error: SubmissionError): boolean {
Log.addNewLineIfNone();
if (!error.message || (error.errorCode && UNKNOWN_ERROR_CODES.includes(error.errorCode))) {
Log.error(error.message ?? `We couldn't figure out what went wrong. See logs to learn more.`);
return true;
if (
error.errorCode &&
(Object.values(SubmissionErrorCode) as string[]).includes(error.errorCode)
) {
const errorCode = error.errorCode as SubmissionErrorCode;
Log.addNewLineIfNone();
Log.error(SubmissionErrorMessages[errorCode]);
return [SubmissionErrorCode.ANDROID_UNKNOWN_ERROR, SubmissionErrorCode.IOS_UNKNOWN_ERROR].some(
code => code === errorCode
);
} else {
Log.error(error.message);
return false;
Log.log(error.message);
return true;
}
}
+1 -1
View File
@@ -5,5 +5,5 @@ set -eo pipefail
SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. && pwd )"
pushd $SCRIPTS_DIR >/dev/null 2>&1
yarn --silent $@
yarn $@
popd >/dev/null 2>&1
-2
View File
@@ -5,8 +5,6 @@
"version": "0.31.0",
"scripts": {
"changelog-entry": "ts-node-esm src/changelogEntry.ts",
"next-version": "ts-node-esm src/nextVersion.ts",
"release": "./src/release.sh",
"release-changelog": "ts-node-esm src/releaseChangelog.ts",
"update-local-plugin": "./src/updateLocalPlugin.sh",
"typecheck": "tsc"
-67
View File
@@ -1,67 +0,0 @@
import { CATEGORY_HEADERS, EntryCategory } from './changelog/consts.js';
import { readAndParseChangelogAsync } from './changelog/file.js';
import * as markdown from './markdown.js';
enum BumpStrategy {
MAJOR = 'major',
MINOR = 'minor',
PATCH = 'patch',
}
type Counts = Record<EntryCategory, number>;
(async function main(): Promise<void> {
const tokens = await readAndParseChangelogAsync();
const counts = countEntriesPerCategory(tokens);
// eslint-disable-next-line no-console
console.log(getBumpStrategy(counts));
})().catch(err => {
// eslint-disable-next-line no-console
console.error(err);
process.exit(1);
});
function countEntriesPerCategory(tokens: markdown.Tokens): Counts {
const counts = Object.values(EntryCategory).reduce((acc, i) => {
acc[i] = 0;
return acc;
}, {} as Counts);
for (const [categoryHeader, categoryHeaderText] of Object.entries(CATEGORY_HEADERS)) {
let i = 0;
while (true) {
const token = tokens[i];
if (
token.type === markdown.TokenType.HEADING &&
token.depth === 3 &&
token.text === categoryHeaderText
) {
break;
} else {
i++;
}
}
// if next token is a heading, there are no entries for this category
if (tokens[i + 1].type === markdown.TokenType.HEADING) {
continue;
}
// i points at the category heading
// tokens[i + 1] is a list token
const listToken = tokens[i + 1] as unknown as markdown.ListToken;
counts[categoryHeader as EntryCategory] = listToken.items.length;
}
return counts;
}
function getBumpStrategy(counts: Counts): BumpStrategy {
if (counts[EntryCategory.BreakingChange] > 0) {
return BumpStrategy.MAJOR;
}
if (counts[EntryCategory.NewFeature] > 0) {
return BumpStrategy.MINOR;
}
return BumpStrategy.PATCH;
}
-13
View File
@@ -1,13 +0,0 @@
#!/usr/bin/env bash
set -eo pipefail
SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. && pwd )"
ROOT_DIR="$( cd "$SCRIPTS_DIR"/.. && pwd )"
$SCRIPTS_DIR/bin/run update-local-plugin
next_version_bump=$($SCRIPTS_DIR/bin/run next-version)
next_version=${1:-$next_version_bump}
lerna version --exact "$next_version"