eas-cli 0.33.1 → 0.34.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.
Files changed (90) hide show
  1. package/README.md +26 -26
  2. package/build/analytics.js +3 -9
  3. package/build/build/android/configure.js +2 -2
  4. package/build/build/android/graphql.js +2 -4
  5. package/build/build/android/prepareJob.js +4 -3
  6. package/build/build/build.js +2 -2
  7. package/build/build/configure.js +14 -7
  8. package/build/build/ios/UpdatesModule.js +2 -2
  9. package/build/build/ios/graphql.js +2 -23
  10. package/build/build/ios/prepareJob.js +4 -6
  11. package/build/build/metadata.js +5 -10
  12. package/build/build/utils/devClient.js +2 -2
  13. package/build/build/utils/repository.js +10 -7
  14. package/build/build/validate.js +4 -4
  15. package/build/commandUtils/EasCommand.d.ts +1 -0
  16. package/build/commandUtils/EasCommand.js +21 -0
  17. package/build/commands/branch/create.js +3 -2
  18. package/build/commands/branch/delete.js +1 -1
  19. package/build/commands/branch/list.js +1 -1
  20. package/build/commands/branch/publish.js +6 -5
  21. package/build/commands/branch/view.js +1 -1
  22. package/build/commands/build/index.js +35 -25
  23. package/build/commands/channel/edit.js +1 -1
  24. package/build/commands/channel/list.js +1 -1
  25. package/build/commands/channel/view.js +1 -1
  26. package/build/commands/diagnostics.js +2 -2
  27. package/build/commands/project/info.js +1 -1
  28. package/build/commands/update/view.js +1 -1
  29. package/build/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.js +2 -0
  30. package/build/credentials/credentialsJson/update.js +5 -4
  31. package/build/credentials/ios/actions/CreateDistributionCertificate.js +1 -1
  32. package/build/credentials/ios/actions/CreatePushKey.js +1 -1
  33. package/build/credentials/ios/actions/DistributionCertificateUtils.d.ts +1 -1
  34. package/build/credentials/ios/actions/DistributionCertificateUtils.js +5 -7
  35. package/build/credentials/ios/actions/PushKeyUtils.d.ts +1 -1
  36. package/build/credentials/ios/actions/PushKeyUtils.js +5 -5
  37. package/build/credentials/ios/api/graphql/queries/AppQuery.js +3 -1
  38. package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +6 -2
  39. package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.js +7 -1
  40. package/build/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.js +5 -1
  41. package/build/credentials/ios/api/graphql/queries/ApplePushKeyQuery.js +2 -0
  42. package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +5 -1
  43. package/build/credentials/manager/Actions.d.ts +47 -0
  44. package/build/credentials/manager/Actions.js +48 -0
  45. package/build/credentials/manager/AndroidActions.d.ts +6 -0
  46. package/build/credentials/manager/AndroidActions.js +114 -0
  47. package/build/credentials/manager/IosActions.d.ts +6 -0
  48. package/build/credentials/manager/IosActions.js +110 -0
  49. package/build/credentials/manager/ManageAndroid.d.ts +1 -29
  50. package/build/credentials/manager/ManageAndroid.js +26 -159
  51. package/build/credentials/manager/ManageIos.d.ts +1 -29
  52. package/build/credentials/manager/ManageIos.js +28 -155
  53. package/build/graphql/client.d.ts +8 -2
  54. package/build/graphql/generated.d.ts +85 -8
  55. package/build/graphql/generated.js +23 -1
  56. package/build/graphql/queries/BuildQuery.js +4 -1
  57. package/build/graphql/queries/EnvironmentSecretsQuery.js +4 -2
  58. package/build/graphql/queries/ProjectQuery.js +3 -1
  59. package/build/graphql/queries/PublishQuery.js +4 -1
  60. package/build/graphql/queries/SubmissionQuery.js +5 -2
  61. package/build/graphql/queries/UserQuery.js +4 -1
  62. package/build/graphql/queries/WebhookQuery.js +6 -2
  63. package/build/log.d.ts +0 -2
  64. package/build/log.js +2 -12
  65. package/build/project/projectUtils.js +1 -1
  66. package/build/project/publish.js +2 -2
  67. package/build/project/workflow.js +2 -2
  68. package/build/submit/ios/IosSubmitter.js +1 -1
  69. package/build/user/User.js +1 -0
  70. package/build/utils/easCli.d.ts +1 -0
  71. package/build/utils/easCli.js +5 -0
  72. package/build/utils/{expoCommand.d.ts → expoCli.d.ts} +0 -0
  73. package/build/utils/{expoCommand.js → expoCli.js} +0 -0
  74. package/build/utils/profiles.js +9 -2
  75. package/build/vcs/clients/git.d.ts +26 -0
  76. package/build/vcs/clients/git.js +184 -0
  77. package/build/vcs/clients/gitNoCommit.d.ts +7 -0
  78. package/build/vcs/clients/gitNoCommit.js +27 -0
  79. package/build/vcs/clients/noVcs.d.ts +6 -0
  80. package/build/vcs/clients/noVcs.js +19 -0
  81. package/build/vcs/git.d.ts +10 -17
  82. package/build/vcs/git.js +7 -175
  83. package/build/vcs/index.d.ts +2 -2
  84. package/build/vcs/index.js +15 -6
  85. package/build/vcs/local.d.ts +18 -5
  86. package/build/vcs/local.js +61 -32
  87. package/build/vcs/vcs.d.ts +2 -1
  88. package/build/vcs/vcs.js +8 -4
  89. package/oclif.manifest.json +1 -1
  90. package/package.json +4 -4
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.33.1/packages/eas-cli/src/commands/account/login.js)_
76
+ _See code: [src/commands/account/login.js](https://github.com/expo/eas-cli/blob/v0.34.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.33.1/packages/eas-cli/src/commands/account/logout.js)_
90
+ _See code: [src/commands/account/logout.js](https://github.com/expo/eas-cli/blob/v0.34.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.33.1/packages/eas-cli/src/commands/account/view.js)_
104
+ _See code: [src/commands/account/view.js](https://github.com/expo/eas-cli/blob/v0.34.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.33.1/packages/eas-cli/src/commands/analytics.js)_
115
+ _See code: [src/commands/analytics.js](https://github.com/expo/eas-cli/blob/v0.34.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.33.1/packages/eas-cli/src/commands/build/index.js)_
149
+ _See code: [src/commands/build/index.js](https://github.com/expo/eas-cli/blob/v0.34.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.33.1/packages/eas-cli/src/commands/build/cancel.js)_
160
+ _See code: [src/commands/build/cancel.js](https://github.com/expo/eas-cli/blob/v0.34.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.33.1/packages/eas-cli/src/commands/build/configure.js)_
174
+ _See code: [src/commands/build/configure.js](https://github.com/expo/eas-cli/blob/v0.34.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.33.1/packages/eas-cli/src/commands/build/list.js)_
207
+ _See code: [src/commands/build/list.js](https://github.com/expo/eas-cli/blob/v0.34.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.33.1/packages/eas-cli/src/commands/build/view.js)_
221
+ _See code: [src/commands/build/view.js](https://github.com/expo/eas-cli/blob/v0.34.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.33.1/packages/eas-cli/src/commands/config.js)_
236
+ _See code: [src/commands/config.js](https://github.com/expo/eas-cli/blob/v0.34.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.33.1/packages/eas-cli/src/commands/credentials.js)_
247
+ _See code: [src/commands/credentials.js](https://github.com/expo/eas-cli/blob/v0.34.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.33.1/packages/eas-cli/src/commands/device/create.js)_
258
+ _See code: [src/commands/device/create.js](https://github.com/expo/eas-cli/blob/v0.34.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.33.1/packages/eas-cli/src/commands/device/list.js)_
272
+ _See code: [src/commands/device/list.js](https://github.com/expo/eas-cli/blob/v0.34.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.33.1/packages/eas-cli/src/commands/device/view.js)_
283
+ _See code: [src/commands/device/view.js](https://github.com/expo/eas-cli/blob/v0.34.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.33.1/packages/eas-cli/src/commands/diagnostics.js)_
294
+ _See code: [src/commands/diagnostics.js](https://github.com/expo/eas-cli/blob/v0.34.0/packages/eas-cli/src/commands/diagnostics.js)_
295
295
 
296
296
  ## `eas help [COMMAND]`
297
297
 
@@ -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.33.1/packages/eas-cli/src/commands/project/info.js)_
322
+ _See code: [src/commands/project/info.js](https://github.com/expo/eas-cli/blob/v0.34.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.33.1/packages/eas-cli/src/commands/project/init.js)_
336
+ _See code: [src/commands/project/init.js](https://github.com/expo/eas-cli/blob/v0.34.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.33.1/packages/eas-cli/src/commands/secret/create.js)_
353
+ _See code: [src/commands/secret/create.js](https://github.com/expo/eas-cli/blob/v0.34.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 secrets:list
368
368
  ```
369
369
 
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
+ _See code: [src/commands/secret/delete.js](https://github.com/expo/eas-cli/blob/v0.34.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.33.1/packages/eas-cli/src/commands/secret/list.js)_
381
+ _See code: [src/commands/secret/list.js](https://github.com/expo/eas-cli/blob/v0.34.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.33.1/packages/eas-cli/src/commands/submit.js)_
414
+ _See code: [src/commands/submit.js](https://github.com/expo/eas-cli/blob/v0.34.0/packages/eas-cli/src/commands/submit.js)_
415
415
 
416
416
  ## `eas webhook:create`
417
417
 
@@ -430,7 +430,7 @@ OPTIONS
430
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.33.1/packages/eas-cli/src/commands/webhook/create.js)_
433
+ _See code: [src/commands/webhook/create.js](https://github.com/expo/eas-cli/blob/v0.34.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.33.1/packages/eas-cli/src/commands/webhook/delete.js)_
447
+ _See code: [src/commands/webhook/delete.js](https://github.com/expo/eas-cli/blob/v0.34.0/packages/eas-cli/src/commands/webhook/delete.js)_
448
448
 
449
449
  ## `eas webhook:list`
450
450
 
@@ -458,7 +458,7 @@ OPTIONS
458
458
  --event=(BUILD) 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.33.1/packages/eas-cli/src/commands/webhook/list.js)_
461
+ _See code: [src/commands/webhook/list.js](https://github.com/expo/eas-cli/blob/v0.34.0/packages/eas-cli/src/commands/webhook/list.js)_
462
462
 
463
463
  ## `eas webhook:update`
464
464
 
@@ -478,7 +478,7 @@ OPTIONS
478
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.33.1/packages/eas-cli/src/commands/webhook/update.js)_
481
+ _See code: [src/commands/webhook/update.js](https://github.com/expo/eas-cli/blob/v0.34.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.33.1/packages/eas-cli/src/commands/webhook/view.js)_
495
+ _See code: [src/commands/webhook/view.js](https://github.com/expo/eas-cli/blob/v0.34.0/packages/eas-cli/src/commands/webhook/view.js)_
496
496
  <!-- commandsstop -->
@@ -7,12 +7,7 @@ const os_1 = (0, tslib_1.__importDefault)(require("os"));
7
7
  const url_1 = require("url");
8
8
  const uuid_1 = require("uuid");
9
9
  const UserSettings_1 = (0, tslib_1.__importDefault)(require("./user/UserSettings"));
10
- /**
11
- * We use require() to exclude package.json from TypeScript's analysis since it lives outside
12
- * the src directory and would change the directory structure of the emitted files
13
- * under the build directory
14
- */
15
- const packageJSON = require('../package.json');
10
+ const easCli_1 = require("./utils/easCli");
16
11
  const PLATFORM_TO_ANALYTICS_PLATFORM = {
17
12
  darwin: 'Mac',
18
13
  win32: 'Windows',
@@ -82,7 +77,7 @@ function logEvent(name, properties = {}) {
82
77
  }
83
78
  ensureUserIdentified();
84
79
  const { userId, deviceId } = identifyData !== null && identifyData !== void 0 ? identifyData : {};
85
- const commonEventProperties = { source_version: packageJSON === null || packageJSON === void 0 ? void 0 : packageJSON.version, source: 'eas cli' };
80
+ const commonEventProperties = { source_version: easCli_1.easCliVersion, source: 'eas cli' };
86
81
  const identity = { userId: userId !== null && userId !== void 0 ? userId : undefined, anonymousId: deviceId !== null && deviceId !== void 0 ? deviceId : (0, uuid_1.v4)() };
87
82
  rudderstackClient.track({
88
83
  event: name,
@@ -104,12 +99,11 @@ function ensureUserIdentified() {
104
99
  userIdentified = true;
105
100
  }
106
101
  function getRudderStackContext() {
107
- var _a;
108
102
  const platform = PLATFORM_TO_ANALYTICS_PLATFORM[os_1.default.platform()] || os_1.default.platform();
109
103
  return {
110
104
  os: { name: platform, version: os_1.default.release() },
111
105
  device: { type: platform, model: platform },
112
- app: { name: 'eas cli', version: (_a = packageJSON === null || packageJSON === void 0 ? void 0 : packageJSON.version) !== null && _a !== void 0 ? _a : undefined },
106
+ app: { name: 'eas cli', version: easCli_1.easCliVersion !== null && easCli_1.easCliVersion !== void 0 ? easCli_1.easCliVersion : undefined },
113
107
  };
114
108
  }
115
109
  var AnalyticsEvent;
@@ -7,7 +7,7 @@ const eas_build_job_1 = require("@expo/eas-build-job");
7
7
  const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
8
8
  const applicationId_1 = require("../../project/android/applicationId");
9
9
  const workflow_1 = require("../../project/workflow");
10
- const vcs_1 = (0, tslib_1.__importDefault)(require("../../vcs"));
10
+ const vcs_1 = require("../../vcs");
11
11
  const updates_1 = require("../utils/updates");
12
12
  const UpdatesModule_1 = require("./UpdatesModule");
13
13
  const version_1 = require("./version");
@@ -19,7 +19,7 @@ async function configureAndroidAsync(ctx) {
19
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
- await vcs_1.default.trackFileAsync(easGradlePath);
22
+ await (0, vcs_1.getVcsClient)().trackFileAsync(easGradlePath);
23
23
  if ((0, updates_1.isExpoUpdatesInstalled)(ctx.projectDir)) {
24
24
  await (0, UpdatesModule_1.configureUpdatesAsync)(ctx.projectDir, ctx.exp);
25
25
  }
@@ -18,6 +18,7 @@ function transformJob(job) {
18
18
  artifactPath: job.artifactPath,
19
19
  username: job.username,
20
20
  buildType: job.buildType && transformBuildType(job.buildType),
21
+ developmentClient: job.developmentClient,
21
22
  };
22
23
  }
23
24
  exports.transformJob = transformJob;
@@ -25,10 +26,7 @@ function transformBuildType(buildType) {
25
26
  if (buildType === eas_build_job_1.Android.BuildType.APK) {
26
27
  return generated_1.AndroidBuildType.Apk;
27
28
  }
28
- else if (buildType === eas_build_job_1.Android.BuildType.APP_BUNDLE) {
29
- return generated_1.AndroidBuildType.AppBundle;
30
- }
31
29
  else {
32
- return generated_1.AndroidBuildType.DevelopmentClient;
30
+ return generated_1.AndroidBuildType.AppBundle;
33
31
  }
34
32
  }
@@ -7,7 +7,7 @@ const path_1 = (0, tslib_1.__importDefault)(require("path"));
7
7
  const slash_1 = (0, tslib_1.__importDefault)(require("slash"));
8
8
  const projectUtils_1 = require("../../project/projectUtils");
9
9
  const actions_1 = require("../../user/actions");
10
- const vcs_1 = (0, tslib_1.__importDefault)(require("../../vcs"));
10
+ const vcs_1 = require("../../vcs");
11
11
  const cacheDefaults = {
12
12
  disabled: false,
13
13
  customPaths: [],
@@ -16,7 +16,7 @@ const cacheDefaults = {
16
16
  async function prepareJobAsync(ctx, jobData) {
17
17
  const username = (0, projectUtils_1.getUsername)(ctx.exp, await (0, actions_1.ensureLoggedInAsync)());
18
18
  const buildProfile = ctx.buildProfile;
19
- const projectRootDirectory = (0, slash_1.default)(path_1.default.relative(await vcs_1.default.getRootPathAsync(), ctx.projectDir)) || '.';
19
+ const projectRootDirectory = (0, slash_1.default)(path_1.default.relative(await (0, vcs_1.getVcsClient)().getRootPathAsync(), ctx.projectDir)) || '.';
20
20
  const { credentials } = jobData;
21
21
  const buildCredentials = credentials
22
22
  ? {
@@ -57,10 +57,11 @@ async function prepareJobAsync(ctx, jobData) {
57
57
  },
58
58
  releaseChannel: ctx.buildProfile.releaseChannel,
59
59
  updates: { channel: ctx.buildProfile.channel },
60
+ developmentClient: buildProfile.developmentClient,
60
61
  gradleCommand: buildProfile.gradleCommand,
61
62
  artifactPath: buildProfile.artifactPath,
63
+ buildType,
62
64
  username,
63
- buildType: buildProfile.developmentClient ? eas_build_job_1.Android.BuildType.DEVELOPMENT_CLIENT : buildType,
64
65
  };
65
66
  return (0, eas_build_job_1.sanitizeJob)(job);
66
67
  }
@@ -14,7 +14,7 @@ const uploads_1 = require("../uploads");
14
14
  const files_1 = require("../utils/files");
15
15
  const progress_1 = require("../utils/progress");
16
16
  const promise_1 = require("../utils/promise");
17
- const vcs_1 = (0, tslib_1.__importDefault)(require("../vcs"));
17
+ const vcs_1 = require("../vcs");
18
18
  const local_1 = require("./local");
19
19
  const metadata_1 = require("./metadata");
20
20
  const analytics_1 = (0, tslib_1.__importStar)(require("./utils/analytics"));
@@ -34,7 +34,7 @@ async function prepareBuildRequestForPlatformAsync(builder) {
34
34
  trackingCtx: ctx.trackingCtx,
35
35
  });
36
36
  }
37
- if (await vcs_1.default.hasUncommittedChangesAsync()) {
37
+ if (await (0, vcs_1.getVcsClient)().isCommitRequiredAsync()) {
38
38
  log_1.default.addNewLineIfNone();
39
39
  await (0, repository_1.reviewAndCommitChangesAsync)(`[EAS Build] Run EAS Build for ${platform_1.requestedPlatformDisplayNames[ctx.platform]}`, { nonInteractive: ctx.nonInteractive });
40
40
  }
@@ -13,7 +13,8 @@ const platform_1 = require("../platform");
13
13
  const workflow_1 = require("../project/workflow");
14
14
  const prompts_1 = require("../prompts");
15
15
  const actions_1 = require("../user/actions");
16
- const vcs_1 = (0, tslib_1.__importDefault)(require("../vcs"));
16
+ const easCli_1 = require("../utils/easCli");
17
+ const vcs_1 = require("../vcs");
17
18
  const configure_1 = require("./android/configure");
18
19
  const configure_2 = require("./ios/configure");
19
20
  const repository_1 = require("./utils/repository");
@@ -33,7 +34,7 @@ async function ensureProjectConfiguredAsync(projectDir, requestedPlatform) {
33
34
  projectDir,
34
35
  platform: requestedPlatform,
35
36
  });
36
- if (await vcs_1.default.hasUncommittedChangesAsync()) {
37
+ if (await (0, vcs_1.getVcsClient)().isCommitRequiredAsync()) {
37
38
  (0, errors_1.error)('Build process requires clean working tree, please commit all your changes and run `eas build` again', { exit: 1 });
38
39
  }
39
40
  }
@@ -43,7 +44,7 @@ async function ensureProjectConfiguredAsync(projectDir, requestedPlatform) {
43
44
  }
44
45
  exports.ensureProjectConfiguredAsync = ensureProjectConfiguredAsync;
45
46
  async function configureAsync(options) {
46
- await vcs_1.default.ensureRepoExistsAsync();
47
+ await (0, vcs_1.getVcsClient)().ensureRepoExistsAsync();
47
48
  await (0, repository_1.maybeBailOnRepoStatusAsync)();
48
49
  const { exp } = (0, config_1.getConfig)(options.projectDir, { skipSDKVersionRequirement: true });
49
50
  const ctx = {
@@ -64,17 +65,20 @@ async function configureAsync(options) {
64
65
  if (ctx.shouldConfigureIos) {
65
66
  await (0, configure_2.configureIosAsync)(ctx);
66
67
  }
67
- if (await vcs_1.default.hasUncommittedChangesAsync()) {
68
+ if (await (0, vcs_1.getVcsClient)().isCommitRequiredAsync()) {
68
69
  log_1.default.newLine();
69
70
  await reviewAndCommitChangesAsync(configureCommitMessage[options.platform]);
70
71
  }
71
- else {
72
+ else if (!(await (0, vcs_1.getVcsClient)().hasUncommittedChangesAsync())) {
72
73
  log_1.default.newLine();
73
74
  log_1.default.withTick('No changes were necessary, the project is already configured correctly.');
74
75
  }
75
76
  }
76
77
  exports.configureAsync = configureAsync;
77
78
  const EAS_JSON_MANAGED_DEFAULT = {
79
+ cli: {
80
+ version: `>= ${easCli_1.easCliVersion}`,
81
+ },
78
82
  build: {
79
83
  development: {
80
84
  developmentClient: true,
@@ -90,6 +94,9 @@ const EAS_JSON_MANAGED_DEFAULT = {
90
94
  },
91
95
  };
92
96
  const EAS_JSON_BARE_DEFAULT = {
97
+ cli: {
98
+ version: `>= ${easCli_1.easCliVersion}`,
99
+ },
93
100
  build: {
94
101
  development: {
95
102
  distribution: 'internal',
@@ -121,7 +128,7 @@ async function ensureEasJsonExistsAsync(ctx) {
121
128
  ? EAS_JSON_BARE_DEFAULT
122
129
  : EAS_JSON_MANAGED_DEFAULT;
123
130
  await fs_extra_1.default.writeFile(easJsonPath, `${JSON.stringify(easJson, null, 2)}\n`);
124
- await vcs_1.default.trackFileAsync(easJsonPath);
131
+ await (0, vcs_1.getVcsClient)().trackFileAsync(easJsonPath);
125
132
  log_1.default.withTick('Generated eas.json');
126
133
  }
127
134
  exports.ensureEasJsonExistsAsync = ensureEasJsonExistsAsync;
@@ -152,7 +159,7 @@ async function reviewAndCommitChangesAsync(initialCommitMessage, askedFirstTime
152
159
  log_1.default.withTick('Committed changes');
153
160
  }
154
161
  else if (selected === ShouldCommitChanges.ShowDiffFirst) {
155
- await vcs_1.default.showDiffAsync();
162
+ await (0, vcs_1.getVcsClient)().showDiffAsync();
156
163
  await reviewAndCommitChangesAsync(initialCommitMessage, false);
157
164
  }
158
165
  }
@@ -6,7 +6,7 @@ const config_plugins_1 = require("@expo/config-plugins");
6
6
  const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
7
7
  const projectUtils_1 = require("../../project/projectUtils");
8
8
  const actions_1 = require("../../user/actions");
9
- const vcs_1 = (0, tslib_1.__importDefault)(require("../../vcs"));
9
+ const vcs_1 = require("../../vcs");
10
10
  const updates_1 = require("../utils/updates");
11
11
  const plist_1 = require("./plist");
12
12
  async function configureUpdatesAsync(projectDir, exp) {
@@ -55,7 +55,7 @@ async function readExpoPlistAsync(projectDir) {
55
55
  async function writeExpoPlistAsync(projectDir, expoPlist) {
56
56
  const expoPlistPath = config_plugins_1.IOSConfig.Paths.getExpoPlistPath(projectDir);
57
57
  await (0, plist_1.writePlistAsync)(expoPlistPath, expoPlist);
58
- await vcs_1.default.trackFileAsync(expoPlistPath);
58
+ await (0, vcs_1.getVcsClient)().trackFileAsync(expoPlistPath);
59
59
  }
60
60
  async function readReleaseChannelSafelyAsync(projectDir) {
61
61
  var _a;
@@ -2,9 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.transformJob = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const eas_build_job_1 = require("@expo/eas-build-job");
6
5
  const nullthrows_1 = (0, tslib_1.__importDefault)(require("nullthrows"));
7
- const generated_1 = require("../../graphql/generated");
8
6
  const graphql_1 = require("../graphql");
9
7
  function transformJob(job) {
10
8
  return {
@@ -13,29 +11,18 @@ function transformJob(job) {
13
11
  projectRootDirectory: job.projectRootDirectory,
14
12
  releaseChannel: job.releaseChannel,
15
13
  updates: job.updates,
16
- distribution: job.distribution && transformDistributionType(job.distribution),
17
14
  secrets: transformIosSecrets(job.secrets),
18
15
  builderEnvironment: job.builderEnvironment,
19
16
  cache: job.cache,
20
17
  scheme: job.scheme,
21
18
  buildConfiguration: job.buildConfiguration,
22
19
  artifactPath: job.artifactPath,
23
- buildType: job.buildType && transformBuildType(job.buildType),
24
20
  username: job.username,
21
+ developmentClient: job.developmentClient,
22
+ simulator: job.simulator,
25
23
  };
26
24
  }
27
25
  exports.transformJob = transformJob;
28
- function transformDistributionType(distributionType) {
29
- if (distributionType === 'store') {
30
- return generated_1.DistributionType.Store;
31
- }
32
- else if (distributionType === 'internal') {
33
- return generated_1.DistributionType.Internal;
34
- }
35
- else {
36
- return generated_1.DistributionType.Simulator;
37
- }
38
- }
39
26
  function transformIosSecrets(secrets) {
40
27
  var _a, _b, _c;
41
28
  const buildCredentials = [];
@@ -53,11 +40,3 @@ function transformIosSecrets(secrets) {
53
40
  environmentSecrets: secrets.env,
54
41
  };
55
42
  }
56
- function transformBuildType(buildType) {
57
- if (buildType === eas_build_job_1.Ios.BuildType.DEVELOPMENT_CLIENT) {
58
- return generated_1.IosBuildType.DevelopmentClient;
59
- }
60
- else {
61
- return generated_1.IosBuildType.Release;
62
- }
63
- }
@@ -7,14 +7,14 @@ const path_1 = (0, tslib_1.__importDefault)(require("path"));
7
7
  const slash_1 = (0, tslib_1.__importDefault)(require("slash"));
8
8
  const projectUtils_1 = require("../../project/projectUtils");
9
9
  const actions_1 = require("../../user/actions");
10
- const vcs_1 = (0, tslib_1.__importDefault)(require("../../vcs"));
10
+ const vcs_1 = require("../../vcs");
11
11
  const cacheDefaults = {
12
12
  disabled: false,
13
13
  customPaths: [],
14
14
  cacheDefaultPaths: true,
15
15
  };
16
16
  async function prepareJobAsync(ctx, jobData) {
17
- const projectRootDirectory = (0, slash_1.default)(path_1.default.relative(await vcs_1.default.getRootPathAsync(), ctx.projectDir)) || '.';
17
+ const projectRootDirectory = (0, slash_1.default)(path_1.default.relative(await (0, vcs_1.getVcsClient)().getRootPathAsync(), ctx.projectDir)) || '.';
18
18
  const username = (0, projectUtils_1.getUsername)(ctx.exp, await (0, actions_1.ensureLoggedInAsync)());
19
19
  const buildCredentials = {};
20
20
  if (jobData.credentials) {
@@ -28,7 +28,6 @@ async function prepareJobAsync(ctx, jobData) {
28
28
  platform: eas_build_job_1.Platform.IOS,
29
29
  projectArchive: jobData.projectArchive,
30
30
  projectRootDirectory,
31
- distribution: ctx.buildProfile.simulator ? 'simulator' : ctx.buildProfile.distribution,
32
31
  builderEnvironment: {
33
32
  image: ctx.buildProfile.image,
34
33
  node: ctx.buildProfile.node,
@@ -49,12 +48,11 @@ async function prepareJobAsync(ctx, jobData) {
49
48
  },
50
49
  releaseChannel: ctx.buildProfile.releaseChannel,
51
50
  updates: { channel: ctx.buildProfile.channel },
51
+ developmentClient: ctx.buildProfile.developmentClient,
52
+ simulator: ctx.buildProfile.simulator,
52
53
  scheme: jobData.buildScheme,
53
54
  buildConfiguration: ctx.buildProfile.buildConfiguration,
54
55
  artifactPath: ctx.buildProfile.artifactPath,
55
- buildType: ctx.buildProfile.developmentClient
56
- ? eas_build_job_1.Ios.BuildType.DEVELOPMENT_CLIENT
57
- : eas_build_job_1.Ios.BuildType.RELEASE,
58
56
  username,
59
57
  };
60
58
  return (0, eas_build_job_1.sanitizeJob)(job);
@@ -1,24 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.collectMetadataAsync = void 0;
4
- const tslib_1 = require("tslib");
5
4
  const eas_build_job_1 = require("@expo/eas-build-job");
6
5
  const applicationId_1 = require("../project/android/applicationId");
7
6
  const bundleIdentifier_1 = require("../project/ios/bundleIdentifier");
8
7
  const projectUtils_1 = require("../project/projectUtils");
9
8
  const actions_1 = require("../user/actions");
10
- const vcs_1 = (0, tslib_1.__importDefault)(require("../vcs"));
9
+ const easCli_1 = require("../utils/easCli");
10
+ const vcs_1 = require("../vcs");
11
11
  const UpdatesModule_1 = require("./android/UpdatesModule");
12
12
  const version_1 = require("./android/version");
13
13
  const UpdatesModule_2 = require("./ios/UpdatesModule");
14
14
  const version_2 = require("./ios/version");
15
15
  const updates_1 = require("./utils/updates");
16
- /**
17
- * We use require() to exclude package.json from TypeScript's analysis since it lives outside
18
- * the src directory and would change the directory structure of the emitted files
19
- * under the build directory
20
- */
21
- const packageJSON = require('../../package.json');
22
16
  async function collectMetadataAsync(ctx, platformContext) {
23
17
  var _a;
24
18
  const channelOrReleaseChannel = await resolveChannelOrReleaseChannelAsync(ctx);
@@ -28,7 +22,7 @@ async function collectMetadataAsync(ctx, platformContext) {
28
22
  const metadata = {
29
23
  trackingContext: ctx.trackingCtx,
30
24
  ...(await maybeResolveVersionsAsync(ctx, platformContext)),
31
- cliVersion: packageJSON.version,
25
+ cliVersion: easCli_1.easCliVersion,
32
26
  workflow: ctx.workflow,
33
27
  credentialsSource: ctx.buildProfile.credentialsSource,
34
28
  sdkVersion: ctx.exp.sdkVersion,
@@ -38,7 +32,8 @@ async function collectMetadataAsync(ctx, platformContext) {
38
32
  appName: ctx.exp.name,
39
33
  appIdentifier: await resolveAppIdentifierAsync(ctx, platformContext),
40
34
  buildProfile: ctx.buildProfileName,
41
- gitCommitHash: await vcs_1.default.getCommitHashAsync(),
35
+ gitCommitHash: await (0, vcs_1.getVcsClient)().getCommitHashAsync(),
36
+ isGitWorkingTreeDirty: await (0, vcs_1.getVcsClient)().hasUncommittedChangesAsync(),
42
37
  username: (0, projectUtils_1.getUsername)(ctx.exp, await (0, actions_1.ensureLoggedInAsync)()),
43
38
  ...(ctx.platform === eas_build_job_1.Platform.IOS && {
44
39
  iosEnterpriseProvisioning: resolveIosEnterpriseProvisioning(ctx),
@@ -11,7 +11,7 @@ const log_1 = (0, tslib_1.__importStar)(require("../../log"));
11
11
  const platform_1 = require("../../platform");
12
12
  const workflow_1 = require("../../project/workflow");
13
13
  const prompts_1 = require("../../prompts");
14
- const expoCommand_1 = require("../../utils/expoCommand");
14
+ const expoCli_1 = require("../../utils/expoCli");
15
15
  const repository_1 = require("./repository");
16
16
  async function ensureExpoDevClientInstalledForDevClientBuildsAsync({ projectDir, nonInteractive = false, buildProfiles = [], }) {
17
17
  if (await isExpoDevClientInstalledAsync(projectDir)) {
@@ -76,7 +76,7 @@ async function installExpoDevClientAsync(projectDir, { nonInteractive }) {
76
76
  log_1.default.newLine();
77
77
  log_1.default.log(`Running ${chalk_1.default.bold('expo install expo-dev-client')}`);
78
78
  log_1.default.newLine();
79
- await (0, expoCommand_1.expoCommandAsync)(projectDir, ['install', 'expo-dev-client']);
79
+ await (0, expoCli_1.expoCommandAsync)(projectDir, ['install', 'expo-dev-client']);
80
80
  log_1.default.newLine();
81
81
  await (0, repository_1.reviewAndCommitChangesAsync)('Install expo-dev-client', {
82
82
  nonInteractive,