-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(env): server/secret variables (#10954)
Co-authored-by: Bjorn Lu <[email protected]> Co-authored-by: Emanuele Stoppa <[email protected]>
- Loading branch information
1 parent
87ea8ab
commit 9edc5e5
Showing
32 changed files
with
339 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
export const VIRTUAL_CLIENT_MODULE_ID = 'astro:env/client'; | ||
export const RESOLVED_VIRTUAL_CLIENT_MODULE_ID = '\0astro:env/client'; | ||
export const VIRTUAL_SERVER_MODULE_ID = 'astro:env/server'; | ||
export const RESOLVED_VIRTUAL_SERVER_MODULE_ID = '\0astro:env/server'; | ||
export const VIRTUAL_MODULES_IDS = { | ||
client: 'astro:env/client', | ||
server: 'astro:env/server', | ||
internal: 'virtual:astro:env/internal', | ||
}; | ||
|
||
export const PUBLIC_PREFIX = 'PUBLIC_'; | ||
export const ENV_TYPES_FILE = 'astro-env.d.ts'; | ||
export const ENV_TYPES_FILE = 'env.d.ts'; | ||
|
||
const PKG_BASE = new URL('../../', import.meta.url); | ||
export const MODULE_TEMPLATE_URL = new URL('templates/env/module.mjs', PKG_BASE); | ||
export const TYPES_TEMPLATE_URL = new URL('templates/env/types.d.ts', PKG_BASE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type GetEnv = (key: string) => string | undefined; |
Oops, something went wrong.