@safe-hand/safe-env-check 1.1.2 → 1.1.5
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 +2 -7
- package/dist/cli/index.js +1 -1
- package/package.json +12 -1
package/README.md
CHANGED
|
@@ -255,20 +255,15 @@ validateEnv(schema, {
|
|
|
255
255
|
|
|
256
256
|
## Loading Environment Variables
|
|
257
257
|
|
|
258
|
-
`safe-env-check`
|
|
259
|
-
|
|
260
|
-
Load environment variables before calling `validateEnv`, for example using `dotenv`:
|
|
258
|
+
`safe-env-check` uses dotenv to lead the `.env` files\*\*.
|
|
261
259
|
|
|
262
260
|
```ts
|
|
263
|
-
import dotenv from "dotenv";
|
|
264
261
|
import { validateEnv } from "@safe-hand/safe-env-check";
|
|
265
262
|
|
|
266
|
-
dotenv.config();
|
|
267
|
-
|
|
268
263
|
const env = validateEnv(schema);
|
|
269
264
|
```
|
|
270
265
|
|
|
271
|
-
**Example** `.env`:
|
|
266
|
+
**Example** `.env.test`:
|
|
272
267
|
|
|
273
268
|
```bash
|
|
274
269
|
PORT=3000
|
package/dist/cli/index.js
CHANGED
|
@@ -427,7 +427,7 @@ var import_path = __toESM(require("path"));
|
|
|
427
427
|
var import_fs2 = __toESM(require("fs"));
|
|
428
428
|
|
|
429
429
|
// package.json
|
|
430
|
-
var version = "1.1.
|
|
430
|
+
var version = "1.1.5";
|
|
431
431
|
|
|
432
432
|
// src/cli/argsParser.ts
|
|
433
433
|
var valueFlags = /* @__PURE__ */ new Set(["--schema", "--env-file", "--prefix", "--format"]);
|
package/package.json
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@safe-hand/safe-env-check",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/shshamim63/safe-env-check.git"
|
|
7
7
|
},
|
|
8
|
+
"keywords": [
|
|
9
|
+
"env",
|
|
10
|
+
"env-validation",
|
|
11
|
+
"environment",
|
|
12
|
+
"config",
|
|
13
|
+
"dotenv",
|
|
14
|
+
"schema",
|
|
15
|
+
"validation",
|
|
16
|
+
"nodejs",
|
|
17
|
+
"typescript"
|
|
18
|
+
],
|
|
8
19
|
"homepage": "https://github.com/shshamim63/safe-env-check#readme",
|
|
9
20
|
"main": "dist/index.js",
|
|
10
21
|
"types": "dist/index.d.ts",
|