Compare commits

...
10 Commits
Author SHA1 Message Date
Radoslaw Krzemien f75ef22154 v14.5.0 2025-01-22 14:24:59 +01:00
Radosław Krzemień 7d3f4e8fd4 [eas-json] [ENG-14636] Allow longer submit profile extension chains (#2831)
* [eas-json] Extend submit profile expansion chain

Extended the limit for expansion chain for submit profiles to equal that of build profiles - 5

See: https://linear.app/expo/issue/ENG-14636/allow-longer-profile-extend-chains-in-easjson

* [eas-json] Add tests for submit profiles

Added tests for submit profiles extension chain

See: https://linear.app/expo/issue/ENG-14636/allow-longer-profile-extend-chains-in-easjson

* [eas-json] Add tests for build profiles

Added tests for build profiles extension chain

See: https://linear.app/expo/issue/ENG-14636/allow-longer-profile-extend-chains-in-easjson

* [eas-json] Lint

Lint

See: https://linear.app/expo/issue/ENG-14636/allow-longer-profile-extend-chains-in-easjson

* [eas-json] Add changelog

Updated CHANGELOG.md

See: https://linear.app/expo/issue/ENG-14636/allow-longer-profile-extend-chains-in-easjson
2025-01-22 14:23:07 +01:00
Radosław Krzemień 004caf4bb7 [eas-cli] [ENG-14629] Improve AppleID validation (#2830)
* [eas-cli] Remove invalid unprintable characters from AppleID

Clears the AppleID received from the prompt

See: https://linear.app/expo/issue/ENG-14629/improve-apple-id-input-validation

* [eas-cli] Add tests

Adds tests for `resolveUserCredentialsAsync` function, including reading malformed AppleID from the prompt

See: https://linear.app/expo/issue/ENG-14629/improve-apple-id-input-validation

* [eas-cli] Remove line

Removed redundant expect()

See: https://linear.app/expo/issue/ENG-14629/improve-apple-id-input-validation

* [eas-cli] Add context

Added a comment with context for the change

See: https://linear.app/expo/issue/ENG-14629/improve-apple-id-input-validation

* [eas-cli] Add changelog

Updated CHANGELOG.md

See: https://linear.app/expo/issue/ENG-14629/improve-apple-id-input-validation
2025-01-22 14:17:14 +01:00
Kadi Kraman 5a16f3d6d8 [eas-cli] Detect valid JSON files during hosting upload (#2829)
* Use application/json as content type for valid JSON without an extension

* Add changelog

* Pull getContentTypeAsync to a separate function
2025-01-21 10:51:32 +00:00
Expo Bot d2e4cb5fc6 Upgrade eas-build dependencies (#2826) 2025-01-18 16:29:59 +01:00
Kadi Kraman 2c1c9b91cb [eas-cli] Use deploy as top level hosting command (#2824)
* Replace preview with help

* Remove redundant alias

* Update description

* Rename top level command from worker -> deploy

* Add changelog

* End sentence with a .

* Add worker:deploy as an alias to deploy
2025-01-17 12:16:02 +00:00
Will Schurman b447194c85 [eas-cli] Make variable naming more explicit, remove deprecated runtimeFingerprintSource uses (#2816) 2025-01-16 08:51:32 -08:00
Kadi Kraman 9ab095597a [eas-cli] fix deploy command typos (#2822)
* EAS hosting is in preview (not beta)

* Remove errant curly

* Add changelog
2025-01-16 13:09:44 +00:00
Szymon Dziedzic b1edff7242 [eas-cli] allow filtering by fingerprint-hash in eas build:list command (#2818)
<!-- If this PR requires a changelog entry, add it by commenting the PR with the command `/changelog-entry [breaking-change|new-feature|bug-fix|chore] [message]`. -->
<!-- You can skip the changelog check by labeling the PR with "no changelog". -->

# Why

Allow filtering by `--fingerprint-hash` in the `eas build:list` command

# How

Update GQL schema to add a new filter field, and add a new flag to use it.

# Test Plan

Test locally
2025-01-16 00:38:54 +01:00
Expo CI 4d9e37269c update CHANGELOG.md 2025-01-15 09:48:15 +00:00
22 changed files with 1839 additions and 169 deletions

No files matched your search

+15
View File
@@ -8,6 +8,21 @@ This is the log of notable changes to EAS CLI and related packages.
### 🎉 New features
- Allow filtering by `--fingerprint_hash` in `eas build:list` command. ([#2818](https://github.com/expo/eas-cli/pull/2818) by [@szdziedzic](https://github.com/szdziedzic))
### 🐛 Bug fixes
- Ensure that the AASA file is served with content type application/json ([#2829](https://github.com/expo/eas-cli/pull/2829) by [@kadikraman](https://github.com/kadikraman))
- Ensure that the AppleID provided in prompt or saved to cache does not contain invalid unprintable characters ([#2830](https://github.com/expo/eas-cli/pull/2830) by [@radoslawkrzemien](https://github.com/radoslawkrzemien))
### 🧹 Chores
- Fix logs typos in the `eas deploy` command. ([#2822](https://github.com/expo/eas-cli/pull/2822) by [@kadikraman](https://github.com/kadikraman))
- Make `deploy` the top level command for hosting. ([#2824](https://github.com/expo/eas-cli/pull/2824) by [@kadikraman](https://github.com/kadikraman))
- Allow longer submit profile extension chain (up to 5, same as build profile) ([#2831](https://github.com/expo/eas-cli/pull/2831) by [@radoslawkrzemien](https://github.com/radoslawkrzemien))
- Make variable naming more explicit, remove deprecated runtimeFingerprintSource uses. ([#2816](https://github.com/expo/eas-cli/pull/2816) by [@wschurman](https://github.com/wschurman))
## [14.4.1](https://github.com/expo/eas-cli/releases/tag/v14.4.1) - 2025-01-15
### 🐛 Bug fixes
- Enable shell execution for env:exec commands. ([#2788](https://github.com/expo/eas-cli/pull/2788) by [@tharakadesilva](https://github.com/tharakadesilva))
+1 -1
View File
@@ -1,5 +1,5 @@
{
"npmClient": "yarn",
"version": "14.4.1",
"version": "14.5.0",
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
+93 -91
View File
@@ -158,7 +158,7 @@ ALIASES
$ eas login
```
_See code: [packages/eas-cli/src/commands/account/login.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/account/login.ts)_
_See code: [packages/eas-cli/src/commands/account/login.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/account/login.ts)_
## `eas account:logout`
@@ -175,7 +175,7 @@ ALIASES
$ eas logout
```
_See code: [packages/eas-cli/src/commands/account/logout.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/account/logout.ts)_
_See code: [packages/eas-cli/src/commands/account/logout.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/account/logout.ts)_
## `eas account:view`
@@ -192,7 +192,7 @@ ALIASES
$ eas whoami
```
_See code: [packages/eas-cli/src/commands/account/view.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/account/view.ts)_
_See code: [packages/eas-cli/src/commands/account/view.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/account/view.ts)_
## `eas analytics [STATUS]`
@@ -206,7 +206,7 @@ DESCRIPTION
display or change analytics settings
```
_See code: [packages/eas-cli/src/commands/analytics.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/analytics.ts)_
_See code: [packages/eas-cli/src/commands/analytics.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/analytics.ts)_
## `eas autocomplete [SHELL]`
@@ -258,7 +258,7 @@ DESCRIPTION
create a branch
```
_See code: [packages/eas-cli/src/commands/branch/create.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/branch/create.ts)_
_See code: [packages/eas-cli/src/commands/branch/create.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/branch/create.ts)_
## `eas branch:delete [NAME]`
@@ -279,7 +279,7 @@ DESCRIPTION
delete a branch
```
_See code: [packages/eas-cli/src/commands/branch/delete.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/branch/delete.ts)_
_See code: [packages/eas-cli/src/commands/branch/delete.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/branch/delete.ts)_
## `eas branch:list`
@@ -299,7 +299,7 @@ DESCRIPTION
list all branches
```
_See code: [packages/eas-cli/src/commands/branch/list.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/branch/list.ts)_
_See code: [packages/eas-cli/src/commands/branch/list.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/branch/list.ts)_
## `eas branch:rename`
@@ -319,7 +319,7 @@ DESCRIPTION
rename a branch
```
_See code: [packages/eas-cli/src/commands/branch/rename.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/branch/rename.ts)_
_See code: [packages/eas-cli/src/commands/branch/rename.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/branch/rename.ts)_
## `eas branch:view [NAME]`
@@ -342,7 +342,7 @@ DESCRIPTION
view a branch
```
_See code: [packages/eas-cli/src/commands/branch/view.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/branch/view.ts)_
_See code: [packages/eas-cli/src/commands/branch/view.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/branch/view.ts)_
## `eas build`
@@ -379,7 +379,7 @@ DESCRIPTION
start a build
```
_See code: [packages/eas-cli/src/commands/build/index.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/build/index.ts)_
_See code: [packages/eas-cli/src/commands/build/index.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/build/index.ts)_
## `eas build:cancel [BUILD_ID]`
@@ -398,7 +398,7 @@ DESCRIPTION
cancel a build
```
_See code: [packages/eas-cli/src/commands/build/cancel.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/build/cancel.ts)_
_See code: [packages/eas-cli/src/commands/build/cancel.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/build/cancel.ts)_
## `eas build:configure`
@@ -415,7 +415,7 @@ DESCRIPTION
configure the project to support EAS Build
```
_See code: [packages/eas-cli/src/commands/build/configure.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/build/configure.ts)_
_See code: [packages/eas-cli/src/commands/build/configure.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/build/configure.ts)_
## `eas build:delete [BUILD_ID]`
@@ -434,7 +434,7 @@ DESCRIPTION
delete a build
```
_See code: [packages/eas-cli/src/commands/build/delete.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/build/delete.ts)_
_See code: [packages/eas-cli/src/commands/build/delete.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/build/delete.ts)_
## `eas build:inspect`
@@ -469,7 +469,7 @@ DESCRIPTION
inspect the state of the project at specific build stages, useful for troubleshooting
```
_See code: [packages/eas-cli/src/commands/build/inspect.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/build/inspect.ts)_
_See code: [packages/eas-cli/src/commands/build/inspect.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/build/inspect.ts)_
## `eas build:list`
@@ -480,8 +480,8 @@ USAGE
$ eas build:list [-p android|ios|all] [--status
new|in-queue|in-progress|pending-cancel|errored|finished|canceled] [--distribution store|internal|simulator]
[--channel <value>] [--app-version <value>] [--app-build-version <value>] [--sdk-version <value>] [--runtime-version
<value>] [--app-identifier <value>] [-e <value>] [--git-commit-hash <value>] [--offset <value>] [--limit <value>]
[--json --non-interactive] [--simulator]
<value>] [--app-identifier <value>] [-e <value>] [--git-commit-hash <value>] [--fingerprint-hash <value>] [--offset
<value>] [--limit <value>] [--json --non-interactive] [--simulator]
FLAGS
-e, --build-profile=<value> Filter only builds created with the
@@ -496,6 +496,8 @@ FLAGS
--channel=<value>
--distribution=(store|internal|simulator) Filter only builds with the specified
distribution type
--fingerprint-hash=<value> Filter only builds with the specified
fingerprint hash
--git-commit-hash=<value> Filter only builds created with the
specified git commit hash
--json Enable JSON output, non-JSON messages
@@ -519,7 +521,7 @@ DESCRIPTION
list all builds for your project
```
_See code: [packages/eas-cli/src/commands/build/list.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/build/list.ts)_
_See code: [packages/eas-cli/src/commands/build/list.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/build/list.ts)_
## `eas build:resign`
@@ -548,7 +550,7 @@ DESCRIPTION
re-sign a build archive
```
_See code: [packages/eas-cli/src/commands/build/resign.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/build/resign.ts)_
_See code: [packages/eas-cli/src/commands/build/resign.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/build/resign.ts)_
## `eas build:run`
@@ -574,7 +576,7 @@ DESCRIPTION
run simulator/emulator builds from eas-cli
```
_See code: [packages/eas-cli/src/commands/build/run.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/build/run.ts)_
_See code: [packages/eas-cli/src/commands/build/run.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/build/run.ts)_
## `eas build:submit`
@@ -624,7 +626,7 @@ DESCRIPTION
get the latest version from EAS servers
```
_See code: [packages/eas-cli/src/commands/build/version/get.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/build/version/get.ts)_
_See code: [packages/eas-cli/src/commands/build/version/get.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/build/version/get.ts)_
## `eas build:version:set`
@@ -643,7 +645,7 @@ DESCRIPTION
update version of an app
```
_See code: [packages/eas-cli/src/commands/build/version/set.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/build/version/set.ts)_
_See code: [packages/eas-cli/src/commands/build/version/set.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/build/version/set.ts)_
## `eas build:version:sync`
@@ -662,7 +664,7 @@ DESCRIPTION
update a version in native code with a value stored on EAS servers
```
_See code: [packages/eas-cli/src/commands/build/version/sync.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/build/version/sync.ts)_
_See code: [packages/eas-cli/src/commands/build/version/sync.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/build/version/sync.ts)_
## `eas build:view [BUILD_ID]`
@@ -679,7 +681,7 @@ DESCRIPTION
view a build for your project
```
_See code: [packages/eas-cli/src/commands/build/view.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/build/view.ts)_
_See code: [packages/eas-cli/src/commands/build/view.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/build/view.ts)_
## `eas channel:create [NAME]`
@@ -700,7 +702,7 @@ DESCRIPTION
create a channel
```
_See code: [packages/eas-cli/src/commands/channel/create.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/channel/create.ts)_
_See code: [packages/eas-cli/src/commands/channel/create.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/channel/create.ts)_
## `eas channel:edit [NAME]`
@@ -722,7 +724,7 @@ DESCRIPTION
point a channel at a new branch
```
_See code: [packages/eas-cli/src/commands/channel/edit.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/channel/edit.ts)_
_See code: [packages/eas-cli/src/commands/channel/edit.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/channel/edit.ts)_
## `eas channel:list`
@@ -742,7 +744,7 @@ DESCRIPTION
list all channels
```
_See code: [packages/eas-cli/src/commands/channel/list.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/channel/list.ts)_
_See code: [packages/eas-cli/src/commands/channel/list.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/channel/list.ts)_
## `eas channel:pause [NAME]`
@@ -764,7 +766,7 @@ DESCRIPTION
pause a channel to stop it from sending updates
```
_See code: [packages/eas-cli/src/commands/channel/pause.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/channel/pause.ts)_
_See code: [packages/eas-cli/src/commands/channel/pause.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/channel/pause.ts)_
## `eas channel:resume [NAME]`
@@ -786,7 +788,7 @@ DESCRIPTION
resume a channel to start sending updates
```
_See code: [packages/eas-cli/src/commands/channel/resume.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/channel/resume.ts)_
_See code: [packages/eas-cli/src/commands/channel/resume.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/channel/resume.ts)_
## `eas channel:rollout [CHANNEL]`
@@ -819,7 +821,7 @@ DESCRIPTION
Roll a new branch out on a channel incrementally.
```
_See code: [packages/eas-cli/src/commands/channel/rollout.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/channel/rollout.ts)_
_See code: [packages/eas-cli/src/commands/channel/rollout.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/channel/rollout.ts)_
## `eas channel:view [NAME]`
@@ -842,7 +844,7 @@ DESCRIPTION
view a channel
```
_See code: [packages/eas-cli/src/commands/channel/view.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/channel/view.ts)_
_See code: [packages/eas-cli/src/commands/channel/view.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/channel/view.ts)_
## `eas config`
@@ -863,7 +865,7 @@ DESCRIPTION
display project configuration (app.json + eas.json)
```
_See code: [packages/eas-cli/src/commands/config.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/config.ts)_
_See code: [packages/eas-cli/src/commands/config.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/config.ts)_
## `eas credentials`
@@ -880,7 +882,7 @@ DESCRIPTION
manage credentials
```
_See code: [packages/eas-cli/src/commands/credentials/index.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/credentials/index.ts)_
_See code: [packages/eas-cli/src/commands/credentials/index.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/credentials/index.ts)_
## `eas credentials:configure-build`
@@ -898,11 +900,11 @@ DESCRIPTION
Set up credentials for building your project.
```
_See code: [packages/eas-cli/src/commands/credentials/configure-build.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/credentials/configure-build.ts)_
_See code: [packages/eas-cli/src/commands/credentials/configure-build.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/credentials/configure-build.ts)_
## `eas deploy [options]`
Deploy your Expo web build
Deploy your Expo Router web build and API Routes.
```
USAGE
@@ -920,15 +922,17 @@ FLAGS
--prod Create a new production deployment.
DESCRIPTION
Deploy your Expo web build
Deploy your Expo Router web build and API Routes.
ALIASES
$ eas deploy
$ eas worker:deploy
```
_See code: [packages/eas-cli/src/commands/deploy/index.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/deploy/index.ts)_
## `eas deploy:alias`
Assign deployment aliases
Assign deployment aliases.
```
USAGE
@@ -942,16 +946,18 @@ FLAGS
--prod Promote an existing deployment to production.
DESCRIPTION
Assign deployment aliases
Assign deployment aliases.
ALIASES
$ eas deploy:alias
$ eas worker:alias
$ eas deploy:promote
```
_See code: [packages/eas-cli/src/commands/deploy/alias.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/deploy/alias.ts)_
## `eas deploy:promote`
Assign deployment aliases
Assign deployment aliases.
```
USAGE
@@ -965,10 +971,10 @@ FLAGS
--prod Promote an existing deployment to production.
DESCRIPTION
Assign deployment aliases
Assign deployment aliases.
ALIASES
$ eas deploy:alias
$ eas worker:alias
$ eas deploy:promote
```
@@ -984,7 +990,7 @@ DESCRIPTION
register new Apple Devices to use for internal distribution
```
_See code: [packages/eas-cli/src/commands/device/create.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/device/create.ts)_
_See code: [packages/eas-cli/src/commands/device/create.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/device/create.ts)_
## `eas device:delete`
@@ -1004,7 +1010,7 @@ DESCRIPTION
remove a registered device from your account
```
_See code: [packages/eas-cli/src/commands/device/delete.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/device/delete.ts)_
_See code: [packages/eas-cli/src/commands/device/delete.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/device/delete.ts)_
## `eas device:list`
@@ -1025,7 +1031,7 @@ DESCRIPTION
list all registered devices for your account
```
_See code: [packages/eas-cli/src/commands/device/list.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/device/list.ts)_
_See code: [packages/eas-cli/src/commands/device/list.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/device/list.ts)_
## `eas device:rename`
@@ -1046,7 +1052,7 @@ DESCRIPTION
rename a registered device
```
_See code: [packages/eas-cli/src/commands/device/rename.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/device/rename.ts)_
_See code: [packages/eas-cli/src/commands/device/rename.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/device/rename.ts)_
## `eas device:view [UDID]`
@@ -1060,7 +1066,7 @@ DESCRIPTION
view a device for your project
```
_See code: [packages/eas-cli/src/commands/device/view.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/device/view.ts)_
_See code: [packages/eas-cli/src/commands/device/view.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/device/view.ts)_
## `eas diagnostics`
@@ -1074,7 +1080,7 @@ DESCRIPTION
display environment info
```
_See code: [packages/eas-cli/src/commands/diagnostics.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/diagnostics.ts)_
_See code: [packages/eas-cli/src/commands/diagnostics.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/diagnostics.ts)_
## `eas env:create [ENVIRONMENT]`
@@ -1103,7 +1109,7 @@ DESCRIPTION
create an environment variable for the current project or account
```
_See code: [packages/eas-cli/src/commands/env/create.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/env/create.ts)_
_See code: [packages/eas-cli/src/commands/env/create.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/env/create.ts)_
## `eas env:delete [ENVIRONMENT]`
@@ -1127,7 +1133,7 @@ DESCRIPTION
delete an environment variable for the current project or account
```
_See code: [packages/eas-cli/src/commands/env/delete.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/env/delete.ts)_
_See code: [packages/eas-cli/src/commands/env/delete.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/env/delete.ts)_
## `eas env:exec ENVIRONMENT BASH_COMMAND`
@@ -1148,7 +1154,7 @@ DESCRIPTION
execute a command with environment variables from the selected environment
```
_See code: [packages/eas-cli/src/commands/env/exec.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/env/exec.ts)_
_See code: [packages/eas-cli/src/commands/env/exec.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/env/exec.ts)_
## `eas env:get [ENVIRONMENT]`
@@ -1173,7 +1179,7 @@ DESCRIPTION
view an environment variable for the current project or account
```
_See code: [packages/eas-cli/src/commands/env/get.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/env/get.ts)_
_See code: [packages/eas-cli/src/commands/env/get.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/env/get.ts)_
## `eas env:list [ENVIRONMENT]`
@@ -1198,7 +1204,7 @@ DESCRIPTION
list environment variables for the current project or account
```
_See code: [packages/eas-cli/src/commands/env/list.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/env/list.ts)_
_See code: [packages/eas-cli/src/commands/env/list.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/env/list.ts)_
## `eas env:pull [ENVIRONMENT]`
@@ -1221,7 +1227,7 @@ DESCRIPTION
pull environment variables for the selected environment to .env file
```
_See code: [packages/eas-cli/src/commands/env/pull.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/env/pull.ts)_
_See code: [packages/eas-cli/src/commands/env/pull.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/env/pull.ts)_
## `eas env:push [ENVIRONMENT]`
@@ -1242,7 +1248,7 @@ DESCRIPTION
push environment variables from .env file to the selected environment
```
_See code: [packages/eas-cli/src/commands/env/push.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/env/push.ts)_
_See code: [packages/eas-cli/src/commands/env/push.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/env/push.ts)_
## `eas env:update [ENVIRONMENT]`
@@ -1273,7 +1279,7 @@ DESCRIPTION
update an environment variable on the current project or account
```
_See code: [packages/eas-cli/src/commands/env/update.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/env/update.ts)_
_See code: [packages/eas-cli/src/commands/env/update.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/env/update.ts)_
## `eas help [COMMAND]`
@@ -1381,7 +1387,7 @@ DESCRIPTION
validate the local store configuration
```
_See code: [packages/eas-cli/src/commands/metadata/lint.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/metadata/lint.ts)_
_See code: [packages/eas-cli/src/commands/metadata/lint.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/metadata/lint.ts)_
## `eas metadata:pull`
@@ -1398,7 +1404,7 @@ DESCRIPTION
generate the local store configuration from the app stores
```
_See code: [packages/eas-cli/src/commands/metadata/pull.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/metadata/pull.ts)_
_See code: [packages/eas-cli/src/commands/metadata/pull.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/metadata/pull.ts)_
## `eas metadata:push`
@@ -1415,7 +1421,7 @@ DESCRIPTION
sync the local store configuration to the app stores
```
_See code: [packages/eas-cli/src/commands/metadata/push.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/metadata/push.ts)_
_See code: [packages/eas-cli/src/commands/metadata/push.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/metadata/push.ts)_
## `eas onboarding [TARGET_PROJECT_DIRECTORY]`
@@ -1445,7 +1451,7 @@ DESCRIPTION
open the project page in a web browser
```
_See code: [packages/eas-cli/src/commands/open.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/open.ts)_
_See code: [packages/eas-cli/src/commands/open.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/open.ts)_
## `eas project:info`
@@ -1459,7 +1465,7 @@ DESCRIPTION
information about the current project
```
_See code: [packages/eas-cli/src/commands/project/info.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/project/info.ts)_
_See code: [packages/eas-cli/src/commands/project/info.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/project/info.ts)_
## `eas project:init`
@@ -1482,7 +1488,7 @@ ALIASES
$ eas init
```
_See code: [packages/eas-cli/src/commands/project/init.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/project/init.ts)_
_See code: [packages/eas-cli/src/commands/project/init.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/project/init.ts)_
## `eas project:onboarding [TARGET_PROJECT_DIRECTORY]`
@@ -1500,7 +1506,7 @@ ALIASES
$ eas onboarding
```
_See code: [packages/eas-cli/src/commands/project/onboarding.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/project/onboarding.ts)_
_See code: [packages/eas-cli/src/commands/project/onboarding.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/project/onboarding.ts)_
## `eas submit`
@@ -1531,7 +1537,7 @@ ALIASES
$ eas build:submit
```
_See code: [packages/eas-cli/src/commands/submit.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/submit.ts)_
_See code: [packages/eas-cli/src/commands/submit.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/submit.ts)_
## `eas update`
@@ -1573,7 +1579,7 @@ DESCRIPTION
publish an update group
```
_See code: [packages/eas-cli/src/commands/update/index.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/update/index.ts)_
_See code: [packages/eas-cli/src/commands/update/index.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/update/index.ts)_
## `eas update:configure`
@@ -1593,7 +1599,7 @@ DESCRIPTION
configure the project to support EAS Update
```
_See code: [packages/eas-cli/src/commands/update/configure.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/update/configure.ts)_
_See code: [packages/eas-cli/src/commands/update/configure.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/update/configure.ts)_
## `eas update:delete GROUPID`
@@ -1614,7 +1620,7 @@ DESCRIPTION
delete all the updates in an update group
```
_See code: [packages/eas-cli/src/commands/update/delete.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/update/delete.ts)_
_See code: [packages/eas-cli/src/commands/update/delete.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/update/delete.ts)_
## `eas update:edit [GROUPID]`
@@ -1638,7 +1644,7 @@ DESCRIPTION
edit all the updates in an update group
```
_See code: [packages/eas-cli/src/commands/update/edit.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/update/edit.ts)_
_See code: [packages/eas-cli/src/commands/update/edit.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/update/edit.ts)_
## `eas update:list`
@@ -1660,7 +1666,7 @@ DESCRIPTION
view the recent updates
```
_See code: [packages/eas-cli/src/commands/update/list.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/update/list.ts)_
_See code: [packages/eas-cli/src/commands/update/list.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/update/list.ts)_
## `eas update:republish`
@@ -1692,7 +1698,7 @@ DESCRIPTION
roll back to an existing update
```
_See code: [packages/eas-cli/src/commands/update/republish.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/update/republish.ts)_
_See code: [packages/eas-cli/src/commands/update/republish.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/update/republish.ts)_
## `eas update:roll-back-to-embedded`
@@ -1720,7 +1726,7 @@ DESCRIPTION
roll back to the embedded update
```
_See code: [packages/eas-cli/src/commands/update/roll-back-to-embedded.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/update/roll-back-to-embedded.ts)_
_See code: [packages/eas-cli/src/commands/update/roll-back-to-embedded.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/update/roll-back-to-embedded.ts)_
## `eas update:rollback`
@@ -1740,7 +1746,7 @@ DESCRIPTION
roll back to an embedded update or an existing update
```
_See code: [packages/eas-cli/src/commands/update/rollback.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/update/rollback.ts)_
_See code: [packages/eas-cli/src/commands/update/rollback.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/update/rollback.ts)_
## `eas update:view GROUPID`
@@ -1760,7 +1766,7 @@ DESCRIPTION
update group details
```
_See code: [packages/eas-cli/src/commands/update/view.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/update/view.ts)_
_See code: [packages/eas-cli/src/commands/update/view.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/update/view.ts)_
## `eas webhook:create`
@@ -1781,7 +1787,7 @@ DESCRIPTION
create a webhook
```
_See code: [packages/eas-cli/src/commands/webhook/create.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/webhook/create.ts)_
_See code: [packages/eas-cli/src/commands/webhook/create.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/webhook/create.ts)_
## `eas webhook:delete [ID]`
@@ -1801,7 +1807,7 @@ DESCRIPTION
delete a webhook
```
_See code: [packages/eas-cli/src/commands/webhook/delete.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/webhook/delete.ts)_
_See code: [packages/eas-cli/src/commands/webhook/delete.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/webhook/delete.ts)_
## `eas webhook:list`
@@ -1819,7 +1825,7 @@ DESCRIPTION
list webhooks
```
_See code: [packages/eas-cli/src/commands/webhook/list.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/webhook/list.ts)_
_See code: [packages/eas-cli/src/commands/webhook/list.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/webhook/list.ts)_
## `eas webhook:update`
@@ -1841,7 +1847,7 @@ DESCRIPTION
update a webhook
```
_See code: [packages/eas-cli/src/commands/webhook/update.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/webhook/update.ts)_
_See code: [packages/eas-cli/src/commands/webhook/update.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/webhook/update.ts)_
## `eas webhook:view ID`
@@ -1858,7 +1864,7 @@ DESCRIPTION
view a webhook
```
_See code: [packages/eas-cli/src/commands/webhook/view.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/webhook/view.ts)_
_See code: [packages/eas-cli/src/commands/webhook/view.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/webhook/view.ts)_
## `eas whoami`
@@ -1877,7 +1883,7 @@ ALIASES
## `eas worker:alias`
Assign deployment aliases
Assign deployment aliases.
```
USAGE
@@ -1891,18 +1897,16 @@ FLAGS
--prod Promote an existing deployment to production.
DESCRIPTION
Assign deployment aliases
Assign deployment aliases.
ALIASES
$ eas deploy:alias
$ eas worker:alias
$ eas deploy:promote
```
_See code: [packages/eas-cli/src/commands/worker/alias.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/worker/alias.ts)_
## `eas deploy [options]`
Deploy your Expo web build
Deploy your Expo Router web build and API Routes.
```
USAGE
@@ -1920,14 +1924,12 @@ FLAGS
--prod Create a new production deployment.
DESCRIPTION
Deploy your Expo web build
Deploy your Expo Router web build and API Routes.
ALIASES
$ eas deploy
$ eas worker:deploy
```
_See code: [packages/eas-cli/src/commands/worker/deploy.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/worker/deploy.ts)_
## `eas workflow:create [NAME]`
create a new workflow configuration YAML file
@@ -1946,7 +1948,7 @@ DESCRIPTION
create a new workflow configuration YAML file
```
_See code: [packages/eas-cli/src/commands/workflow/create.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/workflow/create.ts)_
_See code: [packages/eas-cli/src/commands/workflow/create.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/workflow/create.ts)_
## `eas workflow:run [FILE]`
@@ -1966,7 +1968,7 @@ DESCRIPTION
Run an EAS workflow
```
_See code: [packages/eas-cli/src/commands/workflow/run.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/workflow/run.ts)_
_See code: [packages/eas-cli/src/commands/workflow/run.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/workflow/run.ts)_
## `eas workflow:validate PATH`
@@ -1986,5 +1988,5 @@ DESCRIPTION
validate a workflow configuration yaml file
```
_See code: [packages/eas-cli/src/commands/workflow/validate.ts](https://github.com/expo/eas-cli/blob/v14.4.1/packages/eas-cli/src/commands/workflow/validate.ts)_
_See code: [packages/eas-cli/src/commands/workflow/validate.ts](https://github.com/expo/eas-cli/blob/v14.5.0/packages/eas-cli/src/commands/workflow/validate.ts)_
<!-- commandsstop -->
File diff suppressed because it is too large. Load diff
+4 -4
View File
@@ -1,7 +1,7 @@
{
"name": "eas-cli",
"description": "EAS command line tool",
"version": "14.4.1",
"version": "14.5.0",
"author": "Expo <[email protected]>",
"bin": {
"eas": "./bin/run"
@@ -12,8 +12,8 @@
"@expo/code-signing-certificates": "0.0.5",
"@expo/config": "10.0.6",
"@expo/config-plugins": "9.0.12",
"@expo/eas-build-job": "1.0.156",
"@expo/eas-json": "14.3.1",
"@expo/eas-build-job": "1.0.165",
"@expo/eas-json": "14.5.0",
"@expo/env": "^1.0.0",
"@expo/json-file": "8.3.3",
"@expo/logger": "1.0.117",
@@ -28,7 +28,7 @@
"@expo/results": "1.0.0",
"@expo/rudder-sdk-node": "1.1.1",
"@expo/spawn-async": "1.7.2",
"@expo/steps": "1.0.161",
"@expo/steps": "1.0.165",
"@expo/timeago.js": "1.0.0",
"@oclif/core": "^1.26.2",
"@oclif/plugin-autocomplete": "^2.3.10",
+6 -3
View File
@@ -709,7 +709,10 @@ async function computeAndMaybeUploadFingerprintFromExpoUpdatesAsync<T extends Pl
* It's ok for fingerprintSources or runtimeVersion to be empty
* fingerprintSources only exist if the project is using runtimeVersion.policy: fingerprint
*/
if (!resolvedRuntimeVersion.fingerprint || !resolvedRuntimeVersion.runtimeVersion) {
if (
!resolvedRuntimeVersion.expoUpdatesRuntimeFingerprint ||
!resolvedRuntimeVersion.runtimeVersion
) {
return {
runtimeVersion: resolvedRuntimeVersion.runtimeVersion ?? undefined,
};
@@ -717,14 +720,14 @@ async function computeAndMaybeUploadFingerprintFromExpoUpdatesAsync<T extends Pl
const uploadedFingerprint = await maybeUploadFingerprintAsync({
hash: resolvedRuntimeVersion.runtimeVersion,
fingerprint: resolvedRuntimeVersion.fingerprint,
fingerprint: resolvedRuntimeVersion.expoUpdatesRuntimeFingerprint,
graphqlClient: ctx.graphqlClient,
localBuildMode: ctx.localBuildOptions.localBuildMode,
});
return {
runtimeVersion: uploadedFingerprint.hash,
fingerprintSource: uploadedFingerprint.fingerprintSource,
fingerprintHash: resolvedRuntimeVersion.fingerprintHash ?? undefined,
fingerprintHash: resolvedRuntimeVersion.expoUpdatesRuntimeFingerprintHash ?? undefined,
};
}
@@ -62,6 +62,9 @@ export default class BuildList extends EasCommand {
aliases: ['gitCommitHash'],
description: 'Filter only builds created with the specified git commit hash',
}),
'fingerprint-hash': Flags.string({
description: 'Filter only builds with the specified fingerprint hash',
}),
...EasPaginatedQueryFlags,
limit: getLimitFlagWithCustomValues({ defaultTo: 10, limit: BUILDS_LIMIT }),
...EasNonInteractiveAndJsonFlags,
@@ -130,6 +133,7 @@ export default class BuildList extends EasCommand {
buildProfile: flags['build-profile'],
gitCommitHash: flags['git-commit-hash'],
simulator: flags.simulator,
fingerprintHash: flags['fingerprint-hash'],
},
paginatedQueryOptions,
});
@@ -33,9 +33,9 @@ interface RawDeployAliasFlags {
}
export default class WorkerAlias extends EasCommand {
static override description = 'Assign deployment aliases';
static override aliases = ['deploy:alias', 'deploy:promote'];
static override state = 'beta';
static override description = 'Assign deployment aliases.';
static override aliases = ['worker:alias', 'deploy:promote'];
static override state = 'preview';
static override flags = {
prod: Flags.boolean({
@@ -70,7 +70,7 @@ export default class WorkerAlias extends EasCommand {
enableJsonOutput();
}
Log.warn('EAS Hosting is still in beta and subject to changes.');
Log.warn('EAS Hosting is still in preview and subject to changes.');
const {
getDynamicPrivateProjectConfigAsync,
@@ -65,10 +65,10 @@ interface DeployInProgressParams {
}
export default class WorkerDeploy extends EasCommand {
static override description = 'Deploy your Expo web build';
static override aliases = ['deploy'];
static override description = 'Deploy your Expo Router web build and API Routes.';
static override aliases = ['worker:deploy'];
static override usage = [chalk`deploy {dim [options]}`, `deploy --prod`];
static override state = 'beta';
static override state = 'preview';
static override flags = {
prod: Flags.boolean({
@@ -111,7 +111,7 @@ export default class WorkerDeploy extends EasCommand {
enableJsonOutput();
}
Log.warn('EAS Hosting is still in beta and subject to changes.');
Log.warn('EAS Hosting is still in preview and subject to changes.');
const {
getDynamicPrivateProjectConfigAsync,
@@ -455,7 +455,7 @@ function logExportedProjectInfo(
// Only show the timestamp for exports older than 1 minute
if (project.modifiedAt && Date.now() - project.modifiedAt.getTime() > 60_000) {
modifiedAgo = ` - exported ${formatTimeAgo(project.modifiedAt)}`;
Log.warn(`> Project export: ${project.type}${modifiedAgo}}`);
Log.warn(`> Project export: ${project.type}${modifiedAgo}`);
} else {
Log.log(chalk`{dim > Project export: ${project.type}}`);
}
@@ -410,11 +410,11 @@ export default class UpdatePublish extends EasCommand {
runtimeToPlatformsAndFingerprintInfoMapping.map(async info => {
return {
...info,
fingerprintSource: info.fingerprint
expoUpdatesRuntimeFingerprintSource: info.expoUpdatesRuntimeFingerprint
? (
await maybeUploadFingerprintAsync({
hash: info.runtimeVersion,
fingerprint: info.fingerprint,
fingerprint: info.expoUpdatesRuntimeFingerprint,
graphqlClient,
})
).fingerprintSource ?? null
@@ -449,7 +449,7 @@ export default class UpdatePublish extends EasCommand {
// Sort the updates into different groups based on their platform specific runtime versions
const updateGroups: PublishUpdateGroupInput[] =
runtimeToPlatformsAndFingerprintInfoAndFingerprintSourceMapping.map(
({ runtimeVersion, platforms, fingerprintSource, fingerprintInfoGroup }) => {
({ runtimeVersion, platforms, fingerprintInfoGroup }) => {
const localUpdateInfoGroup = Object.fromEntries(
platforms.map(platform => [
platform,
@@ -485,9 +485,6 @@ export default class UpdatePublish extends EasCommand {
branchId: branch.id,
updateInfoGroup: localUpdateInfoGroup,
rolloutInfoGroup: localRolloutInfoGroup,
runtimeFingerprintSource: fingerprintSource
? transformFingerprintSource(fingerprintSource)
: null,
fingerprintInfoGroup: transformedFingerprintInfoGroup,
runtimeVersion,
message: updateMessage,
@@ -208,8 +208,8 @@ export default class UpdateRollBackToEmbedded extends EasCommand {
platform,
runtimeVersionInfo: {
runtimeVersion: selectedRuntime,
fingerprint: null,
fingerprintHash: null,
expoUpdatesRuntimeFingerprint: null,
expoUpdatesRuntimeFingerprintHash: null,
},
}))
);
@@ -1,11 +1,26 @@
import { JsonFileCache } from '@expo/apple-utils';
import * as fs from 'fs-extra';
import { vol } from 'memfs';
import { promptAsync } from '../../../../prompts';
import { AppleTeamType } from '../authenticateTypes';
import { resolveAppleTeamAsync, resolveAscApiKeyAsync } from '../resolveCredentials';
import * as Keychain from '../keychain';
import {
resolveAppleTeamAsync,
resolveAscApiKeyAsync,
resolveUserCredentialsAsync,
} from '../resolveCredentials';
jest.mock('../../../../prompts');
jest.mock('fs');
jest.mock('@expo/apple-utils', () => {
return {
getCacheAsync: jest.fn(),
usernameCachePath: jest.fn(),
...jest.requireActual('@expo/apple-utils'),
};
});
jest.mock('../keychain');
const testAscApiKey = {
keyP8: 'test-key-p8',
@@ -89,3 +104,139 @@ describe(resolveAppleTeamAsync, () => {
});
});
});
describe(resolveUserCredentialsAsync, () => {
let KeychainMock: any;
beforeAll(() => {
JsonFileCache.getCacheAsync = jest.fn().mockImplementation(async (filePath: string) => {
const content = await fs.readFile(filePath, 'utf-8');
return content ? JSON.parse(content) : null;
});
KeychainMock = jest.mocked(Keychain);
});
beforeEach(() => {
jest.clearAllMocks();
KeychainMock.EXPO_NO_KEYCHAIN = '';
});
it('uses credentials resolved from options', async () => {
const result = await resolveUserCredentialsAsync({
username: 'fakeUsername',
password: 'fakePassword',
});
expect(result).toMatchObject({
username: 'fakeUsername',
password: 'fakePassword',
});
});
it('uses credentials resolved from environment', async () => {
process.env.EXPO_APPLE_ID = 'fakeUsername';
process.env.EXPO_APPLE_PASSWORD = 'fakePassword';
const result = await resolveUserCredentialsAsync({});
expect(result).toMatchObject({
username: 'fakeUsername',
password: 'fakePassword',
});
});
it('uses credentials from prompt, does not update cache if they match', async () => {
vol.fromJSON({
'./.app-store/auth/username.json': `
{
"username": "fakeUsername"
}
`,
});
jest.mocked(promptAsync).mockResolvedValueOnce({ username: 'fakeUsername' });
JsonFileCache.usernameCachePath = jest.fn().mockReturnValue('./.app-store/auth/username.json');
const cacheAsyncSpy = jest.spyOn(JsonFileCache, 'cacheAsync');
const result = await resolveUserCredentialsAsync({});
expect(result).toMatchObject({
username: 'fakeUsername',
});
expect(cacheAsyncSpy).not.toHaveBeenCalled();
});
it("uses credentials from prompt, updates cache if they don't match", async () => {
vol.fromJSON({
'./.app-store/auth/username.json': `
{
"username": "fakeUsername"
}
`,
});
jest.mocked(promptAsync).mockResolvedValueOnce({ username: 'newFakeUsername' });
JsonFileCache.usernameCachePath = jest.fn().mockReturnValue('./.app-store/auth/username.json');
const cacheAsyncSpy = jest.spyOn(JsonFileCache, 'cacheAsync');
expect(JSON.parse(await fs.readFile('./.app-store/auth/username.json', 'utf-8'))).toMatchObject(
{ username: 'fakeUsername' }
);
const result = await resolveUserCredentialsAsync({});
expect(result).toMatchObject({
username: 'newFakeUsername',
});
expect(cacheAsyncSpy).toHaveBeenCalledWith('./.app-store/auth/username.json', {
username: 'newFakeUsername',
});
expect(JSON.parse(await fs.readFile('./.app-store/auth/username.json', 'utf-8'))).toMatchObject(
{ username: 'newFakeUsername' }
);
});
it("uses credentials from prompt, doesn't read or update cache if EXPO_NO_KEYCHAIN is set", async () => {
vol.fromJSON({
'./.app-store/auth/username.json': `
{
"username": "fakeUsername"
}
`,
});
jest.mocked(promptAsync).mockResolvedValueOnce({ username: 'newFakeUsername' });
JsonFileCache.usernameCachePath = jest.fn().mockReturnValue('./.app-store/auth/username.json');
KeychainMock.EXPO_NO_KEYCHAIN = 'true';
const getCacheAsyncSpy = jest.spyOn(JsonFileCache, 'getCacheAsync');
const cacheAsyncSpy = jest.spyOn(JsonFileCache, 'cacheAsync');
expect(JSON.parse(await fs.readFile('./.app-store/auth/username.json', 'utf-8'))).toMatchObject(
{ username: 'fakeUsername' }
);
const result = await resolveUserCredentialsAsync({});
expect(result).toMatchObject({
username: 'newFakeUsername',
});
expect(getCacheAsyncSpy).not.toHaveBeenCalled();
expect(cacheAsyncSpy).not.toHaveBeenCalled();
await expect(fs.access('./.app-store/auth/username.json')).rejects.toThrow();
});
it('clears credentials from prompt if malformed before using and updating cache', async () => {
vol.fromJSON({
'./.app-store/auth/username.json': `
{
"username": "fakeUsername"
}
`,
});
jest.mocked(promptAsync).mockResolvedValueOnce({ username: '\x17newFake\x01Username\x1F' });
JsonFileCache.usernameCachePath = jest.fn().mockReturnValue('./.app-store/auth/username.json');
const cacheAsyncSpy = jest.spyOn(JsonFileCache, 'cacheAsync');
expect(JSON.parse(await fs.readFile('./.app-store/auth/username.json', 'utf-8'))).toMatchObject(
{ username: 'fakeUsername' }
);
const result = await resolveUserCredentialsAsync({});
expect(result).toMatchObject({
username: 'newFakeUsername',
});
expect(cacheAsyncSpy).toHaveBeenCalledWith('./.app-store/auth/username.json', {
username: 'newFakeUsername',
});
expect(JSON.parse(await fs.readFile('./.app-store/auth/username.json', 'utf-8'))).toMatchObject(
{ username: 'newFakeUsername' }
);
});
});
@@ -208,13 +208,18 @@ async function promptUsernameAsync(): Promise<string> {
// the default value for quicker authentication.
const lastAppleId = await getCachedUsernameAsync();
const { username } = await promptAsync({
let { username } = await promptAsync({
type: 'text',
name: 'username',
message: `Apple ID:`,
validate: (val: string) => val !== '',
initial: lastAppleId ?? undefined,
});
// https://github.com/expo/eas-cli/issues/2254
// user got an invalid unprintable character in their username, which was saved to cache and used to prefill the prompt
// which made them accept the prefilled value not knowing it contains the character and fail to log in
// this replace makes sure no such characters are used or cached
username = username.replace(/[\x00-\x1F]/gi, '');
if (username && username !== lastAppleId) {
await cacheUsernameAsync(username);
+149
View File
@@ -139,6 +139,7 @@ export type Account = {
/** Whether this account has SSO enabled. Can be queried by all members. */
isSSOEnabled: Scalars['Boolean']['output'];
lastDeletionAttemptTime?: Maybe<Scalars['DateTime']['output']>;
logRocketOrganization?: Maybe<LogRocketOrganization>;
name: Scalars['String']['output'];
/** Offers set on this account */
offers?: Maybe<Array<Offer>>;
@@ -1300,6 +1301,7 @@ export type App = Project & {
likeCount: Scalars['Int']['output'];
/** @deprecated 'likes' have been deprecated. */
likedBy: Array<Maybe<User>>;
logRocketProject?: Maybe<LogRocketProject>;
name: Scalars['String']['output'];
ownerAccount: Account;
/** @deprecated No longer supported */
@@ -2932,6 +2934,7 @@ export type BuildFilter = {
buildProfile?: InputMaybe<Scalars['String']['input']>;
channel?: InputMaybe<Scalars['String']['input']>;
distribution?: InputMaybe<DistributionType>;
fingerprintHash?: InputMaybe<Scalars['String']['input']>;
gitCommitHash?: InputMaybe<Scalars['String']['input']>;
hasFingerprint?: InputMaybe<Scalars['Boolean']['input']>;
platform?: InputMaybe<AppPlatform>;
@@ -2945,6 +2948,7 @@ export type BuildFilterInput = {
channel?: InputMaybe<Scalars['String']['input']>;
developmentClient?: InputMaybe<Scalars['Boolean']['input']>;
distributions?: InputMaybe<Array<DistributionType>>;
fingerprintHash?: InputMaybe<Scalars['String']['input']>;
hasFingerprint?: InputMaybe<Scalars['Boolean']['input']>;
platforms?: InputMaybe<Array<AppPlatform>>;
releaseChannel?: InputMaybe<Scalars['String']['input']>;
@@ -3664,6 +3668,16 @@ export type DeleteIosAppCredentialsResult = {
id: Scalars['ID']['output'];
};
export type DeleteLogRocketOrganizationResult = {
__typename?: 'DeleteLogRocketOrganizationResult';
accountId: Scalars['ID']['output'];
};
export type DeleteLogRocketProjectResult = {
__typename?: 'DeleteLogRocketProjectResult';
id: Scalars['ID']['output'];
};
export type DeleteRobotResult = {
__typename?: 'DeleteRobotResult';
id: Scalars['ID']['output'];
@@ -4251,12 +4265,40 @@ export enum Feature {
export type Fingerprint = {
__typename?: 'Fingerprint';
app: App;
builds: AppBuildsConnection;
createdAt: Scalars['DateTime']['output'];
debugInfoUrl?: Maybe<Scalars['String']['output']>;
hash: Scalars['String']['output'];
id: Scalars['ID']['output'];
source?: Maybe<FingerprintSource>;
updatedAt: Scalars['DateTime']['output'];
updates: AppUpdatesConnection;
};
export type FingerprintBuildsArgs = {
after?: InputMaybe<Scalars['String']['input']>;
before?: InputMaybe<Scalars['String']['input']>;
filter?: InputMaybe<FingerprintBuildsFilterInput>;
first?: InputMaybe<Scalars['Int']['input']>;
last?: InputMaybe<Scalars['Int']['input']>;
};
export type FingerprintUpdatesArgs = {
after?: InputMaybe<Scalars['String']['input']>;
before?: InputMaybe<Scalars['String']['input']>;
first?: InputMaybe<Scalars['Int']['input']>;
last?: InputMaybe<Scalars['Int']['input']>;
};
export type FingerprintBuildsFilterInput = {
channel?: InputMaybe<Scalars['String']['input']>;
developmentClient?: InputMaybe<Scalars['Boolean']['input']>;
distributions?: InputMaybe<Array<DistributionType>>;
platforms?: InputMaybe<Array<AppPlatform>>;
releaseChannel?: InputMaybe<Scalars['String']['input']>;
simulator?: InputMaybe<Scalars['Boolean']['input']>;
};
export type FingerprintFilterInput = {
@@ -4313,6 +4355,22 @@ export type FutureSubscription = {
startDate: Scalars['DateTime']['output'];
};
export type GenerateLogRocketOrganizationLinkResult = {
__typename?: 'GenerateLogRocketOrganizationLinkResult';
url: Scalars['String']['output'];
};
export type GenerateLogRocketOrganizationLinkingUrlInput = {
accountId: Scalars['ID']['input'];
callbackUrl: Scalars['String']['input'];
};
export type GenerateLogRocketReplayTokenResult = {
__typename?: 'GenerateLogRocketReplayTokenResult';
orgSlug: Scalars['String']['output'];
replayToken: Scalars['String']['output'];
};
export type GetSignedAssetUploadSpecificationsResult = {
__typename?: 'GetSignedAssetUploadSpecificationsResult';
specifications: Array<Scalars['String']['output']>;
@@ -5193,6 +5251,15 @@ export type LineDataset = {
label: Scalars['String']['output'];
};
export type LinkLogRocketOrganizationToExpoAccountInput = {
accountId: Scalars['ID']['input'];
client_id: Scalars['String']['input'];
client_secret: Scalars['String']['input'];
orgName: Scalars['String']['input'];
orgSlug: Scalars['String']['input'];
state: Scalars['String']['input'];
};
export type LinkSharedEnvironmentVariableInput = {
appId: Scalars['ID']['input'];
environment?: InputMaybe<EnvironmentVariableEnvironment>;
@@ -5205,6 +5272,76 @@ export type LogNameTypeMapping = {
typeName: EntityTypeName;
};
export type LogRocketOrganization = {
__typename?: 'LogRocketOrganization';
account: Account;
createdAt: Scalars['DateTime']['output'];
id: Scalars['ID']['output'];
orgName: Scalars['String']['output'];
orgSlug: Scalars['String']['output'];
};
export type LogRocketOrganizationMutation = {
__typename?: 'LogRocketOrganizationMutation';
/** Delete a LogRocket organization by ID */
deleteLogRocketOrganization: DeleteLogRocketOrganizationResult;
/** Generate a LogRocket linking URL */
generateLogRocketOrganizationLinkingURL: GenerateLogRocketOrganizationLinkResult;
/** Generate a LogRocket replay token for an organization */
generateLogRocketReplayToken: GenerateLogRocketReplayTokenResult;
/** Link a LogRocket organization to an Expo account */
linkLogRocketOrganizationToExpoAccount: LogRocketOrganization;
};
export type LogRocketOrganizationMutationDeleteLogRocketOrganizationArgs = {
accountId: Scalars['ID']['input'];
};
export type LogRocketOrganizationMutationGenerateLogRocketOrganizationLinkingUrlArgs = {
input: GenerateLogRocketOrganizationLinkingUrlInput;
};
export type LogRocketOrganizationMutationGenerateLogRocketReplayTokenArgs = {
accountId: Scalars['ID']['input'];
};
export type LogRocketOrganizationMutationLinkLogRocketOrganizationToExpoAccountArgs = {
input: LinkLogRocketOrganizationToExpoAccountInput;
};
export type LogRocketProject = {
__typename?: 'LogRocketProject';
app: App;
createdAt: Scalars['DateTime']['output'];
id: Scalars['ID']['output'];
logRocketOrgId: Scalars['ID']['output'];
logRocketProjectSlug: Scalars['String']['output'];
updatedAt: Scalars['DateTime']['output'];
};
export type LogRocketProjectMutation = {
__typename?: 'LogRocketProjectMutation';
/** Create a LogRocket project */
createLogRocketProject: LogRocketProject;
/** Delete a LogRocket project by ID */
deleteLogRocketProject: DeleteLogRocketProjectResult;
};
export type LogRocketProjectMutationCreateLogRocketProjectArgs = {
appId: Scalars['ID']['input'];
logRocketProjectSlug: Scalars['String']['input'];
};
export type LogRocketProjectMutationDeleteLogRocketProjectArgs = {
logRocketProjectId: Scalars['ID']['input'];
};
export type LogsTimespan = {
end: Scalars['DateTime']['input'];
start?: InputMaybe<Scalars['DateTime']['input']>;
@@ -5848,6 +5985,10 @@ export type RootMutation = {
/** Mutations that modify an EAS Build */
jobRun: JobRunMutation;
keystoreGenerationUrl: KeystoreGenerationUrlMutation;
/** Mutations for LogRocket organizations */
logRocketOrganization: LogRocketOrganizationMutation;
/** Mutations for LogRocket projects */
logRocketProject: LogRocketProjectMutation;
/** Mutations that modify the currently authenticated User */
me: MeMutation;
/** Mutations that modify a NotificationSubscription */
@@ -8312,6 +8453,8 @@ export type WorkflowRun = ActivityTimelineProjectActivity & {
name: Scalars['String']['output'];
pullRequestNumber?: Maybe<Scalars['Int']['output']>;
requestedGitRef?: Maybe<Scalars['String']['output']>;
retriedWorkflowRun?: Maybe<WorkflowRun>;
retries: Array<WorkflowRun>;
status: WorkflowRunStatus;
triggerEventType: WorkflowRunTriggerEventType;
updatedAt: Scalars['DateTime']['output'];
@@ -8339,6 +8482,7 @@ export type WorkflowRunMutation = {
__typename?: 'WorkflowRunMutation';
cancelWorkflowRun: WorkflowRun;
createWorkflowRun: WorkflowRun;
retryWorkflowRun: WorkflowRun;
};
@@ -8353,6 +8497,11 @@ export type WorkflowRunMutationCreateWorkflowRunArgs = {
workflowRunInput: WorkflowRunInput;
};
export type WorkflowRunMutationRetryWorkflowRunArgs = {
workflowRunId: Scalars['ID']['input'];
};
export type WorkflowRunQuery = {
__typename?: 'WorkflowRunQuery';
byId: WorkflowRun;
+22 -18
View File
@@ -733,11 +733,11 @@ export const defaultPublishPlatforms: UpdatePublishPlatform[] = ['android', 'ios
export type RuntimeVersionInfo = {
runtimeVersion: string;
fingerprint: {
expoUpdatesRuntimeFingerprint: {
fingerprintSources: object[];
isDebugFingerprintSource: boolean;
} | null;
fingerprintHash: string | null;
expoUpdatesRuntimeFingerprintHash: string | null;
};
type FingerprintInfoGroup = {
@@ -797,11 +797,11 @@ async function getRuntimeVersionInfoForPlatformAsync({
env: Env | undefined;
}): Promise<{
runtimeVersion: string;
fingerprint: {
expoUpdatesRuntimeFingerprint: {
fingerprintSources: object[];
isDebugFingerprintSource: boolean;
} | null;
fingerprintHash: string | null;
expoUpdatesRuntimeFingerprintHash: string | null;
}> {
if (await isModernExpoUpdatesCLIWithRuntimeVersionCommandSupportedAsync(projectDir)) {
try {
@@ -852,8 +852,8 @@ async function getRuntimeVersionInfoForPlatformAsync({
return {
runtimeVersion: resolvedRuntimeVersion,
fingerprint: null,
fingerprintHash: null,
expoUpdatesRuntimeFingerprint: null,
expoUpdatesRuntimeFingerprintHash: null,
};
}
@@ -875,13 +875,15 @@ export function getRuntimeToPlatformsAndFingerprintInfoMappingFromRuntimeVersion
platforms: runtimeVersionInfoObjects.map(
runtimeVersionInfoObject => runtimeVersionInfoObject.platform
),
fingerprint:
expoUpdatesRuntimeFingerprint:
runtimeVersionInfoObjects.map(
runtimeVersionInfoObject => runtimeVersionInfoObject.runtimeVersionInfo.fingerprint
runtimeVersionInfoObject =>
runtimeVersionInfoObject.runtimeVersionInfo.expoUpdatesRuntimeFingerprint
)[0] ?? null,
fingerprintHash:
expoUpdatesRuntimeFingerprintHash:
runtimeVersionInfoObjects.map(
runtimeVersionInfoObject => runtimeVersionInfoObject.runtimeVersionInfo.fingerprintHash
runtimeVersionInfoObject =>
runtimeVersionInfoObject.runtimeVersionInfo.expoUpdatesRuntimeFingerprintHash
)[0] ?? null,
};
}
@@ -899,20 +901,20 @@ export async function maybeCalculateFingerprintForRuntimeVersionInfoObjectsWitho
graphqlClient: ExpoGraphqlClient;
runtimeToPlatformsAndFingerprintInfoAndFingerprintSourceMapping: (RuntimeVersionInfo & {
platforms: UpdatePublishPlatform[];
fingerprintSource: FingerprintSource | null;
expoUpdatesRuntimeFingerprintSource: FingerprintSource | null;
})[];
workflowsByPlatform: Record<Platform, Workflow>;
env: Env | undefined;
}): Promise<
(RuntimeVersionInfo & {
platforms: UpdatePublishPlatform[];
fingerprintSource: FingerprintSource | null;
expoUpdatesRuntimeFingerprintSource: FingerprintSource | null;
fingerprintInfoGroup: FingerprintInfoGroup;
})[]
> {
const runtimesToComputeFingerprintsFor =
runtimeToPlatformsAndFingerprintInfoAndFingerprintSourceMapping.filter(
infoGroup => !infoGroup.fingerprintHash
infoGroup => !infoGroup.expoUpdatesRuntimeFingerprintHash
);
const fingerprintOptionsByRuntimeAndPlatform = new Map<string, FingerprintOptions>();
for (const infoGroup of runtimesToComputeFingerprintsFor) {
@@ -975,9 +977,11 @@ export async function maybeCalculateFingerprintForRuntimeVersionInfoObjectsWitho
infoGroup
): infoGroup is RuntimeVersionInfo & {
platforms: UpdatePublishPlatform[];
fingerprintSource: FingerprintSource;
fingerprintHash: string;
} => !!infoGroup.fingerprintHash && !!infoGroup.fingerprintSource
expoUpdatesRuntimeFingerprintSource: FingerprintSource;
expoUpdatesRuntimeFingerprintHash: string;
} =>
!!infoGroup.expoUpdatesRuntimeFingerprintHash &&
!!infoGroup.expoUpdatesRuntimeFingerprintSource
)
.map(infoGroup => {
const platform = infoGroup.platforms[0];
@@ -985,8 +989,8 @@ export async function maybeCalculateFingerprintForRuntimeVersionInfoObjectsWitho
...infoGroup,
fingerprintInfoGroup: {
[platform]: {
fingerprintHash: infoGroup.fingerprintHash,
fingerprintSource: infoGroup.fingerprintSource,
fingerprintHash: infoGroup.expoUpdatesRuntimeFingerprintHash,
fingerprintSource: infoGroup.expoUpdatesRuntimeFingerprintSource,
},
},
};
@@ -23,11 +23,11 @@ export async function resolveRuntimeVersionUsingCLIAsync({
cwd?: string;
}): Promise<{
runtimeVersion: string | null;
fingerprint: {
expoUpdatesRuntimeFingerprint: {
fingerprintSources: object[];
isDebugFingerprintSource: boolean;
} | null;
fingerprintHash: string | null;
expoUpdatesRuntimeFingerprintHash: string | null;
}> {
Log.debug('Using expo-updates runtimeversion:resolve CLI for runtime version resolution');
@@ -47,13 +47,13 @@ export async function resolveRuntimeVersionUsingCLIAsync({
return {
runtimeVersion: runtimeVersionResult.runtimeVersion ?? null,
fingerprint: runtimeVersionResult.fingerprintSources
expoUpdatesRuntimeFingerprint: runtimeVersionResult.fingerprintSources
? {
fingerprintSources: runtimeVersionResult.fingerprintSources,
isDebugFingerprintSource: useDebugFingerprintSource,
}
: null,
fingerprintHash: runtimeVersionResult.fingerprintSources
expoUpdatesRuntimeFingerprintHash: runtimeVersionResult.fingerprintSources
? runtimeVersionResult.runtimeVersion
: null,
};
@@ -75,19 +75,19 @@ export async function resolveRuntimeVersionAsync({
cwd?: string;
}): Promise<{
runtimeVersion: string | null;
fingerprint: {
expoUpdatesRuntimeFingerprint: {
fingerprintSources: object[];
isDebugFingerprintSource: boolean;
} | null;
fingerprintHash: string | null;
expoUpdatesRuntimeFingerprintHash: string | null;
} | null> {
if (!(await isModernExpoUpdatesCLIWithRuntimeVersionCommandSupportedAsync(projectDir))) {
// fall back to the previous behavior (using the @expo/config-plugins eas-cli dependency rather
// than the versioned @expo/config-plugins dependency in the project)
return {
runtimeVersion: await Updates.getRuntimeVersionNullableAsync(projectDir, exp, platform),
fingerprint: null,
fingerprintHash: null,
expoUpdatesRuntimeFingerprint: null,
expoUpdatesRuntimeFingerprintHash: null,
};
}
+23 -3
View File
@@ -4,6 +4,7 @@ import mime from 'mime';
import { Gzip } from 'minizlib';
import fetch, { Headers, HeadersInit, RequestInit, Response } from 'node-fetch';
import fs, { createReadStream } from 'node:fs';
import { readFile } from 'node:fs/promises';
import path from 'node:path';
import promiseRetry from 'promise-retry';
@@ -28,6 +29,24 @@ const isCompressible = (contentType: string | null, size: number): boolean => {
}
};
const getContentTypeAsync = async (filePath: string): Promise<string | null> => {
let contentType = mime.getType(path.basename(filePath));
if (!contentType) {
const fileContent = await readFile(filePath, 'utf-8');
try {
// check if file is valid JSON without an extension, e.g. for the apple app site association file
const parsedData = JSON.parse(fileContent);
if (parsedData) {
contentType = 'application/json';
}
} catch {}
}
return contentType;
};
export interface UploadParams extends Omit<RequestInit, 'signal' | 'body'> {
filePath: string;
compress?: boolean;
@@ -70,14 +89,15 @@ export async function uploadAsync(params: UploadParams): Promise<UploadResult> {
headers: headersInit,
...requestInit
} = params;
const stat = await fs.promises.stat(params.filePath);
const stat = await fs.promises.stat(filePath);
if (stat.size > MAX_UPLOAD_SIZE) {
throw new Error(
`Upload of "${params.filePath}" aborted: File size is greater than the upload limit (>500MB)`
`Upload of "${filePath}" aborted: File size is greater than the upload limit (>500MB)`
);
}
const contentType = mime.getType(path.basename(params.filePath));
const contentType = await getContentTypeAsync(filePath);
return await promiseRetry(
async retry => {
const headers = new Headers(headersInit);
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@expo/eas-json",
"description": "A library for interacting with eas.json",
"version": "14.3.1",
"version": "14.5.0",
"author": "Expo <[email protected]>",
"bugs": "https://github.com/expo/eas-cli/issues",
"dependencies": {
"@babel/code-frame": "7.23.5",
"@expo/eas-build-job": "1.0.156",
"@expo/eas-build-job": "1.0.165",
"chalk": "4.1.2",
"env-string": "1.0.1",
"fs-extra": "11.2.0",
@@ -301,37 +301,124 @@ test('valid profile for internal distribution on Android', async () => {
});
});
test('valid profile extending other profile', async () => {
test('valid profile with extension chain not exceeding 5', async () => {
await fs.writeJson('/project/eas.json', {
build: {
base: {
node: '12.0.0',
},
extension: {
extension1: {
extends: 'base',
distribution: 'internal',
node: '13.0.0',
},
extension2: {
extends: 'extension1',
distribution: 'internal',
node: '14.0.0',
},
extension3: {
extends: 'extension2',
distribution: 'internal',
node: '15.0.0',
},
extension4: {
extends: 'extension3',
distribution: 'internal',
node: '16.0.0',
},
},
});
const accessor = EasJsonAccessor.fromProjectPath('/project');
const baseProfile = await EasJsonUtils.getBuildProfileAsync(accessor, Platform.ANDROID, 'base');
const extendedProfile = await EasJsonUtils.getBuildProfileAsync(
const extendedProfile1 = await EasJsonUtils.getBuildProfileAsync(
accessor,
Platform.ANDROID,
'extension'
'extension1'
);
const extendedProfile2 = await EasJsonUtils.getBuildProfileAsync(
accessor,
Platform.ANDROID,
'extension2'
);
const extendedProfile3 = await EasJsonUtils.getBuildProfileAsync(
accessor,
Platform.ANDROID,
'extension3'
);
const extendedProfile4 = await EasJsonUtils.getBuildProfileAsync(
accessor,
Platform.ANDROID,
'extension4'
);
expect(baseProfile).toEqual({
distribution: 'store',
credentialsSource: 'remote',
node: '12.0.0',
});
expect(extendedProfile).toEqual({
expect(extendedProfile1).toEqual({
distribution: 'internal',
credentialsSource: 'remote',
node: '13.0.0',
});
expect(extendedProfile2).toEqual({
distribution: 'internal',
credentialsSource: 'remote',
node: '14.0.0',
});
expect(extendedProfile3).toEqual({
distribution: 'internal',
credentialsSource: 'remote',
node: '15.0.0',
});
expect(extendedProfile4).toEqual({
distribution: 'internal',
credentialsSource: 'remote',
node: '16.0.0',
});
});
test('valid profile with extension chain exceeding 5 - too long', async () => {
await fs.writeJson('/project/eas.json', {
build: {
base: {
node: '12.0.0',
},
extension1: {
extends: 'base',
distribution: 'internal',
node: '13.0.0',
},
extension2: {
extends: 'extension1',
distribution: 'internal',
node: '14.0.0',
},
extension3: {
extends: 'extension2',
distribution: 'internal',
node: '15.0.0',
},
extension4: {
extends: 'extension3',
distribution: 'internal',
node: '16.0.0',
},
extension5: {
extends: 'extension4',
distribution: 'internal',
node: '17.0.0',
},
},
});
const accessor = EasJsonAccessor.fromProjectPath('/project');
await expect(
EasJsonUtils.getBuildProfileAsync(accessor, Platform.ANDROID, 'extension5')
).rejects.toThrow(
'Too long chain of profile extensions, make sure "extends" keys do not make a cycle'
);
});
test('valid profile extending other profile with platform specific envs', async () => {
@@ -169,7 +169,7 @@ test('ios config with ascApiKey fields set to env var', async () => {
}
});
test('valid profile extending other profile', async () => {
test('valid profile with extension chain not exceeding 5', async () => {
await fs.writeJson('/project/eas.json', {
submit: {
base: {
@@ -179,7 +179,7 @@ test('valid profile extending other profile', async () => {
appleTeamId: 'AB32CZE81F',
},
},
extension: {
extension1: {
extends: 'base',
ios: {
appleTeamId: 'AB32CZE81F',
@@ -188,15 +188,57 @@ test('valid profile extending other profile', async () => {
ascApiKeyId: 'AB32CZE81F',
},
},
extension2: {
extends: 'extension1',
ios: {
appleTeamId: 'AB32CZE81E',
ascApiKeyPath: './path-ABCD.p8',
ascApiKeyIssuerId: '2af70a7a-2ac5-44d4-924e-ae97a7ca9333',
ascApiKeyId: 'AB32CZE81E',
},
},
extension3: {
extends: 'extension2',
ios: {
appleTeamId: 'AB32CZE81D',
ascApiKeyPath: './path-ABCD.p8',
ascApiKeyIssuerId: '2af70a7a-2ac5-44d4-924e-ae97a7ca9333',
ascApiKeyId: 'AB32CZE81D',
},
},
extension4: {
extends: 'extension3',
ios: {
appleTeamId: 'AB32CZE81C',
ascApiKeyPath: './path-ABCD.p8',
ascApiKeyIssuerId: '2af70a7a-2ac5-44d4-924e-ae97a7ca9333',
ascApiKeyId: 'AB32CZE81C',
},
},
},
});
const accessor = EasJsonAccessor.fromProjectPath('/project');
const baseProfile = await EasJsonUtils.getSubmitProfileAsync(accessor, Platform.IOS, 'base');
const extendedProfile = await EasJsonUtils.getSubmitProfileAsync(
const extendedProfile1 = await EasJsonUtils.getSubmitProfileAsync(
accessor,
Platform.IOS,
'extension'
'extension1'
);
const extendedProfile2 = await EasJsonUtils.getSubmitProfileAsync(
accessor,
Platform.IOS,
'extension2'
);
const extendedProfile3 = await EasJsonUtils.getSubmitProfileAsync(
accessor,
Platform.IOS,
'extension3'
);
const extendedProfile4 = await EasJsonUtils.getSubmitProfileAsync(
accessor,
Platform.IOS,
'extension4'
);
expect(baseProfile).toEqual({
language: 'en-US',
@@ -204,7 +246,7 @@ test('valid profile extending other profile', async () => {
ascAppId: '1223423523',
appleTeamId: 'AB32CZE81F',
});
expect(extendedProfile).toEqual({
expect(extendedProfile1).toEqual({
language: 'en-US',
appleId: '[email protected]',
ascAppId: '1223423523',
@@ -213,6 +255,99 @@ test('valid profile extending other profile', async () => {
ascApiKeyIssuerId: '2af70a7a-2ac5-44d4-924e-ae97a7ca9333',
ascApiKeyId: 'AB32CZE81F',
});
expect(extendedProfile2).toEqual({
language: 'en-US',
appleId: '[email protected]',
ascAppId: '1223423523',
appleTeamId: 'AB32CZE81E',
ascApiKeyPath: './path-ABCD.p8',
ascApiKeyIssuerId: '2af70a7a-2ac5-44d4-924e-ae97a7ca9333',
ascApiKeyId: 'AB32CZE81E',
});
expect(extendedProfile3).toEqual({
language: 'en-US',
appleId: '[email protected]',
ascAppId: '1223423523',
appleTeamId: 'AB32CZE81D',
ascApiKeyPath: './path-ABCD.p8',
ascApiKeyIssuerId: '2af70a7a-2ac5-44d4-924e-ae97a7ca9333',
ascApiKeyId: 'AB32CZE81D',
});
expect(extendedProfile4).toEqual({
language: 'en-US',
appleId: '[email protected]',
ascAppId: '1223423523',
appleTeamId: 'AB32CZE81C',
ascApiKeyPath: './path-ABCD.p8',
ascApiKeyIssuerId: '2af70a7a-2ac5-44d4-924e-ae97a7ca9333',
ascApiKeyId: 'AB32CZE81C',
});
});
test('valid profile with extension chain exceeding 5 - too long', async () => {
await fs.writeJson('/project/eas.json', {
submit: {
base: {
ios: {
appleId: '[email protected]',
ascAppId: '1223423523',
appleTeamId: 'AB32CZE81F',
},
},
extension1: {
extends: 'base',
ios: {
appleTeamId: 'AB32CZE81F',
ascApiKeyPath: './path-ABCD.p8',
ascApiKeyIssuerId: '2af70a7a-2ac5-44d4-924e-ae97a7ca9333',
ascApiKeyId: 'AB32CZE81F',
},
},
extension2: {
extends: 'extension1',
ios: {
appleTeamId: 'AB32CZE81E',
ascApiKeyPath: './path-ABCD.p8',
ascApiKeyIssuerId: '2af70a7a-2ac5-44d4-924e-ae97a7ca9333',
ascApiKeyId: 'AB32CZE81E',
},
},
extension3: {
extends: 'extension2',
ios: {
appleTeamId: 'AB32CZE81D',
ascApiKeyPath: './path-ABCD.p8',
ascApiKeyIssuerId: '2af70a7a-2ac5-44d4-924e-ae97a7ca9333',
ascApiKeyId: 'AB32CZE81D',
},
},
extension4: {
extends: 'extension3',
ios: {
appleTeamId: 'AB32CZE81C',
ascApiKeyPath: './path-ABCD.p8',
ascApiKeyIssuerId: '2af70a7a-2ac5-44d4-924e-ae97a7ca9333',
ascApiKeyId: 'AB32CZE81C',
},
},
extension5: {
extends: 'extension4',
ios: {
appleTeamId: 'AB32CZE81B',
ascApiKeyPath: './path-ABCD.p8',
ascApiKeyIssuerId: '2af70a7a-2ac5-44d4-924e-ae97a7ca9333',
ascApiKeyId: 'AB32CZE81B',
},
},
},
});
const accessor = EasJsonAccessor.fromProjectPath('/project');
await expect(
EasJsonUtils.getSubmitProfileAsync(accessor, Platform.IOS, 'extension5')
).rejects.toThrow(
'Too long chain of profile extensions, make sure "extends" keys do not make a cycle'
);
});
test('ios config with with invalid appleId', async () => {
+1 -1
View File
@@ -47,7 +47,7 @@ function resolveProfile<T extends Platform>({
profileName: string;
depth?: number;
}): SubmitProfile<T> | undefined {
if (depth >= 2) {
if (depth >= 5) {
throw new Error(
'Too long chain of profile extensions, make sure "extends" keys do not make a cycle'
);
Generated
+9 -9
View File
@@ -1465,10 +1465,10 @@
slugify "^1.3.4"
sucrase "3.35.0"
"@expo/[email protected]56":
version "1.0.156"
resolved "https://registry.yarnpkg.com/@expo/eas-build-job/-/eas-build-job-1.0.156.tgz#c8e1f34a480eba217e6aa37e5d178f440065a7e7"
integrity sha512-pD3vWO7fIaQ4wmJy/x6L2dVK2rwf1qNzTE/4I5JI4r6vYSKrSCv8EIoE87xDBaRUBMk72ZdzyznJe516pMyTaw==
"@expo/[email protected]5":
version "1.0.165"
resolved "https://registry.yarnpkg.com/@expo/eas-build-job/-/eas-build-job-1.0.165.tgz#71ec010330d23bb6f6c257ce1ca7c0258e8feaaa"
integrity sha512-l4bPVRmc6SlrgiC7AOid6s+o3kyP47x17cGIPQ0d4FOaOxu6pP3bPZ3BuPjts1mfvrKg/c/Phe1fJ1nnNlo3Xw==
dependencies:
"@expo/logger" "1.0.117"
joi "^17.13.1"
@@ -1645,12 +1645,12 @@
dependencies:
cross-spawn "^7.0.3"
"@expo/[email protected]1":
version "1.0.161"
resolved "https://registry.yarnpkg.com/@expo/steps/-/steps-1.0.161.tgz#6201d45b1aa31e5c71cc18216d4272419f9fc6c3"
integrity sha512-CKYYBB+fb0uV1DmaNgIoXcPaT5MBRTWDE8ptRWUbYwrNSf9Dp9k+bVlw+eoI1GTwcoCoLiLSLg+S7hvfQRBeZw==
"@expo/[email protected]5":
version "1.0.165"
resolved "https://registry.yarnpkg.com/@expo/steps/-/steps-1.0.165.tgz#16cc510174aebaafbc864377e32d4091efad77c1"
integrity sha512-Eo7BYU0iCCdJnxvvj/fVjsYUxV8nmej0VxZaaUpgqlutbRBJNsiBx0BQNxk9Hx/2Ix4n/amcW7IiddBVYzoCUQ==
dependencies:
"@expo/eas-build-job" "1.0.156"
"@expo/eas-build-job" "1.0.165"
"@expo/logger" "1.0.117"
"@expo/spawn-async" "^1.7.2"
arg "^5.0.2"