convex-env 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
### Overview
|
|
9
9
|
|
|
10
|
-
If you've ever used [t3-env](https://github.com/t3-oss/t3-env),
|
|
10
|
+
If you've ever used [t3-env](https://github.com/t3-oss/t3-env), it's basically that, but native to [Convex](https://www.convex.dev).
|
|
11
11
|
|
|
12
12
|
Validators currently supported:
|
|
13
13
|
|
|
@@ -109,15 +109,15 @@ export const env = createEnv(
|
|
|
109
109
|
|
|
110
110
|
### Why use it?
|
|
111
111
|
|
|
112
|
-
User defined values on the `process.env` object will always be typed `string | undefined`. If you want to store anything other than a string, you have to cast it at each use and hope that you
|
|
112
|
+
User defined values on the `process.env` object will always be typed `string | undefined`. If you want to store anything other than a string, you have to cast it at each use and hope that you entered the value correctly in `.env`
|
|
113
113
|
|
|
114
114
|
This package gives you the reassurance that when you use an environment variable in your code, it will:
|
|
115
115
|
|
|
116
116
|
- Actually be there
|
|
117
|
-
-
|
|
117
|
+
- Be the type you expect it to be
|
|
118
118
|
|
|
119
119
|
It can also prevent you from shipping bugs to production. If an environment variable is missing or doesn't match its validator, your deployment to Convex will fail.
|
|
120
120
|
|
|
121
121
|
<p align="center">
|
|
122
|
-
<img src="https://b9sa6juqtj.ufs.sh/f/
|
|
122
|
+
<img src="https://b9sa6juqtj.ufs.sh/f/WmevHvqCEmRai7ZRq7VC2K8VNp5TJWgmuZAHxryoLzDhek3B" alt="Convex Env build failure example" style="max-width: 700px; width: 100%;">
|
|
123
123
|
</p>
|