Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

@varlock/astro-integration

npm version GitHub stars license

This package helps you integrate varlock into an Astro project.

See our docs site for complete installation and usage instructions.

It is designed as an Astro integration, which will override Astro's default .env file loading logic (powered by Vite), to instead use varlock.

Compared to the default Astro behavior, this package provides:

  • Validation of your env vars against your .env.schema
  • Type-generation and type-safe env var access with built-in docs
  • Redaction of sensitive from logs during build time
  • Automatic leak prevention of sensitive items at build and runtime
  • More flexible multi-env handling, rather than relying on the --mode flag

While some of these features are similar to what can be accomplished via astro:env, this integration provides additional security features and more flexible multi-env handling.

  • Facilitates loading and composing multiple .env files
  • You can use validated env vars right away within your astro.config.* file
  • Facilitates setting values and handling multiple environments, not just setting defaults
  • More data types and options available
  • Leak detection, log redaction, and more security guardrails
  • Works with various adapters and platforms to make your resolved config available
Morty Proxy This is a proxified and sanitized view of the page, visit original site.