eas-cli 0.31.0 → 0.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -28
- package/build/build/android/UpdatesModule.js +4 -15
- package/build/build/android/configure.js +1 -1
- package/build/build/configure.js +12 -6
- package/build/build/ios/UpdatesModule.js +4 -16
- package/build/build/ios/configure.js +1 -1
- package/build/build/utils/appJson.d.ts +1 -0
- package/build/build/utils/appJson.js +13 -4
- package/build/build/utils/devClient.d.ts +4 -4
- package/build/build/utils/devClient.js +8 -16
- package/build/commands/branch/publish.js +14 -43
- package/build/commands/build/index.d.ts +1 -1
- package/build/commands/build/index.js +29 -24
- package/build/commands/submit.js +16 -11
- package/build/credentials/android/actions/SetupGoogleServiceAccountKey.js +3 -3
- package/build/credentials/context.d.ts +1 -1
- package/build/credentials/context.js +5 -5
- package/build/credentials/errors.d.ts +3 -0
- package/build/credentials/errors.js +7 -1
- package/build/credentials/ios/IosCredentialsProvider.js +1 -1
- package/build/credentials/ios/actions/AscApiKeyUtils.d.ts +5 -0
- package/build/credentials/ios/actions/AscApiKeyUtils.js +63 -0
- package/build/credentials/ios/actions/DistributionCertificateUtils.js +5 -5
- package/build/credentials/ios/actions/SetupTargetBuildCredentials.js +1 -1
- package/build/credentials/ios/appstore/AppStoreApi.d.ts +7 -1
- package/build/credentials/ios/appstore/AppStoreApi.js +17 -0
- package/build/credentials/ios/appstore/Credentials.js +3 -3
- package/build/credentials/ios/appstore/Credentials.types.d.ts +13 -0
- package/build/credentials/ios/appstore/ascApiKey.d.ts +9 -0
- package/build/credentials/ios/appstore/ascApiKey.js +99 -0
- package/build/credentials/ios/credentials.d.ts +17 -0
- package/build/credentials/ios/credentials.js +16 -1
- package/build/credentials/manager/ManageAndroid.js +1 -1
- package/build/credentials/manager/ManageIos.js +1 -1
- package/build/graphql/generated.d.ts +49 -113
- package/build/graphql/generated.js +24 -28
- package/build/log.d.ts +11 -1
- package/build/log.js +21 -10
- package/build/project/android/applicationId.d.ts +1 -1
- package/build/project/android/applicationId.js +7 -6
- package/build/project/ios/bundleIdentifier.d.ts +1 -1
- package/build/project/ios/bundleIdentifier.js +7 -6
- package/build/submit/ArchiveSource.d.ts +7 -2
- package/build/submit/ArchiveSource.js +94 -11
- package/build/submit/ios/AscApiKeySource.d.ts +28 -0
- package/build/submit/ios/AscApiKeySource.js +51 -0
- package/build/submit/ios/IosSubmitCommand.d.ts +2 -0
- package/build/submit/ios/IosSubmitCommand.js +55 -3
- package/build/submit/ios/IosSubmitter.d.ts +3 -1
- package/build/submit/ios/IosSubmitter.js +48 -4
- package/build/submit/submit.js +1 -1
- package/build/submit/utils/builds.d.ts +3 -1
- package/build/submit/utils/builds.js +6 -6
- package/build/utils/profiles.d.ts +11 -0
- package/build/utils/profiles.js +39 -0
- package/oclif.manifest.json +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -73,7 +73,7 @@ ALIASES
|
|
|
73
73
|
$ eas login
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
_See code: [src/commands/account/login.js](https://github.com/expo/eas-cli/blob/v0.
|
|
76
|
+
_See code: [src/commands/account/login.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/account/login.js)_
|
|
77
77
|
|
|
78
78
|
## `eas account:logout`
|
|
79
79
|
|
|
@@ -87,7 +87,7 @@ ALIASES
|
|
|
87
87
|
$ eas logout
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
_See code: [src/commands/account/logout.js](https://github.com/expo/eas-cli/blob/v0.
|
|
90
|
+
_See code: [src/commands/account/logout.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/account/logout.js)_
|
|
91
91
|
|
|
92
92
|
## `eas account:view`
|
|
93
93
|
|
|
@@ -101,7 +101,7 @@ ALIASES
|
|
|
101
101
|
$ eas whoami
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
_See code: [src/commands/account/view.js](https://github.com/expo/eas-cli/blob/v0.
|
|
104
|
+
_See code: [src/commands/account/view.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/account/view.js)_
|
|
105
105
|
|
|
106
106
|
## `eas analytics [STATUS]`
|
|
107
107
|
|
|
@@ -112,7 +112,7 @@ USAGE
|
|
|
112
112
|
$ eas analytics [STATUS]
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
-
_See code: [src/commands/analytics.js](https://github.com/expo/eas-cli/blob/v0.
|
|
115
|
+
_See code: [src/commands/analytics.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/analytics.js)_
|
|
116
116
|
|
|
117
117
|
## `eas build`
|
|
118
118
|
|
|
@@ -138,14 +138,15 @@ OPTIONS
|
|
|
138
138
|
|
|
139
139
|
--non-interactive Run command in non-interactive mode
|
|
140
140
|
|
|
141
|
-
--profile=PROFILE_NAME
|
|
141
|
+
--profile=PROFILE_NAME Name of the build profile from eas.json. Defaults to "production" if defined
|
|
142
|
+
in eas.json.
|
|
142
143
|
|
|
143
144
|
--skip-project-configuration Skip project configuration
|
|
144
145
|
|
|
145
146
|
--[no-]wait Wait for build(s) to complete
|
|
146
147
|
```
|
|
147
148
|
|
|
148
|
-
_See code: [src/commands/build/index.js](https://github.com/expo/eas-cli/blob/v0.
|
|
149
|
+
_See code: [src/commands/build/index.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/build/index.js)_
|
|
149
150
|
|
|
150
151
|
## `eas build:cancel [BUILD_ID]`
|
|
151
152
|
|
|
@@ -156,7 +157,7 @@ USAGE
|
|
|
156
157
|
$ eas build:cancel [BUILD_ID]
|
|
157
158
|
```
|
|
158
159
|
|
|
159
|
-
_See code: [src/commands/build/cancel.js](https://github.com/expo/eas-cli/blob/v0.
|
|
160
|
+
_See code: [src/commands/build/cancel.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/build/cancel.js)_
|
|
160
161
|
|
|
161
162
|
## `eas build:configure`
|
|
162
163
|
|
|
@@ -170,7 +171,7 @@ OPTIONS
|
|
|
170
171
|
-p, --platform=(android|ios|all) Platform to configure
|
|
171
172
|
```
|
|
172
173
|
|
|
173
|
-
_See code: [src/commands/build/configure.js](https://github.com/expo/eas-cli/blob/v0.
|
|
174
|
+
_See code: [src/commands/build/configure.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/build/configure.js)_
|
|
174
175
|
|
|
175
176
|
## `eas build:list`
|
|
176
177
|
|
|
@@ -203,7 +204,7 @@ OPTIONS
|
|
|
203
204
|
--status=(new|in-queue|in-progress|errored|finished|canceled)
|
|
204
205
|
```
|
|
205
206
|
|
|
206
|
-
_See code: [src/commands/build/list.js](https://github.com/expo/eas-cli/blob/v0.
|
|
207
|
+
_See code: [src/commands/build/list.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/build/list.js)_
|
|
207
208
|
|
|
208
209
|
## `eas build:view [BUILD_ID]`
|
|
209
210
|
|
|
@@ -217,7 +218,7 @@ OPTIONS
|
|
|
217
218
|
--json Enable JSON output, non-JSON messages will be printed to stderr
|
|
218
219
|
```
|
|
219
220
|
|
|
220
|
-
_See code: [src/commands/build/view.js](https://github.com/expo/eas-cli/blob/v0.
|
|
221
|
+
_See code: [src/commands/build/view.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/build/view.js)_
|
|
221
222
|
|
|
222
223
|
## `eas config`
|
|
223
224
|
|
|
@@ -232,7 +233,7 @@ OPTIONS
|
|
|
232
233
|
--profile=profile
|
|
233
234
|
```
|
|
234
235
|
|
|
235
|
-
_See code: [src/commands/config.js](https://github.com/expo/eas-cli/blob/v0.
|
|
236
|
+
_See code: [src/commands/config.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/config.js)_
|
|
236
237
|
|
|
237
238
|
## `eas credentials`
|
|
238
239
|
|
|
@@ -243,7 +244,7 @@ USAGE
|
|
|
243
244
|
$ eas credentials
|
|
244
245
|
```
|
|
245
246
|
|
|
246
|
-
_See code: [src/commands/credentials.js](https://github.com/expo/eas-cli/blob/v0.
|
|
247
|
+
_See code: [src/commands/credentials.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/credentials.js)_
|
|
247
248
|
|
|
248
249
|
## `eas device:create`
|
|
249
250
|
|
|
@@ -254,7 +255,7 @@ USAGE
|
|
|
254
255
|
$ eas device:create
|
|
255
256
|
```
|
|
256
257
|
|
|
257
|
-
_See code: [src/commands/device/create.js](https://github.com/expo/eas-cli/blob/v0.
|
|
258
|
+
_See code: [src/commands/device/create.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/device/create.js)_
|
|
258
259
|
|
|
259
260
|
## `eas device:list`
|
|
260
261
|
|
|
@@ -268,7 +269,7 @@ OPTIONS
|
|
|
268
269
|
--apple-team-id=apple-team-id
|
|
269
270
|
```
|
|
270
271
|
|
|
271
|
-
_See code: [src/commands/device/list.js](https://github.com/expo/eas-cli/blob/v0.
|
|
272
|
+
_See code: [src/commands/device/list.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/device/list.js)_
|
|
272
273
|
|
|
273
274
|
## `eas device:view [UDID]`
|
|
274
275
|
|
|
@@ -279,7 +280,7 @@ USAGE
|
|
|
279
280
|
$ eas device:view [UDID]
|
|
280
281
|
```
|
|
281
282
|
|
|
282
|
-
_See code: [src/commands/device/view.js](https://github.com/expo/eas-cli/blob/v0.
|
|
283
|
+
_See code: [src/commands/device/view.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/device/view.js)_
|
|
283
284
|
|
|
284
285
|
## `eas diagnostics`
|
|
285
286
|
|
|
@@ -290,7 +291,7 @@ USAGE
|
|
|
290
291
|
$ eas diagnostics
|
|
291
292
|
```
|
|
292
293
|
|
|
293
|
-
_See code: [src/commands/diagnostics.js](https://github.com/expo/eas-cli/blob/v0.
|
|
294
|
+
_See code: [src/commands/diagnostics.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/diagnostics.js)_
|
|
294
295
|
|
|
295
296
|
## `eas help [COMMAND]`
|
|
296
297
|
|
|
@@ -318,7 +319,7 @@ USAGE
|
|
|
318
319
|
$ eas project:info
|
|
319
320
|
```
|
|
320
321
|
|
|
321
|
-
_See code: [src/commands/project/info.js](https://github.com/expo/eas-cli/blob/v0.
|
|
322
|
+
_See code: [src/commands/project/info.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/project/info.js)_
|
|
322
323
|
|
|
323
324
|
## `eas project:init`
|
|
324
325
|
|
|
@@ -332,7 +333,7 @@ ALIASES
|
|
|
332
333
|
$ eas init
|
|
333
334
|
```
|
|
334
335
|
|
|
335
|
-
_See code: [src/commands/project/init.js](https://github.com/expo/eas-cli/blob/v0.
|
|
336
|
+
_See code: [src/commands/project/init.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/project/init.js)_
|
|
336
337
|
|
|
337
338
|
## `eas secret:create`
|
|
338
339
|
|
|
@@ -349,7 +350,7 @@ OPTIONS
|
|
|
349
350
|
--value=value Value of the secret
|
|
350
351
|
```
|
|
351
352
|
|
|
352
|
-
_See code: [src/commands/secret/create.js](https://github.com/expo/eas-cli/blob/v0.
|
|
353
|
+
_See code: [src/commands/secret/create.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/secret/create.js)_
|
|
353
354
|
|
|
354
355
|
## `eas secret:delete`
|
|
355
356
|
|
|
@@ -366,7 +367,7 @@ DESCRIPTION
|
|
|
366
367
|
Unsure where to find the secret's ID? Run eas secrets:list
|
|
367
368
|
```
|
|
368
369
|
|
|
369
|
-
_See code: [src/commands/secret/delete.js](https://github.com/expo/eas-cli/blob/v0.
|
|
370
|
+
_See code: [src/commands/secret/delete.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/secret/delete.js)_
|
|
370
371
|
|
|
371
372
|
## `eas secret:list`
|
|
372
373
|
|
|
@@ -377,7 +378,7 @@ USAGE
|
|
|
377
378
|
$ eas secret:list
|
|
378
379
|
```
|
|
379
380
|
|
|
380
|
-
_See code: [src/commands/secret/list.js](https://github.com/expo/eas-cli/blob/v0.
|
|
381
|
+
_See code: [src/commands/secret/list.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/secret/list.js)_
|
|
381
382
|
|
|
382
383
|
## `eas submit`
|
|
383
384
|
|
|
@@ -394,7 +395,7 @@ OPTIONS
|
|
|
394
395
|
--non-interactive Run command in non-interactive mode
|
|
395
396
|
--path=path Path to the .apk/.aab/.ipa file
|
|
396
397
|
|
|
397
|
-
--profile=profile Name of the submit profile from eas.json. Defaults to "
|
|
398
|
+
--profile=profile Name of the submit profile from eas.json. Defaults to "production" if defined in
|
|
398
399
|
eas.json.
|
|
399
400
|
|
|
400
401
|
--url=url App archive url
|
|
@@ -410,7 +411,7 @@ ALIASES
|
|
|
410
411
|
$ eas build:submit
|
|
411
412
|
```
|
|
412
413
|
|
|
413
|
-
_See code: [src/commands/submit.js](https://github.com/expo/eas-cli/blob/v0.
|
|
414
|
+
_See code: [src/commands/submit.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/submit.js)_
|
|
414
415
|
|
|
415
416
|
## `eas webhook:create`
|
|
416
417
|
|
|
@@ -429,7 +430,7 @@ OPTIONS
|
|
|
429
430
|
--url=url Webhook URL
|
|
430
431
|
```
|
|
431
432
|
|
|
432
|
-
_See code: [src/commands/webhook/create.js](https://github.com/expo/eas-cli/blob/v0.
|
|
433
|
+
_See code: [src/commands/webhook/create.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/webhook/create.js)_
|
|
433
434
|
|
|
434
435
|
## `eas webhook:delete [ID]`
|
|
435
436
|
|
|
@@ -443,7 +444,7 @@ ARGUMENTS
|
|
|
443
444
|
ID ID of the webhook to delete
|
|
444
445
|
```
|
|
445
446
|
|
|
446
|
-
_See code: [src/commands/webhook/delete.js](https://github.com/expo/eas-cli/blob/v0.
|
|
447
|
+
_See code: [src/commands/webhook/delete.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/webhook/delete.js)_
|
|
447
448
|
|
|
448
449
|
## `eas webhook:list`
|
|
449
450
|
|
|
@@ -457,7 +458,7 @@ OPTIONS
|
|
|
457
458
|
--event=(BUILD) Event type that triggers the webhook
|
|
458
459
|
```
|
|
459
460
|
|
|
460
|
-
_See code: [src/commands/webhook/list.js](https://github.com/expo/eas-cli/blob/v0.
|
|
461
|
+
_See code: [src/commands/webhook/list.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/webhook/list.js)_
|
|
461
462
|
|
|
462
463
|
## `eas webhook:update`
|
|
463
464
|
|
|
@@ -477,7 +478,7 @@ OPTIONS
|
|
|
477
478
|
--url=url Webhook URL
|
|
478
479
|
```
|
|
479
480
|
|
|
480
|
-
_See code: [src/commands/webhook/update.js](https://github.com/expo/eas-cli/blob/v0.
|
|
481
|
+
_See code: [src/commands/webhook/update.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/webhook/update.js)_
|
|
481
482
|
|
|
482
483
|
## `eas webhook:view ID`
|
|
483
484
|
|
|
@@ -491,5 +492,5 @@ ARGUMENTS
|
|
|
491
492
|
ID ID of the webhook to view
|
|
492
493
|
```
|
|
493
494
|
|
|
494
|
-
_See code: [src/commands/webhook/view.js](https://github.com/expo/eas-cli/blob/v0.
|
|
495
|
+
_See code: [src/commands/webhook/view.js](https://github.com/expo/eas-cli/blob/v0.33.1/packages/eas-cli/src/commands/webhook/view.js)_
|
|
495
496
|
<!-- commandsstop -->
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.readChannelSafelyAsync = exports.readReleaseChannelSafelyAsync = exports.syncUpdatesConfigurationAsync = exports.configureUpdatesAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
6
|
-
const fs_extra_1 = (0, tslib_1.__importDefault)(require("fs-extra"));
|
|
7
6
|
const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
|
|
8
7
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
9
8
|
const actions_1 = require("../../user/actions");
|
|
@@ -11,12 +10,6 @@ const updates_1 = require("../utils/updates");
|
|
|
11
10
|
async function configureUpdatesAsync(projectDir, exp) {
|
|
12
11
|
(0, updates_1.ensureValidVersions)(exp);
|
|
13
12
|
const accountName = (0, projectUtils_1.getProjectAccountName)(exp, await (0, actions_1.ensureLoggedInAsync)());
|
|
14
|
-
const buildGradlePath = config_plugins_1.AndroidConfig.Paths.getAppBuildGradleFilePath(projectDir);
|
|
15
|
-
const buildGradleContents = await fs_extra_1.default.readFile(buildGradlePath, 'utf8');
|
|
16
|
-
if (!config_plugins_1.AndroidConfig.Updates.isBuildGradleConfigured(projectDir, buildGradleContents)) {
|
|
17
|
-
const updatedBuildGradleContents = config_plugins_1.AndroidConfig.Updates.ensureBuildGradleContainsConfigurationScript(projectDir, buildGradleContents);
|
|
18
|
-
await fs_extra_1.default.writeFile(buildGradlePath, updatedBuildGradleContents);
|
|
19
|
-
}
|
|
20
13
|
const androidManifestPath = await config_plugins_1.AndroidConfig.Paths.getAndroidManifestAsync(projectDir);
|
|
21
14
|
const androidManifest = await getAndroidManifestAsync(projectDir);
|
|
22
15
|
if (!config_plugins_1.AndroidConfig.Updates.isMainApplicationMetaDataSynced(exp, androidManifest, accountName)) {
|
|
@@ -29,7 +22,7 @@ async function syncUpdatesConfigurationAsync(projectDir, exp) {
|
|
|
29
22
|
(0, updates_1.ensureValidVersions)(exp);
|
|
30
23
|
const accountName = (0, projectUtils_1.getProjectAccountName)(exp, await (0, actions_1.ensureLoggedInAsync)());
|
|
31
24
|
try {
|
|
32
|
-
await ensureUpdatesConfiguredAsync(projectDir
|
|
25
|
+
await ensureUpdatesConfiguredAsync(projectDir);
|
|
33
26
|
}
|
|
34
27
|
catch (error) {
|
|
35
28
|
log_1.default.error('expo-updates module is not configured. Please run "eas build:configure" first to configure the project');
|
|
@@ -46,13 +39,9 @@ async function syncUpdatesConfigurationAsync(projectDir, exp) {
|
|
|
46
39
|
}
|
|
47
40
|
}
|
|
48
41
|
exports.syncUpdatesConfigurationAsync = syncUpdatesConfigurationAsync;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
if (!config_plugins_1.AndroidConfig.Updates.isBuildGradleConfigured(projectDir, buildGradleContents)) {
|
|
53
|
-
const gradleScriptApply = config_plugins_1.AndroidConfig.Updates.formatApplyLineForBuildGradle(projectDir);
|
|
54
|
-
throw new Error(`Missing ${gradleScriptApply} in ${buildGradlePath}`);
|
|
55
|
-
}
|
|
42
|
+
// Note: we assume here that Expo modules are properly configured in the project. Aside from that,
|
|
43
|
+
// all that is needed on Expo SDK 43+ to configure expo-updates configuration in AndroidManifest.xml
|
|
44
|
+
async function ensureUpdatesConfiguredAsync(projectDir) {
|
|
56
45
|
const androidManifest = await getAndroidManifestAsync(projectDir);
|
|
57
46
|
if (!config_plugins_1.AndroidConfig.Updates.isMainApplicationMetaDataSet(androidManifest)) {
|
|
58
47
|
throw new Error('Missing values in AndroidManifest.xml');
|
|
@@ -16,7 +16,7 @@ async function configureAndroidAsync(ctx) {
|
|
|
16
16
|
await (0, applicationId_1.ensureApplicationIdIsDefinedForManagedProjectAsync)(ctx.projectDir, ctx.exp);
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
|
-
(0, applicationId_1.
|
|
19
|
+
(0, applicationId_1.warnIfAndroidPackageDefinedInAppConfigForBareWorkflowProject)(ctx.projectDir, ctx.exp);
|
|
20
20
|
await config_plugins_1.AndroidConfig.EasBuild.configureEasBuildAsync(ctx.projectDir);
|
|
21
21
|
const easGradlePath = config_plugins_1.AndroidConfig.EasBuild.getEasBuildGradlePath(ctx.projectDir);
|
|
22
22
|
await vcs_1.default.trackFileAsync(easGradlePath);
|
package/build/build/configure.js
CHANGED
|
@@ -76,19 +76,21 @@ async function configureAsync(options) {
|
|
|
76
76
|
exports.configureAsync = configureAsync;
|
|
77
77
|
const EAS_JSON_MANAGED_DEFAULT = {
|
|
78
78
|
build: {
|
|
79
|
-
release: {},
|
|
80
79
|
development: {
|
|
81
80
|
developmentClient: true,
|
|
82
81
|
distribution: 'internal',
|
|
83
82
|
},
|
|
83
|
+
preview: {
|
|
84
|
+
distribution: 'internal',
|
|
85
|
+
},
|
|
86
|
+
production: {},
|
|
84
87
|
},
|
|
85
88
|
submit: {
|
|
86
|
-
|
|
89
|
+
production: {},
|
|
87
90
|
},
|
|
88
91
|
};
|
|
89
|
-
const
|
|
92
|
+
const EAS_JSON_BARE_DEFAULT = {
|
|
90
93
|
build: {
|
|
91
|
-
release: {},
|
|
92
94
|
development: {
|
|
93
95
|
distribution: 'internal',
|
|
94
96
|
android: {
|
|
@@ -98,9 +100,13 @@ const EAS_JSON_GENERIC_DEFAULT = {
|
|
|
98
100
|
buildConfiguration: 'Debug',
|
|
99
101
|
},
|
|
100
102
|
},
|
|
103
|
+
preview: {
|
|
104
|
+
distribution: 'internal',
|
|
105
|
+
},
|
|
106
|
+
production: {},
|
|
101
107
|
},
|
|
102
108
|
submit: {
|
|
103
|
-
|
|
109
|
+
production: {},
|
|
104
110
|
},
|
|
105
111
|
};
|
|
106
112
|
async function ensureEasJsonExistsAsync(ctx) {
|
|
@@ -112,7 +118,7 @@ async function ensureEasJsonExistsAsync(ctx) {
|
|
|
112
118
|
return;
|
|
113
119
|
}
|
|
114
120
|
const easJson = ctx.hasAndroidNativeProject && ctx.hasIosNativeProject
|
|
115
|
-
?
|
|
121
|
+
? EAS_JSON_BARE_DEFAULT
|
|
116
122
|
: EAS_JSON_MANAGED_DEFAULT;
|
|
117
123
|
await fs_extra_1.default.writeFile(easJsonPath, `${JSON.stringify(easJson, null, 2)}\n`);
|
|
118
124
|
await vcs_1.default.trackFileAsync(easJsonPath);
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.readChannelSafelyAsync = exports.readReleaseChannelSafelyAsync = exports.syncUpdatesConfigurationAsync = exports.configureUpdatesAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
6
|
-
const fs_extra_1 = (0, tslib_1.__importDefault)(require("fs-extra"));
|
|
7
6
|
const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
|
|
8
7
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
9
8
|
const actions_1 = require("../../user/actions");
|
|
@@ -13,13 +12,6 @@ const plist_1 = require("./plist");
|
|
|
13
12
|
async function configureUpdatesAsync(projectDir, exp) {
|
|
14
13
|
(0, updates_1.ensureValidVersions)(exp);
|
|
15
14
|
const accountName = (0, projectUtils_1.getProjectAccountName)(exp, await (0, actions_1.ensureLoggedInAsync)());
|
|
16
|
-
let xcodeProject = config_plugins_1.IOSConfig.XcodeUtils.getPbxproj(projectDir);
|
|
17
|
-
if (!config_plugins_1.IOSConfig.Updates.isShellScriptBuildPhaseConfigured(projectDir, xcodeProject)) {
|
|
18
|
-
xcodeProject = config_plugins_1.IOSConfig.Updates.ensureBundleReactNativePhaseContainsConfigurationScript(projectDir, xcodeProject);
|
|
19
|
-
await fs_extra_1.default.writeFile(config_plugins_1.IOSConfig.Paths.getPBXProjectPath(projectDir),
|
|
20
|
-
// eslint-disable-next-line node/no-sync
|
|
21
|
-
xcodeProject.writeSync());
|
|
22
|
-
}
|
|
23
15
|
let expoPlist = await readExpoPlistAsync(projectDir);
|
|
24
16
|
if (!config_plugins_1.IOSConfig.Updates.isPlistConfigurationSynced(exp, expoPlist, accountName)) {
|
|
25
17
|
expoPlist = config_plugins_1.IOSConfig.Updates.setUpdatesConfig(exp, expoPlist, accountName);
|
|
@@ -32,7 +24,7 @@ async function syncUpdatesConfigurationAsync(projectDir, exp) {
|
|
|
32
24
|
(0, updates_1.ensureValidVersions)(exp);
|
|
33
25
|
const accountName = (0, projectUtils_1.getProjectAccountName)(exp, await (0, actions_1.ensureLoggedInAsync)());
|
|
34
26
|
try {
|
|
35
|
-
await ensureUpdatesConfiguredAsync(projectDir
|
|
27
|
+
await ensureUpdatesConfiguredAsync(projectDir);
|
|
36
28
|
}
|
|
37
29
|
catch (error) {
|
|
38
30
|
log_1.default.error('expo-updates module is not configured. Please run "eas build:configure" first to configure the project');
|
|
@@ -48,13 +40,9 @@ async function syncUpdatesConfigurationAsync(projectDir, exp) {
|
|
|
48
40
|
}
|
|
49
41
|
}
|
|
50
42
|
exports.syncUpdatesConfigurationAsync = syncUpdatesConfigurationAsync;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const script = 'expo-updates/scripts/create-manifest-ios.sh';
|
|
55
|
-
const buildPhase = '"Bundle React Native code and images"';
|
|
56
|
-
throw new Error(`Path to ${script} is missing in a ${buildPhase} build phase.`);
|
|
57
|
-
}
|
|
43
|
+
// Note: we assume here that Expo modules are properly configured in the project. Aside from that,
|
|
44
|
+
// all that is needed on Expo SDK 43+ to configure expo-updates configuration in Expo.plist
|
|
45
|
+
async function ensureUpdatesConfiguredAsync(projectDir) {
|
|
58
46
|
const expoPlist = await readExpoPlistAsync(projectDir);
|
|
59
47
|
if (!config_plugins_1.IOSConfig.Updates.isPlistConfigurationSet(expoPlist)) {
|
|
60
48
|
throw new Error('Missing values in Expo.plist');
|
|
@@ -14,7 +14,7 @@ async function configureIosAsync(ctx) {
|
|
|
14
14
|
await (0, bundleIdentifier_1.ensureBundleIdentifierIsDefinedForManagedProjectAsync)(ctx.projectDir, ctx.exp);
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
|
-
(0, bundleIdentifier_1.
|
|
17
|
+
(0, bundleIdentifier_1.warnIfBundleIdentifierDefinedInAppConfigForBareWorkflowProject)(ctx.projectDir, ctx.exp);
|
|
18
18
|
if ((0, updates_1.isExpoUpdatesInstalled)(ctx.projectDir)) {
|
|
19
19
|
await (0, UpdatesModule_1.configureUpdatesAsync)(ctx.projectDir, ctx.exp);
|
|
20
20
|
}
|
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateAppJsonConfigAsync = void 0;
|
|
3
|
+
exports.readAppJson = exports.updateAppJsonConfigAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ExpoConfig = (0, tslib_1.__importStar)(require("@expo/config"));
|
|
6
|
+
const json_file_1 = (0, tslib_1.__importDefault)(require("@expo/json-file"));
|
|
6
7
|
const assert_1 = (0, tslib_1.__importDefault)(require("assert"));
|
|
7
|
-
const fs_extra_1 = (0, tslib_1.__importDefault)(require("fs-extra"));
|
|
8
8
|
async function updateAppJsonConfigAsync({ projectDir, exp, }, modifyConfig) {
|
|
9
9
|
var _a;
|
|
10
10
|
const paths = ExpoConfig.getConfigFilePaths(projectDir);
|
|
11
11
|
(0, assert_1.default)(paths.staticConfigPath, "can't update dynamic config");
|
|
12
|
-
const rawStaticConfig =
|
|
12
|
+
const rawStaticConfig = readAppJson(paths.staticConfigPath);
|
|
13
13
|
rawStaticConfig.expo = (_a = rawStaticConfig.expo) !== null && _a !== void 0 ? _a : {};
|
|
14
14
|
modifyConfig(rawStaticConfig.expo);
|
|
15
|
-
await
|
|
15
|
+
await json_file_1.default.writeAsync(paths.staticConfigPath, rawStaticConfig, { json5: false });
|
|
16
16
|
modifyConfig(exp);
|
|
17
17
|
}
|
|
18
18
|
exports.updateAppJsonConfigAsync = updateAppJsonConfigAsync;
|
|
19
|
+
// TODO: remove this once @expo/config exports getStaticConfig
|
|
20
|
+
function readAppJson(appJsonPath) {
|
|
21
|
+
const config = json_file_1.default.read(appJsonPath, { json5: true });
|
|
22
|
+
if (config) {
|
|
23
|
+
return config;
|
|
24
|
+
}
|
|
25
|
+
throw new Error(`Failed to read app.json`);
|
|
26
|
+
}
|
|
27
|
+
exports.readAppJson = readAppJson;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { BuildProfile } from '@expo/eas-json';
|
|
2
|
+
import { ProfileData } from '../../utils/profiles';
|
|
3
|
+
export declare function ensureExpoDevClientInstalledForDevClientBuildsAsync({ projectDir, nonInteractive, buildProfiles, }: {
|
|
3
4
|
projectDir: string;
|
|
4
|
-
platforms: Platform[];
|
|
5
|
-
profile: string;
|
|
6
5
|
nonInteractive?: boolean;
|
|
6
|
+
buildProfiles?: ProfileData<BuildProfile>[];
|
|
7
7
|
}): Promise<void>;
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ensureExpoDevClientInstalledForDevClientBuildsAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
6
|
-
const eas_json_1 = require("@expo/eas-json");
|
|
7
6
|
const errors_1 = require("@oclif/errors");
|
|
8
7
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
9
8
|
const resolve_from_1 = (0, tslib_1.__importDefault)(require("resolve-from"));
|
|
@@ -13,24 +12,17 @@ const platform_1 = require("../../platform");
|
|
|
13
12
|
const workflow_1 = require("../../project/workflow");
|
|
14
13
|
const prompts_1 = require("../../prompts");
|
|
15
14
|
const expoCommand_1 = require("../../utils/expoCommand");
|
|
16
|
-
const zipObject_1 = (0, tslib_1.__importDefault)(require("../../utils/expodash/zipObject"));
|
|
17
15
|
const repository_1 = require("./repository");
|
|
18
|
-
async function ensureExpoDevClientInstalledForDevClientBuildsAsync({ projectDir,
|
|
16
|
+
async function ensureExpoDevClientInstalledForDevClientBuildsAsync({ projectDir, nonInteractive = false, buildProfiles = [], }) {
|
|
19
17
|
if (await isExpoDevClientInstalledAsync(projectDir)) {
|
|
20
18
|
return;
|
|
21
19
|
}
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
const buildProfile = await easJsonReader.readBuildProfileAsync(platform, profile);
|
|
26
|
-
return (_a = buildProfile.developmentClient) !== null && _a !== void 0 ? _a : false;
|
|
27
|
-
}));
|
|
28
|
-
const isDevClientRequired = devClientPerPlatformList.some(i => i);
|
|
29
|
-
if (!isDevClientRequired) {
|
|
20
|
+
const buildProfilesWithDevelopmentClientRequired = buildProfiles.filter(buildProfile => buildProfile.profile.developmentClient);
|
|
21
|
+
const isDevelopmentClientRequired = buildProfilesWithDevelopmentClientRequired.some(Boolean);
|
|
22
|
+
if (!isDevelopmentClientRequired) {
|
|
30
23
|
return;
|
|
31
24
|
}
|
|
32
|
-
const
|
|
33
|
-
const platformsToCheck = platforms.filter(platform => devClientPerPlatform[platform]);
|
|
25
|
+
const platformsToCheck = buildProfilesWithDevelopmentClientRequired.map(({ platform }) => platform);
|
|
34
26
|
const workflowPerPlatformList = await Promise.all(platformsToCheck.map(platform => (0, workflow_1.resolveWorkflowAsync)(projectDir, platform)));
|
|
35
27
|
log_1.default.newLine();
|
|
36
28
|
log_1.default.error(`You want to build a development client build for platforms: ${platformsToCheck
|
|
@@ -47,15 +39,15 @@ async function ensureExpoDevClientInstalledForDevClientBuildsAsync({ projectDir,
|
|
|
47
39
|
await installExpoDevClientAsync(projectDir, { nonInteractive });
|
|
48
40
|
}
|
|
49
41
|
else {
|
|
50
|
-
(0, errors_1.error)(`Install ${chalk_1.default.bold('expo-dev-client')}
|
|
42
|
+
(0, errors_1.error)(`Install ${chalk_1.default.bold('expo-dev-client')} manually and come back later.`, {
|
|
51
43
|
exit: 1,
|
|
52
44
|
});
|
|
53
45
|
}
|
|
54
46
|
}
|
|
55
47
|
else {
|
|
56
|
-
log_1.default.warn(`
|
|
48
|
+
log_1.default.warn(`You'll need to install ${chalk_1.default.bold('expo-dev-client')} manually.`);
|
|
57
49
|
log_1.default.warn((0, log_1.learnMore)('https://docs.expo.dev/clients/installation/', {
|
|
58
|
-
learnMoreMessage: 'See installation instructions on how to do it',
|
|
50
|
+
learnMoreMessage: 'See installation instructions on how to do it.',
|
|
59
51
|
dim: false,
|
|
60
52
|
}));
|
|
61
53
|
log_1.default.warn('If you proceed anyway, you might not get the build you want.');
|
|
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.defaultPublishPlatforms = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const config_1 = require("@expo/config");
|
|
6
|
-
const
|
|
6
|
+
const config_plugins_1 = require("@expo/config-plugins");
|
|
7
|
+
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
7
8
|
const command_1 = require("@oclif/command");
|
|
8
9
|
const assert_1 = (0, tslib_1.__importDefault)(require("assert"));
|
|
9
10
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
@@ -16,6 +17,7 @@ const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
|
|
|
16
17
|
const ora_1 = require("../../ora");
|
|
17
18
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
18
19
|
const publish_1 = require("../../project/publish");
|
|
20
|
+
const workflow_1 = require("../../project/workflow");
|
|
19
21
|
const prompts_1 = require("../../prompts");
|
|
20
22
|
const utils_1 = require("../../update/utils");
|
|
21
23
|
const uniqBy_1 = (0, tslib_1.__importDefault)(require("../../utils/expodash/uniqBy"));
|
|
@@ -69,7 +71,7 @@ class BranchPublish extends EasCommand_1.default {
|
|
|
69
71
|
skipSDKVersionRequirement: true,
|
|
70
72
|
isPublicConfig: true,
|
|
71
73
|
});
|
|
72
|
-
const runtimeVersions =
|
|
74
|
+
const runtimeVersions = await getRuntimeVersionObjectAsync(exp, platformFlag, projectDir);
|
|
73
75
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
74
76
|
if (!branchName && autoFlag) {
|
|
75
77
|
branchName =
|
|
@@ -295,50 +297,19 @@ BranchPublish.flags = {
|
|
|
295
297
|
default: false,
|
|
296
298
|
}),
|
|
297
299
|
};
|
|
298
|
-
function
|
|
300
|
+
async function getRuntimeVersionObjectAsync(exp, platformFlag, projectDir) {
|
|
299
301
|
var _a, _b;
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
}
|
|
309
|
-
const iOSRuntimeVersion = (_a = exp.ios) === null || _a === void 0 ? void 0 : _a.runtimeVersion; // TODO-JJ remove cast to any
|
|
310
|
-
const androidRuntimeVersion = (_b = exp.android) === null || _b === void 0 ? void 0 : _b.runtimeVersion; // TODO-JJ remove cast to any
|
|
311
|
-
let runtimeVersions;
|
|
312
|
-
switch (platformFlag) {
|
|
313
|
-
case 'ios': {
|
|
314
|
-
runtimeVersions = {
|
|
315
|
-
ios: iOSRuntimeVersion !== null && iOSRuntimeVersion !== void 0 ? iOSRuntimeVersion : defaultRuntimeVersion,
|
|
316
|
-
};
|
|
317
|
-
break;
|
|
318
|
-
}
|
|
319
|
-
case 'android': {
|
|
320
|
-
runtimeVersions = {
|
|
321
|
-
android: androidRuntimeVersion !== null && androidRuntimeVersion !== void 0 ? androidRuntimeVersion : defaultRuntimeVersion,
|
|
322
|
-
};
|
|
323
|
-
break;
|
|
324
|
-
}
|
|
325
|
-
case 'all': {
|
|
326
|
-
runtimeVersions = {
|
|
327
|
-
ios: iOSRuntimeVersion !== null && iOSRuntimeVersion !== void 0 ? iOSRuntimeVersion : defaultRuntimeVersion,
|
|
328
|
-
android: androidRuntimeVersion !== null && androidRuntimeVersion !== void 0 ? androidRuntimeVersion : defaultRuntimeVersion,
|
|
329
|
-
};
|
|
330
|
-
break;
|
|
302
|
+
const platforms = (platformFlag === 'all' ? ['android', 'ios'] : [platformFlag]);
|
|
303
|
+
for (const platform of platforms) {
|
|
304
|
+
const isPolicy = typeof ((_b = (_a = exp[platform]) === null || _a === void 0 ? void 0 : _a.runtimeVersion) !== null && _b !== void 0 ? _b : exp.runtimeVersion) === 'object';
|
|
305
|
+
if (isPolicy) {
|
|
306
|
+
const isManaged = (await (0, workflow_1.resolveWorkflowAsync)(projectDir, platform)) === eas_build_job_1.Workflow.MANAGED;
|
|
307
|
+
if (!isManaged) {
|
|
308
|
+
throw new Error('Runtime version policies are only supported in the managed workflow.');
|
|
309
|
+
}
|
|
331
310
|
}
|
|
332
|
-
default:
|
|
333
|
-
throw new Error('Platform flag must be "ios", "android", or "all"');
|
|
334
|
-
}
|
|
335
|
-
if (Object.values(runtimeVersions).some(runtime => !runtime)) {
|
|
336
|
-
throw new Error("Couldn't find a 'runtimeVersion' for every platform. Please specify it under the 'expo' key in 'app.json'");
|
|
337
|
-
}
|
|
338
|
-
if (Object.values(runtimeVersions).some(runtime => typeof runtime !== 'string')) {
|
|
339
|
-
throw new Error(`Please ensure that all of the runtime versions defined in the app.json are strings.`);
|
|
340
311
|
}
|
|
341
|
-
return
|
|
312
|
+
return Object.fromEntries(platforms.map(platform => [platform, config_plugins_1.Updates.getRuntimeVersion(exp, platform)]));
|
|
342
313
|
}
|
|
343
314
|
function formatUpdateTitle(update) {
|
|
344
315
|
const { message, createdAt, actor, runtimeVersion } = update;
|
|
@@ -7,7 +7,7 @@ export default class Build extends EasCommand {
|
|
|
7
7
|
'skip-credentials-check': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
8
8
|
json: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
9
9
|
'skip-project-configuration': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
10
|
-
profile: flags.IOptionFlag<string>;
|
|
10
|
+
profile: flags.IOptionFlag<string | undefined>;
|
|
11
11
|
'non-interactive': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
12
12
|
local: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
13
13
|
wait: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|