-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(env): server/secret variables #10954
feat(env): server/secret variables #10954
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved since none of my comments are blocking. This API will be 4.8's secret
sauce
@@ -2428,6 +2428,11 @@ export type AstroFeatureMap = { | |||
* List of features that orbit around the i18n routing | |||
*/ | |||
i18nDomains?: SupportsKind; | |||
|
|||
/** | |||
* The adapter is able to support `astro:env` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to be more specific. It's not a blocker, however the support is for getEnv
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it means if the adapter has a custom getEnv
. It defaults to process.env
, happy to change the name if you have better ideas!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
envGetter
? Even env
is fine, as long as we're good at documenting it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will spend some time working on jsdoc in the last pr 👍
@@ -2428,6 +2428,11 @@ export type AstroFeatureMap = { | |||
* List of features that orbit around the i18n routing | |||
*/ | |||
i18nDomains?: SupportsKind; | |||
|
|||
/** | |||
* The adapter is able to support `astro:env` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
envGetter
? Even env
is fine, as long as we're good at documenting it
* feat(env): add schema, types and envField (#10805) * feat(env): add validators (#10827) * feat(env): add vite plugin (#10829) * feat(env): client/public variables (#10848) Co-authored-by: Bjorn Lu <[email protected]> Co-authored-by: Emanuele Stoppa <[email protected]> * feat(env): server/public variables (#10881) Co-authored-by: Bjorn Lu <[email protected]> Co-authored-by: Emanuele Stoppa <[email protected]> * feat(env): server/secret variables (#10954) Co-authored-by: Bjorn Lu <[email protected]> Co-authored-by: Emanuele Stoppa <[email protected]> * fix: import * fix: test * feat: work on jsdoc * feat: more jsdoc * chore: remove todo * feat: fix test error and write changeset * feat: update config reference * feat: apply recommendations from review * feat: rework getEnv/setGetEnv * chore: move tests * fix: rename * fix: dev mode * chore: improve error * feat: add overrideProcessEnv helper * fix: make eslint happy * Update .changeset/poor-berries-occur.md Co-authored-by: Paul Valladares <[email protected]> * Update .changeset/poor-berries-occur.md Co-authored-by: Paul Valladares <[email protected]> * Update .changeset/poor-berries-occur.md Co-authored-by: Paul Valladares <[email protected]> * Update .changeset/poor-berries-occur.md Co-authored-by: Paul Valladares <[email protected]> * feat: fix build and address reviews * fix: container api * fix: tests * Apply suggestions from code review Co-authored-by: Sarah Rainsberger <[email protected]> * Update packages/astro/src/@types/astro.ts Co-authored-by: Sarah Rainsberger <[email protected]> * Apply suggestions from code review Co-authored-by: Sarah Rainsberger <[email protected]> * Update packages/astro/src/@types/astro.ts * chore: update changeset * feat: address reviews * feat: address Ema's reviews * Update .changeset/poor-berries-occur.md Co-authored-by: Sarah Rainsberger <[email protected]> --------- Co-authored-by: Bjorn Lu <[email protected]> Co-authored-by: Emanuele Stoppa <[email protected]> Co-authored-by: Paul Valladares <[email protected]> Co-authored-by: Sarah Rainsberger <[email protected]>
Changes
getEnv
toRenderContext
Testing
Cleans a test i forgot and add one to test
getSecret
with thetestAdapter
Docs
N/A