Implement `eas env` commands
Why
Implements the following commands:
eas env:createENG-11913eas env:getENG-11915eas env:deleteENG-11914eas env:listENG-11917eas env:updateENG-11918 (Currently only delegates toenv:create)
Also, as discussed on Linear, implements eas env:shared:create/update/get/delete/link/unlink as --scope shared flag on mentioned commands. (ENG-11927, ENG-11926, ENG-11925, ENG-11921, ENG-11922, ENG-11923).
How
Created commands and mutations using updated backend (https://github.com/expo/universe/pull/15153).
Deployment
(We'll wait with merging when everything from https://linear.app/expo/project/eas-environment-variables-2813a6f4c62e is done)
- https://github.com/expo/universe/pull/15153
- https://github.com/expo/eas-cli/pull/2350
Test Plan
Each command accepts arguments both in interactive mode (user is prompted for input) and non-interactive (arguments are passed inline).
The following flow will create both project and shared variables, then it will link and unlink shared variable from the project, and finally delete both of them. Commands are executed both with inline arguments and prompts. From an existing app directory:
- Create project variable interactively -
eas env:createand provide name, value and select environment - Create shared variable non-interactively -
env:create --scope SHARED --name sharedVariable --value someValue eas env:listand select environment - displays only project vareas env:list --format long --scope SHARED- displays only shared var in long formateas env:link- select shared var and environmenteas env:list- shared variable should be added to selected enveas env:unlink --environment SELECTEDENV --name sharedVariableeas env:list- shared variable should be removedeas env:delete- delete project variableeas env:delete --scope SHARED- delete shared environment
Size Change: +4.33 kB (+0.01%)
Total Size: 52.5 MB
| Filename | Size | Change |
|---|---|---|
./packages/eas-cli/dist/eas-linux-x64.tar.gz |
52.5 MB | +4.33 kB (+0.01%) |
Codecov Report
Attention: Patch coverage is 34.30962% with 314 lines in your changes missing coverage. Please review.
Project coverage is 52.95%. Comparing base (
ce76d4d) to head (eb1efa0).
Additional details and impacted files
@@ Coverage Diff @@
## main #2350 +/- ##
==========================================
- Coverage 53.40% 52.95% -0.45%
==========================================
Files 530 542 +12
Lines 19585 20062 +477
Branches 3988 4101 +113
==========================================
+ Hits 10458 10621 +163
- Misses 8369 8626 +257
- Partials 758 815 +57
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
⏩ The changelog entry check has been skipped since the "no changelog" label is present.