eas-cli 0.37.0 → 0.38.3
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 +52 -40
- package/build/build/android/build.d.ts +2 -1
- package/build/build/android/build.js +11 -9
- package/build/build/android/configure.d.ts +3 -2
- package/build/build/build.d.ts +0 -2
- package/build/build/build.js +1 -2
- package/build/build/configure.js +1 -2
- package/build/build/context.d.ts +18 -10
- package/build/build/context.js +0 -96
- package/build/build/createContext.d.ts +13 -0
- package/build/build/createContext.js +114 -0
- package/build/build/ios/build.d.ts +2 -1
- package/build/build/ios/build.js +24 -19
- package/build/build/ios/configure.d.ts +3 -2
- package/build/build/ios/version.d.ts +1 -1
- package/build/build/ios/version.js +4 -1
- package/build/build/local.js +14 -3
- package/build/build/metadata.d.ts +1 -12
- package/build/build/metadata.js +24 -19
- package/build/build/validate.d.ts +3 -3
- package/build/commandUtils/EasCommand.js +0 -2
- package/build/commands/branch/publish.js +10 -0
- package/build/commands/build/configure.js +2 -0
- package/build/commands/build/index.js +24 -16
- package/build/commands/config.js +1 -1
- package/build/commands/update/configure.d.ts +7 -0
- package/build/commands/update/configure.js +67 -0
- package/build/commands/webhook/create.js +1 -2
- package/build/commands/webhook/list.js +1 -1
- package/build/commands/webhook/update.js +1 -2
- package/build/credentials/ios/appstore/bundleIdCapabilities.js +11 -1
- package/build/credentials/ios/appstore/entitlements.js +1 -1
- package/build/credentials/manager/SelectBuildProfileFromEasJson.js +1 -1
- package/build/credentials/manager/SelectIosDistributionTypeGraphqlFromBuildProfile.d.ts +3 -2
- package/build/graphql/generated.d.ts +2 -1
- package/build/graphql/generated.js +1 -0
- package/build/project/ios/scheme.d.ts +3 -2
- package/build/submit/android/AndroidSubmitCommand.js +2 -1
- package/build/submit/context.d.ts +2 -0
- package/build/submit/context.js +2 -1
- package/build/submit/ios/IosSubmitCommand.js +2 -1
- package/build/utils/profiles.d.ts +2 -3
- package/build/utils/profiles.js +20 -7
- package/build/vcs/clients/git.js +4 -1
- package/build/webhooks/input.d.ts +2 -2
- package/build/webhooks/input.js +19 -2
- package/oclif.manifest.json +1 -1
- package/package.json +16 -16
package/README.md
CHANGED
|
@@ -7,9 +7,9 @@ EAS command line tool
|
|
|
7
7
|
[](https://npmjs.org/package/eas-cli)
|
|
8
8
|
[](https://github.com/expo/eas-cli/blob/main/package.json)
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
- [Installation](#installation)
|
|
11
|
+
- [Usage](#usage)
|
|
12
|
+
- [Commands](#commands)
|
|
13
13
|
|
|
14
14
|
# Installation
|
|
15
15
|
|
|
@@ -55,6 +55,7 @@ eas --help COMMAND
|
|
|
55
55
|
* [`eas secret:delete`](#eas-secretdelete)
|
|
56
56
|
* [`eas secret:list`](#eas-secretlist)
|
|
57
57
|
* [`eas submit`](#eas-submit)
|
|
58
|
+
* [`eas update:configure`](#eas-updateconfigure)
|
|
58
59
|
* [`eas webhook:create`](#eas-webhookcreate)
|
|
59
60
|
* [`eas webhook:delete [ID]`](#eas-webhookdelete-id)
|
|
60
61
|
* [`eas webhook:list`](#eas-webhooklist)
|
|
@@ -73,7 +74,7 @@ ALIASES
|
|
|
73
74
|
$ eas login
|
|
74
75
|
```
|
|
75
76
|
|
|
76
|
-
_See code: [src/commands/account/login.
|
|
77
|
+
_See code: [src/commands/account/login.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/account/login.ts)_
|
|
77
78
|
|
|
78
79
|
## `eas account:logout`
|
|
79
80
|
|
|
@@ -87,7 +88,7 @@ ALIASES
|
|
|
87
88
|
$ eas logout
|
|
88
89
|
```
|
|
89
90
|
|
|
90
|
-
_See code: [src/commands/account/logout.
|
|
91
|
+
_See code: [src/commands/account/logout.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/account/logout.ts)_
|
|
91
92
|
|
|
92
93
|
## `eas account:view`
|
|
93
94
|
|
|
@@ -101,7 +102,7 @@ ALIASES
|
|
|
101
102
|
$ eas whoami
|
|
102
103
|
```
|
|
103
104
|
|
|
104
|
-
_See code: [src/commands/account/view.
|
|
105
|
+
_See code: [src/commands/account/view.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/account/view.ts)_
|
|
105
106
|
|
|
106
107
|
## `eas analytics [STATUS]`
|
|
107
108
|
|
|
@@ -112,7 +113,7 @@ USAGE
|
|
|
112
113
|
$ eas analytics [STATUS]
|
|
113
114
|
```
|
|
114
115
|
|
|
115
|
-
_See code: [src/commands/analytics.
|
|
116
|
+
_See code: [src/commands/analytics.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/analytics.ts)_
|
|
116
117
|
|
|
117
118
|
## `eas build`
|
|
118
119
|
|
|
@@ -146,7 +147,7 @@ OPTIONS
|
|
|
146
147
|
--[no-]wait Wait for build(s) to complete
|
|
147
148
|
```
|
|
148
149
|
|
|
149
|
-
_See code: [src/commands/build/index.
|
|
150
|
+
_See code: [src/commands/build/index.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/build/index.ts)_
|
|
150
151
|
|
|
151
152
|
## `eas build:cancel [BUILD_ID]`
|
|
152
153
|
|
|
@@ -157,7 +158,7 @@ USAGE
|
|
|
157
158
|
$ eas build:cancel [BUILD_ID]
|
|
158
159
|
```
|
|
159
160
|
|
|
160
|
-
_See code: [src/commands/build/cancel.
|
|
161
|
+
_See code: [src/commands/build/cancel.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/build/cancel.ts)_
|
|
161
162
|
|
|
162
163
|
## `eas build:configure`
|
|
163
164
|
|
|
@@ -171,7 +172,7 @@ OPTIONS
|
|
|
171
172
|
-p, --platform=(android|ios|all) Platform to configure
|
|
172
173
|
```
|
|
173
174
|
|
|
174
|
-
_See code: [src/commands/build/configure.
|
|
175
|
+
_See code: [src/commands/build/configure.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/build/configure.ts)_
|
|
175
176
|
|
|
176
177
|
## `eas build:list`
|
|
177
178
|
|
|
@@ -204,7 +205,7 @@ OPTIONS
|
|
|
204
205
|
--status=(new|in-queue|in-progress|errored|finished|canceled)
|
|
205
206
|
```
|
|
206
207
|
|
|
207
|
-
_See code: [src/commands/build/list.
|
|
208
|
+
_See code: [src/commands/build/list.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/build/list.ts)_
|
|
208
209
|
|
|
209
210
|
## `eas build:view [BUILD_ID]`
|
|
210
211
|
|
|
@@ -218,7 +219,7 @@ OPTIONS
|
|
|
218
219
|
--json Enable JSON output, non-JSON messages will be printed to stderr
|
|
219
220
|
```
|
|
220
221
|
|
|
221
|
-
_See code: [src/commands/build/view.
|
|
222
|
+
_See code: [src/commands/build/view.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/build/view.ts)_
|
|
222
223
|
|
|
223
224
|
## `eas config`
|
|
224
225
|
|
|
@@ -233,7 +234,7 @@ OPTIONS
|
|
|
233
234
|
--profile=profile
|
|
234
235
|
```
|
|
235
236
|
|
|
236
|
-
_See code: [src/commands/config.
|
|
237
|
+
_See code: [src/commands/config.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/config.ts)_
|
|
237
238
|
|
|
238
239
|
## `eas credentials`
|
|
239
240
|
|
|
@@ -244,7 +245,7 @@ USAGE
|
|
|
244
245
|
$ eas credentials
|
|
245
246
|
```
|
|
246
247
|
|
|
247
|
-
_See code: [src/commands/credentials.
|
|
248
|
+
_See code: [src/commands/credentials.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/credentials.ts)_
|
|
248
249
|
|
|
249
250
|
## `eas device:create`
|
|
250
251
|
|
|
@@ -255,7 +256,7 @@ USAGE
|
|
|
255
256
|
$ eas device:create
|
|
256
257
|
```
|
|
257
258
|
|
|
258
|
-
_See code: [src/commands/device/create.
|
|
259
|
+
_See code: [src/commands/device/create.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/device/create.ts)_
|
|
259
260
|
|
|
260
261
|
## `eas device:list`
|
|
261
262
|
|
|
@@ -269,7 +270,7 @@ OPTIONS
|
|
|
269
270
|
--apple-team-id=apple-team-id
|
|
270
271
|
```
|
|
271
272
|
|
|
272
|
-
_See code: [src/commands/device/list.
|
|
273
|
+
_See code: [src/commands/device/list.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/device/list.ts)_
|
|
273
274
|
|
|
274
275
|
## `eas device:view [UDID]`
|
|
275
276
|
|
|
@@ -280,7 +281,7 @@ USAGE
|
|
|
280
281
|
$ eas device:view [UDID]
|
|
281
282
|
```
|
|
282
283
|
|
|
283
|
-
_See code: [src/commands/device/view.
|
|
284
|
+
_See code: [src/commands/device/view.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/device/view.ts)_
|
|
284
285
|
|
|
285
286
|
## `eas diagnostics`
|
|
286
287
|
|
|
@@ -291,7 +292,7 @@ USAGE
|
|
|
291
292
|
$ eas diagnostics
|
|
292
293
|
```
|
|
293
294
|
|
|
294
|
-
_See code: [src/commands/diagnostics.
|
|
295
|
+
_See code: [src/commands/diagnostics.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/diagnostics.ts)_
|
|
295
296
|
|
|
296
297
|
## `eas help [COMMAND]`
|
|
297
298
|
|
|
@@ -308,7 +309,7 @@ OPTIONS
|
|
|
308
309
|
--all see all commands in CLI
|
|
309
310
|
```
|
|
310
311
|
|
|
311
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.
|
|
312
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.5/src/commands/help.ts)_
|
|
312
313
|
|
|
313
314
|
## `eas project:info`
|
|
314
315
|
|
|
@@ -319,7 +320,7 @@ USAGE
|
|
|
319
320
|
$ eas project:info
|
|
320
321
|
```
|
|
321
322
|
|
|
322
|
-
_See code: [src/commands/project/info.
|
|
323
|
+
_See code: [src/commands/project/info.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/project/info.ts)_
|
|
323
324
|
|
|
324
325
|
## `eas project:init`
|
|
325
326
|
|
|
@@ -333,7 +334,7 @@ ALIASES
|
|
|
333
334
|
$ eas init
|
|
334
335
|
```
|
|
335
336
|
|
|
336
|
-
_See code: [src/commands/project/init.
|
|
337
|
+
_See code: [src/commands/project/init.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/project/init.ts)_
|
|
337
338
|
|
|
338
339
|
## `eas secret:create`
|
|
339
340
|
|
|
@@ -350,7 +351,7 @@ OPTIONS
|
|
|
350
351
|
--value=value Value of the secret
|
|
351
352
|
```
|
|
352
353
|
|
|
353
|
-
_See code: [src/commands/secret/create.
|
|
354
|
+
_See code: [src/commands/secret/create.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/secret/create.ts)_
|
|
354
355
|
|
|
355
356
|
## `eas secret:delete`
|
|
356
357
|
|
|
@@ -367,7 +368,7 @@ DESCRIPTION
|
|
|
367
368
|
Unsure where to find the secret's ID? Run eas secret:list
|
|
368
369
|
```
|
|
369
370
|
|
|
370
|
-
_See code: [src/commands/secret/delete.
|
|
371
|
+
_See code: [src/commands/secret/delete.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/secret/delete.ts)_
|
|
371
372
|
|
|
372
373
|
## `eas secret:list`
|
|
373
374
|
|
|
@@ -378,7 +379,7 @@ USAGE
|
|
|
378
379
|
$ eas secret:list
|
|
379
380
|
```
|
|
380
381
|
|
|
381
|
-
_See code: [src/commands/secret/list.
|
|
382
|
+
_See code: [src/commands/secret/list.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/secret/list.ts)_
|
|
382
383
|
|
|
383
384
|
## `eas submit`
|
|
384
385
|
|
|
@@ -411,7 +412,18 @@ ALIASES
|
|
|
411
412
|
$ eas build:submit
|
|
412
413
|
```
|
|
413
414
|
|
|
414
|
-
_See code: [src/commands/submit.
|
|
415
|
+
_See code: [src/commands/submit.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/submit.ts)_
|
|
416
|
+
|
|
417
|
+
## `eas update:configure`
|
|
418
|
+
|
|
419
|
+
Configure the project to support EAS Update.
|
|
420
|
+
|
|
421
|
+
```
|
|
422
|
+
USAGE
|
|
423
|
+
$ eas update:configure
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
_See code: [src/commands/update/configure.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/update/configure.ts)_
|
|
415
427
|
|
|
416
428
|
## `eas webhook:create`
|
|
417
429
|
|
|
@@ -422,15 +434,15 @@ USAGE
|
|
|
422
434
|
$ eas webhook:create
|
|
423
435
|
|
|
424
436
|
OPTIONS
|
|
425
|
-
--event=(BUILD)
|
|
437
|
+
--event=(BUILD|SUBMIT) Event type that triggers the webhook
|
|
426
438
|
|
|
427
|
-
--secret=secret
|
|
428
|
-
|
|
439
|
+
--secret=secret Secret used to create a hash signature of the request payload, provided in the
|
|
440
|
+
'Expo-Signature' header.
|
|
429
441
|
|
|
430
|
-
--url=url
|
|
442
|
+
--url=url Webhook URL
|
|
431
443
|
```
|
|
432
444
|
|
|
433
|
-
_See code: [src/commands/webhook/create.
|
|
445
|
+
_See code: [src/commands/webhook/create.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/webhook/create.ts)_
|
|
434
446
|
|
|
435
447
|
## `eas webhook:delete [ID]`
|
|
436
448
|
|
|
@@ -444,7 +456,7 @@ ARGUMENTS
|
|
|
444
456
|
ID ID of the webhook to delete
|
|
445
457
|
```
|
|
446
458
|
|
|
447
|
-
_See code: [src/commands/webhook/delete.
|
|
459
|
+
_See code: [src/commands/webhook/delete.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/webhook/delete.ts)_
|
|
448
460
|
|
|
449
461
|
## `eas webhook:list`
|
|
450
462
|
|
|
@@ -455,10 +467,10 @@ USAGE
|
|
|
455
467
|
$ eas webhook:list
|
|
456
468
|
|
|
457
469
|
OPTIONS
|
|
458
|
-
--event=(BUILD) Event type that triggers the webhook
|
|
470
|
+
--event=(BUILD|SUBMIT) Event type that triggers the webhook
|
|
459
471
|
```
|
|
460
472
|
|
|
461
|
-
_See code: [src/commands/webhook/list.
|
|
473
|
+
_See code: [src/commands/webhook/list.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/webhook/list.ts)_
|
|
462
474
|
|
|
463
475
|
## `eas webhook:update`
|
|
464
476
|
|
|
@@ -469,16 +481,16 @@ USAGE
|
|
|
469
481
|
$ eas webhook:update
|
|
470
482
|
|
|
471
483
|
OPTIONS
|
|
472
|
-
--event=(BUILD)
|
|
473
|
-
--id=id
|
|
484
|
+
--event=(BUILD|SUBMIT) Event type that triggers the webhook
|
|
485
|
+
--id=id (required) Webhook ID
|
|
474
486
|
|
|
475
|
-
--secret=secret
|
|
476
|
-
|
|
487
|
+
--secret=secret Secret used to create a hash signature of the request payload, provided in the
|
|
488
|
+
'Expo-Signature' header.
|
|
477
489
|
|
|
478
|
-
--url=url
|
|
490
|
+
--url=url Webhook URL
|
|
479
491
|
```
|
|
480
492
|
|
|
481
|
-
_See code: [src/commands/webhook/update.
|
|
493
|
+
_See code: [src/commands/webhook/update.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/webhook/update.ts)_
|
|
482
494
|
|
|
483
495
|
## `eas webhook:view ID`
|
|
484
496
|
|
|
@@ -492,5 +504,5 @@ ARGUMENTS
|
|
|
492
504
|
ID ID of the webhook to view
|
|
493
505
|
```
|
|
494
506
|
|
|
495
|
-
_See code: [src/commands/webhook/view.
|
|
507
|
+
_See code: [src/commands/webhook/view.ts](https://github.com/expo/eas-cli/blob/v0.38.3/packages/eas-cli/src/commands/webhook/view.ts)_
|
|
496
508
|
<!-- commandsstop -->
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Platform } from '@expo/eas-build-job';
|
|
2
2
|
import { BuildRequestSender } from '../build';
|
|
3
|
-
import { BuildContext } from '../context';
|
|
3
|
+
import { AndroidBuildContext, BuildContext, CommonContext } from '../context';
|
|
4
|
+
export declare function createAndroidContextAsync(ctx: CommonContext<Platform.ANDROID>): Promise<AndroidBuildContext>;
|
|
4
5
|
export declare function prepareAndroidBuildAsync(ctx: BuildContext<Platform.ANDROID>): Promise<BuildRequestSender>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.prepareAndroidBuildAsync = void 0;
|
|
3
|
+
exports.prepareAndroidBuildAsync = exports.createAndroidContextAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
6
6
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
@@ -19,7 +19,7 @@ const validate_1 = require("../validate");
|
|
|
19
19
|
const configure_1 = require("./configure");
|
|
20
20
|
const graphql_2 = require("./graphql");
|
|
21
21
|
const prepareJob_1 = require("./prepareJob");
|
|
22
|
-
async function
|
|
22
|
+
async function createAndroidContextAsync(ctx) {
|
|
23
23
|
var _a;
|
|
24
24
|
const { buildProfile } = ctx;
|
|
25
25
|
if (buildProfile.distribution === 'internal' && ((_a = buildProfile.gradleCommand) === null || _a === void 0 ? void 0 : _a.match(/bundle/))) {
|
|
@@ -39,21 +39,23 @@ This means that it will most likely produce an AAB and you will not be able to i
|
|
|
39
39
|
if (ctx.workflow === eas_build_job_1.Workflow.MANAGED) {
|
|
40
40
|
await (0, applicationId_1.ensureApplicationIdIsDefinedForManagedProjectAsync)(ctx.projectDir, ctx.exp);
|
|
41
41
|
}
|
|
42
|
+
const applicationId = await (0, applicationId_1.getApplicationIdAsync)(ctx.projectDir, ctx.exp, gradleContext);
|
|
43
|
+
return { applicationId, gradleContext };
|
|
44
|
+
}
|
|
45
|
+
exports.createAndroidContextAsync = createAndroidContextAsync;
|
|
46
|
+
async function prepareAndroidBuildAsync(ctx) {
|
|
42
47
|
return await (0, build_1.prepareBuildRequestForPlatformAsync)({
|
|
43
48
|
ctx,
|
|
44
49
|
ensureCredentialsAsync: async (ctx) => {
|
|
45
|
-
return await ensureAndroidCredentialsAsync(ctx
|
|
50
|
+
return await ensureAndroidCredentialsAsync(ctx);
|
|
46
51
|
},
|
|
47
52
|
ensureProjectConfiguredAsync: async () => {
|
|
48
53
|
await (0, configure_1.validateAndSyncProjectConfigurationAsync)({
|
|
49
54
|
projectDir: ctx.projectDir,
|
|
50
55
|
exp: ctx.exp,
|
|
51
|
-
buildProfile,
|
|
56
|
+
buildProfile: ctx.buildProfile,
|
|
52
57
|
});
|
|
53
58
|
},
|
|
54
|
-
getMetadataContext: () => ({
|
|
55
|
-
gradleContext,
|
|
56
|
-
}),
|
|
57
59
|
prepareJobAsync: async (ctx, jobData) => {
|
|
58
60
|
return await (0, prepareJob_1.prepareJobAsync)(ctx, jobData);
|
|
59
61
|
},
|
|
@@ -72,11 +74,11 @@ exports.prepareAndroidBuildAsync = prepareAndroidBuildAsync;
|
|
|
72
74
|
function shouldProvideCredentials(ctx) {
|
|
73
75
|
return !ctx.buildProfile.withoutCredentials;
|
|
74
76
|
}
|
|
75
|
-
async function ensureAndroidCredentialsAsync(ctx
|
|
77
|
+
async function ensureAndroidCredentialsAsync(ctx) {
|
|
76
78
|
if (!shouldProvideCredentials(ctx)) {
|
|
77
79
|
return;
|
|
78
80
|
}
|
|
79
|
-
const androidApplicationIdentifier = await (0, applicationId_1.getApplicationIdAsync)(ctx.projectDir, ctx.exp, gradleContext);
|
|
81
|
+
const androidApplicationIdentifier = await (0, applicationId_1.getApplicationIdAsync)(ctx.projectDir, ctx.exp, ctx.android.gradleContext);
|
|
80
82
|
const provider = new AndroidCredentialsProvider_1.default(ctx.credentialsCtx, {
|
|
81
83
|
app: {
|
|
82
84
|
account: (0, nullthrows_1.default)((0, Account_1.findAccountByName)(ctx.user.accounts, ctx.accountName), `You do not have access to account: ${ctx.accountName}`),
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
|
-
import {
|
|
2
|
+
import { Platform } from '@expo/eas-build-job';
|
|
3
|
+
import { BuildProfile } from '@expo/eas-json';
|
|
3
4
|
import { ConfigureContext } from '../context';
|
|
4
5
|
export declare function configureAndroidAsync(ctx: ConfigureContext): Promise<void>;
|
|
5
6
|
export declare function validateAndSyncProjectConfigurationAsync({ projectDir, exp, buildProfile, }: {
|
|
6
7
|
projectDir: string;
|
|
7
8
|
exp: ExpoConfig;
|
|
8
|
-
buildProfile:
|
|
9
|
+
buildProfile: BuildProfile<Platform.ANDROID>;
|
|
9
10
|
}): Promise<void>;
|
package/build/build/build.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { CredentialsSource } from '@expo/eas-json';
|
|
|
3
3
|
import { BuildFragment } from '../graphql/generated';
|
|
4
4
|
import { BuildResult } from '../graphql/mutations/BuildMutation';
|
|
5
5
|
import { BuildContext } from './context';
|
|
6
|
-
import { MetadataContext } from './metadata';
|
|
7
6
|
export interface CredentialsResult<Credentials> {
|
|
8
7
|
source: CredentialsSource.LOCAL | CredentialsSource.REMOTE;
|
|
9
8
|
credentials: Credentials;
|
|
@@ -16,7 +15,6 @@ interface Builder<TPlatform extends Platform, Credentials, TJob extends Job> {
|
|
|
16
15
|
ctx: BuildContext<TPlatform>;
|
|
17
16
|
ensureCredentialsAsync(ctx: BuildContext<TPlatform>): Promise<CredentialsResult<Credentials> | undefined>;
|
|
18
17
|
ensureProjectConfiguredAsync(ctx: BuildContext<TPlatform>): Promise<void>;
|
|
19
|
-
getMetadataContext: () => MetadataContext<TPlatform>;
|
|
20
18
|
prepareJobAsync(ctx: BuildContext<TPlatform>, jobData: JobData<Credentials>): Promise<Job>;
|
|
21
19
|
sendBuildRequestAsync(appId: string, job: TJob, metadata: Metadata): Promise<BuildResult>;
|
|
22
20
|
}
|
package/build/build/build.js
CHANGED
|
@@ -50,8 +50,7 @@ async function prepareBuildRequestForPlatformAsync(builder) {
|
|
|
50
50
|
type: eas_build_job_1.ArchiveSourceType.S3,
|
|
51
51
|
bucketKey: await uploadProjectAsync(ctx),
|
|
52
52
|
};
|
|
53
|
-
const
|
|
54
|
-
const metadata = await (0, metadata_1.collectMetadataAsync)(ctx, metadataContext);
|
|
53
|
+
const metadata = await (0, metadata_1.collectMetadataAsync)(ctx);
|
|
55
54
|
const job = await builder.prepareJobAsync(ctx, {
|
|
56
55
|
projectArchive,
|
|
57
56
|
credentials: credentialsResult === null || credentialsResult === void 0 ? void 0 : credentialsResult.credentials,
|
package/build/build/configure.js
CHANGED
|
@@ -44,7 +44,6 @@ async function ensureProjectConfiguredAsync(projectDir, requestedPlatform) {
|
|
|
44
44
|
}
|
|
45
45
|
exports.ensureProjectConfiguredAsync = ensureProjectConfiguredAsync;
|
|
46
46
|
async function configureAsync(options) {
|
|
47
|
-
await (0, vcs_1.getVcsClient)().ensureRepoExistsAsync();
|
|
48
47
|
await (0, repository_1.maybeBailOnRepoStatusAsync)();
|
|
49
48
|
const { exp } = (0, config_1.getConfig)(options.projectDir, { skipSDKVersionRequirement: true });
|
|
50
49
|
const ctx = {
|
|
@@ -120,7 +119,7 @@ async function ensureEasJsonExistsAsync(ctx) {
|
|
|
120
119
|
const easJsonPath = eas_json_1.EasJsonReader.formatEasJsonPath(ctx.projectDir);
|
|
121
120
|
if (await fs_extra_1.default.pathExists(easJsonPath)) {
|
|
122
121
|
const reader = new eas_json_1.EasJsonReader(ctx.projectDir);
|
|
123
|
-
await reader.
|
|
122
|
+
await reader.readAsync();
|
|
124
123
|
log_1.default.withTick('Validated eas.json');
|
|
125
124
|
return;
|
|
126
125
|
}
|
package/build/build/context.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
2
|
import { Platform, Workflow } from '@expo/eas-build-job';
|
|
3
3
|
import { BuildProfile } from '@expo/eas-json';
|
|
4
|
+
import type { XCBuildConfiguration } from 'xcode';
|
|
4
5
|
import { TrackingContext } from '../analytics/common';
|
|
5
6
|
import { CredentialsContext } from '../credentials/context';
|
|
7
|
+
import { Target } from '../credentials/ios/types';
|
|
6
8
|
import { RequestedPlatform } from '../platform';
|
|
9
|
+
import { GradleBuildContext } from '../project/android/gradle';
|
|
10
|
+
import { XcodeBuildContext } from '../project/ios/scheme';
|
|
7
11
|
import { Actor } from '../user/User';
|
|
8
12
|
export interface ConfigureContext {
|
|
9
13
|
user: Actor;
|
|
@@ -15,6 +19,18 @@ export interface ConfigureContext {
|
|
|
15
19
|
hasAndroidNativeProject: boolean;
|
|
16
20
|
hasIosNativeProject: boolean;
|
|
17
21
|
}
|
|
22
|
+
export declare type CommonContext<T extends Platform> = Omit<BuildContext<T>, 'android' | 'ios'>;
|
|
23
|
+
export interface AndroidBuildContext {
|
|
24
|
+
applicationId: string;
|
|
25
|
+
gradleContext?: GradleBuildContext;
|
|
26
|
+
}
|
|
27
|
+
export interface IosBuildContext {
|
|
28
|
+
bundleIdentifier: string;
|
|
29
|
+
applicationTargetBuildSettings: XCBuildConfiguration['buildSettings'];
|
|
30
|
+
applicationTarget: Target;
|
|
31
|
+
targets: Target[];
|
|
32
|
+
xcodeBuildContext: XcodeBuildContext;
|
|
33
|
+
}
|
|
18
34
|
export interface BuildContext<T extends Platform> {
|
|
19
35
|
accountName: string;
|
|
20
36
|
buildProfile: BuildProfile<T>;
|
|
@@ -32,14 +48,6 @@ export interface BuildContext<T extends Platform> {
|
|
|
32
48
|
trackingCtx: TrackingContext;
|
|
33
49
|
user: Actor;
|
|
34
50
|
workflow: Workflow;
|
|
51
|
+
android: T extends Platform.ANDROID ? AndroidBuildContext : undefined;
|
|
52
|
+
ios: T extends Platform.IOS ? IosBuildContext : undefined;
|
|
35
53
|
}
|
|
36
|
-
export declare function createBuildContextAsync<T extends Platform>({ buildProfileName, buildProfile, clearCache, local, nonInteractive, platform, projectDir, skipProjectConfiguration, }: {
|
|
37
|
-
buildProfileName: string;
|
|
38
|
-
buildProfile: BuildProfile<T>;
|
|
39
|
-
clearCache: boolean;
|
|
40
|
-
local: boolean;
|
|
41
|
-
nonInteractive: boolean;
|
|
42
|
-
platform: T;
|
|
43
|
-
projectDir: string;
|
|
44
|
-
skipProjectConfiguration: boolean;
|
|
45
|
-
}): Promise<BuildContext<T>>;
|
package/build/build/context.js
CHANGED
|
@@ -1,98 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createBuildContextAsync = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
6
|
-
const json_file_1 = (0, tslib_1.__importDefault)(require("@expo/json-file"));
|
|
7
|
-
const resolve_from_1 = (0, tslib_1.__importDefault)(require("resolve-from"));
|
|
8
|
-
const uuid_1 = require("uuid");
|
|
9
|
-
const events_1 = require("../analytics/events");
|
|
10
|
-
const context_1 = require("../credentials/context");
|
|
11
|
-
const expoConfig_1 = require("../project/expoConfig");
|
|
12
|
-
const projectUtils_1 = require("../project/projectUtils");
|
|
13
|
-
const workflow_1 = require("../project/workflow");
|
|
14
|
-
const Account_1 = require("../user/Account");
|
|
15
|
-
const actions_1 = require("../user/actions");
|
|
16
|
-
async function createBuildContextAsync({ buildProfileName, buildProfile, clearCache = false, local, nonInteractive = false, platform, projectDir, skipProjectConfiguration = false, }) {
|
|
17
|
-
var _a;
|
|
18
|
-
const exp = (0, expoConfig_1.getExpoConfig)(projectDir, { env: buildProfile.env });
|
|
19
|
-
const user = await (0, actions_1.ensureLoggedInAsync)();
|
|
20
|
-
const accountName = (0, projectUtils_1.getProjectAccountName)(exp, user);
|
|
21
|
-
const projectName = exp.slug;
|
|
22
|
-
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp, { env: buildProfile.env });
|
|
23
|
-
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, platform);
|
|
24
|
-
const accountId = (_a = (0, Account_1.findAccountByName)(user.accounts, accountName)) === null || _a === void 0 ? void 0 : _a.id;
|
|
25
|
-
const credentialsCtx = new context_1.CredentialsContext({
|
|
26
|
-
exp,
|
|
27
|
-
nonInteractive,
|
|
28
|
-
projectDir,
|
|
29
|
-
user,
|
|
30
|
-
});
|
|
31
|
-
const devClientProperties = getDevClientEventProperties({
|
|
32
|
-
platform,
|
|
33
|
-
projectDir,
|
|
34
|
-
buildProfile,
|
|
35
|
-
});
|
|
36
|
-
const trackingCtx = {
|
|
37
|
-
tracking_id: (0, uuid_1.v4)(),
|
|
38
|
-
platform,
|
|
39
|
-
...(accountId && { account_id: accountId }),
|
|
40
|
-
account_name: accountName,
|
|
41
|
-
project_id: projectId,
|
|
42
|
-
project_type: workflow,
|
|
43
|
-
...devClientProperties,
|
|
44
|
-
};
|
|
45
|
-
events_1.Analytics.logEvent(events_1.BuildEvent.BUILD_COMMAND, trackingCtx);
|
|
46
|
-
return {
|
|
47
|
-
accountName,
|
|
48
|
-
buildProfile,
|
|
49
|
-
buildProfileName,
|
|
50
|
-
clearCache,
|
|
51
|
-
credentialsCtx,
|
|
52
|
-
exp,
|
|
53
|
-
local,
|
|
54
|
-
nonInteractive,
|
|
55
|
-
platform,
|
|
56
|
-
projectDir,
|
|
57
|
-
projectId,
|
|
58
|
-
projectName,
|
|
59
|
-
skipProjectConfiguration,
|
|
60
|
-
trackingCtx,
|
|
61
|
-
user,
|
|
62
|
-
workflow,
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
exports.createBuildContextAsync = createBuildContextAsync;
|
|
66
|
-
function getDevClientEventProperties({ platform, projectDir, buildProfile, }) {
|
|
67
|
-
var _a;
|
|
68
|
-
let includesDevClient;
|
|
69
|
-
const version = tryGetDevClientVersion(projectDir);
|
|
70
|
-
if (platform === eas_build_job_1.Platform.ANDROID && 'gradleCommand' in buildProfile) {
|
|
71
|
-
includesDevClient = Boolean(version && ((_a = buildProfile.gradleCommand) === null || _a === void 0 ? void 0 : _a.includes('Debug')));
|
|
72
|
-
}
|
|
73
|
-
else if (platform === eas_build_job_1.Platform.IOS && 'buildConfiguration' in buildProfile) {
|
|
74
|
-
includesDevClient = Boolean(version && buildProfile.buildConfiguration === 'Debug');
|
|
75
|
-
}
|
|
76
|
-
else if (buildProfile.developmentClient) {
|
|
77
|
-
includesDevClient = true;
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
includesDevClient = false;
|
|
81
|
-
}
|
|
82
|
-
if (version) {
|
|
83
|
-
return { dev_client: includesDevClient, dev_client_version: version };
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
return { dev_client: includesDevClient };
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
function tryGetDevClientVersion(projectDir) {
|
|
90
|
-
var _a, _b;
|
|
91
|
-
try {
|
|
92
|
-
const pkg = json_file_1.default.read((0, resolve_from_1.default)(projectDir, 'expo-dev-client/package.json'));
|
|
93
|
-
return (_b = (_a = pkg.version) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : null;
|
|
94
|
-
}
|
|
95
|
-
catch {
|
|
96
|
-
return null;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Platform } from '@expo/eas-build-job';
|
|
2
|
+
import { BuildProfile } from '@expo/eas-json';
|
|
3
|
+
import { BuildContext } from './context';
|
|
4
|
+
export declare function createBuildContextAsync<T extends Platform>({ buildProfileName, buildProfile, clearCache, local, nonInteractive, platform, projectDir, skipProjectConfiguration, }: {
|
|
5
|
+
buildProfileName: string;
|
|
6
|
+
buildProfile: BuildProfile<T>;
|
|
7
|
+
clearCache: boolean;
|
|
8
|
+
local: boolean;
|
|
9
|
+
nonInteractive: boolean;
|
|
10
|
+
platform: T;
|
|
11
|
+
projectDir: string;
|
|
12
|
+
skipProjectConfiguration: boolean;
|
|
13
|
+
}): Promise<BuildContext<T>>;
|