eas-cli 2.4.1 → 2.5.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 (82) hide show
  1. package/README.md +47 -47
  2. package/build/analytics/{events.d.ts → AnalyticsManager.d.ts} +32 -3
  3. package/build/analytics/AnalyticsManager.js +188 -0
  4. package/build/analytics/common.d.ts +6 -7
  5. package/build/analytics/common.js +5 -5
  6. package/build/build/build.js +21 -21
  7. package/build/build/context.d.ts +3 -2
  8. package/build/build/createContext.d.ts +3 -1
  9. package/build/build/createContext.js +7 -5
  10. package/build/build/local.js +1 -1
  11. package/build/build/metadata.js +1 -1
  12. package/build/build/runBuildAndSubmit.d.ts +2 -1
  13. package/build/build/runBuildAndSubmit.js +5 -2
  14. package/build/commandUtils/EasCommand.d.ts +19 -2
  15. package/build/commandUtils/EasCommand.js +31 -17
  16. package/build/commandUtils/context/AnalyticsContextField.d.ts +5 -0
  17. package/build/commandUtils/context/AnalyticsContextField.js +10 -0
  18. package/build/commandUtils/context/ContextField.d.ts +2 -0
  19. package/build/commands/analytics.js +3 -3
  20. package/build/commands/build/index.d.ts +1 -0
  21. package/build/commands/build/index.js +3 -2
  22. package/build/commands/build/inspect.d.ts +1 -0
  23. package/build/commands/build/inspect.js +3 -2
  24. package/build/commands/credentials.d.ts +1 -0
  25. package/build/commands/credentials.js +3 -2
  26. package/build/commands/metadata/pull.d.ts +1 -0
  27. package/build/commands/metadata/pull.js +4 -1
  28. package/build/commands/metadata/push.d.ts +1 -0
  29. package/build/commands/metadata/push.js +4 -1
  30. package/build/commands/project/init.d.ts +3 -0
  31. package/build/commands/project/init.js +88 -4
  32. package/build/commands/secret/create.js +5 -5
  33. package/build/commands/secret/push.d.ts +16 -0
  34. package/build/commands/secret/push.js +149 -0
  35. package/build/commands/submit.d.ts +2 -1
  36. package/build/commands/submit.js +3 -1
  37. package/build/commands/update/index.js +2 -2
  38. package/build/commands/update/view.js +1 -14
  39. package/build/credentials/android/actions/CreateKeystore.js +3 -3
  40. package/build/credentials/android/utils/keystore.d.ts +2 -1
  41. package/build/credentials/android/utils/keystore.js +7 -7
  42. package/build/credentials/context.d.ts +3 -0
  43. package/build/credentials/context.js +1 -0
  44. package/build/credentials/ios/actions/AscApiKeyUtils.js +1 -1
  45. package/build/credentials/ios/appstore/AppStoreApi.d.ts +2 -1
  46. package/build/credentials/ios/appstore/AppStoreApi.js +2 -2
  47. package/build/credentials/ios/appstore/ascApiKey.d.ts +3 -2
  48. package/build/credentials/ios/appstore/ascApiKey.js +7 -7
  49. package/build/credentials/manager/HelperActions.d.ts +2 -0
  50. package/build/credentials/manager/ManageAndroid.js +1 -0
  51. package/build/credentials/manager/ManageIos.js +1 -0
  52. package/build/credentials/manager/SelectPlatform.d.ts +3 -1
  53. package/build/credentials/manager/SelectPlatform.js +2 -1
  54. package/build/metadata/context.d.ts +4 -0
  55. package/build/metadata/context.js +1 -0
  56. package/build/metadata/download.js +2 -2
  57. package/build/metadata/upload.js +2 -2
  58. package/build/metadata/utils/telemetry.d.ts +2 -2
  59. package/build/metadata/utils/telemetry.js +3 -4
  60. package/build/project/projectUtils.js +1 -3
  61. package/build/project/publish.js +14 -8
  62. package/build/submit/BaseSubmitter.d.ts +4 -4
  63. package/build/submit/BaseSubmitter.js +8 -8
  64. package/build/submit/android/AndroidSubmitter.js +7 -7
  65. package/build/submit/context.d.ts +4 -2
  66. package/build/submit/context.js +6 -5
  67. package/build/submit/ios/IosSubmitter.js +7 -7
  68. package/build/submit/submit.js +6 -6
  69. package/build/update/utils.d.ts +1 -0
  70. package/build/update/utils.js +11 -1
  71. package/build/user/SessionManager.d.ts +4 -1
  72. package/build/user/SessionManager.js +10 -13
  73. package/build/utils/expoCli.d.ts +1 -0
  74. package/build/utils/expoCli.js +8 -1
  75. package/build/utils/expodash/intersection.d.ts +1 -0
  76. package/build/utils/expodash/intersection.js +8 -0
  77. package/build/vcs/clients/git.js +13 -2
  78. package/oclif.manifest.json +1 -1
  79. package/package.json +3 -2
  80. package/build/analytics/events.js +0 -59
  81. package/build/analytics/rudderstackClient.d.ts +0 -7
  82. package/build/analytics/rudderstackClient.js +0 -112
package/README.md CHANGED
@@ -125,7 +125,7 @@ ALIASES
125
125
  $ eas login
126
126
  ```
127
127
 
128
- _See code: [src/commands/account/login.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/account/login.ts)_
128
+ _See code: [src/commands/account/login.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/account/login.ts)_
129
129
 
130
130
  ## `eas account:logout`
131
131
 
@@ -142,7 +142,7 @@ ALIASES
142
142
  $ eas logout
143
143
  ```
144
144
 
145
- _See code: [src/commands/account/logout.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/account/logout.ts)_
145
+ _See code: [src/commands/account/logout.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/account/logout.ts)_
146
146
 
147
147
  ## `eas account:view`
148
148
 
@@ -159,7 +159,7 @@ ALIASES
159
159
  $ eas whoami
160
160
  ```
161
161
 
162
- _See code: [src/commands/account/view.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/account/view.ts)_
162
+ _See code: [src/commands/account/view.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/account/view.ts)_
163
163
 
164
164
  ## `eas analytics [STATUS]`
165
165
 
@@ -173,7 +173,7 @@ DESCRIPTION
173
173
  display or change analytics settings
174
174
  ```
175
175
 
176
- _See code: [src/commands/analytics.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/analytics.ts)_
176
+ _See code: [src/commands/analytics.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/analytics.ts)_
177
177
 
178
178
  ## `eas autocomplete [SHELL]`
179
179
 
@@ -223,7 +223,7 @@ DESCRIPTION
223
223
  create a branch
224
224
  ```
225
225
 
226
- _See code: [src/commands/branch/create.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/branch/create.ts)_
226
+ _See code: [src/commands/branch/create.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/branch/create.ts)_
227
227
 
228
228
  ## `eas branch:delete [NAME]`
229
229
 
@@ -244,7 +244,7 @@ DESCRIPTION
244
244
  delete a branch
245
245
  ```
246
246
 
247
- _See code: [src/commands/branch/delete.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/branch/delete.ts)_
247
+ _See code: [src/commands/branch/delete.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/branch/delete.ts)_
248
248
 
249
249
  ## `eas branch:list`
250
250
 
@@ -264,7 +264,7 @@ DESCRIPTION
264
264
  list all branches
265
265
  ```
266
266
 
267
- _See code: [src/commands/branch/list.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/branch/list.ts)_
267
+ _See code: [src/commands/branch/list.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/branch/list.ts)_
268
268
 
269
269
  ## `eas branch:rename`
270
270
 
@@ -284,7 +284,7 @@ DESCRIPTION
284
284
  rename a branch
285
285
  ```
286
286
 
287
- _See code: [src/commands/branch/rename.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/branch/rename.ts)_
287
+ _See code: [src/commands/branch/rename.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/branch/rename.ts)_
288
288
 
289
289
  ## `eas branch:view [NAME]`
290
290
 
@@ -307,7 +307,7 @@ DESCRIPTION
307
307
  view a branch
308
308
  ```
309
309
 
310
- _See code: [src/commands/branch/view.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/branch/view.ts)_
310
+ _See code: [src/commands/branch/view.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/branch/view.ts)_
311
311
 
312
312
  ## `eas build`
313
313
 
@@ -337,7 +337,7 @@ DESCRIPTION
337
337
  start a build
338
338
  ```
339
339
 
340
- _See code: [src/commands/build/index.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/build/index.ts)_
340
+ _See code: [src/commands/build/index.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/build/index.ts)_
341
341
 
342
342
  ## `eas build:cancel [BUILD_ID]`
343
343
 
@@ -354,7 +354,7 @@ DESCRIPTION
354
354
  cancel a build
355
355
  ```
356
356
 
357
- _See code: [src/commands/build/cancel.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/build/cancel.ts)_
357
+ _See code: [src/commands/build/cancel.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/build/cancel.ts)_
358
358
 
359
359
  ## `eas build:configure`
360
360
 
@@ -371,7 +371,7 @@ DESCRIPTION
371
371
  configure the project to support EAS Build
372
372
  ```
373
373
 
374
- _See code: [src/commands/build/configure.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/build/configure.ts)_
374
+ _See code: [src/commands/build/configure.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/build/configure.ts)_
375
375
 
376
376
  ## `eas build:inspect`
377
377
 
@@ -406,7 +406,7 @@ DESCRIPTION
406
406
  inspect the state of the project at specific build stages, useful for troubleshooting
407
407
  ```
408
408
 
409
- _See code: [src/commands/build/inspect.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/build/inspect.ts)_
409
+ _See code: [src/commands/build/inspect.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/build/inspect.ts)_
410
410
 
411
411
  ## `eas build:list`
412
412
 
@@ -443,7 +443,7 @@ DESCRIPTION
443
443
  list all builds for your project
444
444
  ```
445
445
 
446
- _See code: [src/commands/build/list.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/build/list.ts)_
446
+ _See code: [src/commands/build/list.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/build/list.ts)_
447
447
 
448
448
  ## `eas build:submit`
449
449
 
@@ -490,7 +490,7 @@ DESCRIPTION
490
490
  Update version of an app.
491
491
  ```
492
492
 
493
- _See code: [src/commands/build/version/set.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/build/version/set.ts)_
493
+ _See code: [src/commands/build/version/set.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/build/version/set.ts)_
494
494
 
495
495
  ## `eas build:version:sync`
496
496
 
@@ -509,7 +509,7 @@ DESCRIPTION
509
509
  Update a version in native code with a value stored on EAS servers
510
510
  ```
511
511
 
512
- _See code: [src/commands/build/version/sync.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/build/version/sync.ts)_
512
+ _See code: [src/commands/build/version/sync.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/build/version/sync.ts)_
513
513
 
514
514
  ## `eas build:view [BUILD_ID]`
515
515
 
@@ -526,7 +526,7 @@ DESCRIPTION
526
526
  view a build for your project
527
527
  ```
528
528
 
529
- _See code: [src/commands/build/view.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/build/view.ts)_
529
+ _See code: [src/commands/build/view.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/build/view.ts)_
530
530
 
531
531
  ## `eas channel:create [NAME]`
532
532
 
@@ -547,7 +547,7 @@ DESCRIPTION
547
547
  create a channel
548
548
  ```
549
549
 
550
- _See code: [src/commands/channel/create.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/channel/create.ts)_
550
+ _See code: [src/commands/channel/create.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/channel/create.ts)_
551
551
 
552
552
  ## `eas channel:edit [NAME]`
553
553
 
@@ -569,7 +569,7 @@ DESCRIPTION
569
569
  point a channel at a new branch
570
570
  ```
571
571
 
572
- _See code: [src/commands/channel/edit.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/channel/edit.ts)_
572
+ _See code: [src/commands/channel/edit.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/channel/edit.ts)_
573
573
 
574
574
  ## `eas channel:list`
575
575
 
@@ -589,7 +589,7 @@ DESCRIPTION
589
589
  list all channels
590
590
  ```
591
591
 
592
- _See code: [src/commands/channel/list.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/channel/list.ts)_
592
+ _See code: [src/commands/channel/list.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/channel/list.ts)_
593
593
 
594
594
  ## `eas channel:view [NAME]`
595
595
 
@@ -612,7 +612,7 @@ DESCRIPTION
612
612
  view a channel
613
613
  ```
614
614
 
615
- _See code: [src/commands/channel/view.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/channel/view.ts)_
615
+ _See code: [src/commands/channel/view.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/channel/view.ts)_
616
616
 
617
617
  ## `eas config`
618
618
 
@@ -631,7 +631,7 @@ DESCRIPTION
631
631
  display project configuration (app.json + eas.json)
632
632
  ```
633
633
 
634
- _See code: [src/commands/config.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/config.ts)_
634
+ _See code: [src/commands/config.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/config.ts)_
635
635
 
636
636
  ## `eas credentials`
637
637
 
@@ -648,7 +648,7 @@ DESCRIPTION
648
648
  manage credentials
649
649
  ```
650
650
 
651
- _See code: [src/commands/credentials.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/credentials.ts)_
651
+ _See code: [src/commands/credentials.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/credentials.ts)_
652
652
 
653
653
  ## `eas device:create`
654
654
 
@@ -662,7 +662,7 @@ DESCRIPTION
662
662
  register new Apple Devices to use for internal distribution
663
663
  ```
664
664
 
665
- _See code: [src/commands/device/create.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/device/create.ts)_
665
+ _See code: [src/commands/device/create.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/device/create.ts)_
666
666
 
667
667
  ## `eas device:delete`
668
668
 
@@ -682,7 +682,7 @@ DESCRIPTION
682
682
  remove a registered device from your account
683
683
  ```
684
684
 
685
- _See code: [src/commands/device/delete.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/device/delete.ts)_
685
+ _See code: [src/commands/device/delete.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/device/delete.ts)_
686
686
 
687
687
  ## `eas device:list`
688
688
 
@@ -703,7 +703,7 @@ DESCRIPTION
703
703
  list all registered devices for your account
704
704
  ```
705
705
 
706
- _See code: [src/commands/device/list.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/device/list.ts)_
706
+ _See code: [src/commands/device/list.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/device/list.ts)_
707
707
 
708
708
  ## `eas device:view [UDID]`
709
709
 
@@ -717,7 +717,7 @@ DESCRIPTION
717
717
  view a device for your project
718
718
  ```
719
719
 
720
- _See code: [src/commands/device/view.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/device/view.ts)_
720
+ _See code: [src/commands/device/view.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/device/view.ts)_
721
721
 
722
722
  ## `eas diagnostics`
723
723
 
@@ -731,7 +731,7 @@ DESCRIPTION
731
731
  display environment info
732
732
  ```
733
733
 
734
- _See code: [src/commands/diagnostics.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/diagnostics.ts)_
734
+ _See code: [src/commands/diagnostics.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/diagnostics.ts)_
735
735
 
736
736
  ## `eas help [COMMAND]`
737
737
 
@@ -818,7 +818,7 @@ DESCRIPTION
818
818
  generate the local store configuration from the app stores
819
819
  ```
820
820
 
821
- _See code: [src/commands/metadata/pull.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/metadata/pull.ts)_
821
+ _See code: [src/commands/metadata/pull.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/metadata/pull.ts)_
822
822
 
823
823
  ## `eas metadata:push`
824
824
 
@@ -835,7 +835,7 @@ DESCRIPTION
835
835
  sync the local store configuration to the app stores
836
836
  ```
837
837
 
838
- _See code: [src/commands/metadata/push.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/metadata/push.ts)_
838
+ _See code: [src/commands/metadata/push.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/metadata/push.ts)_
839
839
 
840
840
  ## `eas open`
841
841
 
@@ -849,7 +849,7 @@ DESCRIPTION
849
849
  open the project page in a web browser
850
850
  ```
851
851
 
852
- _See code: [src/commands/open.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/open.ts)_
852
+ _See code: [src/commands/open.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/open.ts)_
853
853
 
854
854
  ## `eas project:info`
855
855
 
@@ -863,7 +863,7 @@ DESCRIPTION
863
863
  information about the current project
864
864
  ```
865
865
 
866
- _See code: [src/commands/project/info.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/project/info.ts)_
866
+ _See code: [src/commands/project/info.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/project/info.ts)_
867
867
 
868
868
  ## `eas project:init`
869
869
 
@@ -885,7 +885,7 @@ ALIASES
885
885
  $ eas init
886
886
  ```
887
887
 
888
- _See code: [src/commands/project/init.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/project/init.ts)_
888
+ _See code: [src/commands/project/init.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/project/init.ts)_
889
889
 
890
890
  ## `eas secret:create`
891
891
 
@@ -908,7 +908,7 @@ DESCRIPTION
908
908
  create an environment secret on the current project or owner account
909
909
  ```
910
910
 
911
- _See code: [src/commands/secret/create.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/secret/create.ts)_
911
+ _See code: [src/commands/secret/create.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/secret/create.ts)_
912
912
 
913
913
  ## `eas secret:delete`
914
914
 
@@ -926,7 +926,7 @@ DESCRIPTION
926
926
  delete an environment secret by ID
927
927
  ```
928
928
 
929
- _See code: [src/commands/secret/delete.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/secret/delete.ts)_
929
+ _See code: [src/commands/secret/delete.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/secret/delete.ts)_
930
930
 
931
931
  ## `eas secret:list`
932
932
 
@@ -940,7 +940,7 @@ DESCRIPTION
940
940
  list environment secrets available for your current app
941
941
  ```
942
942
 
943
- _See code: [src/commands/secret/list.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/secret/list.ts)_
943
+ _See code: [src/commands/secret/list.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/secret/list.ts)_
944
944
 
945
945
  ## `eas submit`
946
946
 
@@ -970,7 +970,7 @@ ALIASES
970
970
  $ eas build:submit
971
971
  ```
972
972
 
973
- _See code: [src/commands/submit.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/submit.ts)_
973
+ _See code: [src/commands/submit.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/submit.ts)_
974
974
 
975
975
  ## `eas update`
976
976
 
@@ -1000,7 +1000,7 @@ DESCRIPTION
1000
1000
  publish an update group
1001
1001
  ```
1002
1002
 
1003
- _See code: [src/commands/update/index.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/update/index.ts)_
1003
+ _See code: [src/commands/update/index.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/update/index.ts)_
1004
1004
 
1005
1005
  ## `eas update:configure`
1006
1006
 
@@ -1017,7 +1017,7 @@ DESCRIPTION
1017
1017
  configure the project to support EAS Update
1018
1018
  ```
1019
1019
 
1020
- _See code: [src/commands/update/configure.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/update/configure.ts)_
1020
+ _See code: [src/commands/update/configure.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/update/configure.ts)_
1021
1021
 
1022
1022
  ## `eas update:delete GROUPID`
1023
1023
 
@@ -1038,7 +1038,7 @@ DESCRIPTION
1038
1038
  delete all the updates in an update group
1039
1039
  ```
1040
1040
 
1041
- _See code: [src/commands/update/delete.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/update/delete.ts)_
1041
+ _See code: [src/commands/update/delete.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/update/delete.ts)_
1042
1042
 
1043
1043
  ## `eas update:list`
1044
1044
 
@@ -1060,7 +1060,7 @@ DESCRIPTION
1060
1060
  view the recent updates
1061
1061
  ```
1062
1062
 
1063
- _See code: [src/commands/update/list.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/update/list.ts)_
1063
+ _See code: [src/commands/update/list.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/update/list.ts)_
1064
1064
 
1065
1065
  ## `eas update:view GROUPID`
1066
1066
 
@@ -1080,7 +1080,7 @@ DESCRIPTION
1080
1080
  update group details
1081
1081
  ```
1082
1082
 
1083
- _See code: [src/commands/update/view.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/update/view.ts)_
1083
+ _See code: [src/commands/update/view.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/update/view.ts)_
1084
1084
 
1085
1085
  ## `eas webhook:create`
1086
1086
 
@@ -1101,7 +1101,7 @@ DESCRIPTION
1101
1101
  create a webhook
1102
1102
  ```
1103
1103
 
1104
- _See code: [src/commands/webhook/create.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/webhook/create.ts)_
1104
+ _See code: [src/commands/webhook/create.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/webhook/create.ts)_
1105
1105
 
1106
1106
  ## `eas webhook:delete [ID]`
1107
1107
 
@@ -1121,7 +1121,7 @@ DESCRIPTION
1121
1121
  delete a webhook
1122
1122
  ```
1123
1123
 
1124
- _See code: [src/commands/webhook/delete.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/webhook/delete.ts)_
1124
+ _See code: [src/commands/webhook/delete.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/webhook/delete.ts)_
1125
1125
 
1126
1126
  ## `eas webhook:list`
1127
1127
 
@@ -1138,7 +1138,7 @@ DESCRIPTION
1138
1138
  list webhooks
1139
1139
  ```
1140
1140
 
1141
- _See code: [src/commands/webhook/list.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/webhook/list.ts)_
1141
+ _See code: [src/commands/webhook/list.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/webhook/list.ts)_
1142
1142
 
1143
1143
  ## `eas webhook:update`
1144
1144
 
@@ -1160,7 +1160,7 @@ DESCRIPTION
1160
1160
  update a webhook
1161
1161
  ```
1162
1162
 
1163
- _See code: [src/commands/webhook/update.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/webhook/update.ts)_
1163
+ _See code: [src/commands/webhook/update.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/webhook/update.ts)_
1164
1164
 
1165
1165
  ## `eas webhook:view ID`
1166
1166
 
@@ -1177,7 +1177,7 @@ DESCRIPTION
1177
1177
  view a webhook
1178
1178
  ```
1179
1179
 
1180
- _See code: [src/commands/webhook/view.ts](https://github.com/expo/eas-cli/blob/v2.4.1/packages/eas-cli/src/commands/webhook/view.ts)_
1180
+ _See code: [src/commands/webhook/view.ts](https://github.com/expo/eas-cli/blob/v2.5.0/packages/eas-cli/src/commands/webhook/view.ts)_
1181
1181
 
1182
1182
  ## `eas whoami`
1183
1183
 
@@ -1,4 +1,8 @@
1
- export declare type Event = BuildEvent | SubmissionEvent | MetadataEvent;
1
+ import { Actor } from '../user/User';
2
+ export declare type AnalyticsEvent = CommandEvent | BuildEvent | SubmissionEvent | MetadataEvent;
3
+ export declare enum CommandEvent {
4
+ ACTION = "action"
5
+ }
2
6
  export declare enum SubmissionEvent {
3
7
  SUBMIT_COMMAND = "submit cli submit command",
4
8
  SUBMIT_COMMAND_ATTEMPT = "submit cli attempt",
@@ -45,6 +49,31 @@ export declare enum MetadataEvent {
45
49
  APPLE_METADATA_DOWNLOAD = "metadata cli download apple response",
46
50
  APPLE_METADATA_UPLOAD = "metadata cli upload apple response"
47
51
  }
48
- export declare class Analytics {
49
- static logEvent(name: Event, properties: Record<string, any>): void;
52
+ export declare type AnalyticsEventProperties = Record<string, string | number | boolean>;
53
+ /**
54
+ * The interface for commands to use to log events to analytics.
55
+ */
56
+ export interface Analytics {
57
+ logEvent(name: AnalyticsEvent, properties: AnalyticsEventProperties): void;
58
+ }
59
+ /**
60
+ * The interface for commands to use to orchestrate the analytics system. Should only be necessary to use
61
+ * this within EASCommand.
62
+ */
63
+ export interface AnalyticsWithOrchestration extends Analytics {
64
+ setActor(actor: Actor): void;
65
+ flushAsync(): Promise<void>;
50
66
  }
67
+ /**
68
+ * Sets the user's analytics enabled preference. Note that this will only take effect
69
+ * upon the next run of the CLI.
70
+ */
71
+ export declare function setAnalyticsEnabledAsync(enabled: boolean): Promise<void>;
72
+ /**
73
+ * Returns the user's analytics enabled preference.
74
+ */
75
+ export declare function getAnalyticsEnabledAsync(): Promise<boolean>;
76
+ /**
77
+ * Create an instance of Analytics based on the user's analytics enabled preferences.
78
+ */
79
+ export declare function createAnalyticsAsync(): Promise<AnalyticsWithOrchestration>;
@@ -0,0 +1,188 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createAnalyticsAsync = exports.getAnalyticsEnabledAsync = exports.setAnalyticsEnabledAsync = exports.MetadataEvent = exports.BuildEvent = exports.SubmissionEvent = exports.CommandEvent = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const rudder_sdk_node_1 = tslib_1.__importDefault(require("@expo/rudder-sdk-node"));
6
+ const os_1 = tslib_1.__importDefault(require("os"));
7
+ const url_1 = require("url");
8
+ const uuid_1 = require("uuid");
9
+ const User_1 = require("../user/User");
10
+ const UserSettings_1 = tslib_1.__importDefault(require("../user/UserSettings"));
11
+ const easCli_1 = require("../utils/easCli");
12
+ const PLATFORM_TO_ANALYTICS_PLATFORM = {
13
+ darwin: 'Mac',
14
+ win32: 'Windows',
15
+ linux: 'Linux',
16
+ };
17
+ var CommandEvent;
18
+ (function (CommandEvent) {
19
+ CommandEvent["ACTION"] = "action";
20
+ })(CommandEvent = exports.CommandEvent || (exports.CommandEvent = {}));
21
+ var SubmissionEvent;
22
+ (function (SubmissionEvent) {
23
+ SubmissionEvent["SUBMIT_COMMAND"] = "submit cli submit command";
24
+ SubmissionEvent["SUBMIT_COMMAND_ATTEMPT"] = "submit cli attempt";
25
+ SubmissionEvent["SUBMIT_COMMAND_SUCCESS"] = "submit cli success";
26
+ SubmissionEvent["SUBMIT_COMMAND_FAIL"] = "submit cli fail";
27
+ SubmissionEvent["GATHER_CREDENTIALS_ATTEMPT"] = "submit cli gather credentials attempt";
28
+ SubmissionEvent["GATHER_CREDENTIALS_SUCCESS"] = "submit cli gather credentials success";
29
+ SubmissionEvent["GATHER_CREDENTIALS_FAIL"] = "submit cli gather credentials fail";
30
+ SubmissionEvent["GATHER_ARCHIVE_ATTEMPT"] = "submit cli gather archive attempt";
31
+ SubmissionEvent["GATHER_ARCHIVE_SUCCESS"] = "submit cli gather archive success";
32
+ SubmissionEvent["GATHER_ARCHIVE_FAIL"] = "submit cli gather archive fail";
33
+ SubmissionEvent["SUBMIT_REQUEST_ATTEMPT"] = "submit cli request attempt";
34
+ SubmissionEvent["SUBMIT_REQUEST_SUCCESS"] = "submit cli request success";
35
+ SubmissionEvent["SUBMIT_REQUEST_FAIL"] = "submit cli request fail";
36
+ SubmissionEvent["API_KEY_DOWNLOAD_FAIL"] = "submit cli credentials api key download fail";
37
+ SubmissionEvent["API_KEY_DOWNLOAD_RETRY"] = "submit cli credentials api key download fail temporary";
38
+ SubmissionEvent["API_KEY_DOWNLOAD_SUCCESS"] = "submit cli credentials api key download succeed";
39
+ })(SubmissionEvent = exports.SubmissionEvent || (exports.SubmissionEvent = {}));
40
+ var BuildEvent;
41
+ (function (BuildEvent) {
42
+ BuildEvent["BUILD_COMMAND"] = "build cli build command";
43
+ BuildEvent["PROJECT_UPLOAD_ATTEMPT"] = "build cli project upload attempt";
44
+ BuildEvent["PROJECT_UPLOAD_SUCCESS"] = "build cli project upload success";
45
+ BuildEvent["PROJECT_UPLOAD_FAIL"] = "build cli project upload fail";
46
+ BuildEvent["GATHER_CREDENTIALS_ATTEMPT"] = "build cli gather credentials attempt";
47
+ BuildEvent["GATHER_CREDENTIALS_SUCCESS"] = "build cli gather credentials success";
48
+ BuildEvent["GATHER_CREDENTIALS_FAIL"] = "build cli gather credentials fail";
49
+ BuildEvent["CONFIGURE_PROJECT_ATTEMPT"] = "build cli configure project attempt";
50
+ BuildEvent["CONFIGURE_PROJECT_SUCCESS"] = "build cli configure project success";
51
+ BuildEvent["CONFIGURE_PROJECT_FAIL"] = "build cli configure project fail";
52
+ BuildEvent["BUILD_REQUEST_ATTEMPT"] = "build cli build request attempt";
53
+ BuildEvent["BUILD_REQUEST_SUCCESS"] = "build cli build request success";
54
+ BuildEvent["BUILD_REQUEST_FAIL"] = "build cli build request fail";
55
+ BuildEvent["BUILD_STATUS_COMMAND"] = "build cli build status";
56
+ BuildEvent["CREDENTIALS_SYNC_COMMAND"] = "build cli credentials sync command";
57
+ BuildEvent["CREDENTIALS_SYNC_UPDATE_LOCAL_ATTEMPT"] = "build cli credentials sync update local attempt";
58
+ BuildEvent["CREDENTIALS_SYNC_UPDATE_LOCAL_SUCCESS"] = "build cli credentials sync update local success";
59
+ BuildEvent["CREDENTIALS_SYNC_UPDATE_LOCAL_FAIL"] = "build cli credentials sync update local fail";
60
+ BuildEvent["CREDENTIALS_SYNC_UPDATE_REMOTE_ATTEMPT"] = "build cli credentials sync update remote attempt";
61
+ BuildEvent["CREDENTIALS_SYNC_UPDATE_REMOTE_SUCCESS"] = "build cli credentials sync update remote success";
62
+ BuildEvent["CREDENTIALS_SYNC_UPDATE_REMOTE_FAIL"] = "build cli credentials sync update remote fail";
63
+ BuildEvent["ANDROID_KEYSTORE_CREATE"] = "build cli credentials keystore create";
64
+ })(BuildEvent = exports.BuildEvent || (exports.BuildEvent = {}));
65
+ var MetadataEvent;
66
+ (function (MetadataEvent) {
67
+ MetadataEvent["APPLE_METADATA_DOWNLOAD"] = "metadata cli download apple response";
68
+ MetadataEvent["APPLE_METADATA_UPLOAD"] = "metadata cli upload apple response";
69
+ })(MetadataEvent = exports.MetadataEvent || (exports.MetadataEvent = {}));
70
+ const USER_SETTINGS_KEY_AMPLITUDE_ENABLED = 'amplitudeEnabled';
71
+ const USER_SETTINGS_KEY_AMPLITUDE_DEVICE_ID = 'amplitudeDeviceId';
72
+ const USER_SETTINGS_KEY_ANALYTICS_ENABLED = 'analyticsEnabled';
73
+ const USER_SETTINGS_KEY_ANALYTICS_DEVICE_ID = 'analyticsDeviceId';
74
+ /**
75
+ * Sets the user's analytics enabled preference. Note that this will only take effect
76
+ * upon the next run of the CLI.
77
+ */
78
+ async function setAnalyticsEnabledAsync(enabled) {
79
+ await UserSettings_1.default.setAsync(USER_SETTINGS_KEY_ANALYTICS_ENABLED, enabled);
80
+ }
81
+ exports.setAnalyticsEnabledAsync = setAnalyticsEnabledAsync;
82
+ /**
83
+ * Returns the user's analytics enabled preference.
84
+ */
85
+ async function getAnalyticsEnabledAsync() {
86
+ const analyticsEnabled = await UserSettings_1.default.getAsync(USER_SETTINGS_KEY_ANALYTICS_ENABLED, null);
87
+ return !!analyticsEnabled;
88
+ }
89
+ exports.getAnalyticsEnabledAsync = getAnalyticsEnabledAsync;
90
+ /**
91
+ * Create an instance of Analytics based on the user's analytics enabled preferences.
92
+ */
93
+ async function createAnalyticsAsync() {
94
+ // TODO: remove after some time
95
+ const amplitudeEnabled = await UserSettings_1.default.getAsync(USER_SETTINGS_KEY_AMPLITUDE_ENABLED, null);
96
+ if (amplitudeEnabled !== null) {
97
+ await UserSettings_1.default.setAsync(USER_SETTINGS_KEY_ANALYTICS_ENABLED, amplitudeEnabled);
98
+ await UserSettings_1.default.deleteKeyAsync(USER_SETTINGS_KEY_AMPLITUDE_ENABLED);
99
+ }
100
+ const amplitudeDeviceId = await UserSettings_1.default.getAsync(USER_SETTINGS_KEY_AMPLITUDE_DEVICE_ID, null);
101
+ if (amplitudeDeviceId !== null) {
102
+ await UserSettings_1.default.setAsync(USER_SETTINGS_KEY_ANALYTICS_DEVICE_ID, amplitudeDeviceId);
103
+ await UserSettings_1.default.deleteKeyAsync(USER_SETTINGS_KEY_AMPLITUDE_DEVICE_ID);
104
+ }
105
+ if (process.env.DISABLE_EAS_ANALYTICS) {
106
+ await UserSettings_1.default.setAsync(USER_SETTINGS_KEY_ANALYTICS_ENABLED, false);
107
+ }
108
+ const analyticsEnabled = await UserSettings_1.default.getAsync(USER_SETTINGS_KEY_ANALYTICS_ENABLED, true);
109
+ if (!analyticsEnabled) {
110
+ return new NoOpAnalytics();
111
+ }
112
+ const persistedDeviceId = await UserSettings_1.default.getAsync(USER_SETTINGS_KEY_ANALYTICS_DEVICE_ID, null);
113
+ const deviceId = persistedDeviceId !== null && persistedDeviceId !== void 0 ? persistedDeviceId : (0, uuid_1.v4)();
114
+ if (!persistedDeviceId) {
115
+ await UserSettings_1.default.setAsync(USER_SETTINGS_KEY_ANALYTICS_DEVICE_ID, deviceId);
116
+ }
117
+ return new RudderstackAnalytics(deviceId);
118
+ }
119
+ exports.createAnalyticsAsync = createAnalyticsAsync;
120
+ class NoOpAnalytics {
121
+ logEvent() { }
122
+ setActor() { }
123
+ async flushAsync() { }
124
+ }
125
+ const RudderstackAnalyticsConfig = process.env.EXPO_STAGING || process.env.EXPO_LOCAL
126
+ ? {
127
+ // staging environment
128
+ rudderstackWriteKey: '1wpX20Da4ltFGSXbPFYUL00Chb7',
129
+ rudderstackDataPlaneURL: 'https://cdp.expo.dev',
130
+ }
131
+ : {
132
+ // prod environment
133
+ rudderstackWriteKey: '1wpXLFxmujq86etH6G6cc90hPcC',
134
+ rudderstackDataPlaneURL: 'https://cdp.expo.dev',
135
+ };
136
+ class RudderstackAnalytics {
137
+ constructor(persistentDeviceId) {
138
+ this.persistentDeviceId = persistentDeviceId;
139
+ this.rudderstackClient = new rudder_sdk_node_1.default(RudderstackAnalyticsConfig.rudderstackWriteKey, new url_1.URL('/v1/batch', RudderstackAnalyticsConfig.rudderstackDataPlaneURL).toString(), {
140
+ flushInterval: 300,
141
+ });
142
+ this.identifiedActor = null;
143
+ // identify once with just anonymous ID. Once the actor is fetched, re-indentify with
144
+ // both so that they can be associated
145
+ this.rudderstackClient.identify({
146
+ anonymousId: persistentDeviceId,
147
+ });
148
+ }
149
+ setActor(actor) {
150
+ if (this.identifiedActor) {
151
+ return;
152
+ }
153
+ this.rudderstackClient.identify({
154
+ userId: actor.id,
155
+ anonymousId: this.persistentDeviceId,
156
+ traits: {
157
+ username: (0, User_1.getActorDisplayName)(actor),
158
+ user_id: actor.id,
159
+ user_type: actor.__typename,
160
+ },
161
+ });
162
+ this.identifiedActor = actor;
163
+ }
164
+ logEvent(name, properties) {
165
+ var _a;
166
+ const userId = (_a = this.identifiedActor) === null || _a === void 0 ? void 0 : _a.id;
167
+ const deviceId = this.persistentDeviceId;
168
+ const commonEventProperties = { source_version: easCli_1.easCliVersion, source: 'eas cli' };
169
+ const identity = { userId: userId !== null && userId !== void 0 ? userId : undefined, anonymousId: deviceId !== null && deviceId !== void 0 ? deviceId : (0, uuid_1.v4)() };
170
+ this.rudderstackClient.track({
171
+ event: name,
172
+ properties: { ...properties, ...commonEventProperties },
173
+ ...identity,
174
+ context: this.getRudderStackContext(),
175
+ });
176
+ }
177
+ async flushAsync() {
178
+ await this.rudderstackClient.flush();
179
+ }
180
+ getRudderStackContext() {
181
+ const platform = PLATFORM_TO_ANALYTICS_PLATFORM[os_1.default.platform()] || os_1.default.platform();
182
+ return {
183
+ os: { name: platform, version: os_1.default.release() },
184
+ device: { type: platform, model: platform },
185
+ app: { name: 'eas cli', version: easCli_1.easCliVersion !== null && easCli_1.easCliVersion !== void 0 ? easCli_1.easCliVersion : undefined },
186
+ };
187
+ }
188
+ }
@@ -1,8 +1,7 @@
1
- import { Event } from './events';
2
- export declare type TrackingContext = Record<string, string | number | boolean>;
3
- export declare function withAnalyticsAsync<Result>(fn: () => Promise<Result>, analytics: {
4
- attemptEvent: Event;
5
- successEvent: Event;
6
- failureEvent: Event;
7
- trackingCtx: TrackingContext;
1
+ import { Analytics, AnalyticsEvent, AnalyticsEventProperties } from './AnalyticsManager';
2
+ export declare function withAnalyticsAsync<Result>(analytics: Analytics, fn: () => Promise<Result>, { attemptEvent, successEvent, failureEvent, properties, }: {
3
+ attemptEvent: AnalyticsEvent;
4
+ successEvent: AnalyticsEvent;
5
+ failureEvent: AnalyticsEvent;
6
+ properties: AnalyticsEventProperties;
8
7
  }): Promise<Result>;