env-typed-checker 0.2.1 → 0.2.3

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 CHANGED
@@ -21,7 +21,6 @@ It helps your app fail fast when configuration is wrong:
21
21
  - Optional values with `?` and `optional: true`
22
22
  - Defaults (typed + validated)
23
23
  - CLI:
24
-
25
24
  - `check` → validate env
26
25
  - `generate` → generate/update `.env` from schema (no overwrite by default)
27
26
  - Uses `.env` via `dotenv` (optional)
@@ -57,13 +56,10 @@ export const config = envDoctor({
57
56
 
58
57
  ### What you get
59
58
 
60
- * PORT → number
61
-
62
- * DB_URL → string (validated as URL)
63
-
64
- * ADMIN_EMAIL → string (validated as email)
65
-
66
- * DEBUG → boolean | undefined (optional)
59
+ * PORT → `number`
60
+ * DB_URL → `string` (validated as URL)
61
+ * ADMIN_EMAIL`string` (validated as email)
62
+ * DEBUG → `boolean` | `undefined` (optional)
67
63
 
68
64
 
69
65
  ### 🧩 Supported Types
@@ -251,9 +247,7 @@ npx env-typed-checker generate --schema env.schema.json --comment-types
251
247
  ### Exit codes
252
248
 
253
249
  * `0` = OK
254
-
255
250
  * `1` = validation failed
256
-
257
251
  * `2` = CLI usage / unexpected error
258
252
 
259
253
  ## ✅ CI Example (GitHub Actions)
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
+ "use strict";
2
3
 
3
- const { runCli } = require("../dist/cli.js");
4
+ const { runCli } = require("../dist/cli/index.js");
4
5
 
5
6
  const code = runCli(process.argv.slice(2), console);
6
- process.exitCode = code;
7
+ process.exitCode = typeof code === "number" ? code : 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "env-typed-checker",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Validate and parse environment variables with a tiny, type-safe schema.",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",