eas-cli 0.37.0 → 0.38.0
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 +37 -37
- package/build/build/android/build.d.ts +2 -1
- package/build/build/android/build.js +11 -9
- package/build/build/build.d.ts +0 -2
- package/build/build/build.js +1 -2
- package/build/build/configure.js +0 -1
- 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/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/commands/build/configure.js +2 -0
- package/build/commands/build/index.js +9 -8
- 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/graphql/generated.d.ts +2 -1
- package/build/graphql/generated.js +1 -0
- 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/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 +10 -10
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.38.0/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.38.0/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.38.0/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.38.0/packages/eas-cli/src/commands/analytics.js)_
|
|
116
116
|
|
|
117
117
|
## `eas build`
|
|
118
118
|
|
|
@@ -146,7 +146,7 @@ OPTIONS
|
|
|
146
146
|
--[no-]wait Wait for build(s) to complete
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
_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.38.0/packages/eas-cli/src/commands/build/index.js)_
|
|
150
150
|
|
|
151
151
|
## `eas build:cancel [BUILD_ID]`
|
|
152
152
|
|
|
@@ -157,7 +157,7 @@ USAGE
|
|
|
157
157
|
$ eas build:cancel [BUILD_ID]
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
-
_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.38.0/packages/eas-cli/src/commands/build/cancel.js)_
|
|
161
161
|
|
|
162
162
|
## `eas build:configure`
|
|
163
163
|
|
|
@@ -171,7 +171,7 @@ OPTIONS
|
|
|
171
171
|
-p, --platform=(android|ios|all) Platform to configure
|
|
172
172
|
```
|
|
173
173
|
|
|
174
|
-
_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.38.0/packages/eas-cli/src/commands/build/configure.js)_
|
|
175
175
|
|
|
176
176
|
## `eas build:list`
|
|
177
177
|
|
|
@@ -204,7 +204,7 @@ OPTIONS
|
|
|
204
204
|
--status=(new|in-queue|in-progress|errored|finished|canceled)
|
|
205
205
|
```
|
|
206
206
|
|
|
207
|
-
_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.38.0/packages/eas-cli/src/commands/build/list.js)_
|
|
208
208
|
|
|
209
209
|
## `eas build:view [BUILD_ID]`
|
|
210
210
|
|
|
@@ -218,7 +218,7 @@ OPTIONS
|
|
|
218
218
|
--json Enable JSON output, non-JSON messages will be printed to stderr
|
|
219
219
|
```
|
|
220
220
|
|
|
221
|
-
_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.38.0/packages/eas-cli/src/commands/build/view.js)_
|
|
222
222
|
|
|
223
223
|
## `eas config`
|
|
224
224
|
|
|
@@ -233,7 +233,7 @@ OPTIONS
|
|
|
233
233
|
--profile=profile
|
|
234
234
|
```
|
|
235
235
|
|
|
236
|
-
_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.38.0/packages/eas-cli/src/commands/config.js)_
|
|
237
237
|
|
|
238
238
|
## `eas credentials`
|
|
239
239
|
|
|
@@ -244,7 +244,7 @@ USAGE
|
|
|
244
244
|
$ eas credentials
|
|
245
245
|
```
|
|
246
246
|
|
|
247
|
-
_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.38.0/packages/eas-cli/src/commands/credentials.js)_
|
|
248
248
|
|
|
249
249
|
## `eas device:create`
|
|
250
250
|
|
|
@@ -255,7 +255,7 @@ USAGE
|
|
|
255
255
|
$ eas device:create
|
|
256
256
|
```
|
|
257
257
|
|
|
258
|
-
_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.38.0/packages/eas-cli/src/commands/device/create.js)_
|
|
259
259
|
|
|
260
260
|
## `eas device:list`
|
|
261
261
|
|
|
@@ -269,7 +269,7 @@ OPTIONS
|
|
|
269
269
|
--apple-team-id=apple-team-id
|
|
270
270
|
```
|
|
271
271
|
|
|
272
|
-
_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.38.0/packages/eas-cli/src/commands/device/list.js)_
|
|
273
273
|
|
|
274
274
|
## `eas device:view [UDID]`
|
|
275
275
|
|
|
@@ -280,7 +280,7 @@ USAGE
|
|
|
280
280
|
$ eas device:view [UDID]
|
|
281
281
|
```
|
|
282
282
|
|
|
283
|
-
_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.38.0/packages/eas-cli/src/commands/device/view.js)_
|
|
284
284
|
|
|
285
285
|
## `eas diagnostics`
|
|
286
286
|
|
|
@@ -291,7 +291,7 @@ USAGE
|
|
|
291
291
|
$ eas diagnostics
|
|
292
292
|
```
|
|
293
293
|
|
|
294
|
-
_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.38.0/packages/eas-cli/src/commands/diagnostics.js)_
|
|
295
295
|
|
|
296
296
|
## `eas help [COMMAND]`
|
|
297
297
|
|
|
@@ -308,7 +308,7 @@ OPTIONS
|
|
|
308
308
|
--all see all commands in CLI
|
|
309
309
|
```
|
|
310
310
|
|
|
311
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.
|
|
311
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.5/src/commands/help.ts)_
|
|
312
312
|
|
|
313
313
|
## `eas project:info`
|
|
314
314
|
|
|
@@ -319,7 +319,7 @@ USAGE
|
|
|
319
319
|
$ eas project:info
|
|
320
320
|
```
|
|
321
321
|
|
|
322
|
-
_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.38.0/packages/eas-cli/src/commands/project/info.js)_
|
|
323
323
|
|
|
324
324
|
## `eas project:init`
|
|
325
325
|
|
|
@@ -333,7 +333,7 @@ ALIASES
|
|
|
333
333
|
$ eas init
|
|
334
334
|
```
|
|
335
335
|
|
|
336
|
-
_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.38.0/packages/eas-cli/src/commands/project/init.js)_
|
|
337
337
|
|
|
338
338
|
## `eas secret:create`
|
|
339
339
|
|
|
@@ -350,7 +350,7 @@ OPTIONS
|
|
|
350
350
|
--value=value Value of the secret
|
|
351
351
|
```
|
|
352
352
|
|
|
353
|
-
_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.38.0/packages/eas-cli/src/commands/secret/create.js)_
|
|
354
354
|
|
|
355
355
|
## `eas secret:delete`
|
|
356
356
|
|
|
@@ -367,7 +367,7 @@ DESCRIPTION
|
|
|
367
367
|
Unsure where to find the secret's ID? Run eas secret:list
|
|
368
368
|
```
|
|
369
369
|
|
|
370
|
-
_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.38.0/packages/eas-cli/src/commands/secret/delete.js)_
|
|
371
371
|
|
|
372
372
|
## `eas secret:list`
|
|
373
373
|
|
|
@@ -378,7 +378,7 @@ USAGE
|
|
|
378
378
|
$ eas secret:list
|
|
379
379
|
```
|
|
380
380
|
|
|
381
|
-
_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.38.0/packages/eas-cli/src/commands/secret/list.js)_
|
|
382
382
|
|
|
383
383
|
## `eas submit`
|
|
384
384
|
|
|
@@ -411,7 +411,7 @@ ALIASES
|
|
|
411
411
|
$ eas build:submit
|
|
412
412
|
```
|
|
413
413
|
|
|
414
|
-
_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.38.0/packages/eas-cli/src/commands/submit.js)_
|
|
415
415
|
|
|
416
416
|
## `eas webhook:create`
|
|
417
417
|
|
|
@@ -422,15 +422,15 @@ USAGE
|
|
|
422
422
|
$ eas webhook:create
|
|
423
423
|
|
|
424
424
|
OPTIONS
|
|
425
|
-
--event=(BUILD)
|
|
425
|
+
--event=(BUILD|SUBMIT) Event type that triggers the webhook
|
|
426
426
|
|
|
427
|
-
--secret=secret
|
|
428
|
-
|
|
427
|
+
--secret=secret Secret used to create a hash signature of the request payload, provided in the
|
|
428
|
+
'Expo-Signature' header.
|
|
429
429
|
|
|
430
|
-
--url=url
|
|
430
|
+
--url=url Webhook URL
|
|
431
431
|
```
|
|
432
432
|
|
|
433
|
-
_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.38.0/packages/eas-cli/src/commands/webhook/create.js)_
|
|
434
434
|
|
|
435
435
|
## `eas webhook:delete [ID]`
|
|
436
436
|
|
|
@@ -444,7 +444,7 @@ ARGUMENTS
|
|
|
444
444
|
ID ID of the webhook to delete
|
|
445
445
|
```
|
|
446
446
|
|
|
447
|
-
_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.38.0/packages/eas-cli/src/commands/webhook/delete.js)_
|
|
448
448
|
|
|
449
449
|
## `eas webhook:list`
|
|
450
450
|
|
|
@@ -455,10 +455,10 @@ USAGE
|
|
|
455
455
|
$ eas webhook:list
|
|
456
456
|
|
|
457
457
|
OPTIONS
|
|
458
|
-
--event=(BUILD) Event type that triggers the webhook
|
|
458
|
+
--event=(BUILD|SUBMIT) Event type that triggers the webhook
|
|
459
459
|
```
|
|
460
460
|
|
|
461
|
-
_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.38.0/packages/eas-cli/src/commands/webhook/list.js)_
|
|
462
462
|
|
|
463
463
|
## `eas webhook:update`
|
|
464
464
|
|
|
@@ -469,16 +469,16 @@ USAGE
|
|
|
469
469
|
$ eas webhook:update
|
|
470
470
|
|
|
471
471
|
OPTIONS
|
|
472
|
-
--event=(BUILD)
|
|
473
|
-
--id=id
|
|
472
|
+
--event=(BUILD|SUBMIT) Event type that triggers the webhook
|
|
473
|
+
--id=id (required) Webhook ID
|
|
474
474
|
|
|
475
|
-
--secret=secret
|
|
476
|
-
|
|
475
|
+
--secret=secret Secret used to create a hash signature of the request payload, provided in the
|
|
476
|
+
'Expo-Signature' header.
|
|
477
477
|
|
|
478
|
-
--url=url
|
|
478
|
+
--url=url Webhook URL
|
|
479
479
|
```
|
|
480
480
|
|
|
481
|
-
_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.38.0/packages/eas-cli/src/commands/webhook/update.js)_
|
|
482
482
|
|
|
483
483
|
## `eas webhook:view ID`
|
|
484
484
|
|
|
@@ -492,5 +492,5 @@ ARGUMENTS
|
|
|
492
492
|
ID ID of the webhook to view
|
|
493
493
|
```
|
|
494
494
|
|
|
495
|
-
_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.38.0/packages/eas-cli/src/commands/webhook/view.js)_
|
|
496
496
|
<!-- 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}`),
|
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 = {
|
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>>;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
const build_1 = require("./android/build");
|
|
17
|
+
const build_2 = require("./ios/build");
|
|
18
|
+
async function createBuildContextAsync({ buildProfileName, buildProfile, clearCache = false, local, nonInteractive = false, platform, projectDir, skipProjectConfiguration = false, }) {
|
|
19
|
+
var _a;
|
|
20
|
+
const exp = (0, expoConfig_1.getExpoConfig)(projectDir, { env: buildProfile.env });
|
|
21
|
+
const user = await (0, actions_1.ensureLoggedInAsync)();
|
|
22
|
+
const accountName = (0, projectUtils_1.getProjectAccountName)(exp, user);
|
|
23
|
+
const projectName = exp.slug;
|
|
24
|
+
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp, { env: buildProfile.env });
|
|
25
|
+
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, platform);
|
|
26
|
+
const accountId = (_a = (0, Account_1.findAccountByName)(user.accounts, accountName)) === null || _a === void 0 ? void 0 : _a.id;
|
|
27
|
+
const credentialsCtx = new context_1.CredentialsContext({
|
|
28
|
+
exp,
|
|
29
|
+
nonInteractive,
|
|
30
|
+
projectDir,
|
|
31
|
+
user,
|
|
32
|
+
});
|
|
33
|
+
const devClientProperties = getDevClientEventProperties({
|
|
34
|
+
platform,
|
|
35
|
+
projectDir,
|
|
36
|
+
buildProfile,
|
|
37
|
+
});
|
|
38
|
+
const trackingCtx = {
|
|
39
|
+
tracking_id: (0, uuid_1.v4)(),
|
|
40
|
+
platform,
|
|
41
|
+
...(accountId && { account_id: accountId }),
|
|
42
|
+
account_name: accountName,
|
|
43
|
+
project_id: projectId,
|
|
44
|
+
project_type: workflow,
|
|
45
|
+
...devClientProperties,
|
|
46
|
+
};
|
|
47
|
+
events_1.Analytics.logEvent(events_1.BuildEvent.BUILD_COMMAND, trackingCtx);
|
|
48
|
+
const commonContext = {
|
|
49
|
+
accountName,
|
|
50
|
+
buildProfile,
|
|
51
|
+
buildProfileName,
|
|
52
|
+
clearCache,
|
|
53
|
+
credentialsCtx,
|
|
54
|
+
exp,
|
|
55
|
+
local,
|
|
56
|
+
nonInteractive,
|
|
57
|
+
platform,
|
|
58
|
+
projectDir,
|
|
59
|
+
projectId,
|
|
60
|
+
projectName,
|
|
61
|
+
skipProjectConfiguration,
|
|
62
|
+
trackingCtx,
|
|
63
|
+
user,
|
|
64
|
+
workflow,
|
|
65
|
+
};
|
|
66
|
+
if (platform === eas_build_job_1.Platform.ANDROID) {
|
|
67
|
+
const common = commonContext;
|
|
68
|
+
return {
|
|
69
|
+
...common,
|
|
70
|
+
android: await (0, build_1.createAndroidContextAsync)(common),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
const common = commonContext;
|
|
75
|
+
return {
|
|
76
|
+
...common,
|
|
77
|
+
ios: await (0, build_2.createIosContextAsync)(common),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.createBuildContextAsync = createBuildContextAsync;
|
|
82
|
+
function getDevClientEventProperties({ platform, projectDir, buildProfile, }) {
|
|
83
|
+
var _a;
|
|
84
|
+
let includesDevClient;
|
|
85
|
+
const version = tryGetDevClientVersion(projectDir);
|
|
86
|
+
if (platform === eas_build_job_1.Platform.ANDROID && 'gradleCommand' in buildProfile) {
|
|
87
|
+
includesDevClient = Boolean(version && ((_a = buildProfile.gradleCommand) === null || _a === void 0 ? void 0 : _a.includes('Debug')));
|
|
88
|
+
}
|
|
89
|
+
else if (platform === eas_build_job_1.Platform.IOS && 'buildConfiguration' in buildProfile) {
|
|
90
|
+
includesDevClient = Boolean(version && buildProfile.buildConfiguration === 'Debug');
|
|
91
|
+
}
|
|
92
|
+
else if (buildProfile.developmentClient) {
|
|
93
|
+
includesDevClient = true;
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
includesDevClient = false;
|
|
97
|
+
}
|
|
98
|
+
if (version) {
|
|
99
|
+
return { dev_client: includesDevClient, dev_client_version: version };
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
return { dev_client: includesDevClient };
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
function tryGetDevClientVersion(projectDir) {
|
|
106
|
+
var _a, _b;
|
|
107
|
+
try {
|
|
108
|
+
const pkg = json_file_1.default.read((0, resolve_from_1.default)(projectDir, 'expo-dev-client/package.json'));
|
|
109
|
+
return (_b = (_a = pkg.version) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : null;
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -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 { BuildContext, CommonContext, IosBuildContext } from '../context';
|
|
4
|
+
export declare function createIosContextAsync(ctx: CommonContext<Platform.IOS>): Promise<IosBuildContext>;
|
|
4
5
|
export declare function prepareIosBuildAsync(ctx: BuildContext<Platform.IOS>): Promise<BuildRequestSender>;
|