dotenv-diff 2.1.4 → 2.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 +11 -1
- package/dist/src/cli/program.js +1 -0
- package/dist/src/cli/run.js +3 -0
- package/dist/src/config/types.d.ts +1 -0
- package/dist/src/index.js +0 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -105,7 +105,7 @@ dotenv-diff --scan-usage --fix
|
|
|
105
105
|
|
|
106
106
|
Using `--fix`with `--scan-usage` will not detect duplicate keys, it will only add missing keys.
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
### Example workflow
|
|
109
109
|
|
|
110
110
|
1. You add `process.env.NEW_API_KEY` in your code.
|
|
111
111
|
2. You run `dotenv-diff --scan-usage --fix`.
|
|
@@ -194,6 +194,16 @@ You can output the results in JSON format using the `--json` option:
|
|
|
194
194
|
dotenv-diff --json
|
|
195
195
|
```
|
|
196
196
|
|
|
197
|
+
## Disable colored output
|
|
198
|
+
|
|
199
|
+
By default, `dotenv-diff` uses colored output to enhance readability.
|
|
200
|
+
|
|
201
|
+
If you prefer plain text output, you can disable colored output using the `--no-color` option:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
dotenv-diff --no-color
|
|
205
|
+
```
|
|
206
|
+
|
|
197
207
|
## Compare specific files
|
|
198
208
|
|
|
199
209
|
Override the autoscan and compare exactly two files:
|
package/dist/src/cli/program.js
CHANGED
|
@@ -13,6 +13,7 @@ export function createProgram() {
|
|
|
13
13
|
.option('--ignore-regex <pattern>', 'Regex pattern to ignore matching keys')
|
|
14
14
|
.option('--fix', 'Automatically fix common issues: remove duplicates, add missing keys')
|
|
15
15
|
.option('--json', 'Output results in JSON format')
|
|
16
|
+
.option('--no-color', 'Disable colored output')
|
|
16
17
|
.option('--only <list>', 'Comma-separated categories to only run (missing,extra,empty,mismatch,duplicate,gitignore)')
|
|
17
18
|
.option('--scan-usage', 'Scan codebase for environment variable usage')
|
|
18
19
|
.option('--include-files <patterns>', '[requires --scan-usage] Comma-separated file patterns to ADD to default scan patterns (extends default)')
|
package/dist/src/cli/run.js
CHANGED
|
@@ -11,6 +11,9 @@ export async function run(program) {
|
|
|
11
11
|
program.parse(process.argv);
|
|
12
12
|
const raw = program.opts();
|
|
13
13
|
const opts = normalizeOptions(raw);
|
|
14
|
+
if (opts.noColor) {
|
|
15
|
+
chalk.level = 0; // disable colors globally
|
|
16
|
+
}
|
|
14
17
|
if (opts.scanUsage) {
|
|
15
18
|
const envPath = opts.envFlag || (fs.existsSync('.env') ? '.env' : undefined);
|
|
16
19
|
const { exitWithError } = await scanUsage({
|
package/dist/src/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dotenv-diff",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.5",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Find differences between .env and .env.example / .env.* files. And optionally scan your codebase to find environment variables in use.",
|
|
6
6
|
"bin": {
|
|
7
7
|
"dotenv-diff": "dist/bin/dotenv-diff.js"
|
|
8
8
|
},
|