feat: retrieve CLI environment variables from process.env
and .env*
files
#937
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We used to only consider variables from the Worker
env
, missing variables fromprocess.env
and.env*
files for the CLI.This is ok to retrieve public values (i.e.
R2_CACHE_PREFIX_ENV_NAME
) but makes it hard to pass secrets (i.e.CF_ACCOUNT_ID
) to the CI.This PR take all of
process.env
, wrangler config, and.env*
files into account when retrieving the variables.Notes:
envFiles: []
togetPlatformProxy()
to avoid having wrangler handling the.env*
files as it doesn't match what Next doespopulate-cache.ts
,options
&buildOptions
-->buildOpts
) that I should probably have done in a follow up PR, sorry for the churn here.@james-elicx could you please take a look when you have time?