Compare commits

..
Author SHA1 Message Date
Dominik Sokal 8c758fa413 v2.0.0 2022-09-01 13:30:03 +02:00
Dominik Sokal 4b2fb24d1d Update CHANGELOG.md 2022-09-01 13:24:46 +02:00
Dominik Sokal 1637573d72 fix typo in promptToConfigurePushNotifications (#1332)
* fix typo in promptToConfigurePushNotifications

* address PR feedback
2022-09-01 13:20:18 +02:00
Will Schurman 367477f75b [eas-cli] Fix dynamic config update warning for update:configure (#1322) 2022-08-31 14:24:40 -07:00
23 changed files with 231 additions and 156 deletions

No files matched your search

+4 -2
View File
@@ -6,13 +6,15 @@ This is the log of notable changes to EAS CLI and related packages.
### 🛠 Breaking changes
- Fix typo in `cli.promptToConfigurePushNotifications` field in **eas.json**. EAS CLI will throw an error if the old field name is in **eas.json**. ([#1332](https://github.com/expo/eas-cli/pull/1332) by [@dsokal](https://github.com/dsokal))
### 🎉 New features
### 🐛 Bug fixes
### 🧹 Chores
- Fix dynamic config update warning. ([#1322](https://github.com/expo/eas-cli/pull/1322) by [@wschurman](https://github.com/wschurman))
- Use discriminated union type for BuildContext. ([#1330](https://github.com/expo/eas-cli/pull/1330) by [@wschurman](https://github.com/wschurman))
### 🧹 Chores
## [1.2.0](https://github.com/expo/eas-cli/releases/tag/v1.2.0) - 2022-08-29
+1 -1
View File
@@ -1,5 +1,5 @@
{
"npmClient": "yarn",
"useWorkspaces": true,
"version": "1.2.0"
"version": "2.0.0"
}
+46 -46
View File
@@ -124,7 +124,7 @@ ALIASES
$ eas login
```
_See code: [src/commands/account/login.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/account/login.ts)_
_See code: [src/commands/account/login.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/account/login.ts)_
## `eas account:logout`
@@ -141,7 +141,7 @@ ALIASES
$ eas logout
```
_See code: [src/commands/account/logout.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/account/logout.ts)_
_See code: [src/commands/account/logout.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/account/logout.ts)_
## `eas account:view`
@@ -158,7 +158,7 @@ ALIASES
$ eas whoami
```
_See code: [src/commands/account/view.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/account/view.ts)_
_See code: [src/commands/account/view.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/account/view.ts)_
## `eas analytics [STATUS]`
@@ -172,7 +172,7 @@ DESCRIPTION
display or change analytics settings
```
_See code: [src/commands/analytics.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/analytics.ts)_
_See code: [src/commands/analytics.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/analytics.ts)_
## `eas autocomplete [SHELL]`
@@ -221,7 +221,7 @@ DESCRIPTION
create a branch
```
_See code: [src/commands/branch/create.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/branch/create.ts)_
_See code: [src/commands/branch/create.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/branch/create.ts)_
## `eas branch:delete [NAME]`
@@ -241,7 +241,7 @@ DESCRIPTION
delete a branch
```
_See code: [src/commands/branch/delete.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/branch/delete.ts)_
_See code: [src/commands/branch/delete.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/branch/delete.ts)_
## `eas branch:list`
@@ -262,7 +262,7 @@ DESCRIPTION
list all branches
```
_See code: [src/commands/branch/list.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/branch/list.ts)_
_See code: [src/commands/branch/list.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/branch/list.ts)_
## `eas branch:rename`
@@ -281,7 +281,7 @@ DESCRIPTION
rename a branch
```
_See code: [src/commands/branch/rename.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/branch/rename.ts)_
_See code: [src/commands/branch/rename.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/branch/rename.ts)_
## `eas branch:view [NAME]`
@@ -305,7 +305,7 @@ DESCRIPTION
view a branch
```
_See code: [src/commands/branch/view.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/branch/view.ts)_
_See code: [src/commands/branch/view.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/branch/view.ts)_
## `eas build`
@@ -335,7 +335,7 @@ DESCRIPTION
start a build
```
_See code: [src/commands/build/index.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/build/index.ts)_
_See code: [src/commands/build/index.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/build/index.ts)_
## `eas build:cancel [BUILD_ID]`
@@ -349,7 +349,7 @@ DESCRIPTION
cancel a build
```
_See code: [src/commands/build/cancel.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/build/cancel.ts)_
_See code: [src/commands/build/cancel.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/build/cancel.ts)_
## `eas build:configure`
@@ -366,7 +366,7 @@ DESCRIPTION
configure the project to support EAS Build
```
_See code: [src/commands/build/configure.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/build/configure.ts)_
_See code: [src/commands/build/configure.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/build/configure.ts)_
## `eas build:inspect`
@@ -401,7 +401,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/v1.2.0/packages/eas-cli/src/commands/build/inspect.ts)_
_See code: [src/commands/build/inspect.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/build/inspect.ts)_
## `eas build:list`
@@ -434,7 +434,7 @@ DESCRIPTION
list all builds for your project
```
_See code: [src/commands/build/list.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/build/list.ts)_
_See code: [src/commands/build/list.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/build/list.ts)_
## `eas build:submit`
@@ -481,7 +481,7 @@ DESCRIPTION
Update version of an app.
```
_See code: [src/commands/build/version/set.ts](https://github.com/expo/eas-cli/blob/v1.2.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/v2.0.0/packages/eas-cli/src/commands/build/version/set.ts)_
## `eas build:version:sync`
@@ -500,7 +500,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/v1.2.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/v2.0.0/packages/eas-cli/src/commands/build/version/sync.ts)_
## `eas build:view [BUILD_ID]`
@@ -517,7 +517,7 @@ DESCRIPTION
view a build for your project
```
_See code: [src/commands/build/view.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/build/view.ts)_
_See code: [src/commands/build/view.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/build/view.ts)_
## `eas channel:create [NAME]`
@@ -537,7 +537,7 @@ DESCRIPTION
create a channel
```
_See code: [src/commands/channel/create.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/channel/create.ts)_
_See code: [src/commands/channel/create.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/channel/create.ts)_
## `eas channel:edit [NAME]`
@@ -558,7 +558,7 @@ DESCRIPTION
point a channel at a new branch
```
_See code: [src/commands/channel/edit.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/channel/edit.ts)_
_See code: [src/commands/channel/edit.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/channel/edit.ts)_
## `eas channel:list`
@@ -575,7 +575,7 @@ DESCRIPTION
list all channels
```
_See code: [src/commands/channel/list.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/channel/list.ts)_
_See code: [src/commands/channel/list.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/channel/list.ts)_
## `eas channel:view [NAME]`
@@ -595,7 +595,7 @@ DESCRIPTION
view a channel
```
_See code: [src/commands/channel/view.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/channel/view.ts)_
_See code: [src/commands/channel/view.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/channel/view.ts)_
## `eas config`
@@ -613,7 +613,7 @@ DESCRIPTION
display project configuration (app.json + eas.json)
```
_See code: [src/commands/config.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/config.ts)_
_See code: [src/commands/config.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/config.ts)_
## `eas credentials`
@@ -630,7 +630,7 @@ DESCRIPTION
manage credentials
```
_See code: [src/commands/credentials.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/credentials.ts)_
_See code: [src/commands/credentials.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/credentials.ts)_
## `eas device:create`
@@ -644,7 +644,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/v1.2.0/packages/eas-cli/src/commands/device/create.ts)_
_See code: [src/commands/device/create.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/device/create.ts)_
## `eas device:delete`
@@ -662,7 +662,7 @@ DESCRIPTION
remove a registered device from your account
```
_See code: [src/commands/device/delete.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/device/delete.ts)_
_See code: [src/commands/device/delete.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/device/delete.ts)_
## `eas device:list`
@@ -679,7 +679,7 @@ DESCRIPTION
list all registered devices for your account
```
_See code: [src/commands/device/list.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/device/list.ts)_
_See code: [src/commands/device/list.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/device/list.ts)_
## `eas device:view [UDID]`
@@ -693,7 +693,7 @@ DESCRIPTION
view a device for your project
```
_See code: [src/commands/device/view.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/device/view.ts)_
_See code: [src/commands/device/view.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/device/view.ts)_
## `eas diagnostics`
@@ -707,7 +707,7 @@ DESCRIPTION
display environment info
```
_See code: [src/commands/diagnostics.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/diagnostics.ts)_
_See code: [src/commands/diagnostics.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/diagnostics.ts)_
## `eas help [COMMAND]`
@@ -789,7 +789,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/v1.2.0/packages/eas-cli/src/commands/metadata/pull.ts)_
_See code: [src/commands/metadata/pull.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/metadata/pull.ts)_
## `eas metadata:push`
@@ -806,7 +806,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/v1.2.0/packages/eas-cli/src/commands/metadata/push.ts)_
_See code: [src/commands/metadata/push.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/metadata/push.ts)_
## `eas project:info`
@@ -820,7 +820,7 @@ DESCRIPTION
information about the current project
```
_See code: [src/commands/project/info.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/project/info.ts)_
_See code: [src/commands/project/info.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/project/info.ts)_
## `eas project:init`
@@ -837,7 +837,7 @@ ALIASES
$ eas init
```
_See code: [src/commands/project/init.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/project/init.ts)_
_See code: [src/commands/project/init.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/project/init.ts)_
## `eas secret:create`
@@ -857,7 +857,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/v1.2.0/packages/eas-cli/src/commands/secret/create.ts)_
_See code: [src/commands/secret/create.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/secret/create.ts)_
## `eas secret:delete`
@@ -874,7 +874,7 @@ DESCRIPTION
delete an environment secret by ID
```
_See code: [src/commands/secret/delete.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/secret/delete.ts)_
_See code: [src/commands/secret/delete.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/secret/delete.ts)_
## `eas secret:list`
@@ -888,7 +888,7 @@ DESCRIPTION
list environment secrets available for your current app
```
_See code: [src/commands/secret/list.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/secret/list.ts)_
_See code: [src/commands/secret/list.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/secret/list.ts)_
## `eas submit`
@@ -918,7 +918,7 @@ ALIASES
$ eas build:submit
```
_See code: [src/commands/submit.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/submit.ts)_
_See code: [src/commands/submit.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/submit.ts)_
## `eas update`
@@ -948,7 +948,7 @@ DESCRIPTION
publish an update group
```
_See code: [src/commands/update/index.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/update/index.ts)_
_See code: [src/commands/update/index.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/update/index.ts)_
## `eas update:configure`
@@ -965,7 +965,7 @@ DESCRIPTION
configure the project to support EAS Update
```
_See code: [src/commands/update/configure.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/update/configure.ts)_
_See code: [src/commands/update/configure.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/update/configure.ts)_
## `eas update:delete GROUPID`
@@ -985,7 +985,7 @@ DESCRIPTION
delete all the updates in an update group
```
_See code: [src/commands/update/delete.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/update/delete.ts)_
_See code: [src/commands/update/delete.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/update/delete.ts)_
## `eas update:list`
@@ -1004,7 +1004,7 @@ DESCRIPTION
view the recent updates for a branch
```
_See code: [src/commands/update/list.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/update/list.ts)_
_See code: [src/commands/update/list.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/update/list.ts)_
## `eas update:view GROUPID`
@@ -1024,7 +1024,7 @@ DESCRIPTION
update group details
```
_See code: [src/commands/update/view.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/update/view.ts)_
_See code: [src/commands/update/view.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/update/view.ts)_
## `eas webhook:create`
@@ -1044,7 +1044,7 @@ DESCRIPTION
create a webhook
```
_See code: [src/commands/webhook/create.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/webhook/create.ts)_
_See code: [src/commands/webhook/create.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/webhook/create.ts)_
## `eas webhook:delete [ID]`
@@ -1061,7 +1061,7 @@ DESCRIPTION
delete a webhook
```
_See code: [src/commands/webhook/delete.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/webhook/delete.ts)_
_See code: [src/commands/webhook/delete.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/webhook/delete.ts)_
## `eas webhook:list`
@@ -1078,7 +1078,7 @@ DESCRIPTION
list webhooks
```
_See code: [src/commands/webhook/list.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/webhook/list.ts)_
_See code: [src/commands/webhook/list.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/webhook/list.ts)_
## `eas webhook:update`
@@ -1099,7 +1099,7 @@ DESCRIPTION
update a webhook
```
_See code: [src/commands/webhook/update.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/webhook/update.ts)_
_See code: [src/commands/webhook/update.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/webhook/update.ts)_
## `eas webhook:view ID`
@@ -1116,7 +1116,7 @@ DESCRIPTION
view a webhook
```
_See code: [src/commands/webhook/view.ts](https://github.com/expo/eas-cli/blob/v1.2.0/packages/eas-cli/src/commands/webhook/view.ts)_
_See code: [src/commands/webhook/view.ts](https://github.com/expo/eas-cli/blob/v2.0.0/packages/eas-cli/src/commands/webhook/view.ts)_
## `eas whoami`
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "eas-cli",
"description": "EAS command line tool",
"version": "1.2.0",
"version": "2.0.0",
"author": "Expo <[email protected]>",
"bin": {
"eas": "./bin/run"
@@ -14,7 +14,7 @@
"@expo/config-plugins": "5.0.1",
"@expo/config-types": "46.0.2",
"@expo/eas-build-job": "0.2.85",
"@expo/eas-json": "1.2.0",
"@expo/eas-json": "2.0.0",
"@expo/json-file": "8.2.36",
"@expo/multipart-body-parser": "1.1.0",
"@expo/package-manager": "0.0.56",
+7 -7
View File
@@ -22,7 +22,7 @@ import {
JobData,
prepareBuildRequestForPlatformAsync,
} from '../build';
import { AndroidBuildContext, AndroidCommonContext, BuildContextAndroid } from '../context';
import { AndroidBuildContext, BuildContext, CommonContext } from '../context';
import { transformMetadata } from '../graphql';
import { logCredentialsSource } from '../utils/credentials';
import { checkGoogleServicesFileAsync, checkNodeEnvVariable } from '../validate';
@@ -32,7 +32,7 @@ import { syncProjectConfigurationAsync } from './syncProjectConfiguration';
import { resolveRemoteVersionCodeAsync } from './version';
export async function createAndroidContextAsync(
ctx: AndroidCommonContext
ctx: CommonContext<Platform.ANDROID>
): Promise<AndroidBuildContext> {
const { buildProfile } = ctx;
@@ -77,11 +77,11 @@ This means that it will most likely produce an AAB and you will not be able to i
}
export async function prepareAndroidBuildAsync(
ctx: BuildContextAndroid
ctx: BuildContext<Platform.ANDROID>
): Promise<BuildRequestSender> {
return await prepareBuildRequestForPlatformAsync({
ctx,
ensureCredentialsAsync: async (ctx: BuildContextAndroid) => {
ensureCredentialsAsync: async (ctx: BuildContext<Platform.ANDROID>) => {
return await ensureAndroidCredentialsAsync(ctx);
},
syncProjectConfigurationAsync: async () => {
@@ -95,7 +95,7 @@ export async function prepareAndroidBuildAsync(
});
},
prepareJobAsync: async (
ctx: BuildContextAndroid,
ctx: BuildContext<Platform.ANDROID>,
jobData: JobData<AndroidCredentials>
): Promise<Job> => {
return await prepareJobAsync(ctx, jobData);
@@ -118,12 +118,12 @@ export async function prepareAndroidBuildAsync(
});
}
function shouldProvideCredentials(ctx: BuildContextAndroid): boolean {
function shouldProvideCredentials(ctx: BuildContext<Platform.ANDROID>): boolean {
return !ctx.buildProfile.withoutCredentials;
}
async function ensureAndroidCredentialsAsync(
ctx: BuildContextAndroid
ctx: BuildContext<Platform.ANDROID>
): Promise<CredentialsResult<AndroidCredentials> | undefined> {
if (!shouldProvideCredentials(ctx)) {
return;
@@ -7,7 +7,7 @@ import { AndroidCredentials } from '../../credentials/android/AndroidCredentials
import { getUsername } from '../../project/projectUtils';
import { ensureLoggedInAsync } from '../../user/actions';
import { getVcsClient } from '../../vcs';
import { BuildContextAndroid } from '../context';
import { BuildContext } from '../context';
interface JobData {
projectArchive: ArchiveSource;
@@ -20,7 +20,10 @@ const cacheDefaults = {
cacheDefaultPaths: true,
};
export async function prepareJobAsync(ctx: BuildContextAndroid, jobData: JobData): Promise<Job> {
export async function prepareJobAsync(
ctx: BuildContext<Platform.ANDROID>,
jobData: JobData
): Promise<Job> {
const username = getUsername(ctx.exp, await ensureLoggedInAsync());
const buildProfile: BuildProfile<Platform.ANDROID> = ctx.buildProfile;
const projectRootDirectory =
+18 -12
View File
@@ -46,12 +46,14 @@ export interface JobData<Credentials> {
projectArchive: ArchiveSource;
}
interface Builder<Credentials, TJob extends Job> {
ctx: BuildContext;
interface Builder<TPlatform extends Platform, Credentials, TJob extends Job> {
ctx: BuildContext<TPlatform>;
ensureCredentialsAsync(ctx: BuildContext): Promise<CredentialsResult<Credentials> | undefined>;
syncProjectConfigurationAsync(ctx: BuildContext): Promise<void>;
prepareJobAsync(ctx: BuildContext, jobData: JobData<Credentials>): Promise<Job>;
ensureCredentialsAsync(
ctx: BuildContext<TPlatform>
): Promise<CredentialsResult<Credentials> | undefined>;
syncProjectConfigurationAsync(ctx: BuildContext<TPlatform>): Promise<void>;
prepareJobAsync(ctx: BuildContext<TPlatform>, jobData: JobData<Credentials>): Promise<Job>;
sendBuildRequestAsync(
appId: string,
job: TJob,
@@ -62,15 +64,17 @@ interface Builder<Credentials, TJob extends Job> {
export type BuildRequestSender = () => Promise<BuildFragment | undefined>;
function resolveBuildParamsInput(ctx: BuildContext): BuildParamsInput {
function resolveBuildParamsInput<T extends Platform>(ctx: BuildContext<T>): BuildParamsInput {
return {
resourceClass: ctx.resourceClass,
};
}
export async function prepareBuildRequestForPlatformAsync<Credentials, TJob extends Job>(
builder: Builder<Credentials, TJob>
): Promise<BuildRequestSender> {
export async function prepareBuildRequestForPlatformAsync<
TPlatform extends Platform,
Credentials,
TJob extends Job
>(builder: Builder<TPlatform, Credentials, TJob>): Promise<BuildRequestSender> {
const { ctx } = builder;
const credentialsResult = await withAnalyticsAsync(
async () => await builder.ensureCredentialsAsync(ctx),
@@ -159,7 +163,9 @@ function handleBuildRequestError(error: any, platform: Platform): never {
throw error;
}
async function uploadProjectAsync(ctx: BuildContext): Promise<string> {
async function uploadProjectAsync<TPlatform extends Platform>(
ctx: BuildContext<TPlatform>
): Promise<string> {
let projectTarballPath;
try {
return await withAnalyticsAsync(
@@ -201,8 +207,8 @@ async function uploadProjectAsync(ctx: BuildContext): Promise<string> {
}
}
async function sendBuildRequestAsync<Credentials, TJob extends Job>(
builder: Builder<Credentials, TJob>,
async function sendBuildRequestAsync<TPlatform extends Platform, Credentials, TJob extends Job>(
builder: Builder<TPlatform, Credentials, TJob>,
job: TJob,
metadata: Metadata,
buildParams: BuildParamsInput
+6 -18
View File
@@ -11,9 +11,7 @@ import { XcodeBuildContext } from '../project/ios/scheme';
import { Actor } from '../user/User';
import { LocalBuildOptions } from './local';
export type AndroidCommonContext = Omit<BuildContextAndroid, 'android'>;
export type IosCommonContext = Omit<BuildContextIos, 'ios'>;
export type CommonContext = AndroidCommonContext | IosCommonContext;
export type CommonContext<T extends Platform> = Omit<BuildContext<T>, 'android' | 'ios'>;
export interface AndroidBuildContext {
applicationId: string;
@@ -29,9 +27,10 @@ export interface IosBuildContext {
buildNumberOverride?: string;
}
interface BuildContextBase {
export interface BuildContext<T extends Platform> {
accountName: string;
easJsonCliConfig: EasJson['cli'];
buildProfile: BuildProfile<T>;
buildProfileName: string;
resourceClass: BuildResourceClass;
clearCache: boolean;
@@ -41,6 +40,7 @@ interface BuildContextBase {
nonInteractive: boolean;
noWait: boolean;
runFromCI: boolean;
platform: T;
projectDir: string;
projectId: string;
projectName: string;
@@ -48,18 +48,6 @@ interface BuildContextBase {
trackingCtx: TrackingContext;
user: Actor;
workflow: Workflow;
android: T extends Platform.ANDROID ? AndroidBuildContext : undefined;
ios: T extends Platform.IOS ? IosBuildContext : undefined;
}
export interface BuildContextAndroid extends BuildContextBase {
buildProfile: BuildProfile<Platform.ANDROID>;
platform: Platform.ANDROID;
android: AndroidBuildContext;
}
export interface BuildContextIos extends BuildContextBase {
buildProfile: BuildProfile<Platform.IOS>;
platform: Platform.IOS;
ios: IosBuildContext;
}
export type BuildContext = BuildContextAndroid | BuildContextIos;
+7 -7
View File
@@ -15,7 +15,7 @@ import { resolveWorkflowAsync } from '../project/workflow';
import { findAccountByName } from '../user/Account';
import { ensureLoggedInAsync } from '../user/actions';
import { createAndroidContextAsync } from './android/build';
import { AndroidCommonContext, BuildContext, IosCommonContext } from './context';
import { BuildContext, CommonContext } from './context';
import { createIosContextAsync } from './ios/build';
import { LocalBuildOptions } from './local';
@@ -43,7 +43,7 @@ export async function createBuildContextAsync<T extends Platform>({
projectDir: string;
resourceClass: BuildResourceClass;
message?: string;
}): Promise<BuildContext> {
}): Promise<BuildContext<T>> {
const exp = getExpoConfig(projectDir, { env: buildProfile.env });
const user = await ensureLoggedInAsync();
@@ -80,7 +80,7 @@ export async function createBuildContextAsync<T extends Platform>({
};
Analytics.logEvent(BuildEvent.BUILD_COMMAND, trackingCtx);
const commonContext = {
const commonContext: CommonContext<T> = {
accountName,
buildProfile,
buildProfileName,
@@ -103,17 +103,17 @@ export async function createBuildContextAsync<T extends Platform>({
runFromCI,
};
if (platform === Platform.ANDROID) {
const common = commonContext as AndroidCommonContext;
const common = commonContext as CommonContext<Platform.ANDROID>;
return {
...common,
android: await createAndroidContextAsync(common),
};
} as BuildContext<T>;
} else {
const common = commonContext as IosCommonContext;
const common = commonContext as CommonContext<Platform.IOS>;
return {
...common,
ios: await createIosContextAsync(common),
};
} as BuildContext<T>;
}
}
+10 -6
View File
@@ -1,4 +1,4 @@
import { Ios, Job, Metadata, Workflow } from '@expo/eas-build-job';
import { Ios, Job, Metadata, Platform, Workflow } from '@expo/eas-build-job';
import { AppVersionSource } from '@expo/eas-json';
import { IosCredentials } from '../../credentials/ios/types';
@@ -8,7 +8,7 @@ import { ensureBundleIdentifierIsDefinedForManagedProjectAsync } from '../../pro
import { resolveXcodeBuildContextAsync } from '../../project/ios/scheme';
import { findApplicationTarget, resolveTargetsAsync } from '../../project/ios/target';
import { BuildRequestSender, JobData, prepareBuildRequestForPlatformAsync } from '../build';
import { BuildContextIos, IosBuildContext, IosCommonContext } from '../context';
import { BuildContext, CommonContext, IosBuildContext } from '../context';
import { transformMetadata } from '../graphql';
import { checkGoogleServicesFileAsync, checkNodeEnvVariable } from '../validate';
import { ensureIosCredentialsAsync } from './credentials';
@@ -17,7 +17,9 @@ import { prepareJobAsync } from './prepareJob';
import { syncProjectConfigurationAsync } from './syncProjectConfiguration';
import { resolveRemoteBuildNumberAsync } from './version';
export async function createIosContextAsync(ctx: IosCommonContext): Promise<IosBuildContext> {
export async function createIosContextAsync(
ctx: CommonContext<Platform.IOS>
): Promise<IosBuildContext> {
const { buildProfile } = ctx;
if (ctx.workflow === Workflow.MANAGED) {
@@ -61,10 +63,12 @@ export async function createIosContextAsync(ctx: IosCommonContext): Promise<IosB
};
}
export async function prepareIosBuildAsync(ctx: BuildContextIos): Promise<BuildRequestSender> {
export async function prepareIosBuildAsync(
ctx: BuildContext<Platform.IOS>
): Promise<BuildRequestSender> {
return await prepareBuildRequestForPlatformAsync({
ctx,
ensureCredentialsAsync: async (ctx: BuildContextIos) => {
ensureCredentialsAsync: async (ctx: BuildContext<Platform.IOS>) => {
return ensureIosCredentialsAsync(ctx, ctx.ios.targets);
},
syncProjectConfigurationAsync: async () => {
@@ -79,7 +83,7 @@ export async function prepareIosBuildAsync(ctx: BuildContextIos): Promise<BuildR
});
},
prepareJobAsync: async (
ctx: BuildContextIos,
ctx: BuildContext<Platform.IOS>,
jobData: JobData<IosCredentials>
): Promise<Job> => {
return await prepareJobAsync(ctx, {
@@ -4,11 +4,11 @@ import IosCredentialsProvider from '../../credentials/ios/IosCredentialsProvider
import { getAppFromContext } from '../../credentials/ios/actions/BuildCredentialsUtils';
import { IosCredentials, Target } from '../../credentials/ios/types';
import { CredentialsResult } from '../build';
import { BuildContextIos } from '../context';
import { BuildContext } from '../context';
import { logCredentialsSource } from '../utils/credentials';
export async function ensureIosCredentialsAsync(
buildCtx: BuildContextIos,
buildCtx: BuildContext<Platform.IOS>,
targets: Target[]
): Promise<CredentialsResult<IosCredentials> | undefined> {
if (!shouldProvideCredentials(buildCtx)) {
@@ -31,6 +31,6 @@ export async function ensureIosCredentialsAsync(
};
}
function shouldProvideCredentials(buildCtx: BuildContextIos): boolean {
function shouldProvideCredentials(buildCtx: BuildContext<Platform.IOS>): boolean {
return !buildCtx.buildProfile.simulator;
}
+5 -2
View File
@@ -6,7 +6,7 @@ import { IosCredentials, TargetCredentials } from '../../credentials/ios/types';
import { getUsername } from '../../project/projectUtils';
import { ensureLoggedInAsync } from '../../user/actions';
import { getVcsClient } from '../../vcs';
import { BuildContextIos } from '../context';
import { BuildContext } from '../context';
interface JobData {
projectArchive: ArchiveSource;
@@ -20,7 +20,10 @@ const cacheDefaults = {
cacheDefaultPaths: true,
};
export async function prepareJobAsync(ctx: BuildContextIos, jobData: JobData): Promise<Job> {
export async function prepareJobAsync(
ctx: BuildContext<Platform.IOS>,
jobData: JobData
): Promise<Job> {
const projectRootDirectory =
slash(path.relative(await getVcsClient().getRootPathAsync(), ctx.projectDir)) || '.';
const username = getUsername(ctx.exp, await ensureLoggedInAsync());
+39 -25
View File
@@ -18,10 +18,12 @@ import { ensureLoggedInAsync } from '../user/actions';
import { easCliVersion } from '../utils/easCli';
import { getVcsClient } from '../vcs';
import { maybeResolveVersionsAsync as maybeResolveAndroidVersionsAsync } from './android/version';
import { BuildContext, BuildContextIos } from './context';
import { BuildContext } from './context';
import { maybeResolveVersionsAsync as maybeResolveIosVersionsAsync } from './ios/version';
export async function collectMetadataAsync(ctx: BuildContext): Promise<Metadata> {
export async function collectMetadataAsync<T extends Platform>(
ctx: BuildContext<T>
): Promise<Metadata> {
const vcsClient = getVcsClient();
const channelOrReleaseChannel = await resolveChannelOrReleaseChannelAsync(ctx);
const distribution =
@@ -50,7 +52,9 @@ export async function collectMetadataAsync(ctx: BuildContext): Promise<Metadata>
username: getUsername(ctx.exp, await ensureLoggedInAsync()),
message: ctx.message,
...(ctx.platform === Platform.IOS && {
iosEnterpriseProvisioning: resolveIosEnterpriseProvisioning(ctx),
iosEnterpriseProvisioning: resolveIosEnterpriseProvisioning(
ctx as BuildContext<Platform.IOS>
),
}),
runWithNoWaitFlag: ctx.noWait,
runFromCI: ctx.runFromCI,
@@ -58,48 +62,52 @@ export async function collectMetadataAsync(ctx: BuildContext): Promise<Metadata>
return sanitizeMetadata(metadata);
}
async function maybeResolveVersionsAsync(
ctx: BuildContext
async function maybeResolveVersionsAsync<T extends Platform>(
ctx: BuildContext<T>
): Promise<{ appBuildVersion?: string; appVersion?: string }> {
if (ctx.platform === Platform.IOS) {
const iosContext = ctx as BuildContext<Platform.IOS>;
const resolvedVersion = await maybeResolveIosVersionsAsync(
ctx.projectDir,
ctx.exp,
ctx.ios.targets
iosContext.ios.targets
);
if (ctx.ios.buildNumberOverride) {
if (iosContext.ios.buildNumberOverride) {
return {
...resolvedVersion,
appBuildVersion: ctx.ios.buildNumberOverride,
appBuildVersion: iosContext.ios.buildNumberOverride,
};
}
return resolvedVersion;
} else {
} else if (ctx.platform === Platform.ANDROID) {
const androidCtx = ctx as BuildContext<Platform.ANDROID>;
const resolvedVersion = await maybeResolveAndroidVersionsAsync(
ctx.projectDir,
ctx.exp,
ctx.buildProfile
androidCtx.buildProfile
);
if (ctx.android.versionCodeOverride) {
if (androidCtx.android.versionCodeOverride) {
return {
...resolvedVersion,
appBuildVersion: ctx.android.versionCodeOverride,
appBuildVersion: androidCtx.android.versionCodeOverride,
};
}
return resolvedVersion;
}
}
function resolveAppIdentifier(ctx: BuildContext): string {
if (ctx.platform === Platform.IOS) {
return ctx.ios.bundleIdentifier;
} else {
return ctx.android.applicationId;
throw new Error(`Unsupported platform ${ctx.platform}`);
}
}
async function resolveChannelOrReleaseChannelAsync(
ctx: BuildContext
function resolveAppIdentifier<T extends Platform>(ctx: BuildContext<T>): string {
if (ctx.platform === Platform.IOS) {
return (ctx as BuildContext<Platform.IOS>).ios.bundleIdentifier;
} else {
return (ctx as BuildContext<Platform.ANDROID>).android.applicationId;
}
}
async function resolveChannelOrReleaseChannelAsync<T extends Platform>(
ctx: BuildContext<T>
): Promise<{ channel: string } | { releaseChannel: string } | null> {
if (!isExpoUpdatesInstalled(ctx.projectDir)) {
return null;
@@ -118,7 +126,9 @@ async function resolveChannelOrReleaseChannelAsync(
return { releaseChannel };
}
async function getNativeReleaseChannelAsync(ctx: BuildContext): Promise<string> {
async function getNativeReleaseChannelAsync<T extends Platform>(
ctx: BuildContext<T>
): Promise<string> {
switch (ctx.platform) {
case Platform.ANDROID: {
return (await readAndroidReleaseChannelSafelyAsync(ctx.projectDir)) ?? 'default';
@@ -131,7 +141,9 @@ async function getNativeReleaseChannelAsync(ctx: BuildContext): Promise<string>
}
}
async function getNativeChannelAsync(ctx: BuildContext): Promise<string | undefined> {
async function getNativeChannelAsync<T extends Platform>(
ctx: BuildContext<T>
): Promise<string | undefined> {
switch (ctx.platform) {
case Platform.ANDROID: {
return (await readAndroidChannelSafelyAsync(ctx.projectDir)) ?? undefined;
@@ -144,7 +156,9 @@ async function getNativeChannelAsync(ctx: BuildContext): Promise<string | undefi
return undefined;
}
async function getReactNativeVersionAsync(ctx: BuildContext): Promise<string | undefined> {
async function getReactNativeVersionAsync(
ctx: BuildContext<Platform>
): Promise<string | undefined> {
try {
const reactNativePackageJsonPath = resolveFrom(ctx.projectDir, 'react-native/package.json');
return (await fs.readJson(reactNativePackageJsonPath)).version;
@@ -156,7 +170,7 @@ async function getReactNativeVersionAsync(ctx: BuildContext): Promise<string | u
}
function resolveIosEnterpriseProvisioning(
ctx: BuildContextIos
ctx: BuildContext<Platform.IOS>
): IosEnterpriseProvisioning | undefined {
return ctx.buildProfile.enterpriseProvisioning;
}
@@ -119,7 +119,7 @@ export async function runBuildAndSubmitAsync(projectDir: string, flags: BuildFla
build: BuildWithSubmissionsFragment | BuildFragment;
buildProfile: ProfileData<'build'>;
}[] = [];
const buildCtxByPlatform: { [p in AppPlatform]?: BuildContext } = {};
const buildCtxByPlatform: { [p in AppPlatform]?: BuildContext<Platform> } = {};
for (const buildProfile of buildProfiles) {
const { build: maybeBuild, buildCtx } = await prepareAndStartBuildAsync({
@@ -232,7 +232,7 @@ async function prepareAndStartBuildAsync({
buildProfile: ProfileData<'build'>;
resourceClass: BuildResourceClass;
easJsonCliConfig: EasJson['cli'];
}): Promise<{ build: BuildFragment | undefined; buildCtx: BuildContext }> {
}): Promise<{ build: BuildFragment | undefined; buildCtx: BuildContext<Platform> }> {
const buildCtx = await createBuildContextAsync({
buildProfileName: buildProfile.profileName,
resourceClass,
@@ -278,12 +278,12 @@ async function prepareAndStartBuildAsync({
};
}
async function startBuildAsync(ctx: BuildContext): Promise<BuildFragment | undefined> {
async function startBuildAsync(ctx: BuildContext<Platform>): Promise<BuildFragment | undefined> {
let sendBuildRequestAsync: BuildRequestSender;
if (ctx.platform === Platform.ANDROID) {
sendBuildRequestAsync = await prepareAndroidBuildAsync(ctx);
sendBuildRequestAsync = await prepareAndroidBuildAsync(ctx as BuildContext<Platform.ANDROID>);
} else {
sendBuildRequestAsync = await prepareIosBuildAsync(ctx);
sendBuildRequestAsync = await prepareIosBuildAsync(ctx as BuildContext<Platform.IOS>);
}
return await sendBuildRequestAsync();
}
@@ -298,7 +298,7 @@ async function prepareAndStartSubmissionAsync({
nonInteractive,
}: {
build: BuildFragment;
buildCtx: BuildContext;
buildCtx: BuildContext<Platform>;
moreBuilds: boolean;
projectDir: string;
buildProfile: BuildProfile;
@@ -315,10 +315,7 @@ async function prepareAndStartSubmissionAsync({
nonInteractive,
env: buildProfile.env,
credentialsCtx: buildCtx.credentialsCtx,
applicationIdentifier:
buildCtx.platform === Platform.ANDROID
? buildCtx.android.applicationId
: buildCtx.ios.bundleIdentifier,
applicationIdentifier: buildCtx.android?.applicationId ?? buildCtx.ios?.bundleIdentifier,
});
if (moreBuilds) {
+5 -3
View File
@@ -1,4 +1,4 @@
import { Workflow } from '@expo/eas-build-job';
import { Platform, Workflow } from '@expo/eas-build-job';
import fs from 'fs-extra';
import path from 'path';
@@ -6,7 +6,7 @@ import Log, { learnMore } from '../log';
import { getVcsClient } from '../vcs';
import { CommonContext } from './context';
export function checkNodeEnvVariable(ctx: CommonContext): void {
export function checkNodeEnvVariable(ctx: CommonContext<Platform>): void {
if (ctx.buildProfile.env?.NODE_ENV === 'production') {
Log.warn(
'You set NODE_ENV=production in the build profile. Remember that it will be available during the entire build process. In particular, it will make yarn/npm install only production packages.'
@@ -15,7 +15,9 @@ export function checkNodeEnvVariable(ctx: CommonContext): void {
}
}
export async function checkGoogleServicesFileAsync(ctx: CommonContext): Promise<void> {
export async function checkGoogleServicesFileAsync<T extends Platform>(
ctx: CommonContext<T>
): Promise<void> {
if (ctx.workflow === Workflow.GENERIC || ctx.buildProfile?.env?.GOOGLE_SERVICES_FILE) {
return;
}
@@ -117,6 +117,7 @@ async function configureAppJSONForEASUpdateAsync({
exp.ios?.runtimeVersion ?? exp.runtimeVersion ?? iosDefaultRuntimeVersion;
let newConfig: Partial<ExpoConfig>;
let newConfigOnlyAddedValues: Partial<ExpoConfig>;
switch (platform) {
case RequestedPlatform.All: {
if (isRuntimeEqual(newAndroidRuntimeVersion, newIosRuntimeVersion)) {
@@ -129,6 +130,26 @@ async function configureAppJSONForEASUpdateAsync({
ios: { ...exp.ios, runtimeVersion: undefined },
updates,
};
newConfigOnlyAddedValues = {
runtimeVersion: newAndroidRuntimeVersion,
...(exp.android && 'runtimeVersion' in exp.android
? {
android: {
runtimeVersion: '<remove this key>',
},
}
: {}),
...(exp.ios && 'runtimeVersion' in exp.ios
? {
ios: {
runtimeVersion: '<remove this key>',
},
}
: {}),
updates: {
url: easUpdateURL,
},
};
} else {
newConfig = {
runtimeVersion: undefined, // top level runtime is redundant if it is specified in both android and ios
@@ -142,6 +163,22 @@ async function configureAppJSONForEASUpdateAsync({
},
updates,
};
newConfigOnlyAddedValues = {
...('runtimeVersion' in exp
? {
runtimeVersion: '<remove this key>', // top level runtime is redundant if it is specified in both android and ios
}
: {}),
android: {
runtimeVersion: newAndroidRuntimeVersion,
},
ios: {
runtimeVersion: newIosRuntimeVersion,
},
updates: {
url: easUpdateURL,
},
};
}
break;
}
@@ -153,6 +190,14 @@ async function configureAppJSONForEASUpdateAsync({
},
updates,
};
newConfigOnlyAddedValues = {
android: {
runtimeVersion: newAndroidRuntimeVersion,
},
updates: {
url: easUpdateURL,
},
};
break;
}
case RequestedPlatform.Ios: {
@@ -163,6 +208,14 @@ async function configureAppJSONForEASUpdateAsync({
},
updates,
};
newConfigOnlyAddedValues = {
ios: {
runtimeVersion: newIosRuntimeVersion,
},
updates: {
url: easUpdateURL,
},
};
break;
}
default: {
@@ -219,7 +272,7 @@ async function configureAppJSONForEASUpdateAsync({
'https://expo.fyi/eas-update-config.md'
)}\n`
);
Log.log(chalk.bold(JSON.stringify(newConfig, null, 2)));
Log.log(chalk.bold(JSON.stringify(newConfigOnlyAddedValues, null, 2)));
Log.addNewLineIfNone();
if (workflows['android'] === Workflow.GENERIC || workflows['ios'] === Workflow.GENERIC) {
Log.warn(
@@ -101,7 +101,7 @@ export default class IosCredentialsProvider {
return null;
}
if (ctx.easJsonCliConfig?.promptToConfigurePushNotfications === false) {
if (ctx.easJsonCliConfig?.promptToConfigurePushNotifications === false) {
return null;
}
@@ -131,7 +131,7 @@ export default class IosCredentialsProvider {
): Promise<void> {
const easJsonPath = EasJsonReader.formatEasJsonPath(ctx.projectDir);
const easJson = await fs.readJSON(easJsonPath);
easJson.cli = { ...easJson?.cli, promptToConfigurePushNotfications: false };
easJson.cli = { ...easJson?.cli, promptToConfigurePushNotifications: false };
await fs.writeFile(easJsonPath, `${JSON.stringify(easJson, null, 2)}\n`);
Log.withTick('Updated eas.json');
}
+2 -2
View File
@@ -1,4 +1,4 @@
import { Workflow } from '@expo/eas-build-job';
import { Platform, Workflow } from '@expo/eas-build-job';
import { Errors } from '@oclif/core';
import assert from 'assert';
import semver from 'semver';
@@ -10,7 +10,7 @@ import { confirmAsync } from '../prompts';
const SUPPORTED_EXPO_SDK_VERSIONS = '>= 41.0.0';
assert(semver.validRange(SUPPORTED_EXPO_SDK_VERSIONS), 'Must be a valid version range');
export async function checkExpoSdkIsSupportedAsync(ctx: BuildContext): Promise<void> {
export async function checkExpoSdkIsSupportedAsync(ctx: BuildContext<Platform>): Promise<void> {
assert(ctx.workflow === Workflow.MANAGED, 'Must be a managed workflow project');
if (ctx.exp.sdkVersion && semver.satisfies(ctx.exp.sdkVersion, SUPPORTED_EXPO_SDK_VERSIONS)) {
+4 -1
View File
@@ -1,3 +1,4 @@
import { Platform } from '@expo/eas-build-job';
import { Errors } from '@oclif/core';
import chalk from 'chalk';
import type MetroConfig from 'metro-config';
@@ -7,7 +8,9 @@ import { BuildContext } from '../build/context';
import Log, { learnMore } from '../log';
import { confirmAsync } from '../prompts';
export async function validateMetroConfigForManagedWorkflowAsync(ctx: BuildContext): Promise<void> {
export async function validateMetroConfigForManagedWorkflowAsync(
ctx: BuildContext<Platform>
): Promise<void> {
if (!(await configExistsAsync(ctx.projectDir))) {
return;
}
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@expo/eas-json",
"description": "A library for interacting with eas.json",
"version": "1.2.0",
"version": "2.0.0",
"author": "Expo <[email protected]>",
"bugs": "https://github.com/expo/eas-cli/issues",
"dependencies": {
+1 -1
View File
@@ -38,7 +38,7 @@
"When using remote, the `autoIncrement` is based on the values stored on EAS servers."
]
},
"promptToConfigurePushNotfications" : {
"promptToConfigurePushNotifications" : {
"type": "boolean",
"description": "Specifies where EAS CLI should prompt to configure Push Notifications credentials. Defaults to true.",
"default": true
+1 -1
View File
@@ -9,7 +9,7 @@ export const EasJsonSchema = Joi.object({
version: Joi.string(),
requireCommit: Joi.boolean(),
appVersionSource: Joi.string().valid(...Object.values(AppVersionSource)),
promptToConfigurePushNotfications: Joi.boolean(),
promptToConfigurePushNotifications: Joi.boolean(),
}),
build: Joi.object().pattern(Joi.string(), BuildProfileSchema),
submit: Joi.object().pattern(Joi.string(), SubmitProfileSchema),
+1 -1
View File
@@ -21,7 +21,7 @@ export interface EasJson {
version?: string;
requireCommit?: boolean;
appVersionSource?: AppVersionSource;
promptToConfigurePushNotfications?: boolean;
promptToConfigurePushNotifications?: boolean;
};
build?: { [profileName: string]: EasJsonBuildProfile };
submit?: { [profileName: string]: EasJsonSubmitProfile };