@deveko/devguard 0.1.10 → 0.1.11
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 +31 -2
- package/bin/devguard-linux +0 -0
- package/bin/devguard-macos +0 -0
- package/bin/devguard-win.exe +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,6 +21,8 @@ Built with Rust. Fast by default.
|
|
|
21
21
|
- ✅ Clean, readable CLI output
|
|
22
22
|
- 🖥️ Cross platform (Windows, Mac, Linux)
|
|
23
23
|
- 🤖 Auto-builds via GitHub Actions
|
|
24
|
+
- ⚙️ Custom rules via `devguard.config.toml`
|
|
25
|
+
- 🔄 Custom rules override built-in rules
|
|
24
26
|
|
|
25
27
|
---
|
|
26
28
|
|
|
@@ -47,6 +49,25 @@ npx @deveko/devguard check --path ./apps/backend/.env
|
|
|
47
49
|
|
|
48
50
|
# Generate .env.example from .env
|
|
49
51
|
npx @deveko/devguard init
|
|
52
|
+
|
|
53
|
+
# Use custom config path
|
|
54
|
+
npx @deveko/devguard check --config ./custom/devguard.config.toml
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Example `devguard.config.toml`
|
|
58
|
+
|
|
59
|
+
```toml
|
|
60
|
+
[[rules]]
|
|
61
|
+
pattern = "TOKEN"
|
|
62
|
+
rule = "min_length"
|
|
63
|
+
value = "64"
|
|
64
|
+
message = "must be at least 64 characters"
|
|
65
|
+
|
|
66
|
+
[[rules]]
|
|
67
|
+
pattern = "NODE_ENV"
|
|
68
|
+
rule = "one_of"
|
|
69
|
+
value = "staging,production,development"
|
|
70
|
+
message = "must be staging, production or development"
|
|
50
71
|
```
|
|
51
72
|
|
|
52
73
|
### Example `.env`
|
|
@@ -109,7 +130,15 @@ Runs pattern-based rules with priority ordering:
|
|
|
109
130
|
**3. Missing Keys Check**
|
|
110
131
|
Compares `.env` against `.env.example` - any key in `.env.example` missing from `.env` is flagged!!
|
|
111
132
|
|
|
112
|
-
|
|
133
|
+
**4. Custom Rules(optional)**
|
|
134
|
+
Create `devguard.config.toml` in your project root:
|
|
135
|
+
|
|
136
|
+
| Rule type | Description |
|
|
137
|
+
| --------- | ----------- |
|
|
138
|
+
| `min_length` | Value must be at least N characters |
|
|
139
|
+
| `one_of` | Value must be one of the specified options |
|
|
140
|
+
|
|
141
|
+
Custom rules override built-in rules with matching patterns!!
|
|
113
142
|
|
|
114
143
|
---
|
|
115
144
|
|
|
@@ -129,7 +158,7 @@ No config needed. Just run it.
|
|
|
129
158
|
- [x] Sectioned output (Warnings, Errors, Missing)
|
|
130
159
|
- [x] CI/CD integration via GitHub Action
|
|
131
160
|
- [x] Cross platform binaries (Windows, Mac, Linux)
|
|
132
|
-
- [
|
|
161
|
+
- [x] Custom rules via `devguard.config.toml`
|
|
133
162
|
- [ ] VSCode extension
|
|
134
163
|
- [ ] Docker config validation
|
|
135
164
|
- [ ] Secret leak detection in source files
|
package/bin/devguard-linux
CHANGED
|
Binary file
|
package/bin/devguard-macos
CHANGED
|
Binary file
|
package/bin/devguard-win.exe
CHANGED
|
Binary file
|