cli
cli copied to clipboard
feat: add flag to skip env var fetching
๐ Thanks for submitting a pull request! ๐
Summary
Introduce internal option --offline-env to disable using any env vars fetched from the API.
This offers better support for the case of receiving all env vars externally (via devbot).
ref CRE-1078
For us to review and ship your PR efficiently, please perform the following steps:
- [ ] Open a bug/issue before writing your code ๐งโ๐ป. This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire ๐ฅ (e.g. incident related), you can skip this step.
- [ ] Read the contribution guidelines ๐. This ensures your code follows our style guide and passes our tests.
- [ ] Update or add tests (if any source code was changed or added) ๐งช
- [ ] Update or add documentation (if features were changed or added) ๐
- [ ] Make sure the status checks below are successful โ
A picture of a cute animal (not mandatory, but encouraged)
๐ Benchmark results
Comparing with a265859e7e440685a8209fc153f660438d49b535
- Dependency count: 1,212 (no change)
- Package size: 313 MB (no change)
- Number of ts-expect-error directives: 976 (no change)
why cannot we use the existing --offline flag for it?
We still want to fetch the site config (for the dev command and target port). I could provide that from bitballoon as well in the future (CRE-1431) and then we can use --offline (and remove --offline-env)
We still want to fetch the site config (for the dev command and target port). I could provide that from bitballoon as well in the future (CRE-1431) and then we can use
--offline(and remove--offline-env)
As this is public API on the CLI we should provide that probably first to be able to leverage the --offline flag.
i think there is value in having a flag just for "don't fetch env vars". using --offline means that no interaction can happen, but we might want the CLI to talk to services regardless of if it is supposed to fetch env vars
I'm using hideHelp(true) to keep things internal (like we do for other parameters). Makes it easier to do this not all together..