dotenv-diff 2.4.6 → 2.4.8
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/CHANGELOG.md +23 -0
- package/README.md +8 -2
- package/dist/src/cli/run.d.ts.map +1 -1
- package/dist/src/cli/run.js +7 -8
- package/dist/src/cli/run.js.map +1 -1
- package/dist/src/commands/compare.d.ts +2 -2
- package/dist/src/commands/compare.d.ts.map +1 -1
- package/dist/src/commands/compare.js +16 -2
- package/dist/src/commands/compare.js.map +1 -1
- package/dist/src/commands/ensureFilesOrPrompt.d.ts +22 -0
- package/dist/src/commands/ensureFilesOrPrompt.d.ts.map +1 -0
- package/dist/src/commands/ensureFilesOrPrompt.js +76 -0
- package/dist/src/commands/ensureFilesOrPrompt.js.map +1 -0
- package/dist/src/commands/scanUsage.d.ts +3 -5
- package/dist/src/commands/scanUsage.d.ts.map +1 -1
- package/dist/src/commands/scanUsage.js +7 -7
- package/dist/src/commands/scanUsage.js.map +1 -1
- package/dist/src/config/constants.d.ts +42 -0
- package/dist/src/config/constants.d.ts.map +1 -0
- package/dist/src/config/constants.js +54 -0
- package/dist/src/config/constants.js.map +1 -0
- package/dist/src/config/options.d.ts +1 -1
- package/dist/src/config/options.d.ts.map +1 -1
- package/dist/src/config/options.js +1 -1
- package/dist/src/config/options.js.map +1 -1
- package/dist/src/config/types.d.ts +156 -201
- package/dist/src/config/types.d.ts.map +1 -1
- package/dist/src/config/types.js +3 -11
- package/dist/src/config/types.js.map +1 -1
- package/dist/src/core/compareScan.d.ts +1 -0
- package/dist/src/core/compareScan.d.ts.map +1 -1
- package/dist/src/core/compareScan.js +1 -0
- package/dist/src/core/compareScan.js.map +1 -1
- package/dist/src/core/computeHealthScore.d.ts.map +1 -1
- package/dist/src/core/computeHealthScore.js +3 -0
- package/dist/src/core/computeHealthScore.js.map +1 -1
- package/dist/src/core/detectInconsistentNaming.js +0 -7
- package/dist/src/core/detectInconsistentNaming.js.map +1 -1
- package/dist/src/core/determineComparisonFile.d.ts +1 -1
- package/dist/src/core/determineComparisonFile.d.ts.map +1 -1
- package/dist/src/core/determineComparisonFile.js +2 -8
- package/dist/src/core/determineComparisonFile.js.map +1 -1
- package/dist/src/core/duplicates.d.ts +5 -4
- package/dist/src/core/duplicates.d.ts.map +1 -0
- package/dist/src/core/duplicates.js +5 -2
- package/dist/src/core/duplicates.js.map +1 -0
- package/dist/src/core/envDiscovery.d.ts +19 -0
- package/dist/src/core/envDiscovery.d.ts.map +1 -0
- package/dist/src/core/envDiscovery.js +81 -0
- package/dist/src/core/envDiscovery.js.map +1 -0
- package/dist/src/core/envPairing.d.ts.map +1 -1
- package/dist/src/core/envPairing.js +5 -2
- package/dist/src/core/envPairing.js.map +1 -1
- package/dist/src/core/exampleSecretDetector.d.ts.map +1 -1
- package/dist/src/core/exampleSecretDetector.js +2 -2
- package/dist/src/core/exampleSecretDetector.js.map +1 -1
- package/dist/src/core/fixEnv.d.ts.map +1 -1
- package/dist/src/core/fixEnv.js +2 -1
- package/dist/src/core/fixEnv.js.map +1 -1
- package/dist/src/core/frameworkDetector.d.ts +2 -2
- package/dist/src/core/frameworkDetector.d.ts.map +1 -1
- package/dist/src/core/frameworkDetector.js +0 -1
- package/dist/src/core/frameworkDetector.js.map +1 -1
- package/dist/src/core/frameworkValidator.d.ts +2 -2
- package/dist/src/core/frameworkValidator.d.ts.map +1 -1
- package/dist/src/core/frameworkValidator.js +0 -1
- package/dist/src/core/frameworkValidator.js.map +1 -1
- package/dist/src/core/frameworks/frameworkDetector.d.ts +14 -0
- package/dist/src/core/frameworks/frameworkDetector.d.ts.map +1 -0
- package/dist/src/core/frameworks/frameworkDetector.js +40 -0
- package/dist/src/core/frameworks/frameworkDetector.js.map +1 -0
- package/dist/src/core/frameworks/frameworkValidator.d.ts +10 -0
- package/dist/src/core/frameworks/frameworkValidator.d.ts.map +1 -0
- package/dist/src/core/frameworks/frameworkValidator.js +21 -0
- package/dist/src/core/frameworks/frameworkValidator.js.map +1 -0
- package/dist/src/core/frameworks/nextJsRules.d.ts +2 -2
- package/dist/src/core/frameworks/nextJsRules.d.ts.map +1 -1
- package/dist/src/core/frameworks/nextJsRules.js +12 -39
- package/dist/src/core/frameworks/nextJsRules.js.map +1 -1
- package/dist/src/core/frameworks/sveltekitRules.d.ts +2 -2
- package/dist/src/core/frameworks/sveltekitRules.d.ts.map +1 -1
- package/dist/src/core/frameworks/sveltekitRules.js +57 -45
- package/dist/src/core/frameworks/sveltekitRules.js.map +1 -1
- package/dist/src/core/helpers/normalizePath.d.ts +6 -0
- package/dist/src/core/helpers/normalizePath.d.ts.map +1 -0
- package/dist/src/core/helpers/normalizePath.js +8 -0
- package/dist/src/core/helpers/normalizePath.js.map +1 -0
- package/dist/src/core/helpers/updateTotals.d.ts +1 -2
- package/dist/src/core/helpers/updateTotals.d.ts.map +1 -1
- package/dist/src/core/helpers/updateTotals.js.map +1 -1
- package/dist/src/core/parseEnv.d.ts.map +1 -1
- package/dist/src/core/parseEnv.js +19 -1
- package/dist/src/core/parseEnv.js.map +1 -1
- package/dist/src/core/patterns.d.ts.map +1 -1
- package/dist/src/core/patterns.js +24 -1
- package/dist/src/core/patterns.js.map +1 -1
- package/dist/src/core/processComparisonFile.d.ts +6 -14
- package/dist/src/core/processComparisonFile.d.ts.map +1 -1
- package/dist/src/core/processComparisonFile.js +1 -1
- package/dist/src/core/processComparisonFile.js.map +1 -1
- package/dist/src/core/scan/scanJsonOutput.d.ts +85 -0
- package/dist/src/core/scan/scanJsonOutput.d.ts.map +1 -0
- package/dist/src/core/scan/scanJsonOutput.js +97 -0
- package/dist/src/core/scan/scanJsonOutput.js.map +1 -0
- package/dist/src/core/scan/secretDetectors.d.ts +28 -0
- package/dist/src/core/scan/secretDetectors.d.ts.map +1 -0
- package/dist/src/core/scan/secretDetectors.js +272 -0
- package/dist/src/core/scan/secretDetectors.js.map +1 -0
- package/dist/src/core/scanFile.d.ts.map +1 -1
- package/dist/src/core/scanFile.js +11 -1
- package/dist/src/core/scanFile.js.map +1 -1
- package/dist/src/core/scanJsonOutput.d.ts +78 -2
- package/dist/src/core/scanJsonOutput.d.ts.map +1 -1
- package/dist/src/core/scanJsonOutput.js +5 -4
- package/dist/src/core/scanJsonOutput.js.map +1 -1
- package/dist/src/core/security/entropy.d.ts +8 -0
- package/dist/src/core/security/entropy.d.ts.map +1 -0
- package/dist/src/core/security/entropy.js +23 -0
- package/dist/src/core/security/entropy.js.map +1 -0
- package/dist/src/core/security/exampleSecretDetector.d.ts +13 -0
- package/dist/src/core/security/exampleSecretDetector.d.ts.map +1 -0
- package/dist/src/core/security/exampleSecretDetector.js +61 -0
- package/dist/src/core/security/exampleSecretDetector.js.map +1 -0
- package/dist/src/core/security/secretDetectors.d.ts +28 -0
- package/dist/src/core/security/secretDetectors.d.ts.map +1 -0
- package/dist/src/core/security/secretDetectors.js +292 -0
- package/dist/src/core/security/secretDetectors.js.map +1 -0
- package/dist/src/services/codeBaseScanner.d.ts.map +1 -1
- package/dist/src/services/codeBaseScanner.js +59 -22
- package/dist/src/services/codeBaseScanner.js.map +1 -1
- package/dist/src/services/ensureFilesOrPrompt.d.ts.map +1 -1
- package/dist/src/services/ensureFilesOrPrompt.js +5 -2
- package/dist/src/services/ensureFilesOrPrompt.js.map +1 -1
- package/dist/src/services/envDiscovery.d.ts.map +1 -1
- package/dist/src/services/envDiscovery.js +22 -9
- package/dist/src/services/envDiscovery.js.map +1 -1
- package/dist/src/services/git.d.ts.map +1 -1
- package/dist/src/services/git.js +10 -9
- package/dist/src/services/git.js.map +1 -1
- package/dist/src/services/printScanResult.d.ts +17 -0
- package/dist/src/services/printScanResult.d.ts.map +1 -0
- package/dist/src/services/printScanResult.js +127 -0
- package/dist/src/services/printScanResult.js.map +1 -0
- package/dist/src/services/scanCodebase.d.ts +8 -0
- package/dist/src/services/scanCodebase.d.ts.map +1 -0
- package/dist/src/services/scanCodebase.js +110 -0
- package/dist/src/services/scanCodebase.js.map +1 -0
- package/dist/src/services/scanOutputToConsole.d.ts +2 -4
- package/dist/src/services/scanOutputToConsole.d.ts.map +1 -1
- package/dist/src/services/scanOutputToConsole.js +5 -4
- package/dist/src/services/scanOutputToConsole.js.map +1 -1
- package/dist/src/ui/compare/printIssues.d.ts +1 -1
- package/dist/src/ui/compare/printIssues.d.ts.map +1 -1
- package/dist/src/ui/compare/printIssues.js +0 -1
- package/dist/src/ui/compare/printIssues.js.map +1 -1
- package/dist/src/ui/compare/printStats.d.ts +1 -1
- package/dist/src/ui/compare/printStats.d.ts.map +1 -1
- package/dist/src/ui/compare/printStats.js +0 -1
- package/dist/src/ui/compare/printStats.js.map +1 -1
- package/dist/src/ui/scan/printConsolelogWarning.d.ts.map +1 -1
- package/dist/src/ui/scan/printConsolelogWarning.js +8 -5
- package/dist/src/ui/scan/printConsolelogWarning.js.map +1 -1
- package/dist/src/ui/scan/printExampleWarnings.d.ts +1 -1
- package/dist/src/ui/scan/printExampleWarnings.d.ts.map +1 -1
- package/dist/src/ui/scan/printFrameworkWarnings.d.ts +2 -2
- package/dist/src/ui/scan/printFrameworkWarnings.d.ts.map +1 -1
- package/dist/src/ui/scan/printFrameworkWarnings.js +4 -3
- package/dist/src/ui/scan/printFrameworkWarnings.js.map +1 -1
- package/dist/src/ui/scan/printMissing.d.ts.map +1 -1
- package/dist/src/ui/scan/printMissing.js +3 -1
- package/dist/src/ui/scan/printMissing.js.map +1 -1
- package/dist/src/ui/scan/printProgress.d.ts +15 -0
- package/dist/src/ui/scan/printProgress.d.ts.map +1 -0
- package/dist/src/ui/scan/printProgress.js +35 -0
- package/dist/src/ui/scan/printProgress.js.map +1 -0
- package/dist/src/ui/scan/printSecrets.d.ts +1 -1
- package/dist/src/ui/scan/printSecrets.d.ts.map +1 -1
- package/dist/src/ui/scan/printSecrets.js +3 -2
- package/dist/src/ui/scan/printSecrets.js.map +1 -1
- package/dist/src/ui/shared/printFixTips.d.ts +1 -1
- package/dist/src/ui/shared/printFixTips.d.ts.map +1 -1
- package/dist/src/ui/shared/printFixTips.js +0 -1
- package/dist/src/ui/shared/printFixTips.js.map +1 -1
- package/dist/src/ui/shared/printProgress.d.ts +24 -0
- package/dist/src/ui/shared/printProgress.d.ts.map +1 -0
- package/dist/src/ui/shared/printProgress.js +43 -0
- package/dist/src/ui/shared/printProgress.js.map +1 -0
- package/dist/src/ui/shared/setupGlobalConfig.d.ts +1 -1
- package/dist/src/ui/shared/setupGlobalConfig.d.ts.map +1 -1
- package/dist/src/ui/shared/setupGlobalConfig.js +0 -1
- package/dist/src/ui/shared/setupGlobalConfig.js.map +1 -1
- package/package.json +7 -5
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type
|
|
3
|
-
|
|
4
|
-
export
|
|
1
|
+
import { ALLOWED_CATEGORIES } from './constants.js';
|
|
2
|
+
import { type SecretFinding } from '../core/security/secretDetectors.js';
|
|
3
|
+
import { type ExampleSecretWarning } from '../core/security/exampleSecretDetector.js';
|
|
4
|
+
export type SupportedFramework = 'sveltekit' | 'nextjs';
|
|
5
|
+
export type DetectedFramework = SupportedFramework | 'unknown';
|
|
6
|
+
/**
|
|
7
|
+
* Framework-specific warning about environment variable usage
|
|
8
|
+
* From rules defined for each supported framework (SvelteKit, Next.js)
|
|
9
|
+
*/
|
|
10
|
+
export interface FrameworkWarning {
|
|
5
11
|
variable: string;
|
|
6
12
|
reason: string;
|
|
7
13
|
file: string;
|
|
8
14
|
line: number;
|
|
9
|
-
framework:
|
|
15
|
+
framework: SupportedFramework;
|
|
10
16
|
}
|
|
11
17
|
export type Duplicate = {
|
|
12
18
|
key: string;
|
|
@@ -16,43 +22,21 @@ export interface DuplicateResult {
|
|
|
16
22
|
dupsEnv: Duplicate[];
|
|
17
23
|
dupsEx: Duplicate[];
|
|
18
24
|
}
|
|
19
|
-
export declare const ALLOWED_CATEGORIES: readonly ["missing", "extra", "empty", "mismatch", "duplicate", "gitignore"];
|
|
20
25
|
export type Category = (typeof ALLOWED_CATEGORIES)[number];
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
ignore: string[];
|
|
34
|
-
ignoreRegex: RegExp[];
|
|
35
|
-
cwd: string;
|
|
36
|
-
only?: Category[];
|
|
37
|
-
compare: boolean;
|
|
38
|
-
scanUsage: boolean;
|
|
39
|
-
includeFiles: string[];
|
|
40
|
-
excludeFiles: string[];
|
|
41
|
-
showUnused: boolean;
|
|
42
|
-
showStats: boolean;
|
|
43
|
-
files?: string[];
|
|
44
|
-
noColor?: boolean;
|
|
45
|
-
secrets: boolean;
|
|
46
|
-
strict: boolean | undefined;
|
|
47
|
-
ignoreUrls?: string[];
|
|
48
|
-
uppercaseKeys: boolean;
|
|
49
|
-
expireWarnings: boolean;
|
|
50
|
-
inconsistentNamingWarnings: boolean;
|
|
51
|
-
};
|
|
52
|
-
/** Type representing the raw options for the comparison
|
|
53
|
-
* These are the options that are directly passed to the comparison function without any processing or validation.
|
|
26
|
+
/**
|
|
27
|
+
* Raw options as received directly from the CLI argument parser.
|
|
28
|
+
*
|
|
29
|
+
* These values are intentionally loose and reflect how flags are actually
|
|
30
|
+
* provided by the user:
|
|
31
|
+
* - Values may be missing
|
|
32
|
+
* - Lists may be strings or string arrays
|
|
33
|
+
* - No defaults are applied
|
|
34
|
+
* - No validation or normalization has happened yet
|
|
35
|
+
*
|
|
36
|
+
* This type should only be used at the CLI boundary and passed into the
|
|
37
|
+
* normalization step that produces {@link Options}.
|
|
54
38
|
*/
|
|
55
|
-
export
|
|
39
|
+
export interface RawOptions {
|
|
56
40
|
checkValues?: boolean;
|
|
57
41
|
ci?: boolean;
|
|
58
42
|
yes?: boolean;
|
|
@@ -79,37 +63,48 @@ export type RawOptions = {
|
|
|
79
63
|
uppercaseKeys?: boolean;
|
|
80
64
|
expireWarnings?: boolean;
|
|
81
65
|
inconsistentNamingWarnings?: boolean;
|
|
82
|
-
}
|
|
66
|
+
}
|
|
83
67
|
/**
|
|
84
|
-
*
|
|
85
|
-
*
|
|
68
|
+
* Normalized and validated options used internally by the application.
|
|
69
|
+
*
|
|
70
|
+
* These options represent the final, safe configuration that the rest of the
|
|
71
|
+
* codebase can rely on. All values are:
|
|
72
|
+
* - Fully normalized (no string | string[] unions)
|
|
73
|
+
* - Resolved to absolute paths where applicable
|
|
74
|
+
* - Filled with defaults for omitted flags
|
|
75
|
+
* - Validated and ready for use
|
|
76
|
+
*
|
|
77
|
+
* This type should be used everywhere outside of CLI parsing and option
|
|
78
|
+
* normalization logic.
|
|
86
79
|
*/
|
|
87
|
-
export
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
80
|
+
export interface Options {
|
|
81
|
+
checkValues: boolean;
|
|
82
|
+
isCiMode: boolean;
|
|
83
|
+
isYesMode: boolean;
|
|
84
|
+
allowDuplicates: boolean;
|
|
85
|
+
fix: boolean;
|
|
86
|
+
json: boolean;
|
|
87
|
+
envFlag: string | undefined;
|
|
88
|
+
exampleFlag: string | undefined;
|
|
89
|
+
ignore: string[];
|
|
90
|
+
ignoreRegex: RegExp[];
|
|
91
|
+
cwd: string;
|
|
92
|
+
only: Category[];
|
|
93
|
+
compare: boolean;
|
|
94
|
+
scanUsage: boolean;
|
|
95
|
+
includeFiles: string[];
|
|
96
|
+
excludeFiles: string[];
|
|
97
|
+
showUnused: boolean;
|
|
98
|
+
showStats: boolean;
|
|
99
|
+
files: string[];
|
|
100
|
+
noColor: boolean;
|
|
101
|
+
secrets: boolean;
|
|
102
|
+
strict: boolean;
|
|
103
|
+
ignoreUrls: string[];
|
|
104
|
+
uppercaseKeys: boolean;
|
|
105
|
+
expireWarnings: boolean;
|
|
106
|
+
inconsistentNamingWarnings: boolean;
|
|
107
|
+
}
|
|
113
108
|
/**
|
|
114
109
|
* Represents a single usage of an environment variable in the codebase.
|
|
115
110
|
*/
|
|
@@ -118,20 +113,46 @@ export interface EnvUsage {
|
|
|
118
113
|
file: string;
|
|
119
114
|
line: number;
|
|
120
115
|
column: number;
|
|
121
|
-
pattern: 'process.env' | 'import.meta.env' | 'sveltekit'
|
|
116
|
+
pattern: 'process.env' | 'import.meta.env' | 'sveltekit';
|
|
117
|
+
imports?: string[];
|
|
122
118
|
context: string;
|
|
123
119
|
isLogged?: boolean;
|
|
124
120
|
}
|
|
121
|
+
export type VariableUsages = Record<string, EnvUsage[]>;
|
|
122
|
+
/**
|
|
123
|
+
* Options for scanning the codebase
|
|
124
|
+
*/
|
|
125
125
|
export interface ScanOptions {
|
|
126
126
|
cwd: string;
|
|
127
127
|
include: string[];
|
|
128
128
|
exclude: string[];
|
|
129
129
|
ignore: string[];
|
|
130
130
|
ignoreRegex: RegExp[];
|
|
131
|
-
files
|
|
132
|
-
secrets
|
|
133
|
-
ignoreUrls
|
|
131
|
+
files: string[];
|
|
132
|
+
secrets: boolean;
|
|
133
|
+
ignoreUrls: string[];
|
|
134
|
+
json: boolean;
|
|
134
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Extends the basic ScanOptions with additional parameters.
|
|
138
|
+
* All of these options are optional, as they may not be needed for every scan.
|
|
139
|
+
*/
|
|
140
|
+
export interface ScanUsageOptions extends ScanOptions {
|
|
141
|
+
envPath?: string | undefined;
|
|
142
|
+
examplePath?: string | undefined;
|
|
143
|
+
fix?: boolean;
|
|
144
|
+
showUnused?: boolean;
|
|
145
|
+
showStats?: boolean;
|
|
146
|
+
isCiMode?: boolean;
|
|
147
|
+
allowDuplicates?: boolean;
|
|
148
|
+
strict?: boolean;
|
|
149
|
+
uppercaseKeys?: boolean;
|
|
150
|
+
expireWarnings?: boolean;
|
|
151
|
+
inconsistentNamingWarnings?: boolean;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Result of scanning the codebase for environment variable usages.
|
|
155
|
+
*/
|
|
135
156
|
export interface ScanResult {
|
|
136
157
|
used: EnvUsage[];
|
|
137
158
|
missing: string[];
|
|
@@ -145,16 +166,10 @@ export interface ScanResult {
|
|
|
145
166
|
};
|
|
146
167
|
secrets: SecretFinding[];
|
|
147
168
|
duplicates: {
|
|
148
|
-
env?:
|
|
149
|
-
|
|
150
|
-
count: number;
|
|
151
|
-
}>;
|
|
152
|
-
example?: Array<{
|
|
153
|
-
key: string;
|
|
154
|
-
count: number;
|
|
155
|
-
}>;
|
|
169
|
+
env?: Duplicate[];
|
|
170
|
+
example?: Duplicate[];
|
|
156
171
|
};
|
|
157
|
-
frameworkWarnings?:
|
|
172
|
+
frameworkWarnings?: FrameworkWarning[];
|
|
158
173
|
exampleWarnings?: ExampleSecretWarning[];
|
|
159
174
|
logged: EnvUsage[];
|
|
160
175
|
uppercaseWarnings?: UppercaseWarning[];
|
|
@@ -162,103 +177,33 @@ export interface ScanResult {
|
|
|
162
177
|
inconsistentNamingWarnings?: InconsistentNamingWarning[];
|
|
163
178
|
fileContentMap?: Map<string, string>;
|
|
164
179
|
}
|
|
165
|
-
/**
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
files?: string[];
|
|
175
|
-
allowDuplicates?: boolean;
|
|
176
|
-
strict?: boolean;
|
|
177
|
-
uppercaseKeys?: boolean;
|
|
178
|
-
expireWarnings?: boolean;
|
|
179
|
-
inconsistentNamingWarnings?: boolean;
|
|
180
|
-
}
|
|
181
|
-
export interface ScanJsonEntry {
|
|
182
|
-
stats?: {
|
|
183
|
-
filesScanned: number;
|
|
184
|
-
totalUsages: number;
|
|
185
|
-
uniqueVariables: number;
|
|
186
|
-
warningsCount: number;
|
|
187
|
-
duration: number;
|
|
180
|
+
/**
|
|
181
|
+
* Type representing a single entry in the comparison results
|
|
182
|
+
* This entry contains the environment variable and its example value.
|
|
183
|
+
*/
|
|
184
|
+
export type CompareJsonEntry = {
|
|
185
|
+
env: string;
|
|
186
|
+
example: string;
|
|
187
|
+
skipped?: {
|
|
188
|
+
reason: string;
|
|
188
189
|
};
|
|
189
|
-
missing?: Array<{
|
|
190
|
-
variable: string;
|
|
191
|
-
usages: Array<{
|
|
192
|
-
file: string;
|
|
193
|
-
line: number;
|
|
194
|
-
pattern: string;
|
|
195
|
-
context: string;
|
|
196
|
-
}>;
|
|
197
|
-
}>;
|
|
198
|
-
unused?: string[];
|
|
199
|
-
allUsages?: Array<{
|
|
200
|
-
variable: string;
|
|
201
|
-
file: string;
|
|
202
|
-
line: number;
|
|
203
|
-
pattern: string;
|
|
204
|
-
context: string;
|
|
205
|
-
}>;
|
|
206
|
-
comparedAgainst?: string;
|
|
207
|
-
totalEnvVariables?: number;
|
|
208
|
-
secrets?: Array<{
|
|
209
|
-
file: string;
|
|
210
|
-
line: number;
|
|
211
|
-
message: string;
|
|
212
|
-
snippet: string;
|
|
213
|
-
}>;
|
|
214
190
|
duplicates?: {
|
|
215
|
-
env?:
|
|
216
|
-
|
|
217
|
-
count: number;
|
|
218
|
-
}>;
|
|
219
|
-
example?: Array<{
|
|
220
|
-
key: string;
|
|
221
|
-
count: number;
|
|
222
|
-
}>;
|
|
191
|
+
env?: Duplicate[];
|
|
192
|
+
example?: Duplicate[];
|
|
223
193
|
};
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
context: string;
|
|
229
|
-
}>;
|
|
230
|
-
expireWarnings?: Array<{
|
|
231
|
-
key: string;
|
|
232
|
-
date: string;
|
|
233
|
-
daysLeft: number;
|
|
234
|
-
}>;
|
|
235
|
-
uppercaseWarnings?: Array<{
|
|
236
|
-
key: string;
|
|
237
|
-
suggestion: string;
|
|
238
|
-
}>;
|
|
239
|
-
inconsistentNamingWarnings?: Array<{
|
|
240
|
-
key1: string;
|
|
241
|
-
key2: string;
|
|
242
|
-
suggestion: string;
|
|
243
|
-
}>;
|
|
244
|
-
frameworkWarnings?: Array<{
|
|
245
|
-
variable: string;
|
|
246
|
-
reason: string;
|
|
247
|
-
file: string;
|
|
248
|
-
line: number;
|
|
249
|
-
framework: string;
|
|
250
|
-
}>;
|
|
251
|
-
exampleWarnings?: Array<{
|
|
194
|
+
missing?: string[];
|
|
195
|
+
extra?: string[];
|
|
196
|
+
empty?: string[];
|
|
197
|
+
valueMismatches?: Array<{
|
|
252
198
|
key: string;
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
severity: string;
|
|
199
|
+
expected: string;
|
|
200
|
+
actual: string;
|
|
256
201
|
}>;
|
|
257
|
-
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
202
|
+
ok?: boolean;
|
|
203
|
+
};
|
|
204
|
+
/**
|
|
205
|
+
* Options for comparing environment files (--compare flag).
|
|
206
|
+
*/
|
|
262
207
|
export interface ComparisonOptions {
|
|
263
208
|
checkValues: boolean;
|
|
264
209
|
cwd: string;
|
|
@@ -275,30 +220,24 @@ export interface ComparisonOptions {
|
|
|
275
220
|
expireWarnings?: boolean;
|
|
276
221
|
inconsistentNamingWarnings?: boolean;
|
|
277
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* Represents a resolved pair of environment files used for comparison.
|
|
225
|
+
*
|
|
226
|
+
* A FilePair describes one concrete comparison unit consisting of:
|
|
227
|
+
* - an environment file (e.g. `.env`, `.env.production`)
|
|
228
|
+
* - the example file it should be compared against
|
|
229
|
+
*/
|
|
278
230
|
export interface FilePair {
|
|
231
|
+
/** The name of the environment file (e.g. ".env", ".env.production") */
|
|
279
232
|
envName: string;
|
|
233
|
+
/** Absolute path to the environment file */
|
|
280
234
|
envPath: string;
|
|
235
|
+
/** Absolute path to the example file this env file is compared against */
|
|
281
236
|
examplePath: string;
|
|
282
237
|
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
export type PairContext = {
|
|
287
|
-
envName: string;
|
|
288
|
-
envPath: string;
|
|
289
|
-
exampleName: string;
|
|
290
|
-
examplePath: string;
|
|
291
|
-
exists: {
|
|
292
|
-
env: boolean;
|
|
293
|
-
example: boolean;
|
|
294
|
-
};
|
|
295
|
-
currentFull?: Record<string, string>;
|
|
296
|
-
exampleFull?: Record<string, string>;
|
|
297
|
-
currentKeys?: string[];
|
|
298
|
-
exampleKeys?: string[];
|
|
299
|
-
current?: Record<string, string>;
|
|
300
|
-
example?: Record<string, string>;
|
|
301
|
-
};
|
|
238
|
+
/**
|
|
239
|
+
* Result of filtering comparison results based on categories
|
|
240
|
+
*/
|
|
302
241
|
export type Filtered = {
|
|
303
242
|
missing: string[];
|
|
304
243
|
extra?: string[];
|
|
@@ -308,27 +247,43 @@ export type Filtered = {
|
|
|
308
247
|
expected: string;
|
|
309
248
|
actual: string;
|
|
310
249
|
}>;
|
|
311
|
-
duplicatesEnv:
|
|
312
|
-
|
|
313
|
-
count: number;
|
|
314
|
-
}>;
|
|
315
|
-
duplicatesEx: Array<{
|
|
316
|
-
key: string;
|
|
317
|
-
count: number;
|
|
318
|
-
}>;
|
|
250
|
+
duplicatesEnv: Duplicate[];
|
|
251
|
+
duplicatesEx: Duplicate[];
|
|
319
252
|
gitignoreIssue: {
|
|
320
253
|
reason: 'no-gitignore' | 'not-ignored';
|
|
321
254
|
} | null;
|
|
322
255
|
};
|
|
256
|
+
/**
|
|
257
|
+
* Result of the exit code determination after scanning or comparing.
|
|
258
|
+
*/
|
|
259
|
+
export interface ExitResult {
|
|
260
|
+
exitWithError: boolean;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Warning about environment variable keys that are not uppercase.
|
|
264
|
+
*/
|
|
323
265
|
export interface UppercaseWarning {
|
|
324
266
|
key: string;
|
|
325
267
|
suggestion: string;
|
|
326
268
|
}
|
|
269
|
+
/**
|
|
270
|
+
* Warning about environment variable keys that have expiration dates.
|
|
271
|
+
* fx:
|
|
272
|
+
*
|
|
273
|
+
* # @expire 2025-12-31
|
|
274
|
+
* API_KEY=
|
|
275
|
+
*
|
|
276
|
+
* This will generate a warning that API_KEY expires on 2025-12-31.
|
|
277
|
+
*/
|
|
327
278
|
export interface ExpireWarning {
|
|
328
279
|
key: string;
|
|
329
280
|
date: string;
|
|
330
281
|
daysLeft: number;
|
|
331
282
|
}
|
|
283
|
+
/**
|
|
284
|
+
* Warning about inconsistent naming of environment variable keys.
|
|
285
|
+
* fx: If you have both SECRET_KEY and SECRETKEY (inconsistent naming)
|
|
286
|
+
*/
|
|
332
287
|
export interface InconsistentNamingWarning {
|
|
333
288
|
key1: string;
|
|
334
289
|
key2: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAGtF,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,QAAQ,CAAC;AAGxD,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,GAAG,SAAS,CAAC;AAE/D;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,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AE,MAAM,EAAE,cAAc,GAAG,aAAa,CAAA;KAAE,GAAG,IAAI,CAAC;CACnE,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,uBAAuB,EAAE,OAAO,CAAC;CAClC"}
|
package/dist/src/config/types.js
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import {} from '
|
|
2
|
-
import {} from '../core/
|
|
3
|
-
|
|
4
|
-
export const ALLOWED_CATEGORIES = [
|
|
5
|
-
'missing',
|
|
6
|
-
'extra',
|
|
7
|
-
'empty',
|
|
8
|
-
'mismatch',
|
|
9
|
-
'duplicate',
|
|
10
|
-
'gitignore',
|
|
11
|
-
];
|
|
1
|
+
import { ALLOWED_CATEGORIES } from './constants.js';
|
|
2
|
+
import {} from '../core/security/secretDetectors.js';
|
|
3
|
+
import {} from '../core/security/exampleSecretDetector.js';
|
|
12
4
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAsB,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAA6B,MAAM,2CAA2C,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ScanResult } from '../config/types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Compares the scan result with the environment variables.
|
|
4
|
+
* This function identifies missing and unused environment variables.
|
|
4
5
|
* @param scanResult - The result of the scan.
|
|
5
6
|
* @param envVariables - The environment variables to compare against.
|
|
6
7
|
* @returns The comparison result.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compareScan.d.ts","sourceRoot":"","sources":["../../../src/core/compareScan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD
|
|
1
|
+
{"version":3,"file":"compareScan.d.ts","sourceRoot":"","sources":["../../../src/core/compareScan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAC/C,UAAU,CAYZ"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Compares the scan result with the environment variables.
|
|
3
|
+
* This function identifies missing and unused environment variables.
|
|
3
4
|
* @param scanResult - The result of the scan.
|
|
4
5
|
* @param envVariables - The environment variables to compare against.
|
|
5
6
|
* @returns The comparison result.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compareScan.js","sourceRoot":"","sources":["../../../src/core/compareScan.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"compareScan.js","sourceRoot":"","sources":["../../../src/core/compareScan.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CACjC,UAAsB,EACtB,YAAgD;IAEhD,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IACtE,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnD,MAAM,OAAO,GAAG,CAAC,GAAG,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAClE,MAAM,MAAM,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAEjE,OAAO;QACL,GAAG,UAAU;QACb,OAAO;QACP,MAAM;KACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computeHealthScore.d.ts","sourceRoot":"","sources":["../../../src/core/computeHealthScore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"computeHealthScore.d.ts","sourceRoot":"","sources":["../../../src/core/computeHealthScore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAwC3D"}
|
|
@@ -26,6 +26,9 @@ export function computeHealthScore(scan) {
|
|
|
26
26
|
score -= (scan.expireWarnings?.length ?? 0) * 5;
|
|
27
27
|
// === 9. Inconsistent naming warnings ===
|
|
28
28
|
score -= (scan.inconsistentNamingWarnings?.length ?? 0) * 3;
|
|
29
|
+
// === 10. Duplicate definitions ===
|
|
30
|
+
score -= (scan.duplicates?.env?.length ?? 0) * 10;
|
|
31
|
+
score -= (scan.duplicates?.example?.length ?? 0) * 10;
|
|
29
32
|
// Never go below 0 or above 100
|
|
30
33
|
return Math.max(0, Math.min(100, score));
|
|
31
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computeHealthScore.js","sourceRoot":"","sources":["../../../src/core/computeHealthScore.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAgB;IACjD,IAAI,KAAK,GAAG,GAAG,CAAC;IAEhB,8BAA8B;IAC9B,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC,IAAI,EAAE,CAAC;IAC7E,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,IAAI,EAAE,CAAC;IAE9E,KAAK,IAAI,WAAW,CAAC,MAAM,GAAG,EAAE,CAAC;IACjC,KAAK,IAAI,UAAU,CAAC,MAAM,GAAG,EAAE,CAAC;IAEhC,2CAA2C;IAC3C,KAAK,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,EAAE,CAAC;IAElC,qCAAqC;IACrC,KAAK,IAAI,CAAC,IAAI,CAAC,iBAAiB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GAAG,EAAE,CAAC;IAEtD,gCAAgC;IAChC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -47,13 +47,6 @@ function areInconsistentlyNamed(key1, key2) {
|
|
|
47
47
|
if (normalized1 === normalized2 && key1 !== key2) {
|
|
48
48
|
return true;
|
|
49
49
|
}
|
|
50
|
-
// Check for common patterns like API_KEY vs APIKEY
|
|
51
|
-
const withoutUnderscores1 = key1.replace(/_/g, '');
|
|
52
|
-
const withoutUnderscores2 = key2.replace(/_/g, '');
|
|
53
|
-
if (withoutUnderscores1.toLowerCase() === withoutUnderscores2.toLowerCase() &&
|
|
54
|
-
key1 !== key2) {
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
50
|
// Check for partial matches that might indicate inconsistency
|
|
58
51
|
// e.g., DATABASE_URL vs DATABASEURL, JWT_SECRET vs JWTSECRET
|
|
59
52
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detectInconsistentNaming.js","sourceRoot":"","sources":["../../../src/core/detectInconsistentNaming.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CACtC,IAAc;IAEd,MAAM,QAAQ,GAAgC,EAAE,CAAC;IACjD,MAAM,cAAc,GAAG,IAAI,GAAG,EAAU,CAAC;IAEzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,KAAK,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACzC,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACrB,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YAErB,kCAAkC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,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACzD,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAEzD,0DAA0D;IAC1D,IAAI,WAAW,KAAK,WAAW,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QACjD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,8DAA8D;IAC9D,6DAA6D;IAC7D,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"determineComparisonFile.d.ts","sourceRoot":"","sources":["../../../src/core/determineComparisonFile.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"determineComparisonFile.d.ts","sourceRoot":"","sources":["../../../src/core/determineComparisonFile.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAI3D,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,gBAAgB,GACrB,cAAc,GAAG,SAAS,CA0B5B"}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import {} from '../config/types.js';
|
|
4
3
|
import { resolveFromCwd } from './helpers/resolveFromCwd.js';
|
|
5
|
-
|
|
6
|
-
'.env',
|
|
7
|
-
'.env.example',
|
|
8
|
-
'.env.local',
|
|
9
|
-
'.env.production',
|
|
10
|
-
];
|
|
4
|
+
import { DEFAULT_ENV_CANDIDATES } from '../config/constants.js';
|
|
11
5
|
/**
|
|
12
6
|
* Determines which file to use for comparison based on provided options
|
|
13
7
|
* @param {ScanUsageOptions} opts - Scan configuration options
|
|
@@ -28,7 +22,7 @@ export function determineComparisonFile(opts) {
|
|
|
28
22
|
}
|
|
29
23
|
}
|
|
30
24
|
// Auto-discovery: look for common env files relative to cwd
|
|
31
|
-
for (const candidate of
|
|
25
|
+
for (const candidate of DEFAULT_ENV_CANDIDATES) {
|
|
32
26
|
const fullPath = path.resolve(opts.cwd, candidate);
|
|
33
27
|
if (fs.existsSync(fullPath)) {
|
|
34
28
|
return { path: fullPath, name: candidate };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"determineComparisonFile.js","sourceRoot":"","sources":["../../../src/core/determineComparisonFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"determineComparisonFile.js","sourceRoot":"","sources":["../../../src/core/determineComparisonFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAOhE;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CACrC,IAAsB;IAEtB,sDAAsD;IAEtD,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;QACrB,MAAM,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QACrD,IAAI,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;YACrB,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;QAC5D,CAAC;IACH,CAAC;IAED,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QACjB,MAAM,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,GA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