mirror of
https://github.com/expo/eas-cli.git
synced 2026-11-14 17:50:32 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0d2126f0a | ||
|
|
bd46da748d | ||
|
|
d8c68561c5 | ||
|
|
dfc314d5be | ||
|
|
2285d5771a | ||
|
|
aa22163688 | ||
|
|
5e5395b0c6 | ||
|
|
c94a1e7d9c | ||
|
|
aefadf9376 | ||
|
|
7acea869ff | ||
|
|
02af3f587f | ||
|
|
0d0da1a47a | ||
|
|
eec0b88258 |
No files matched your search
@@ -8,6 +8,33 @@ This is the log of notable changes to EAS CLI and related packages.
|
||||
|
||||
### 🎉 New features
|
||||
|
||||
- Add account list to `eas whoami`/`eas account:view`. ([#1814](https://github.com/expo/eas-cli/pull/1814) by [@wschurman](https://github.com/wschurman))
|
||||
- Add `large` resource class for iOS as allowed value in `eas.json`. ([#1817](https://github.com/expo/eas-cli/pull/1817) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Print request ID on unforeseen GraphQL error for easier tracking and follow up. ([#1813](https://github.com/expo/eas-cli/pull/1813) by [@radoslawkrzemien](https://github.com/radoslawkrzemien))
|
||||
|
||||
## [3.10.2](https://github.com/expo/eas-cli/releases/tag/v3.10.2) - 2023-04-25
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Add info about Xcode 14.3 image to `eas.schema.json`. ([#1808](https://github.com/expo/eas-cli/pull/1808) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
- Allow users to select an app to run using the `build:run` command if multiple apps are found in the tarball. ([#1807](https://github.com/expo/eas-cli/pull/1807) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
- Don't resolve `default` resource class for iOS in CLI. ([#1734](https://github.com/expo/eas-cli/pull/1734) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
|
||||
## [3.10.1](https://github.com/expo/eas-cli/releases/tag/v3.10.1) - 2023-04-25
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Add `cache.paths` field and deprecate `cache.customPaths`. ([#1794](https://github.com/expo/eas-cli/pull/1794) by [@radoslawkrzemien](https://github.com/radoslawkrzemien))
|
||||
|
||||
## [3.10.0](https://github.com/expo/eas-cli/releases/tag/v3.10.0) - 2023-04-21
|
||||
|
||||
### 🎉 New features
|
||||
|
||||
- Added eas device:rename command. ([#1787](https://github.com/expo/eas-cli/pull/1787) by [@keith-kurak](https://github.com/keith-kurak))
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"version": "3.10.0",
|
||||
"version": "3.11.0",
|
||||
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
|
||||
}
|
||||
+54
-54
@@ -132,7 +132,7 @@ ALIASES
|
||||
$ eas login
|
||||
```
|
||||
|
||||
_See code: [src/commands/account/login.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/account/login.ts)_
|
||||
_See code: [src/commands/account/login.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/account/login.ts)_
|
||||
|
||||
## `eas account:logout`
|
||||
|
||||
@@ -149,7 +149,7 @@ ALIASES
|
||||
$ eas logout
|
||||
```
|
||||
|
||||
_See code: [src/commands/account/logout.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/account/logout.ts)_
|
||||
_See code: [src/commands/account/logout.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/account/logout.ts)_
|
||||
|
||||
## `eas account:view`
|
||||
|
||||
@@ -166,7 +166,7 @@ ALIASES
|
||||
$ eas whoami
|
||||
```
|
||||
|
||||
_See code: [src/commands/account/view.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/account/view.ts)_
|
||||
_See code: [src/commands/account/view.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/account/view.ts)_
|
||||
|
||||
## `eas analytics [STATUS]`
|
||||
|
||||
@@ -180,7 +180,7 @@ DESCRIPTION
|
||||
display or change analytics settings
|
||||
```
|
||||
|
||||
_See code: [src/commands/analytics.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/analytics.ts)_
|
||||
_See code: [src/commands/analytics.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/analytics.ts)_
|
||||
|
||||
## `eas autocomplete [SHELL]`
|
||||
|
||||
@@ -230,7 +230,7 @@ DESCRIPTION
|
||||
create a branch
|
||||
```
|
||||
|
||||
_See code: [src/commands/branch/create.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/branch/create.ts)_
|
||||
_See code: [src/commands/branch/create.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/branch/create.ts)_
|
||||
|
||||
## `eas branch:delete [NAME]`
|
||||
|
||||
@@ -251,7 +251,7 @@ DESCRIPTION
|
||||
delete a branch
|
||||
```
|
||||
|
||||
_See code: [src/commands/branch/delete.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/branch/delete.ts)_
|
||||
_See code: [src/commands/branch/delete.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/branch/delete.ts)_
|
||||
|
||||
## `eas branch:list`
|
||||
|
||||
@@ -271,7 +271,7 @@ DESCRIPTION
|
||||
list all branches
|
||||
```
|
||||
|
||||
_See code: [src/commands/branch/list.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/branch/list.ts)_
|
||||
_See code: [src/commands/branch/list.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/branch/list.ts)_
|
||||
|
||||
## `eas branch:rename`
|
||||
|
||||
@@ -291,7 +291,7 @@ DESCRIPTION
|
||||
rename a branch
|
||||
```
|
||||
|
||||
_See code: [src/commands/branch/rename.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/branch/rename.ts)_
|
||||
_See code: [src/commands/branch/rename.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/branch/rename.ts)_
|
||||
|
||||
## `eas branch:view [NAME]`
|
||||
|
||||
@@ -314,7 +314,7 @@ DESCRIPTION
|
||||
view a branch
|
||||
```
|
||||
|
||||
_See code: [src/commands/branch/view.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/branch/view.ts)_
|
||||
_See code: [src/commands/branch/view.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/branch/view.ts)_
|
||||
|
||||
## `eas build`
|
||||
|
||||
@@ -344,7 +344,7 @@ DESCRIPTION
|
||||
start a build
|
||||
```
|
||||
|
||||
_See code: [src/commands/build/index.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/build/index.ts)_
|
||||
_See code: [src/commands/build/index.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/build/index.ts)_
|
||||
|
||||
## `eas build:cancel [BUILD_ID]`
|
||||
|
||||
@@ -361,7 +361,7 @@ DESCRIPTION
|
||||
cancel a build
|
||||
```
|
||||
|
||||
_See code: [src/commands/build/cancel.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/build/cancel.ts)_
|
||||
_See code: [src/commands/build/cancel.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/build/cancel.ts)_
|
||||
|
||||
## `eas build:configure`
|
||||
|
||||
@@ -378,7 +378,7 @@ DESCRIPTION
|
||||
configure the project to support EAS Build
|
||||
```
|
||||
|
||||
_See code: [src/commands/build/configure.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/build/configure.ts)_
|
||||
_See code: [src/commands/build/configure.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/build/configure.ts)_
|
||||
|
||||
## `eas build:inspect`
|
||||
|
||||
@@ -413,7 +413,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/v3.10.0/packages/eas-cli/src/commands/build/inspect.ts)_
|
||||
_See code: [src/commands/build/inspect.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/build/inspect.ts)_
|
||||
|
||||
## `eas build:list`
|
||||
|
||||
@@ -450,7 +450,7 @@ DESCRIPTION
|
||||
list all builds for your project
|
||||
```
|
||||
|
||||
_See code: [src/commands/build/list.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/build/list.ts)_
|
||||
_See code: [src/commands/build/list.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/build/list.ts)_
|
||||
|
||||
## `eas build:resign`
|
||||
|
||||
@@ -476,7 +476,7 @@ DESCRIPTION
|
||||
re-sign a build archive
|
||||
```
|
||||
|
||||
_See code: [src/commands/build/resign.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/build/resign.ts)_
|
||||
_See code: [src/commands/build/resign.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/build/resign.ts)_
|
||||
|
||||
## `eas build:run`
|
||||
|
||||
@@ -500,7 +500,7 @@ DESCRIPTION
|
||||
run simulator/emulator builds from eas-cli
|
||||
```
|
||||
|
||||
_See code: [src/commands/build/run.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/build/run.ts)_
|
||||
_See code: [src/commands/build/run.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/build/run.ts)_
|
||||
|
||||
## `eas build:submit`
|
||||
|
||||
@@ -547,7 +547,7 @@ DESCRIPTION
|
||||
Update version of an app.
|
||||
```
|
||||
|
||||
_See code: [src/commands/build/version/set.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/build/version/set.ts)_
|
||||
_See code: [src/commands/build/version/set.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/build/version/set.ts)_
|
||||
|
||||
## `eas build:version:sync`
|
||||
|
||||
@@ -566,7 +566,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/v3.10.0/packages/eas-cli/src/commands/build/version/sync.ts)_
|
||||
_See code: [src/commands/build/version/sync.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/build/version/sync.ts)_
|
||||
|
||||
## `eas build:view [BUILD_ID]`
|
||||
|
||||
@@ -583,7 +583,7 @@ DESCRIPTION
|
||||
view a build for your project
|
||||
```
|
||||
|
||||
_See code: [src/commands/build/view.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/build/view.ts)_
|
||||
_See code: [src/commands/build/view.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/build/view.ts)_
|
||||
|
||||
## `eas channel:create [NAME]`
|
||||
|
||||
@@ -604,7 +604,7 @@ DESCRIPTION
|
||||
create a channel
|
||||
```
|
||||
|
||||
_See code: [src/commands/channel/create.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/channel/create.ts)_
|
||||
_See code: [src/commands/channel/create.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/channel/create.ts)_
|
||||
|
||||
## `eas channel:edit [NAME]`
|
||||
|
||||
@@ -626,7 +626,7 @@ DESCRIPTION
|
||||
point a channel at a new branch
|
||||
```
|
||||
|
||||
_See code: [src/commands/channel/edit.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/channel/edit.ts)_
|
||||
_See code: [src/commands/channel/edit.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/channel/edit.ts)_
|
||||
|
||||
## `eas channel:list`
|
||||
|
||||
@@ -646,7 +646,7 @@ DESCRIPTION
|
||||
list all channels
|
||||
```
|
||||
|
||||
_See code: [src/commands/channel/list.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/channel/list.ts)_
|
||||
_See code: [src/commands/channel/list.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/channel/list.ts)_
|
||||
|
||||
## `eas channel:rollout [CHANNEL]`
|
||||
|
||||
@@ -670,7 +670,7 @@ DESCRIPTION
|
||||
Roll a new branch out on a channel incrementally.
|
||||
```
|
||||
|
||||
_See code: [src/commands/channel/rollout.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/channel/rollout.ts)_
|
||||
_See code: [src/commands/channel/rollout.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/channel/rollout.ts)_
|
||||
|
||||
## `eas channel:view [NAME]`
|
||||
|
||||
@@ -693,7 +693,7 @@ DESCRIPTION
|
||||
view a channel
|
||||
```
|
||||
|
||||
_See code: [src/commands/channel/view.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/channel/view.ts)_
|
||||
_See code: [src/commands/channel/view.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/channel/view.ts)_
|
||||
|
||||
## `eas config`
|
||||
|
||||
@@ -714,7 +714,7 @@ DESCRIPTION
|
||||
display project configuration (app.json + eas.json)
|
||||
```
|
||||
|
||||
_See code: [src/commands/config.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/config.ts)_
|
||||
_See code: [src/commands/config.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/config.ts)_
|
||||
|
||||
## `eas credentials`
|
||||
|
||||
@@ -731,7 +731,7 @@ DESCRIPTION
|
||||
manage credentials
|
||||
```
|
||||
|
||||
_See code: [src/commands/credentials.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/credentials.ts)_
|
||||
_See code: [src/commands/credentials.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/credentials.ts)_
|
||||
|
||||
## `eas device:create`
|
||||
|
||||
@@ -745,7 +745,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/v3.10.0/packages/eas-cli/src/commands/device/create.ts)_
|
||||
_See code: [src/commands/device/create.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/device/create.ts)_
|
||||
|
||||
## `eas device:delete`
|
||||
|
||||
@@ -765,7 +765,7 @@ DESCRIPTION
|
||||
remove a registered device from your account
|
||||
```
|
||||
|
||||
_See code: [src/commands/device/delete.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/device/delete.ts)_
|
||||
_See code: [src/commands/device/delete.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/device/delete.ts)_
|
||||
|
||||
## `eas device:list`
|
||||
|
||||
@@ -786,7 +786,7 @@ DESCRIPTION
|
||||
list all registered devices for your account
|
||||
```
|
||||
|
||||
_See code: [src/commands/device/list.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/device/list.ts)_
|
||||
_See code: [src/commands/device/list.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/device/list.ts)_
|
||||
|
||||
## `eas device:rename`
|
||||
|
||||
@@ -807,7 +807,7 @@ DESCRIPTION
|
||||
rename a registered device
|
||||
```
|
||||
|
||||
_See code: [src/commands/device/rename.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/device/rename.ts)_
|
||||
_See code: [src/commands/device/rename.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/device/rename.ts)_
|
||||
|
||||
## `eas device:view [UDID]`
|
||||
|
||||
@@ -821,7 +821,7 @@ DESCRIPTION
|
||||
view a device for your project
|
||||
```
|
||||
|
||||
_See code: [src/commands/device/view.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/device/view.ts)_
|
||||
_See code: [src/commands/device/view.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/device/view.ts)_
|
||||
|
||||
## `eas diagnostics`
|
||||
|
||||
@@ -835,7 +835,7 @@ DESCRIPTION
|
||||
display environment info
|
||||
```
|
||||
|
||||
_See code: [src/commands/diagnostics.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/diagnostics.ts)_
|
||||
_See code: [src/commands/diagnostics.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/diagnostics.ts)_
|
||||
|
||||
## `eas help [COMMAND]`
|
||||
|
||||
@@ -923,7 +923,7 @@ DESCRIPTION
|
||||
validate the local store configuration
|
||||
```
|
||||
|
||||
_See code: [src/commands/metadata/lint.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/metadata/lint.ts)_
|
||||
_See code: [src/commands/metadata/lint.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/metadata/lint.ts)_
|
||||
|
||||
## `eas metadata:pull`
|
||||
|
||||
@@ -940,7 +940,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/v3.10.0/packages/eas-cli/src/commands/metadata/pull.ts)_
|
||||
_See code: [src/commands/metadata/pull.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/metadata/pull.ts)_
|
||||
|
||||
## `eas metadata:push`
|
||||
|
||||
@@ -957,7 +957,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/v3.10.0/packages/eas-cli/src/commands/metadata/push.ts)_
|
||||
_See code: [src/commands/metadata/push.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/metadata/push.ts)_
|
||||
|
||||
## `eas open`
|
||||
|
||||
@@ -971,7 +971,7 @@ DESCRIPTION
|
||||
open the project page in a web browser
|
||||
```
|
||||
|
||||
_See code: [src/commands/open.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/open.ts)_
|
||||
_See code: [src/commands/open.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/open.ts)_
|
||||
|
||||
## `eas project:info`
|
||||
|
||||
@@ -985,7 +985,7 @@ DESCRIPTION
|
||||
information about the current project
|
||||
```
|
||||
|
||||
_See code: [src/commands/project/info.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/project/info.ts)_
|
||||
_See code: [src/commands/project/info.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/project/info.ts)_
|
||||
|
||||
## `eas project:init`
|
||||
|
||||
@@ -1007,7 +1007,7 @@ ALIASES
|
||||
$ eas init
|
||||
```
|
||||
|
||||
_See code: [src/commands/project/init.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/project/init.ts)_
|
||||
_See code: [src/commands/project/init.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/project/init.ts)_
|
||||
|
||||
## `eas secret:create`
|
||||
|
||||
@@ -1030,7 +1030,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/v3.10.0/packages/eas-cli/src/commands/secret/create.ts)_
|
||||
_See code: [src/commands/secret/create.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/secret/create.ts)_
|
||||
|
||||
## `eas secret:delete`
|
||||
|
||||
@@ -1048,7 +1048,7 @@ DESCRIPTION
|
||||
delete an environment secret by ID
|
||||
```
|
||||
|
||||
_See code: [src/commands/secret/delete.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/secret/delete.ts)_
|
||||
_See code: [src/commands/secret/delete.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/secret/delete.ts)_
|
||||
|
||||
## `eas secret:list`
|
||||
|
||||
@@ -1062,7 +1062,7 @@ DESCRIPTION
|
||||
list environment secrets available for your current app
|
||||
```
|
||||
|
||||
_See code: [src/commands/secret/list.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/secret/list.ts)_
|
||||
_See code: [src/commands/secret/list.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/secret/list.ts)_
|
||||
|
||||
## `eas secret:push`
|
||||
|
||||
@@ -1082,7 +1082,7 @@ DESCRIPTION
|
||||
read environment secrets from env file and store on the server
|
||||
```
|
||||
|
||||
_See code: [src/commands/secret/push.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/secret/push.ts)_
|
||||
_See code: [src/commands/secret/push.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/secret/push.ts)_
|
||||
|
||||
## `eas submit`
|
||||
|
||||
@@ -1112,7 +1112,7 @@ ALIASES
|
||||
$ eas build:submit
|
||||
```
|
||||
|
||||
_See code: [src/commands/submit.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/submit.ts)_
|
||||
_See code: [src/commands/submit.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/submit.ts)_
|
||||
|
||||
## `eas update`
|
||||
|
||||
@@ -1144,7 +1144,7 @@ DESCRIPTION
|
||||
publish an update group
|
||||
```
|
||||
|
||||
_See code: [src/commands/update/index.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/update/index.ts)_
|
||||
_See code: [src/commands/update/index.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/update/index.ts)_
|
||||
|
||||
## `eas update:configure`
|
||||
|
||||
@@ -1162,7 +1162,7 @@ DESCRIPTION
|
||||
configure the project to support EAS Update
|
||||
```
|
||||
|
||||
_See code: [src/commands/update/configure.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/update/configure.ts)_
|
||||
_See code: [src/commands/update/configure.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/update/configure.ts)_
|
||||
|
||||
## `eas update:delete GROUPID`
|
||||
|
||||
@@ -1183,7 +1183,7 @@ DESCRIPTION
|
||||
delete all the updates in an update group
|
||||
```
|
||||
|
||||
_See code: [src/commands/update/delete.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/update/delete.ts)_
|
||||
_See code: [src/commands/update/delete.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/update/delete.ts)_
|
||||
|
||||
## `eas update:list`
|
||||
|
||||
@@ -1205,7 +1205,7 @@ DESCRIPTION
|
||||
view the recent updates
|
||||
```
|
||||
|
||||
_See code: [src/commands/update/list.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/update/list.ts)_
|
||||
_See code: [src/commands/update/list.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/update/list.ts)_
|
||||
|
||||
## `eas update:republish`
|
||||
|
||||
@@ -1229,7 +1229,7 @@ DESCRIPTION
|
||||
roll back to an existing update
|
||||
```
|
||||
|
||||
_See code: [src/commands/update/republish.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/update/republish.ts)_
|
||||
_See code: [src/commands/update/republish.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/update/republish.ts)_
|
||||
|
||||
## `eas update:view GROUPID`
|
||||
|
||||
@@ -1249,7 +1249,7 @@ DESCRIPTION
|
||||
update group details
|
||||
```
|
||||
|
||||
_See code: [src/commands/update/view.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/update/view.ts)_
|
||||
_See code: [src/commands/update/view.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/update/view.ts)_
|
||||
|
||||
## `eas webhook:create`
|
||||
|
||||
@@ -1270,7 +1270,7 @@ DESCRIPTION
|
||||
create a webhook
|
||||
```
|
||||
|
||||
_See code: [src/commands/webhook/create.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/webhook/create.ts)_
|
||||
_See code: [src/commands/webhook/create.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/webhook/create.ts)_
|
||||
|
||||
## `eas webhook:delete [ID]`
|
||||
|
||||
@@ -1290,7 +1290,7 @@ DESCRIPTION
|
||||
delete a webhook
|
||||
```
|
||||
|
||||
_See code: [src/commands/webhook/delete.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/webhook/delete.ts)_
|
||||
_See code: [src/commands/webhook/delete.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/webhook/delete.ts)_
|
||||
|
||||
## `eas webhook:list`
|
||||
|
||||
@@ -1308,7 +1308,7 @@ DESCRIPTION
|
||||
list webhooks
|
||||
```
|
||||
|
||||
_See code: [src/commands/webhook/list.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/webhook/list.ts)_
|
||||
_See code: [src/commands/webhook/list.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/webhook/list.ts)_
|
||||
|
||||
## `eas webhook:update`
|
||||
|
||||
@@ -1330,7 +1330,7 @@ DESCRIPTION
|
||||
update a webhook
|
||||
```
|
||||
|
||||
_See code: [src/commands/webhook/update.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/webhook/update.ts)_
|
||||
_See code: [src/commands/webhook/update.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/webhook/update.ts)_
|
||||
|
||||
## `eas webhook:view ID`
|
||||
|
||||
@@ -1347,7 +1347,7 @@ DESCRIPTION
|
||||
view a webhook
|
||||
```
|
||||
|
||||
_See code: [src/commands/webhook/view.ts](https://github.com/expo/eas-cli/blob/v3.10.0/packages/eas-cli/src/commands/webhook/view.ts)_
|
||||
_See code: [src/commands/webhook/view.ts](https://github.com/expo/eas-cli/blob/v3.11.0/packages/eas-cli/src/commands/webhook/view.ts)_
|
||||
|
||||
## `eas whoami`
|
||||
|
||||
|
||||
Generated
+83
-17
@@ -737,7 +737,7 @@
|
||||
},
|
||||
{
|
||||
"name": "appsPaginated",
|
||||
"description": null,
|
||||
"description": "Paginated list of apps associated with this account. By default sorted by name. Use filter to adjust the sorting order.",
|
||||
"args": [
|
||||
{
|
||||
"name": "after",
|
||||
@@ -763,6 +763,18 @@
|
||||
"isDeprecated": false,
|
||||
"deprecationReason": null
|
||||
},
|
||||
{
|
||||
"name": "filter",
|
||||
"description": null,
|
||||
"type": {
|
||||
"kind": "INPUT_OBJECT",
|
||||
"name": "AccountAppsFilterInput",
|
||||
"ofType": null
|
||||
},
|
||||
"defaultValue": null,
|
||||
"isDeprecated": false,
|
||||
"deprecationReason": null
|
||||
},
|
||||
{
|
||||
"name": "first",
|
||||
"description": null,
|
||||
@@ -1683,6 +1695,56 @@
|
||||
"enumValues": null,
|
||||
"possibleTypes": null
|
||||
},
|
||||
{
|
||||
"kind": "INPUT_OBJECT",
|
||||
"name": "AccountAppsFilterInput",
|
||||
"description": null,
|
||||
"fields": null,
|
||||
"inputFields": [
|
||||
{
|
||||
"name": "sortByField",
|
||||
"description": null,
|
||||
"type": {
|
||||
"kind": "NON_NULL",
|
||||
"name": null,
|
||||
"ofType": {
|
||||
"kind": "ENUM",
|
||||
"name": "AccountAppsSortByField",
|
||||
"ofType": null
|
||||
}
|
||||
},
|
||||
"defaultValue": null,
|
||||
"isDeprecated": false,
|
||||
"deprecationReason": null
|
||||
}
|
||||
],
|
||||
"interfaces": null,
|
||||
"enumValues": null,
|
||||
"possibleTypes": null
|
||||
},
|
||||
{
|
||||
"kind": "ENUM",
|
||||
"name": "AccountAppsSortByField",
|
||||
"description": null,
|
||||
"fields": null,
|
||||
"inputFields": null,
|
||||
"interfaces": null,
|
||||
"enumValues": [
|
||||
{
|
||||
"name": "LATEST_ACTIVITY_TIME",
|
||||
"description": null,
|
||||
"isDeprecated": false,
|
||||
"deprecationReason": null
|
||||
},
|
||||
{
|
||||
"name": "NAME",
|
||||
"description": "Name prefers the display name but falls back to full_name with @account/\npart stripped.",
|
||||
"isDeprecated": false,
|
||||
"deprecationReason": null
|
||||
}
|
||||
],
|
||||
"possibleTypes": null
|
||||
},
|
||||
{
|
||||
"kind": "INPUT_OBJECT",
|
||||
"name": "AccountDataInput",
|
||||
@@ -14207,22 +14269,6 @@
|
||||
"isDeprecated": false,
|
||||
"deprecationReason": null
|
||||
},
|
||||
{
|
||||
"name": "customPaths",
|
||||
"description": null,
|
||||
"type": {
|
||||
"kind": "LIST",
|
||||
"name": null,
|
||||
"ofType": {
|
||||
"kind": "SCALAR",
|
||||
"name": "String",
|
||||
"ofType": null
|
||||
}
|
||||
},
|
||||
"defaultValue": null,
|
||||
"isDeprecated": false,
|
||||
"deprecationReason": null
|
||||
},
|
||||
{
|
||||
"name": "disabled",
|
||||
"description": null,
|
||||
@@ -14246,6 +14292,26 @@
|
||||
"defaultValue": null,
|
||||
"isDeprecated": false,
|
||||
"deprecationReason": null
|
||||
},
|
||||
{
|
||||
"name": "paths",
|
||||
"description": null,
|
||||
"type": {
|
||||
"kind": "LIST",
|
||||
"name": null,
|
||||
"ofType": {
|
||||
"kind": "NON_NULL",
|
||||
"name": null,
|
||||
"ofType": {
|
||||
"kind": "SCALAR",
|
||||
"name": "String",
|
||||
"ofType": null
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultValue": null,
|
||||
"isDeprecated": false,
|
||||
"deprecationReason": null
|
||||
}
|
||||
],
|
||||
"interfaces": null,
|
||||
|
||||
@@ -2,4 +2,5 @@ module.exports = async () => {
|
||||
process.env.TZ = 'UTC';
|
||||
process.env.EAS_NO_VCS = '1';
|
||||
process.env.EAS_PROJECT_ROOT = '/app';
|
||||
process.env.FORCE_COLOR = '1';
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "eas-cli",
|
||||
"description": "EAS command line tool",
|
||||
"version": "3.10.0",
|
||||
"version": "3.11.0",
|
||||
"author": "Expo <[email protected]>",
|
||||
"bin": {
|
||||
"eas": "./bin/run"
|
||||
@@ -13,8 +13,8 @@
|
||||
"@expo/config": "7.0.3",
|
||||
"@expo/config-plugins": "5.0.4",
|
||||
"@expo/config-types": "47.0.0",
|
||||
"@expo/eas-build-job": "1.0.7",
|
||||
"@expo/eas-json": "3.9.2",
|
||||
"@expo/eas-build-job": "1.0.10",
|
||||
"@expo/eas-json": "3.11.0",
|
||||
"@expo/json-file": "8.2.37",
|
||||
"@expo/multipart-body-parser": "1.1.0",
|
||||
"@expo/osascript": "2.0.33",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Platform } from '@expo/eas-build-job';
|
||||
import { CombinedError } from '@urql/core';
|
||||
import { GraphQLError } from 'graphql/error';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
import { EasCommandError } from '../../commandUtils/errors';
|
||||
import Build from '../../commands/build';
|
||||
@@ -42,9 +43,11 @@ const EXPECTED_MAX_BUILD_COUNT_MESSAGE_IOS = `You have already reached the maxim
|
||||
const EXPECTED_GENERIC_MESSAGE =
|
||||
'Build request failed. Make sure you are using the latest eas-cli version. If the problem persists, report the issue.';
|
||||
|
||||
const mockRequestId = uuidv4();
|
||||
const getGraphQLError = (message: string, errorCode: string): GraphQLError => {
|
||||
return new GraphQLError(message, null, null, null, null, null, {
|
||||
errorCode,
|
||||
requestId: mockRequestId,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -114,9 +117,9 @@ describe(Build.name, () => {
|
||||
});
|
||||
|
||||
describe('error is server-side defined error', () => {
|
||||
describe('throws correct EasCommandError subclass', () => {
|
||||
describe('for TURTLE_DEPRECATED_JOB_FORMAT', () => {
|
||||
it('does it with Android', async () => {
|
||||
describe('for TURTLE_DEPRECATED_JOB_FORMAT', () => {
|
||||
describe('with Android', () => {
|
||||
it('throws correct EasCommandError subclass', async () => {
|
||||
const platform = Platform.ANDROID;
|
||||
const graphQLError = getGraphQLError('Error 1', 'TURTLE_DEPRECATED_JOB_FORMAT');
|
||||
const graphQLErrors = [graphQLError];
|
||||
@@ -125,11 +128,12 @@ describe(Build.name, () => {
|
||||
try {
|
||||
handleBuildRequestError(error, platform);
|
||||
} catch (caughtError) {
|
||||
assertReThrownError(caughtError as Error, TurtleDeprecatedJobFormatError);
|
||||
assertReThrownError(caughtError as Error, TurtleDeprecatedJobFormatError, 'Error 1');
|
||||
}
|
||||
});
|
||||
|
||||
it('does it with iOS', async () => {
|
||||
});
|
||||
describe('with iOS', () => {
|
||||
it('throws correct EasCommandError subclass', async () => {
|
||||
const platform = Platform.IOS;
|
||||
const graphQLError = getGraphQLError('Error 1', 'TURTLE_DEPRECATED_JOB_FORMAT');
|
||||
const graphQLErrors = [graphQLError];
|
||||
@@ -138,13 +142,15 @@ describe(Build.name, () => {
|
||||
try {
|
||||
handleBuildRequestError(error, platform);
|
||||
} catch (caughtError) {
|
||||
assertReThrownError(caughtError as Error, TurtleDeprecatedJobFormatError);
|
||||
assertReThrownError(caughtError as Error, TurtleDeprecatedJobFormatError, 'Error 1');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('for EAS_BUILD_FREE_TIER_DISABLED', () => {
|
||||
it('does it with Android', async () => {
|
||||
describe('for EAS_BUILD_FREE_TIER_DISABLED', () => {
|
||||
describe('with Android', () => {
|
||||
it('throws correct EasCommandError subclass', async () => {
|
||||
const platform = Platform.ANDROID;
|
||||
const graphQLError = getGraphQLError('Error 1', 'EAS_BUILD_FREE_TIER_DISABLED');
|
||||
const graphQLErrors = [graphQLError];
|
||||
@@ -153,11 +159,12 @@ describe(Build.name, () => {
|
||||
try {
|
||||
handleBuildRequestError(error, platform);
|
||||
} catch (caughtError) {
|
||||
assertReThrownError(caughtError as Error, EasBuildFreeTierDisabledError);
|
||||
assertReThrownError(caughtError as Error, EasBuildFreeTierDisabledError, 'Error 1');
|
||||
}
|
||||
});
|
||||
|
||||
it('does it with iOS', async () => {
|
||||
});
|
||||
describe('with iOS', () => {
|
||||
it('throws correct EasCommandError subclass', async () => {
|
||||
const platform = Platform.IOS;
|
||||
const graphQLError = getGraphQLError('Error 1', 'EAS_BUILD_FREE_TIER_DISABLED');
|
||||
const graphQLErrors = [graphQLError];
|
||||
@@ -166,12 +173,13 @@ describe(Build.name, () => {
|
||||
try {
|
||||
handleBuildRequestError(error, platform);
|
||||
} catch (caughtError) {
|
||||
assertReThrownError(caughtError as Error, EasBuildFreeTierDisabledError);
|
||||
assertReThrownError(caughtError as Error, EasBuildFreeTierDisabledError, 'Error 1');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it('does it for EAS_BUILD_FREE_TIER_DISABLED_IOS', async () => {
|
||||
});
|
||||
describe('for EAS_BUILD_FREE_TIER_DISABLED_IOS', () => {
|
||||
it('throws correct EasCommandError subclass', async () => {
|
||||
const platform = Platform.IOS;
|
||||
const graphQLError = getGraphQLError('Error 1', 'EAS_BUILD_FREE_TIER_DISABLED_IOS');
|
||||
const graphQLErrors = [graphQLError];
|
||||
@@ -180,11 +188,12 @@ describe(Build.name, () => {
|
||||
try {
|
||||
handleBuildRequestError(error, platform);
|
||||
} catch (caughtError) {
|
||||
assertReThrownError(caughtError as Error, EasBuildFreeTierDisabledIOSError);
|
||||
assertReThrownError(caughtError as Error, EasBuildFreeTierDisabledIOSError, 'Error 1');
|
||||
}
|
||||
});
|
||||
|
||||
it('does it for EAS_BUILD_FREE_TIER_DISABLED_ANDROID', async () => {
|
||||
});
|
||||
describe('for EAS_BUILD_FREE_TIER_DISABLED_ANDROID', () => {
|
||||
it('throws correct EasCommandError subclass', async () => {
|
||||
const platform = Platform.ANDROID;
|
||||
const graphQLError = getGraphQLError('Error 1', 'EAS_BUILD_FREE_TIER_DISABLED_ANDROID');
|
||||
const graphQLErrors = [graphQLError];
|
||||
@@ -193,12 +202,18 @@ describe(Build.name, () => {
|
||||
try {
|
||||
handleBuildRequestError(error, platform);
|
||||
} catch (caughtError) {
|
||||
assertReThrownError(caughtError as Error, EasBuildFreeTierDisabledAndroidError);
|
||||
assertReThrownError(
|
||||
caughtError as Error,
|
||||
EasBuildFreeTierDisabledAndroidError,
|
||||
'Error 1'
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe('for VALIDATION_ERROR', () => {
|
||||
it('does it with Android', async () => {
|
||||
describe('for VALIDATION_ERROR', () => {
|
||||
describe('with Android', () => {
|
||||
it('throws correct EasCommandError subclass', async () => {
|
||||
const platform = Platform.ANDROID;
|
||||
const graphQLError = getGraphQLError('Error 1', 'VALIDATION_ERROR');
|
||||
const graphQLErrors = [graphQLError];
|
||||
@@ -207,11 +222,12 @@ describe(Build.name, () => {
|
||||
try {
|
||||
handleBuildRequestError(error, platform);
|
||||
} catch (caughtError) {
|
||||
assertReThrownError(caughtError as Error, RequestValidationError);
|
||||
assertReThrownError(caughtError as Error, RequestValidationError, 'Error 1');
|
||||
}
|
||||
});
|
||||
|
||||
it('does it with iOS', async () => {
|
||||
});
|
||||
describe('with iOS', () => {
|
||||
it('throws correct EasCommandError subclass', async () => {
|
||||
const platform = Platform.IOS;
|
||||
const graphQLError = getGraphQLError('Error 1', 'VALIDATION_ERROR');
|
||||
const graphQLErrors = [graphQLError];
|
||||
@@ -220,7 +236,7 @@ describe(Build.name, () => {
|
||||
try {
|
||||
handleBuildRequestError(error, platform);
|
||||
} catch (caughtError) {
|
||||
assertReThrownError(caughtError as Error, RequestValidationError);
|
||||
assertReThrownError(caughtError as Error, RequestValidationError, 'Error 1');
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -228,9 +244,9 @@ describe(Build.name, () => {
|
||||
});
|
||||
|
||||
describe('error is other expected graphQL-related error', () => {
|
||||
describe('throws correct EasCommandError subclass', () => {
|
||||
describe('for EAS_BUILD_DOWN_FOR_MAINTENANCE', () => {
|
||||
it('does it with Android', async () => {
|
||||
describe('for EAS_BUILD_DOWN_FOR_MAINTENANCE', () => {
|
||||
describe('with Android', () => {
|
||||
it('throws correct EasCommandError subclass', async () => {
|
||||
const platform = Platform.ANDROID;
|
||||
const graphQLError = getGraphQLError('Error 1', 'EAS_BUILD_DOWN_FOR_MAINTENANCE');
|
||||
const graphQLErrors = [graphQLError];
|
||||
@@ -246,8 +262,9 @@ describe(Build.name, () => {
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
it('does it with iOS', async () => {
|
||||
});
|
||||
describe('with iOS', () => {
|
||||
it('throws correct EasCommandError subclass', async () => {
|
||||
const platform = Platform.IOS;
|
||||
const graphQLError = getGraphQLError('Error 1', 'EAS_BUILD_DOWN_FOR_MAINTENANCE');
|
||||
const graphQLErrors = [graphQLError];
|
||||
@@ -264,9 +281,11 @@ describe(Build.name, () => {
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('for EAS_BUILD_TOO_MANY_PENDING_BUILDS', () => {
|
||||
it('does it with Android', async () => {
|
||||
describe('for EAS_BUILD_TOO_MANY_PENDING_BUILDS', () => {
|
||||
describe('with Android', () => {
|
||||
it('throws correct EasCommandError subclass', async () => {
|
||||
const platform = Platform.ANDROID;
|
||||
const graphQLError = getGraphQLError('Error 1', 'EAS_BUILD_TOO_MANY_PENDING_BUILDS');
|
||||
const graphQLErrors = [graphQLError];
|
||||
@@ -282,8 +301,9 @@ describe(Build.name, () => {
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
it('does it with iOS', async () => {
|
||||
});
|
||||
describe('with iOS', () => {
|
||||
it('throws correct EasCommandError subclass', async () => {
|
||||
const platform = Platform.IOS;
|
||||
const graphQLError = getGraphQLError('Error 1', 'EAS_BUILD_TOO_MANY_PENDING_BUILDS');
|
||||
const graphQLErrors = [graphQLError];
|
||||
@@ -304,38 +324,71 @@ describe(Build.name, () => {
|
||||
});
|
||||
|
||||
describe('error is unexpected graphQL-related error', () => {
|
||||
describe('throws base Error class with custom message', () => {
|
||||
it('does it with Android', async () => {
|
||||
describe('with Android', () => {
|
||||
it('throws base Error class with custom message', async () => {
|
||||
const platform = Platform.ANDROID;
|
||||
const graphQLError = getGraphQLError('Error 1', 'UNKNOWN_GRAPHQL_ERROR');
|
||||
const graphQLErrors = [graphQLError];
|
||||
const error = new CombinedError({ graphQLErrors });
|
||||
const expectedMessage = EXPECTED_GENERIC_MESSAGE + `\nRequest ID: ${mockRequestId}`;
|
||||
|
||||
try {
|
||||
handleBuildRequestError(error, platform);
|
||||
} catch (caughtError) {
|
||||
assertReThrownError(caughtError as Error, Error, EXPECTED_GENERIC_MESSAGE);
|
||||
assertReThrownError(caughtError as Error, Error, expectedMessage);
|
||||
}
|
||||
});
|
||||
describe('without request ID', () => {
|
||||
it('throws base Error class with custom message without request ID line', async () => {
|
||||
const platform = Platform.ANDROID;
|
||||
const graphQLError = getGraphQLError('Error 1', 'UNKNOWN_GRAPHQL_ERROR');
|
||||
delete graphQLError.extensions.requestId;
|
||||
const graphQLErrors = [graphQLError];
|
||||
const error = new CombinedError({ graphQLErrors });
|
||||
|
||||
it('does it with iOS', async () => {
|
||||
try {
|
||||
handleBuildRequestError(error, platform);
|
||||
} catch (caughtError) {
|
||||
assertReThrownError(caughtError as Error, Error, EXPECTED_GENERIC_MESSAGE);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('with iOS', () => {
|
||||
it('throws base Error class with custom message', async () => {
|
||||
const platform = Platform.IOS;
|
||||
const graphQLError = getGraphQLError('Error 1', 'UNKNOWN_GRAPHQL_ERROR');
|
||||
const graphQLErrors = [graphQLError];
|
||||
const error = new CombinedError({ graphQLErrors });
|
||||
const expectedMessage = EXPECTED_GENERIC_MESSAGE + `\nRequest ID: ${mockRequestId}`;
|
||||
|
||||
try {
|
||||
handleBuildRequestError(error, platform);
|
||||
} catch (caughtError) {
|
||||
assertReThrownError(caughtError as Error, Error, EXPECTED_GENERIC_MESSAGE);
|
||||
assertReThrownError(caughtError as Error, Error, expectedMessage);
|
||||
}
|
||||
});
|
||||
describe('without request ID', () => {
|
||||
it('throws base Error class with custom message without request ID line', async () => {
|
||||
const platform = Platform.IOS;
|
||||
const graphQLError = getGraphQLError('Error 1', 'UNKNOWN_GRAPHQL_ERROR');
|
||||
delete graphQLError.extensions.requestId;
|
||||
const graphQLErrors = [graphQLError];
|
||||
const error = new CombinedError({ graphQLErrors });
|
||||
|
||||
try {
|
||||
handleBuildRequestError(error, platform);
|
||||
} catch (caughtError) {
|
||||
assertReThrownError(caughtError as Error, Error, EXPECTED_GENERIC_MESSAGE);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('error is unexpected non-graphQL-related error', () => {
|
||||
describe('throws base Error class with propagated message', () => {
|
||||
it('does it with Android', async () => {
|
||||
describe('with Android', () => {
|
||||
it('throws base Error class with propagated message', async () => {
|
||||
const platform = Platform.ANDROID;
|
||||
const error = new Error('Non-graphQL-related error');
|
||||
|
||||
@@ -345,8 +398,9 @@ describe(Build.name, () => {
|
||||
expect(caughtError).toStrictEqual(error);
|
||||
}
|
||||
});
|
||||
|
||||
it('does it with iOS', async () => {
|
||||
});
|
||||
describe('with iOS', () => {
|
||||
it('throws base Error class with propagated message', async () => {
|
||||
const platform = Platform.IOS;
|
||||
const error = new Error('Non-graphQL-related error');
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ interface JobData {
|
||||
|
||||
const cacheDefaults = {
|
||||
disabled: false,
|
||||
customPaths: [],
|
||||
paths: [],
|
||||
};
|
||||
|
||||
export async function prepareJobAsync(
|
||||
|
||||
@@ -80,9 +80,14 @@ interface Builder<TPlatform extends Platform, Credentials, TJob extends Job> {
|
||||
|
||||
export type BuildRequestSender = () => Promise<BuildFragment | undefined>;
|
||||
|
||||
function resolveBuildParamsInput<T extends Platform>(ctx: BuildContext<T>): BuildParamsInput {
|
||||
function resolveBuildParamsInput<T extends Platform>(
|
||||
ctx: BuildContext<T>,
|
||||
metadata: Metadata
|
||||
): BuildParamsInput {
|
||||
return {
|
||||
resourceClass: ctx.resourceClass,
|
||||
sdkVersion: metadata.sdkVersion,
|
||||
reactNativeVersion: metadata.reactNativeVersion,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -142,7 +147,7 @@ export async function prepareBuildRequestForPlatformAsync<
|
||||
assert(projectArchive);
|
||||
|
||||
const metadata = await collectMetadataAsync(ctx);
|
||||
const buildParams = resolveBuildParamsInput(ctx);
|
||||
const buildParams = resolveBuildParamsInput(ctx, metadata);
|
||||
const job = await builder.prepareJobAsync(ctx, {
|
||||
projectArchive,
|
||||
credentials: credentialsResult?.credentials,
|
||||
@@ -197,8 +202,12 @@ export function handleBuildRequestError(error: any, platform: Platform): never {
|
||||
`You have already reached the maximum number of pending ${requestedPlatformDisplayNames[platform]} builds for your account. Try again later.`
|
||||
);
|
||||
} else if (error?.graphQLErrors) {
|
||||
const requestIdLine = error?.graphQLErrors?.[0]?.extensions?.requestId
|
||||
? `\nRequest ID: ${error.graphQLErrors[0].extensions.requestId}`
|
||||
: '';
|
||||
throw new Error(
|
||||
'Build request failed. Make sure you are using the latest eas-cli version. If the problem persists, report the issue.'
|
||||
'Build request failed. Make sure you are using the latest eas-cli version. If the problem persists, report the issue.' +
|
||||
requestIdLine
|
||||
);
|
||||
}
|
||||
throw error;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Platform, Workflow } from '@expo/eas-build-job';
|
||||
import { EasJson, EasJsonAccessor, ResourceClass } from '@expo/eas-json';
|
||||
import { EasJson, EasJsonAccessor } from '@expo/eas-json';
|
||||
import chalk from 'chalk';
|
||||
import fs from 'fs-extra';
|
||||
|
||||
@@ -53,21 +53,11 @@ const EAS_JSON_MANAGED_DEFAULT: EasJson = {
|
||||
development: {
|
||||
developmentClient: true,
|
||||
distribution: 'internal',
|
||||
ios: {
|
||||
resourceClass: ResourceClass.M_MEDIUM,
|
||||
},
|
||||
},
|
||||
preview: {
|
||||
distribution: 'internal',
|
||||
ios: {
|
||||
resourceClass: ResourceClass.M_MEDIUM,
|
||||
},
|
||||
},
|
||||
production: {
|
||||
ios: {
|
||||
resourceClass: ResourceClass.M_MEDIUM,
|
||||
},
|
||||
},
|
||||
production: {},
|
||||
},
|
||||
submit: {
|
||||
production: {},
|
||||
@@ -86,20 +76,12 @@ const EAS_JSON_BARE_DEFAULT: EasJson = {
|
||||
},
|
||||
ios: {
|
||||
buildConfiguration: 'Debug',
|
||||
resourceClass: ResourceClass.M_MEDIUM,
|
||||
},
|
||||
},
|
||||
preview: {
|
||||
distribution: 'internal',
|
||||
ios: {
|
||||
resourceClass: ResourceClass.M_MEDIUM,
|
||||
},
|
||||
},
|
||||
production: {
|
||||
ios: {
|
||||
resourceClass: ResourceClass.M_MEDIUM,
|
||||
},
|
||||
},
|
||||
production: {},
|
||||
},
|
||||
submit: {
|
||||
production: {},
|
||||
|
||||
@@ -90,8 +90,6 @@ export async function createBuildContextAsync<T extends Platform>({
|
||||
const resourceClass = await resolveBuildResourceClassAsync(
|
||||
buildProfile,
|
||||
platform,
|
||||
projectDir,
|
||||
exp,
|
||||
resourceClassFlag
|
||||
);
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ interface JobData {
|
||||
|
||||
const cacheDefaults = {
|
||||
disabled: false,
|
||||
customPaths: [],
|
||||
paths: [],
|
||||
};
|
||||
|
||||
export async function prepareJobAsync(
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
import { ExpoConfig } from '@expo/config-types';
|
||||
import { Platform } from '@expo/eas-build-job';
|
||||
import { BuildProfile, ResourceClass } from '@expo/eas-json';
|
||||
import chalk from 'chalk';
|
||||
import semver from 'semver';
|
||||
|
||||
import { BuildResourceClass } from '../../graphql/generated';
|
||||
import Log, { link } from '../../log';
|
||||
import { getReactNativeVersionAsync } from '../metadata';
|
||||
|
||||
type AndroidResourceClass = Exclude<
|
||||
ResourceClass,
|
||||
@@ -42,8 +39,6 @@ const androidResourceClassToBuildResourceClassMapping: Record<
|
||||
export async function resolveBuildResourceClassAsync<T extends Platform>(
|
||||
profile: BuildProfile<T>,
|
||||
platform: Platform,
|
||||
projectDir: string,
|
||||
exp: ExpoConfig,
|
||||
resourceClassFlag?: ResourceClass
|
||||
): Promise<BuildResourceClass> {
|
||||
const profileResourceClass = profile.resourceClass;
|
||||
@@ -57,7 +52,7 @@ export async function resolveBuildResourceClassAsync<T extends Platform>(
|
||||
const selectedResourceClass = resourceClassFlag ?? profileResourceClass;
|
||||
|
||||
return platform === Platform.IOS
|
||||
? await resolveIosResourceClassAsync(exp, projectDir, resourceClassFlag, profileResourceClass)
|
||||
? resolveIosResourceClass(resourceClassFlag, profileResourceClass)
|
||||
: resolveAndroidResourceClass(selectedResourceClass);
|
||||
}
|
||||
|
||||
@@ -79,16 +74,11 @@ function resolveAndroidResourceClass(selectedResourceClass?: ResourceClass): Bui
|
||||
return androidResourceClassToBuildResourceClassMapping[resourceClass as AndroidResourceClass];
|
||||
}
|
||||
|
||||
async function resolveIosResourceClassAsync(
|
||||
exp: ExpoConfig,
|
||||
projectDir: string,
|
||||
function resolveIosResourceClass(
|
||||
resourceClassFlag?: ResourceClass,
|
||||
profileResourceClass?: ResourceClass
|
||||
): Promise<BuildResourceClass> {
|
||||
const resourceClass =
|
||||
resourceClassFlag ??
|
||||
profileResourceClass ??
|
||||
(await resolveIosDefaultRequestedResourceClassAsync(exp, projectDir));
|
||||
): BuildResourceClass {
|
||||
const resourceClass = resourceClassFlag ?? profileResourceClass ?? ResourceClass.DEFAULT;
|
||||
|
||||
if (resourceClassFlag === ResourceClass.LARGE) {
|
||||
throw new Error(
|
||||
@@ -106,29 +96,13 @@ async function resolveIosResourceClassAsync(
|
||||
);
|
||||
}
|
||||
|
||||
if (resourceClass === ResourceClass.M1_LARGE) {
|
||||
if ([ResourceClass.M_LARGE, ResourceClass.M1_LARGE].includes(resourceClass)) {
|
||||
Log.warn(
|
||||
`Resource class ${chalk.bold('m1-large')} is deprecated. Use ${chalk.bold(
|
||||
'm-large'
|
||||
`Resource class ${chalk.bold(resourceClass)} is deprecated. Use ${chalk.bold(
|
||||
'large'
|
||||
)} instead.`
|
||||
);
|
||||
}
|
||||
|
||||
return iosResourceClassToBuildResourceClassMapping[resourceClass];
|
||||
}
|
||||
|
||||
async function resolveIosDefaultRequestedResourceClassAsync(
|
||||
exp: ExpoConfig,
|
||||
projectDir: string
|
||||
): Promise<ResourceClass> {
|
||||
const { sdkVersion } = exp;
|
||||
const reactNativeVersion = await getReactNativeVersionAsync(projectDir);
|
||||
if (
|
||||
(sdkVersion && semver.satisfies(sdkVersion, '>=48')) ||
|
||||
(reactNativeVersion && semver.satisfies(reactNativeVersion, '>=0.71.0'))
|
||||
) {
|
||||
return ResourceClass.M_MEDIUM;
|
||||
} else {
|
||||
return ResourceClass.DEFAULT;
|
||||
}
|
||||
}
|
||||
@@ -188,7 +188,10 @@ export default abstract class EasCommand extends Command {
|
||||
if (err instanceof EasCommandError) {
|
||||
Log.error(err.message);
|
||||
} else if (err instanceof CombinedError && err?.graphQLErrors) {
|
||||
const cleanMessage = err.message.replace('[GraphQL] ', '');
|
||||
let cleanMessage = err.message.replace('[GraphQL] ', '');
|
||||
cleanMessage += err?.graphQLErrors?.[0]?.extensions?.requestId
|
||||
? `\nRequest ID: ${err.graphQLErrors[0].extensions.requestId}`
|
||||
: '';
|
||||
Log.error(cleanMessage);
|
||||
baseMessage = BASE_GRAPHQL_ERROR_MESSAGE;
|
||||
} else {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { CombinedError } from '@urql/core';
|
||||
import { GraphQLError } from 'graphql/error';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
import { AnalyticsWithOrchestration, createAnalyticsAsync } from '../../analytics/AnalyticsManager';
|
||||
import Log from '../../log';
|
||||
@@ -17,6 +19,7 @@ jest.mock('../../analytics/AnalyticsManager', () => {
|
||||
jest.mock('../../log');
|
||||
|
||||
let originalProcessArgv: string[];
|
||||
const mockRequestId = uuidv4();
|
||||
|
||||
beforeAll(() => {
|
||||
originalProcessArgv = process.argv;
|
||||
@@ -137,6 +140,38 @@ describe(EasCommand.name, () => {
|
||||
expect(logDebugSpy).toBeCalledWith(error);
|
||||
});
|
||||
|
||||
it('logs the cleaned message with request ID if present', async () => {
|
||||
const TestEasCommand = createTestEasCommand();
|
||||
const logErrorSpy = jest.spyOn(Log, 'error');
|
||||
const logDebugSpy = jest.spyOn(Log, 'debug');
|
||||
const runAsyncMock = jest.spyOn(TestEasCommand.prototype as any, 'runAsync');
|
||||
const graphQLError = new GraphQLError(
|
||||
'Unexpected GraphQL error message',
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
{
|
||||
errorCode: 'UNKNOWN_GRAPHQL_ERROR',
|
||||
requestId: mockRequestId,
|
||||
}
|
||||
);
|
||||
const graphQLErrors = [graphQLError];
|
||||
const error = new CombinedError({ graphQLErrors });
|
||||
runAsyncMock.mockImplementation(() => {
|
||||
throw error;
|
||||
});
|
||||
try {
|
||||
await TestEasCommand.run();
|
||||
} catch {}
|
||||
|
||||
expect(logErrorSpy).toBeCalledWith(
|
||||
`Unexpected GraphQL error message\nRequest ID: ${mockRequestId}`
|
||||
);
|
||||
expect(logDebugSpy).toBeCalledWith(error);
|
||||
});
|
||||
|
||||
it('re-throws the error with default base message', async () => {
|
||||
const TestEasCommand = createTestEasCommand();
|
||||
const runAsyncMock = jest.spyOn(TestEasCommand.prototype as any, 'runAsync');
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import chalk from 'chalk';
|
||||
import nullthrows from 'nullthrows';
|
||||
|
||||
import EasCommand from '../../commandUtils/EasCommand';
|
||||
import { Role } from '../../graphql/generated';
|
||||
import Log from '../../log';
|
||||
import { getActorDisplayName } from '../../user/User';
|
||||
import { Actor, getActorDisplayName } from '../../user/User';
|
||||
|
||||
export default class AccountView extends EasCommand {
|
||||
static override description = 'show the username you are logged in as';
|
||||
@@ -18,9 +20,48 @@ export default class AccountView extends EasCommand {
|
||||
} = await this.getContextAsync(AccountView, { nonInteractive: true });
|
||||
if (actor) {
|
||||
Log.log(chalk.green(getActorDisplayName(actor)));
|
||||
|
||||
// personal account is included, only show if more accounts that personal account
|
||||
// but do show personal account in list if there are more
|
||||
const accountExcludingPersonalAccount = actor.accounts.filter(
|
||||
account => !('username' in actor) || account.name !== actor.username
|
||||
);
|
||||
if (accountExcludingPersonalAccount.length > 0) {
|
||||
Log.newLine();
|
||||
Log.log('Accounts:');
|
||||
actor.accounts.forEach(account => {
|
||||
const roleOnAccount = AccountView.getRoleOnAccount(actor, account);
|
||||
Log.log(`• ${account.name} (Role: ${AccountView.getLabelForRole(roleOnAccount)})`);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Log.warn('Not logged in');
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
private static getRoleOnAccount(actor: Actor, account: Actor['accounts'][0]): Role {
|
||||
if ('username' in actor && account.name === actor.username) {
|
||||
return Role.Owner;
|
||||
}
|
||||
|
||||
return nullthrows(account.users.find(user => user.actor.id === actor.id)?.role);
|
||||
}
|
||||
|
||||
private static getLabelForRole(role: Role): string {
|
||||
switch (role) {
|
||||
case Role.Owner:
|
||||
return 'Owner';
|
||||
case Role.Admin:
|
||||
return 'Admin';
|
||||
case Role.Developer:
|
||||
return 'Developer';
|
||||
case Role.ViewOnly:
|
||||
return 'Viewer';
|
||||
case Role.Custom:
|
||||
case Role.HasAdmin:
|
||||
case Role.NotAdmin:
|
||||
return 'Custom';
|
||||
}
|
||||
}
|
||||
}
|
||||
+16
-1
@@ -87,6 +87,7 @@ export type Account = {
|
||||
appleTeams: Array<AppleTeam>;
|
||||
/** Apps associated with this account */
|
||||
apps: Array<App>;
|
||||
/** Paginated list of apps associated with this account. By default sorted by name. Use filter to adjust the sorting order. */
|
||||
appsPaginated: AccountAppsConnection;
|
||||
/** @deprecated Build packs are no longer supported */
|
||||
availableBuilds?: Maybe<Scalars['Int']>;
|
||||
@@ -219,6 +220,7 @@ export type AccountAppsArgs = {
|
||||
export type AccountAppsPaginatedArgs = {
|
||||
after?: InputMaybe<Scalars['String']>;
|
||||
before?: InputMaybe<Scalars['String']>;
|
||||
filter?: InputMaybe<AccountAppsFilterInput>;
|
||||
first?: InputMaybe<Scalars['Int']>;
|
||||
last?: InputMaybe<Scalars['Int']>;
|
||||
};
|
||||
@@ -309,6 +311,19 @@ export type AccountAppsEdge = {
|
||||
node: App;
|
||||
};
|
||||
|
||||
export type AccountAppsFilterInput = {
|
||||
sortByField: AccountAppsSortByField;
|
||||
};
|
||||
|
||||
export enum AccountAppsSortByField {
|
||||
LatestActivityTime = 'LATEST_ACTIVITY_TIME',
|
||||
/**
|
||||
* Name prefers the display name but falls back to full_name with @account/
|
||||
* part stripped.
|
||||
*/
|
||||
Name = 'NAME'
|
||||
}
|
||||
|
||||
export type AccountDataInput = {
|
||||
name: Scalars['String'];
|
||||
};
|
||||
@@ -2036,9 +2051,9 @@ export type BuildArtifacts = {
|
||||
|
||||
export type BuildCacheInput = {
|
||||
clear?: InputMaybe<Scalars['Boolean']>;
|
||||
customPaths?: InputMaybe<Array<InputMaybe<Scalars['String']>>>;
|
||||
disabled?: InputMaybe<Scalars['Boolean']>;
|
||||
key?: InputMaybe<Scalars['String']>;
|
||||
paths?: InputMaybe<Array<Scalars['String']>>;
|
||||
};
|
||||
|
||||
export enum BuildCredentialsSource {
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`maybePrintBuildProfileDeprecationWarningsAsync multiple deprecation warnings prints the warnings 1`] = `
|
||||
[
|
||||
[
|
||||
"Detected deprecated fields in eas.json:",
|
||||
],
|
||||
[
|
||||
" The "build.production.cache.customPaths" field in eas.json is deprecated and will be removed in the future. Please use "build.production.cache.paths" instead.",
|
||||
],
|
||||
[
|
||||
" [2mLearn more: [4mhttps://docs.expo.dev/build-reference/eas-json/#cache[24m[22m",
|
||||
],
|
||||
[
|
||||
" The "build.production.cache.cacheDefaultPaths" field in eas.json is deprecated and will be removed in the future.",
|
||||
],
|
||||
[
|
||||
" [2mLearn more: [4mhttps://docs.expo.dev/build-reference/caching/#ios-dependencies[24m[22m",
|
||||
],
|
||||
[
|
||||
" Other message",
|
||||
],
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`maybePrintBuildProfileDeprecationWarningsAsync one deprecation warning prints the warning 1`] = `
|
||||
[
|
||||
[
|
||||
"Detected deprecated fields in eas.json:",
|
||||
],
|
||||
[
|
||||
" The "build.production.cache.customPaths" field in eas.json is deprecated and will be removed in the future. Please use "build.production.cache.paths" instead.",
|
||||
],
|
||||
[
|
||||
" [2mLearn more: [4mhttps://docs.expo.dev/build-reference/eas-json/#cache[24m[22m",
|
||||
],
|
||||
]
|
||||
`;
|
||||
@@ -1,8 +1,13 @@
|
||||
import { Platform } from '@expo/eas-build-job';
|
||||
import { EasJsonAccessor, EasJsonUtils, errors } from '@expo/eas-json';
|
||||
import { BuildProfile, EasJsonAccessor, EasJsonUtils, errors } from '@expo/eas-json';
|
||||
|
||||
import Log from '../../log';
|
||||
import { selectAsync } from '../../prompts';
|
||||
import { getProfilesAsync } from '../profiles';
|
||||
import {
|
||||
clearHasPrintedDeprecationWarnings,
|
||||
getProfilesAsync,
|
||||
maybePrintBuildProfileDeprecationWarningsAsync,
|
||||
} from '../profiles';
|
||||
|
||||
jest.mock('../../prompts');
|
||||
jest.mock('@expo/eas-json', () => {
|
||||
@@ -11,7 +16,7 @@ jest.mock('@expo/eas-json', () => {
|
||||
const EasJsonUtilsMock = {
|
||||
getBuildProfileAsync: jest.fn(),
|
||||
getBuildProfileNamesAsync: jest.fn(),
|
||||
getBuildProfileDeprecationWarnings: jest.fn(() => []),
|
||||
getBuildProfileDeprecationWarningsAsync: jest.fn(() => []),
|
||||
};
|
||||
return {
|
||||
...actual,
|
||||
@@ -21,6 +26,12 @@ jest.mock('@expo/eas-json', () => {
|
||||
|
||||
const getBuildProfileAsync = jest.spyOn(EasJsonUtils, 'getBuildProfileAsync');
|
||||
const getBuildProfileNamesAsync = jest.spyOn(EasJsonUtils, 'getBuildProfileNamesAsync');
|
||||
const getBuildProfileDeprecationWarningsAsync = jest.spyOn(
|
||||
EasJsonUtils,
|
||||
'getBuildProfileDeprecationWarningsAsync'
|
||||
);
|
||||
const newLineSpy = jest.spyOn(Log, 'newLine');
|
||||
const warnSpy = jest.spyOn(Log, 'warn');
|
||||
|
||||
describe(getProfilesAsync, () => {
|
||||
afterEach(() => {
|
||||
@@ -31,6 +42,10 @@ describe(getProfilesAsync, () => {
|
||||
|
||||
it('defaults to production profile', async () => {
|
||||
const easJsonAccessor = EasJsonAccessor.fromProjectPath('/fake');
|
||||
const readRawEasJsonMock = jest.spyOn(easJsonAccessor, 'readRawJsonAsync');
|
||||
readRawEasJsonMock.mockImplementation(async () => {
|
||||
return {};
|
||||
});
|
||||
const result = await getProfilesAsync({
|
||||
easJsonAccessor,
|
||||
platforms: [Platform.ANDROID, Platform.IOS],
|
||||
@@ -62,6 +77,10 @@ describe(getProfilesAsync, () => {
|
||||
|
||||
it('gets a specific profile', async () => {
|
||||
const easJsonAccessor = EasJsonAccessor.fromProjectPath('/fake');
|
||||
const readRawEasJsonMock = jest.spyOn(easJsonAccessor, 'readRawJsonAsync');
|
||||
readRawEasJsonMock.mockImplementation(async () => {
|
||||
return {};
|
||||
});
|
||||
const result = await getProfilesAsync({
|
||||
easJsonAccessor,
|
||||
platforms: [Platform.ANDROID, Platform.IOS],
|
||||
@@ -94,3 +113,82 @@ describe(getProfilesAsync, () => {
|
||||
).rejects.toThrowError(/eas.json is not valid/);
|
||||
});
|
||||
});
|
||||
describe(maybePrintBuildProfileDeprecationWarningsAsync, () => {
|
||||
afterEach(() => {
|
||||
clearHasPrintedDeprecationWarnings();
|
||||
newLineSpy.mockClear();
|
||||
warnSpy.mockClear();
|
||||
});
|
||||
const easJsonAccessor = EasJsonAccessor.fromProjectPath('/fake');
|
||||
const readRawEasJsonMock = jest.spyOn(easJsonAccessor, 'readRawJsonAsync');
|
||||
readRawEasJsonMock.mockImplementation(async () => {
|
||||
return {};
|
||||
});
|
||||
getBuildProfileAsync.mockImplementation(async () => {
|
||||
return {} as BuildProfile<Platform.ANDROID>;
|
||||
});
|
||||
|
||||
describe('no deprecation warnings', () => {
|
||||
it('does not print any warnings', async () => {
|
||||
getBuildProfileDeprecationWarningsAsync.mockImplementation(async () => []);
|
||||
await maybePrintBuildProfileDeprecationWarningsAsync(
|
||||
easJsonAccessor,
|
||||
Platform.ANDROID,
|
||||
'production'
|
||||
);
|
||||
expect(newLineSpy).not.toHaveBeenCalled();
|
||||
expect(warnSpy).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
describe('one deprecation warning', () => {
|
||||
it('prints the warning', async () => {
|
||||
getBuildProfileDeprecationWarningsAsync.mockImplementation(async () => [
|
||||
{
|
||||
message: [
|
||||
'The "build.production.cache.customPaths" field in eas.json is deprecated and will be removed in the future. Please use "build.production.cache.paths" instead.',
|
||||
],
|
||||
docsUrl: 'https://docs.expo.dev/build-reference/eas-json/#cache',
|
||||
},
|
||||
]);
|
||||
await maybePrintBuildProfileDeprecationWarningsAsync(
|
||||
easJsonAccessor,
|
||||
Platform.ANDROID,
|
||||
'production'
|
||||
);
|
||||
expect(newLineSpy).toHaveBeenCalledTimes(2);
|
||||
expect(warnSpy).toHaveBeenCalledTimes(3);
|
||||
const warnCalls = warnSpy.mock.calls;
|
||||
expect(warnCalls).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
describe('multiple deprecation warnings', () => {
|
||||
it('prints the warnings', async () => {
|
||||
getBuildProfileDeprecationWarningsAsync.mockImplementation(async () => [
|
||||
{
|
||||
message: [
|
||||
'The "build.production.cache.customPaths" field in eas.json is deprecated and will be removed in the future. Please use "build.production.cache.paths" instead.',
|
||||
],
|
||||
docsUrl: 'https://docs.expo.dev/build-reference/eas-json/#cache',
|
||||
},
|
||||
{
|
||||
message: [
|
||||
'The "build.production.cache.cacheDefaultPaths" field in eas.json is deprecated and will be removed in the future.',
|
||||
],
|
||||
docsUrl: 'https://docs.expo.dev/build-reference/caching/#ios-dependencies',
|
||||
},
|
||||
{
|
||||
message: ['Other message'],
|
||||
},
|
||||
]);
|
||||
await maybePrintBuildProfileDeprecationWarningsAsync(
|
||||
easJsonAccessor,
|
||||
Platform.ANDROID,
|
||||
'production'
|
||||
);
|
||||
expect(newLineSpy).toHaveBeenCalledTimes(4);
|
||||
expect(warnSpy).toHaveBeenCalledTimes(6);
|
||||
const warnCalls = warnSpy.mock.calls;
|
||||
expect(warnCalls).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -10,6 +10,7 @@ import { v4 as uuidv4 } from 'uuid';
|
||||
import fetch, { RequestInit, Response } from '../fetch';
|
||||
import { AppPlatform } from '../graphql/generated';
|
||||
import Log from '../log';
|
||||
import { promptAsync } from '../prompts';
|
||||
import { formatBytes } from './files';
|
||||
import { getTmpDirectory } from './paths';
|
||||
import { ProgressHandler, createProgressTracker } from './progress';
|
||||
@@ -162,16 +163,35 @@ export async function extractAppFromLocalArchiveAsync(
|
||||
}
|
||||
|
||||
async function getAppPathAsync(outputDir: string, applicationExtension: string): Promise<string> {
|
||||
const appFileName = await glob(`*.${applicationExtension}`, {
|
||||
const appFilePaths = await glob(`./**/*.${applicationExtension}`, {
|
||||
cwd: outputDir,
|
||||
onlyFiles: false,
|
||||
});
|
||||
|
||||
if (appFileName.length === 0) {
|
||||
throw Error('Something went wrong while extracting the app from app archive');
|
||||
if (appFilePaths.length === 0) {
|
||||
throw Error('Did not find any installable apps inside tarball.');
|
||||
}
|
||||
|
||||
return path.join(outputDir, appFileName[0]);
|
||||
if (appFilePaths.length === 1) {
|
||||
return path.join(outputDir, appFilePaths[0]);
|
||||
}
|
||||
|
||||
Log.newLine();
|
||||
Log.log('Detected multiple apps in the tarball:');
|
||||
Log.newLine();
|
||||
const { selectedFile } = await promptAsync({
|
||||
type: 'select',
|
||||
message: 'Select the app to run:',
|
||||
name: 'selectedFile',
|
||||
choices: [
|
||||
...appFilePaths.map(filePath => ({
|
||||
title: filePath,
|
||||
value: filePath,
|
||||
})),
|
||||
],
|
||||
});
|
||||
|
||||
return path.join(outputDir, selectedFile);
|
||||
}
|
||||
|
||||
async function tarExtractAsync(input: string, output: string): Promise<void> {
|
||||
|
||||
@@ -65,7 +65,7 @@ async function readProfileAsync<T extends ProfileType>({
|
||||
profileName
|
||||
);
|
||||
|
||||
maybePrintBuildProfileDeprecationWarnings(buildProfile, profileName);
|
||||
await maybePrintBuildProfileDeprecationWarningsAsync(easJsonAccessor, platform, profileName);
|
||||
|
||||
return buildProfile as EasProfile<T>;
|
||||
} else {
|
||||
@@ -79,16 +79,25 @@ async function readProfileAsync<T extends ProfileType>({
|
||||
|
||||
let hasPrintedDeprecationWarnings = false;
|
||||
|
||||
function maybePrintBuildProfileDeprecationWarnings(
|
||||
buildProfile: BuildProfile<Platform>,
|
||||
/**
|
||||
* Only for testing purposes
|
||||
*/
|
||||
export function clearHasPrintedDeprecationWarnings(): void {
|
||||
hasPrintedDeprecationWarnings = false;
|
||||
}
|
||||
|
||||
export async function maybePrintBuildProfileDeprecationWarningsAsync(
|
||||
easJsonAccessor: EasJsonAccessor,
|
||||
platform: Platform,
|
||||
profileName?: string
|
||||
): void {
|
||||
): Promise<void> {
|
||||
if (hasPrintedDeprecationWarnings) {
|
||||
return;
|
||||
}
|
||||
const deprecationWarnings = EasJsonUtils.getBuildProfileDeprecationWarnings(
|
||||
buildProfile,
|
||||
profileName
|
||||
const deprecationWarnings = await EasJsonUtils.getBuildProfileDeprecationWarningsAsync(
|
||||
easJsonAccessor,
|
||||
platform,
|
||||
profileName ?? 'production'
|
||||
);
|
||||
if (deprecationWarnings.length === 0) {
|
||||
return;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@expo/eas-json",
|
||||
"description": "A library for interacting with eas.json",
|
||||
"version": "3.9.2",
|
||||
"version": "3.11.0",
|
||||
"author": "Expo <[email protected]>",
|
||||
"bugs": "https://github.com/expo/eas-cli/issues",
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "7.18.6",
|
||||
"@expo/eas-build-job": "1.0.7",
|
||||
"@expo/eas-build-job": "1.0.10",
|
||||
"chalk": "4.1.2",
|
||||
"env-string": "1.0.1",
|
||||
"fs-extra": "10.1.0",
|
||||
|
||||
@@ -67,6 +67,16 @@
|
||||
"description": "Cache key. You can invalidate the cache by changing this value."
|
||||
},
|
||||
"customPaths": {
|
||||
"type": "array",
|
||||
"description": "[DEPRECATED] Use `paths` instead. List of the paths that will be saved after a successful build and restored at the beginning of the next one.",
|
||||
"markdownDescription": "[DEPRECATED] Use `paths` instead. List of the paths that will be saved after a successful build and restored at the beginning of the next one. Both absolute and relative paths are supported, where relative paths are resolved from the directory with `eas.json`.",
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"deprecated": true
|
||||
},
|
||||
"paths": {
|
||||
"type": "array",
|
||||
"description": "List of the paths that will be saved after a successful build and restored at the beginning of the next one.",
|
||||
"markdownDescription": "List of the paths that will be saved after a successful build and restored at the beginning of the next one. Both absolute and relative paths are supported, where relative paths are resolved from the directory with `eas.json`.",
|
||||
@@ -177,7 +187,7 @@
|
||||
"default": "default",
|
||||
"anyOf": [
|
||||
{
|
||||
"enum": ["default", "medium"]
|
||||
"enum": ["default", "medium", "large"]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
@@ -324,6 +334,7 @@
|
||||
"enum": [
|
||||
"default",
|
||||
"latest",
|
||||
"macos-ventura-13.3-xcode-14.3",
|
||||
"macos-monterey-12.6-xcode-14.2",
|
||||
"macos-monterey-12.6-xcode-14.1",
|
||||
"macos-monterey-12.6-xcode-14.0",
|
||||
@@ -334,8 +345,9 @@
|
||||
"macos-big-sur-11.4-xcode-12.5"
|
||||
],
|
||||
"markdownEnumDescriptions": [
|
||||
"`macos-monterey-12.6-xcode-14.1`",
|
||||
"`macos-monterey-12.6-xcode-14.2`"
|
||||
"`macos-monterey-12.6-xcode-14.2` for Apple silicon builders, `macos-monterey-12.6-xcode-14.1` for Intel builders",
|
||||
"`macos-ventura-13.3-xcode-14.3` for Apple silicon builders, `macos-monterey-12.6-xcode-14.2` for Intel builders",
|
||||
"only available for Apple silicon builders"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -349,7 +361,7 @@
|
||||
"default": "default",
|
||||
"anyOf": [
|
||||
{
|
||||
"enum": ["default", "medium", "intel-medium", "m-medium"]
|
||||
"enum": ["default", "medium", "large", "intel-medium", "m-medium"]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Platform } from '@expo/eas-build-job';
|
||||
import chalk from 'chalk';
|
||||
import fs from 'fs-extra';
|
||||
import { vol } from 'memfs';
|
||||
|
||||
@@ -241,6 +242,65 @@ test('valid profile extending other profile with platform specific envs', async
|
||||
});
|
||||
|
||||
test('valid profile extending other profile with platform specific caching', async () => {
|
||||
await fs.writeJson('/project/eas.json', {
|
||||
build: {
|
||||
base: {
|
||||
cache: {
|
||||
disabled: true,
|
||||
},
|
||||
},
|
||||
extension: {
|
||||
extends: 'base',
|
||||
distribution: 'internal',
|
||||
cache: {
|
||||
key: 'extend-key',
|
||||
},
|
||||
android: {
|
||||
cache: {
|
||||
paths: ['somefakepath'],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const accessor = EasJsonAccessor.fromProjectPath('/project');
|
||||
const baseProfile = await EasJsonUtils.getBuildProfileAsync(accessor, Platform.ANDROID, 'base');
|
||||
const extendedAndroidProfile = await EasJsonUtils.getBuildProfileAsync(
|
||||
accessor,
|
||||
Platform.ANDROID,
|
||||
'extension'
|
||||
);
|
||||
const extendedIosProfile = await EasJsonUtils.getBuildProfileAsync(
|
||||
accessor,
|
||||
Platform.IOS,
|
||||
'extension'
|
||||
);
|
||||
expect(baseProfile).toEqual({
|
||||
distribution: 'store',
|
||||
credentialsSource: 'remote',
|
||||
cache: {
|
||||
disabled: true,
|
||||
},
|
||||
});
|
||||
expect(extendedAndroidProfile).toEqual({
|
||||
distribution: 'internal',
|
||||
credentialsSource: 'remote',
|
||||
cache: {
|
||||
paths: ['somefakepath'],
|
||||
},
|
||||
});
|
||||
expect(extendedIosProfile).toEqual({
|
||||
distribution: 'internal',
|
||||
credentialsSource: 'remote',
|
||||
|
||||
cache: {
|
||||
key: 'extend-key',
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
test('valid profile extending other profile with platform specific caching - backwards compatible with customPaths', async () => {
|
||||
await fs.writeJson('/project/eas.json', {
|
||||
build: {
|
||||
base: {
|
||||
@@ -286,7 +346,7 @@ test('valid profile extending other profile with platform specific caching', asy
|
||||
distribution: 'internal',
|
||||
credentialsSource: 'remote',
|
||||
cache: {
|
||||
customPaths: ['somefakepath'],
|
||||
paths: ['somefakepath'],
|
||||
},
|
||||
});
|
||||
expect(extendedIosProfile).toEqual({
|
||||
@@ -407,6 +467,38 @@ test('iOS-specific resourceClass', async () => {
|
||||
).resolves.not.toThrow();
|
||||
});
|
||||
|
||||
test('iOS-specific `large` resourceClass', async () => {
|
||||
await fs.writeJson('/project/eas.json', {
|
||||
build: {
|
||||
production: {
|
||||
ios: {
|
||||
resourceClass: 'large',
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const accessor = EasJsonAccessor.fromProjectPath('/project');
|
||||
await expect(
|
||||
EasJsonUtils.getBuildProfileAsync(accessor, Platform.IOS, 'production')
|
||||
).resolves.not.toThrow();
|
||||
});
|
||||
|
||||
test('`large` resourceClass in build profile root', async () => {
|
||||
await fs.writeJson('/project/eas.json', {
|
||||
build: {
|
||||
production: {
|
||||
resourceClass: 'large',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const accessor = EasJsonAccessor.fromProjectPath('/project');
|
||||
await expect(
|
||||
EasJsonUtils.getBuildProfileAsync(accessor, Platform.IOS, 'production')
|
||||
).resolves.not.toThrow();
|
||||
});
|
||||
|
||||
test('Android-specific resourceClass', async () => {
|
||||
await fs.writeJson('/project/eas.json', {
|
||||
build: {
|
||||
@@ -484,3 +576,145 @@ test('build profiles with both platform build config', async () => {
|
||||
credentialsSource: 'remote',
|
||||
});
|
||||
});
|
||||
|
||||
test('valid build profile with caching without paths', async () => {
|
||||
await fs.writeJson('/project/eas.json', {
|
||||
build: {
|
||||
production: {
|
||||
cache: {
|
||||
disabled: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const accessor = EasJsonAccessor.fromProjectPath('/project');
|
||||
const iosProfile = await EasJsonUtils.getBuildProfileAsync(accessor, Platform.IOS, 'production');
|
||||
const androidProfile = await EasJsonUtils.getBuildProfileAsync(
|
||||
accessor,
|
||||
Platform.ANDROID,
|
||||
'production'
|
||||
);
|
||||
|
||||
expect(androidProfile).toEqual({
|
||||
distribution: 'store',
|
||||
credentialsSource: 'remote',
|
||||
cache: {
|
||||
disabled: false,
|
||||
},
|
||||
});
|
||||
|
||||
expect(iosProfile).toEqual({
|
||||
distribution: 'store',
|
||||
credentialsSource: 'remote',
|
||||
cache: {
|
||||
disabled: false,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
test('valid build profile with caching with paths', async () => {
|
||||
await fs.writeJson('/project/eas.json', {
|
||||
build: {
|
||||
production: {
|
||||
cache: {
|
||||
disabled: false,
|
||||
paths: ['index.ts'],
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const accessor = EasJsonAccessor.fromProjectPath('/project');
|
||||
const iosProfile = await EasJsonUtils.getBuildProfileAsync(accessor, Platform.IOS, 'production');
|
||||
const androidProfile = await EasJsonUtils.getBuildProfileAsync(
|
||||
accessor,
|
||||
Platform.ANDROID,
|
||||
'production'
|
||||
);
|
||||
|
||||
expect(androidProfile).toEqual({
|
||||
distribution: 'store',
|
||||
credentialsSource: 'remote',
|
||||
cache: {
|
||||
disabled: false,
|
||||
paths: ['index.ts'],
|
||||
},
|
||||
});
|
||||
|
||||
expect(iosProfile).toEqual({
|
||||
distribution: 'store',
|
||||
credentialsSource: 'remote',
|
||||
cache: {
|
||||
disabled: false,
|
||||
paths: ['index.ts'],
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
test('valid build profile with caching with customPaths - moved into paths and customPaths removed', async () => {
|
||||
await fs.writeJson('/project/eas.json', {
|
||||
build: {
|
||||
production: {
|
||||
cache: {
|
||||
disabled: false,
|
||||
customPaths: ['index.ts'],
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const accessor = EasJsonAccessor.fromProjectPath('/project');
|
||||
const iosProfile = await EasJsonUtils.getBuildProfileAsync(accessor, Platform.IOS, 'production');
|
||||
const androidProfile = await EasJsonUtils.getBuildProfileAsync(
|
||||
accessor,
|
||||
Platform.ANDROID,
|
||||
'production'
|
||||
);
|
||||
|
||||
expect(androidProfile).toEqual({
|
||||
distribution: 'store',
|
||||
credentialsSource: 'remote',
|
||||
cache: {
|
||||
disabled: false,
|
||||
paths: ['index.ts'],
|
||||
},
|
||||
});
|
||||
|
||||
expect(iosProfile).toEqual({
|
||||
distribution: 'store',
|
||||
credentialsSource: 'remote',
|
||||
cache: {
|
||||
disabled: false,
|
||||
paths: ['index.ts'],
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
test('invalid build profile with caching with both paths and customPaths - error thrown', async () => {
|
||||
await fs.writeJson('/project/eas.json', {
|
||||
build: {
|
||||
production: {
|
||||
cache: {
|
||||
disabled: false,
|
||||
customPaths: ['index.ts'],
|
||||
paths: ['index2.ts'],
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
const expectedError = new InvalidEasJsonError(
|
||||
`${chalk.bold(
|
||||
'eas.json'
|
||||
)} is not valid.\n- Cannot provide both "cache.customPaths" and "cache.paths" - use "cache.paths"`
|
||||
);
|
||||
const accessor = EasJsonAccessor.fromProjectPath('/project');
|
||||
|
||||
await expect(async () => {
|
||||
await EasJsonUtils.getBuildProfileAsync(accessor, Platform.IOS, 'production');
|
||||
}).rejects.toThrow(expectedError);
|
||||
|
||||
await expect(async () => {
|
||||
await EasJsonUtils.getBuildProfileAsync(accessor, Platform.ANDROID, 'production');
|
||||
}).rejects.toThrow(expectedError);
|
||||
});
|
||||
@@ -0,0 +1,261 @@
|
||||
import { Platform } from '@expo/eas-build-job';
|
||||
|
||||
import { EasJsonAccessor } from '../accessor';
|
||||
import { AndroidBuildProfile, IosBuildProfile } from '../build/types';
|
||||
import { EasJsonUtils } from '../utils';
|
||||
|
||||
jest.mock('@expo/eas-json', () => {
|
||||
const actual = jest.requireActual('@expo/eas-json');
|
||||
|
||||
const EasJsonUtilsMock = {
|
||||
getBuildProfileAsync: jest.fn(),
|
||||
};
|
||||
return {
|
||||
...actual,
|
||||
EasJsonUtils: EasJsonUtilsMock,
|
||||
};
|
||||
});
|
||||
const getBuildProfileAsync = jest.spyOn(EasJsonUtils, 'getBuildProfileAsync');
|
||||
|
||||
describe('getBuildProfileDeprecationWarningsAsync', () => {
|
||||
const easJsonAccessor = EasJsonAccessor.fromProjectPath('/fake');
|
||||
const readRawEasJsonMock = jest.spyOn(easJsonAccessor, 'readRawJsonAsync');
|
||||
describe('android', () => {
|
||||
type BuildProfileType = AndroidBuildProfile;
|
||||
describe('no cache settings', () => {
|
||||
it('does not return deprecation warnings', async () => {
|
||||
getBuildProfileAsync.mockImplementation(async () => {
|
||||
return {} as BuildProfileType;
|
||||
});
|
||||
readRawEasJsonMock.mockImplementation(async () => {
|
||||
return {};
|
||||
});
|
||||
const result = await EasJsonUtils.getBuildProfileDeprecationWarningsAsync(
|
||||
easJsonAccessor,
|
||||
Platform.ANDROID,
|
||||
'production'
|
||||
);
|
||||
expect(result).toEqual([]);
|
||||
});
|
||||
});
|
||||
describe('cache settings with paths', () => {
|
||||
it('does not return deprecation warnings', async () => {
|
||||
getBuildProfileAsync.mockImplementation(async () => {
|
||||
return {
|
||||
cache: {
|
||||
paths: ['path1', 'path2'],
|
||||
},
|
||||
} as BuildProfileType;
|
||||
});
|
||||
readRawEasJsonMock.mockImplementation(async () => {
|
||||
return {
|
||||
build: {
|
||||
production: {
|
||||
cache: {
|
||||
paths: ['path1', 'path2'],
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
const result = await EasJsonUtils.getBuildProfileDeprecationWarningsAsync(
|
||||
easJsonAccessor,
|
||||
Platform.ANDROID,
|
||||
'production'
|
||||
);
|
||||
expect(result).toEqual([]);
|
||||
});
|
||||
});
|
||||
describe('cache settings with customPaths', () => {
|
||||
it('returns deprecation warning', async () => {
|
||||
getBuildProfileAsync.mockImplementation(async () => {
|
||||
return {
|
||||
cache: {
|
||||
paths: ['path1', 'path2'],
|
||||
},
|
||||
} as BuildProfileType;
|
||||
});
|
||||
readRawEasJsonMock.mockImplementation(async () => {
|
||||
return {
|
||||
build: {
|
||||
production: {
|
||||
cache: {
|
||||
customPaths: ['path1', 'path2'],
|
||||
},
|
||||
},
|
||||
dummy_profile_name: {
|
||||
cache: {
|
||||
customPaths: ['path1', 'path2'],
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
let result = await EasJsonUtils.getBuildProfileDeprecationWarningsAsync(
|
||||
easJsonAccessor,
|
||||
Platform.ANDROID,
|
||||
'production'
|
||||
);
|
||||
expect(result).toEqual([
|
||||
{
|
||||
message: [
|
||||
`The "build.production.cache.customPaths" field in eas.json is deprecated and will be removed in the future. Please use "build.production.cache.paths" instead.`,
|
||||
],
|
||||
docsUrl: 'https://docs.expo.dev/build-reference/eas-json/#cache',
|
||||
},
|
||||
]);
|
||||
result = await EasJsonUtils.getBuildProfileDeprecationWarningsAsync(
|
||||
easJsonAccessor,
|
||||
Platform.ANDROID,
|
||||
'dummy_profile_name'
|
||||
);
|
||||
expect(result).toEqual([
|
||||
{
|
||||
message: [
|
||||
`The "build.dummy_profile_name.cache.customPaths" field in eas.json is deprecated and will be removed in the future. Please use "build.dummy_profile_name.cache.paths" instead.`,
|
||||
],
|
||||
docsUrl: 'https://docs.expo.dev/build-reference/eas-json/#cache',
|
||||
},
|
||||
]);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('ios', () => {
|
||||
type BuildProfileType = IosBuildProfile;
|
||||
describe('no cache settings', () => {
|
||||
it('does not return deprecation warnings', async () => {
|
||||
getBuildProfileAsync.mockImplementation(async () => {
|
||||
return {} as BuildProfileType;
|
||||
});
|
||||
readRawEasJsonMock.mockImplementation(async () => {
|
||||
return {};
|
||||
});
|
||||
const result = await EasJsonUtils.getBuildProfileDeprecationWarningsAsync(
|
||||
easJsonAccessor,
|
||||
Platform.IOS,
|
||||
'production'
|
||||
);
|
||||
expect(result).toEqual([]);
|
||||
});
|
||||
});
|
||||
describe('cache settings with paths', () => {
|
||||
it('does not return deprecation warnings', async () => {
|
||||
getBuildProfileAsync.mockImplementation(async () => {
|
||||
return {
|
||||
cache: {
|
||||
paths: ['path1', 'path2'],
|
||||
},
|
||||
} as BuildProfileType;
|
||||
});
|
||||
readRawEasJsonMock.mockImplementation(async () => {
|
||||
return {
|
||||
build: {
|
||||
production: {
|
||||
cache: {
|
||||
paths: ['path1', 'path2'],
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
const result = await EasJsonUtils.getBuildProfileDeprecationWarningsAsync(
|
||||
easJsonAccessor,
|
||||
Platform.IOS,
|
||||
'production'
|
||||
);
|
||||
expect(result).toEqual([]);
|
||||
});
|
||||
});
|
||||
describe('cache settings with customPaths', () => {
|
||||
it('returns deprecation warning', async () => {
|
||||
getBuildProfileAsync.mockImplementation(async () => {
|
||||
return {
|
||||
cache: {
|
||||
paths: ['path1', 'path2'],
|
||||
},
|
||||
} as BuildProfileType;
|
||||
});
|
||||
readRawEasJsonMock.mockImplementation(async () => {
|
||||
return {
|
||||
build: {
|
||||
production: {
|
||||
cache: {
|
||||
customPaths: ['path1', 'path2'],
|
||||
},
|
||||
},
|
||||
dummy_profile_name: {
|
||||
cache: {
|
||||
customPaths: ['path1', 'path2'],
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
let result = await EasJsonUtils.getBuildProfileDeprecationWarningsAsync(
|
||||
easJsonAccessor,
|
||||
Platform.IOS,
|
||||
'production'
|
||||
);
|
||||
expect(result).toEqual([
|
||||
{
|
||||
message: [
|
||||
`The "build.production.cache.customPaths" field in eas.json is deprecated and will be removed in the future. Please use "build.production.cache.paths" instead.`,
|
||||
],
|
||||
docsUrl: 'https://docs.expo.dev/build-reference/eas-json/#cache',
|
||||
},
|
||||
]);
|
||||
result = await EasJsonUtils.getBuildProfileDeprecationWarningsAsync(
|
||||
easJsonAccessor,
|
||||
Platform.IOS,
|
||||
'dummy_profile_name'
|
||||
);
|
||||
expect(result).toEqual([
|
||||
{
|
||||
message: [
|
||||
`The "build.dummy_profile_name.cache.customPaths" field in eas.json is deprecated and will be removed in the future. Please use "build.dummy_profile_name.cache.paths" instead.`,
|
||||
],
|
||||
docsUrl: 'https://docs.expo.dev/build-reference/eas-json/#cache',
|
||||
},
|
||||
]);
|
||||
});
|
||||
});
|
||||
describe('cache settings with customPaths in extended profile', () => {
|
||||
it('returns deprecation warning', async () => {
|
||||
getBuildProfileAsync.mockImplementation(async () => {
|
||||
return {
|
||||
cache: {
|
||||
paths: ['path1', 'path2'],
|
||||
},
|
||||
} as BuildProfileType;
|
||||
});
|
||||
readRawEasJsonMock.mockImplementation(async () => {
|
||||
return {
|
||||
build: {
|
||||
production: {
|
||||
cache: {
|
||||
customPaths: ['path1', 'path2'],
|
||||
},
|
||||
},
|
||||
dummy_profile_name: {
|
||||
extends: 'production',
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
const result = await EasJsonUtils.getBuildProfileDeprecationWarningsAsync(
|
||||
easJsonAccessor,
|
||||
Platform.IOS,
|
||||
'dummy_profile_name'
|
||||
);
|
||||
expect(result).toEqual([
|
||||
{
|
||||
message: [
|
||||
`The "build.production.cache.customPaths" field in eas.json is deprecated and will be removed in the future. Please use "build.production.cache.paths" instead.`,
|
||||
],
|
||||
docsUrl: 'https://docs.expo.dev/build-reference/eas-json/#cache',
|
||||
},
|
||||
]);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -3,13 +3,14 @@ import semver from 'semver';
|
||||
|
||||
import { ResourceClass } from './types';
|
||||
|
||||
const AllowedCommonResourceClasses: ResourceClass[] = [ResourceClass.DEFAULT, ResourceClass.MEDIUM];
|
||||
|
||||
const AllowedAndroidResourceClasses: ResourceClass[] = [
|
||||
...AllowedCommonResourceClasses,
|
||||
const AllowedCommonResourceClasses: ResourceClass[] = [
|
||||
ResourceClass.DEFAULT,
|
||||
ResourceClass.MEDIUM,
|
||||
ResourceClass.LARGE,
|
||||
];
|
||||
|
||||
const AllowedAndroidResourceClasses: ResourceClass[] = AllowedCommonResourceClasses;
|
||||
|
||||
const AllowedIosResourceClasses: ResourceClass[] = [
|
||||
...AllowedCommonResourceClasses,
|
||||
ResourceClass.M1_MEDIUM,
|
||||
@@ -23,7 +24,11 @@ const CacheSchema = Joi.object({
|
||||
key: Joi.string().max(128),
|
||||
cacheDefaultPaths: Joi.boolean(),
|
||||
customPaths: Joi.array().items(Joi.string()),
|
||||
});
|
||||
paths: Joi.array().items(Joi.string()),
|
||||
}).rename('customPaths', 'paths')
|
||||
.messages({
|
||||
'object.rename.override': 'Cannot provide both "cache.customPaths" and "cache.paths" - use "cache.paths"'
|
||||
});
|
||||
|
||||
const CommonBuildProfileSchema = Joi.object({
|
||||
// builder
|
||||
|
||||
@@ -23,6 +23,9 @@ export enum ResourceClass {
|
||||
INTEL_MEDIUM = 'intel-medium',
|
||||
MEDIUM = 'medium',
|
||||
M_MEDIUM = 'm-medium',
|
||||
/**
|
||||
* @deprecated use LARGE instead
|
||||
*/
|
||||
M_LARGE = 'm-large',
|
||||
}
|
||||
|
||||
|
||||
@@ -28,23 +28,54 @@ export class EasJsonUtils {
|
||||
return resolveBuildProfile({ easJson, platform, profileName });
|
||||
}
|
||||
|
||||
public static getBuildProfileDeprecationWarnings(
|
||||
buildProfile: BuildProfile,
|
||||
profileName?: string
|
||||
): EasJsonDeprecationWarning[] {
|
||||
public static async getBuildProfileDeprecationWarningsAsync(
|
||||
easJsonAccessor: EasJsonAccessor,
|
||||
platform: Platform,
|
||||
profileName: string
|
||||
): Promise<EasJsonDeprecationWarning[]> {
|
||||
const warnings: EasJsonDeprecationWarning[] = [];
|
||||
const buildProfile = await EasJsonUtils.getBuildProfileAsync(
|
||||
easJsonAccessor,
|
||||
platform,
|
||||
profileName
|
||||
);
|
||||
const rawEasJson = await easJsonAccessor.readRawJsonAsync();
|
||||
|
||||
if (buildProfile.cache?.cacheDefaultPaths !== undefined) {
|
||||
warnings.push({
|
||||
message: [
|
||||
`The "build.${
|
||||
profileName ?? 'production'
|
||||
}.cache.cacheDefaultPaths" field in eas.json is deprecated and will be removed in the future.`,
|
||||
`The "build.${profileName}.cache.cacheDefaultPaths" field in eas.json is deprecated and will be removed in the future.`,
|
||||
],
|
||||
docsUrl: 'https://docs.expo.dev/build-reference/caching/#ios-dependencies',
|
||||
});
|
||||
}
|
||||
|
||||
warnings.push(...EasJsonUtils.getCustomPathsDeprecationWarnings(rawEasJson, profileName));
|
||||
|
||||
return warnings;
|
||||
}
|
||||
|
||||
private static getCustomPathsDeprecationWarnings(
|
||||
rawEasJson: any,
|
||||
profileName: string
|
||||
): EasJsonDeprecationWarning[] {
|
||||
const warnings: EasJsonDeprecationWarning[] = [];
|
||||
if (rawEasJson.build?.[profileName]?.cache?.customPaths !== undefined) {
|
||||
warnings.push({
|
||||
message: [
|
||||
`The "build.${profileName}.cache.customPaths" field in eas.json is deprecated and will be removed in the future. Please use "build.${profileName}.cache.paths" instead.`,
|
||||
],
|
||||
docsUrl: 'https://docs.expo.dev/build-reference/eas-json/#cache',
|
||||
});
|
||||
}
|
||||
if (rawEasJson.build?.[profileName]?.extends !== undefined) {
|
||||
warnings.push(
|
||||
...EasJsonUtils.getCustomPathsDeprecationWarnings(
|
||||
rawEasJson,
|
||||
rawEasJson.build?.[profileName].extends
|
||||
)
|
||||
);
|
||||
}
|
||||
return warnings;
|
||||
}
|
||||
|
||||
|
||||
@@ -1390,10 +1390,10 @@
|
||||
slugify "^1.3.4"
|
||||
sucrase "^3.20.0"
|
||||
|
||||
"@expo/[email protected].7":
|
||||
version "1.0.7"
|
||||
resolved "https://registry.yarnpkg.com/@expo/eas-build-job/-/eas-build-job-1.0.7.tgz#4c50dbc37faf000c5a5d791e69995bbf0eda39ff"
|
||||
integrity sha512-LBYXWS/wp6YnyNDUqt+5+k0J7P6gf3/hjf48yJp+BcLabQbqWqAuz7eqPMEDt9bezMX2fEAiYywSBdnRJKo3Ow==
|
||||
"@expo/[email protected].10":
|
||||
version "1.0.10"
|
||||
resolved "https://registry.yarnpkg.com/@expo/eas-build-job/-/eas-build-job-1.0.10.tgz#11c7456d7f1a8f228d5c01d51a2b1092b3d84baf"
|
||||
integrity sha512-BQqVXA5wRPVRtpCyChnJfq9iYD3sp4wtHY+9s/CmsUzFcNixg9VoY4qPUuP4Bsvr40seK9Ut7fIQN0DFr6arDA==
|
||||
dependencies:
|
||||
joi "^17.7.0"
|
||||
semver "^7.3.8"
|
||||
|
||||
Reference in new issue
Block a user