envin 1.1.13 → 1.1.14-canary.69df2fd

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
@@ -94,6 +94,30 @@ npx @envin/cli@latest dev
94
94
 
95
95
  This will start a live preview server that will automatically update your environment variables when you change them allowing you to find and fix errors before deploying your app.
96
96
 
97
+ ### CLI options
98
+
99
+ ```bash
100
+ npx @envin/cli@latest dev [options]
101
+ ```
102
+
103
+ Options:
104
+ - `-c, --config <path>`: explicit path to `env.config.ts`
105
+ - `-e, --env <path...>`: path(s) to `.env` file(s) or directories
106
+ - `-p, --port <port>`: port to run the preview server (default: `3000`)
107
+ - `-v, --verbose`: enable verbose logging
108
+ - `--cascade`: enable workspace env/config cascading
109
+
110
+ #### Env loading behavior
111
+
112
+ When `--cascade` is enabled, the CLI:
113
+ - detects the workspace root by walking up from current working directory
114
+ - loads env files from the workspace root first, then the package directory, so package values override root values
115
+ - uses the following precedence within each directory:
116
+ - `.env` → `.env.local` → `.env.development` → `.env.development.local`
117
+ - `.env` → `.env.local` → `.env.production` → `.env.production.local`
118
+
119
+ If `-e` points to a single file, only that file is used. If `-e` points to a directory, only that directory is used. If multiple paths are provided, they must all be files or all be directories. Without `-e` or `--cascade`, the CLI uses the current working directory.
120
+
97
121
 
98
122
  ## Contributing
99
123
 
@@ -155,7 +155,7 @@ declare const netlify: {
155
155
  readonly server: {
156
156
  readonly NETLIFY: arktype0.BaseType<string | undefined, {}>;
157
157
  readonly BUILD_ID: arktype0.BaseType<string | undefined, {}>;
158
- readonly CONTEXT: arktype0.BaseType<"dev" | "production" | "deploy-preview" | "branch-deploy" | undefined, {}>;
158
+ readonly CONTEXT: arktype0.BaseType<"production" | "deploy-preview" | "branch-deploy" | "dev" | undefined, {}>;
159
159
  readonly REPOSITORY_URL: arktype0.BaseType<string | undefined, {}>;
160
160
  readonly BRANCH: arktype0.BaseType<string | undefined, {}>;
161
161
  readonly URL: arktype0.BaseType<string | undefined, {}>;
@@ -166,10 +166,10 @@ declare const netlify: {
166
166
  readonly NETLIFY: z.ZodOptional<z.ZodString>;
167
167
  readonly BUILD_ID: z.ZodOptional<z.ZodString>;
168
168
  readonly CONTEXT: z.ZodOptional<z.ZodEnum<{
169
- dev: "dev";
170
169
  production: "production";
171
170
  "deploy-preview": "deploy-preview";
172
171
  "branch-deploy": "branch-deploy";
172
+ dev: "dev";
173
173
  }>>;
174
174
  readonly REPOSITORY_URL: z.ZodOptional<z.ZodString>;
175
175
  readonly BRANCH: z.ZodOptional<z.ZodString>;
package/package.json CHANGED
@@ -1,83 +1,83 @@
1
1
  {
2
- "name": "envin",
3
- "version": "1.1.13",
4
- "description": "Type-safe env validation with live previews",
5
- "keywords": [
6
- "turbostarter",
7
- "environment variables",
8
- "validation",
9
- "zod",
10
- "arktype",
11
- "valibot"
12
- ],
13
- "repository": {
14
- "type": "git",
15
- "url": "git+https://github.com/turbostarter/envin.git",
16
- "directory": "packages/core"
17
- },
18
- "homepage": "https://envin.turbostarter.dev",
19
- "bugs": {
20
- "url": "https://github.com/turbostarter/envin/issues"
21
- },
22
- "license": "MIT",
23
- "author": "Bartosz Zagrodzki",
24
- "type": "module",
25
- "exports": {
26
- "./package.json": "./package.json",
27
- ".": {
28
- "types": "./dist/index.d.mts",
29
- "default": "./dist/index.mjs"
30
- },
31
- "./presets/*": {
32
- "types": "./dist/presets/*.d.mts",
33
- "default": "./dist/presets/*.mjs"
34
- },
35
- "./types": {
36
- "types": "./dist/types.d.mts",
37
- "default": "./dist/types.mjs"
38
- }
39
- },
40
- "files": [
41
- "dist",
42
- "package.json",
43
- "LICENSE",
44
- "README.md"
45
- ],
46
- "scripts": {
47
- "build": "tsdown",
48
- "clean": "rm -rf dist .turbo node_modules",
49
- "dev": "tsdown --watch",
50
- "start": "node dist/index.js",
51
- "test": "vitest run",
52
- "test:watch": "vitest",
53
- "typecheck": "tsc --noEmit",
54
- "prepack": "bun run ../../scripts/populate-readme.ts"
55
- },
56
- "devDependencies": {
57
- "@types/bun": "^1.3.5",
58
- "arktype": "2.1.20",
59
- "expect-type": "^1.3.0",
60
- "tsdown": "0.19.0",
61
- "typescript": "5.8.3",
62
- "valibot": "1.1.0",
63
- "vitest": "3.2.3",
64
- "zod": "4.1.13"
65
- },
66
- "peerDependencies": {
67
- "arktype": "^2.1.0",
68
- "typescript": ">=5.0.0",
69
- "valibot": "^1.0.0",
70
- "zod": "^3.24.0 || ^4.0.0"
71
- },
72
- "peerDependenciesMeta": {
73
- "typescript": {
74
- "optional": true
75
- },
76
- "valibot": {
77
- "optional": true
78
- },
79
- "zod": {
80
- "optional": true
81
- }
82
- }
83
- }
2
+ "name": "envin",
3
+ "version": "1.1.14-canary.69df2fd",
4
+ "description": "Type-safe env validation with live previews",
5
+ "keywords": [
6
+ "turbostarter",
7
+ "environment variables",
8
+ "validation",
9
+ "zod",
10
+ "arktype",
11
+ "valibot"
12
+ ],
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/turbostarter/envin.git",
16
+ "directory": "packages/core"
17
+ },
18
+ "homepage": "https://envin.turbostarter.dev",
19
+ "bugs": {
20
+ "url": "https://github.com/turbostarter/envin/issues"
21
+ },
22
+ "license": "MIT",
23
+ "author": "Bartosz Zagrodzki",
24
+ "type": "module",
25
+ "exports": {
26
+ "./package.json": "./package.json",
27
+ ".": {
28
+ "types": "./dist/index.d.mts",
29
+ "default": "./dist/index.mjs"
30
+ },
31
+ "./presets/*": {
32
+ "types": "./dist/presets/*.d.mts",
33
+ "default": "./dist/presets/*.mjs"
34
+ },
35
+ "./types": {
36
+ "types": "./dist/types.d.mts",
37
+ "default": "./dist/types.mjs"
38
+ }
39
+ },
40
+ "files": [
41
+ "dist",
42
+ "package.json",
43
+ "LICENSE",
44
+ "README.md"
45
+ ],
46
+ "scripts": {
47
+ "build": "tsdown",
48
+ "clean": "rm -rf dist .turbo node_modules",
49
+ "dev": "tsdown --watch",
50
+ "start": "node dist/index.js",
51
+ "test": "vitest run",
52
+ "test:watch": "vitest",
53
+ "typecheck": "tsc --noEmit",
54
+ "prepack": "bun run ../../scripts/populate-readme.ts"
55
+ },
56
+ "devDependencies": {
57
+ "@types/bun": "^1.3.5",
58
+ "arktype": "catalog:",
59
+ "expect-type": "^1.3.0",
60
+ "tsdown": "catalog:",
61
+ "typescript": "catalog:",
62
+ "valibot": "catalog:",
63
+ "vitest": "3.2.3",
64
+ "zod": "catalog:"
65
+ },
66
+ "peerDependencies": {
67
+ "arktype": "^2.1.0",
68
+ "typescript": ">=5.0.0",
69
+ "valibot": "^1.0.0",
70
+ "zod": "^3.24.0 || ^4.0.0"
71
+ },
72
+ "peerDependenciesMeta": {
73
+ "typescript": {
74
+ "optional": true
75
+ },
76
+ "valibot": {
77
+ "optional": true
78
+ },
79
+ "zod": {
80
+ "optional": true
81
+ }
82
+ }
83
+ }