dotenv-diff 2.8.0 → 2.8.2
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 +18 -0
- package/dist/bench/Detectsecrets.bench.d.ts +9 -0
- package/dist/bench/Detectsecrets.bench.d.ts.map +1 -0
- package/dist/bench/Detectsecrets.bench.js +95 -0
- package/dist/bench/Detectsecrets.bench.js.map +1 -0
- package/dist/bench/filewalker.bench.d.ts +8 -0
- package/dist/bench/filewalker.bench.d.ts.map +1 -0
- package/dist/bench/filewalker.bench.js +95 -0
- package/dist/bench/filewalker.bench.js.map +1 -0
- package/dist/bench/scanCodebase.bench.d.ts +8 -0
- package/dist/bench/scanCodebase.bench.d.ts.map +1 -0
- package/dist/bench/scanCodebase.bench.js +55 -0
- package/dist/bench/scanCodebase.bench.js.map +1 -0
- package/dist/bench/scanFile.bench.d.ts +9 -0
- package/dist/bench/scanFile.bench.d.ts.map +1 -0
- package/dist/bench/scanFile.bench.js +97 -0
- package/dist/bench/scanFile.bench.js.map +1 -0
- package/dist/bench/scanFile.linecol.bench.d.ts +13 -0
- package/dist/bench/scanFile.linecol.bench.d.ts.map +1 -0
- package/dist/bench/scanFile.linecol.bench.js +105 -0
- package/dist/bench/scanFile.linecol.bench.js.map +1 -0
- package/dist/src/commands/scanUsage.js +2 -3
- package/dist/src/commands/scanUsage.js.map +1 -1
- package/dist/src/config/constants.d.ts +2 -1
- package/dist/src/config/constants.d.ts.map +1 -1
- package/dist/src/config/constants.js +2 -0
- package/dist/src/config/constants.js.map +1 -1
- package/dist/src/core/filterIgnoredKeys.d.ts.map +1 -1
- package/dist/src/core/filterIgnoredKeys.js +1 -0
- package/dist/src/core/filterIgnoredKeys.js.map +1 -1
- package/dist/src/core/helpers/concurrencyLimit.d.ts +8 -0
- package/dist/src/core/helpers/concurrencyLimit.d.ts.map +1 -0
- package/dist/src/core/helpers/concurrencyLimit.js +34 -0
- package/dist/src/core/helpers/concurrencyLimit.js.map +1 -0
- package/dist/src/core/scan/patterns.d.ts.map +1 -1
- package/dist/src/core/scan/patterns.js +2 -0
- package/dist/src/core/scan/patterns.js.map +1 -1
- package/dist/src/core/scan/scanFile.d.ts.map +1 -1
- package/dist/src/core/scan/scanFile.js +41 -8
- package/dist/src/core/scan/scanFile.js.map +1 -1
- package/dist/src/core/security/secretDetectors.d.ts.map +1 -1
- package/dist/src/core/security/secretDetectors.js +3 -5
- package/dist/src/core/security/secretDetectors.js.map +1 -1
- package/dist/src/services/fileWalker.d.ts.map +1 -1
- package/dist/src/services/fileWalker.js +29 -11
- package/dist/src/services/fileWalker.js.map +1 -1
- package/dist/src/services/scanCodebase.d.ts.map +1 -1
- package/dist/src/services/scanCodebase.js +22 -17
- package/dist/src/services/scanCodebase.js.map +1 -1
- package/dist/src/ui/scan/printListAll.d.ts.map +1 -1
- package/dist/src/ui/scan/printListAll.js +2 -1
- package/dist/src/ui/scan/printListAll.js.map +1 -1
- package/dist/src/ui/scan/printMissing.d.ts.map +1 -1
- package/dist/src/ui/scan/printMissing.js +11 -16
- package/dist/src/ui/scan/printMissing.js.map +1 -1
- package/dist/src/ui/scan/scanJsonOutput.js +2 -2
- package/dist/src/ui/scan/scanJsonOutput.js.map +1 -1
- package/dist/test/unit/core/filterIgnoredKeys.test.js +2 -2
- package/dist/test/unit/core/filterIgnoredKeys.test.js.map +1 -1
- package/dist/test/unit/core/helpers/concurrencyLimit.test.d.ts +2 -0
- package/dist/test/unit/core/helpers/concurrencyLimit.test.d.ts.map +1 -0
- package/dist/test/unit/core/helpers/concurrencyLimit.test.js +115 -0
- package/dist/test/unit/core/helpers/concurrencyLimit.test.js.map +1 -0
- package/dist/test/unit/core/security/secretDetectors.test.js +5 -0
- package/dist/test/unit/core/security/secretDetectors.test.js.map +1 -1
- package/dist/test/unit/services/envDiscovery.test.js +10 -0
- package/dist/test/unit/services/envDiscovery.test.js.map +1 -1
- package/dist/test/unit/services/filewalker.test.js +13 -1
- package/dist/test/unit/services/filewalker.test.js.map +1 -1
- package/dist/test/unit/services/printScanResult.test.js +1 -1
- package/dist/test/unit/services/printScanResult.test.js.map +1 -1
- package/dist/test/unit/services/scanCodebase.test.js +19 -0
- package/dist/test/unit/services/scanCodebase.test.js.map +1 -1
- package/dist/test/unit/ui/scan/printListAll.test.js +1 -1
- package/dist/test/unit/ui/scan/printMissing.test.js +3 -4
- package/dist/test/unit/ui/scan/printMissing.test.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.8.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9b315f1: added bench and .history to default exclude patterns
|
|
8
|
+
- 9e78a12: added .env.development to common environment files
|
|
9
|
+
- 9b315f1: added form as an harmless attribute for secret detectors
|
|
10
|
+
- 9b315f1: fixed ui bug for --list-all flag
|
|
11
|
+
- 9b315f1: missing warning will now only warn first issue instead of all usages
|
|
12
|
+
|
|
13
|
+
## 2.8.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 209a7bd: does not include default excludes keys to list-all flag
|
|
18
|
+
- cfa00e5: trimmed context for json output
|
|
19
|
+
- 32bb3d5: added SLOW_MO to default exclude list
|
|
20
|
+
|
|
3
21
|
## 2.8.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Benchmarks for the LONG_LITERAL regex in detectSecretsInSource —
|
|
3
|
+
* verifies that letting the regex engine filter to 32+ chars is faster
|
|
4
|
+
* than matching 24+ and discarding short ones in JS afterwards.
|
|
5
|
+
*
|
|
6
|
+
* Run with: pnpm vitest bench
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=Detectsecrets.bench.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Detectsecrets.bench.d.ts","sourceRoot":"","sources":["../../bench/Detectsecrets.bench.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Benchmarks for the LONG_LITERAL regex in detectSecretsInSource —
|
|
3
|
+
* verifies that letting the regex engine filter to 32+ chars is faster
|
|
4
|
+
* than matching 24+ and discarding short ones in JS afterwards.
|
|
5
|
+
*
|
|
6
|
+
* Run with: pnpm vitest bench
|
|
7
|
+
*/
|
|
8
|
+
import { bench, describe } from 'vitest';
|
|
9
|
+
// --- Synthetic source: realistic mix of literal lengths ---
|
|
10
|
+
// The point of this bench is to show how much work is wasted when the regex
|
|
11
|
+
// captures 24-31 char literals that we always throw away. So we need a source
|
|
12
|
+
// with a representative number of medium-length literals.
|
|
13
|
+
function makeSource() {
|
|
14
|
+
const lines = [];
|
|
15
|
+
// ~200 lines of imports & short declarations (no matches in either regex)
|
|
16
|
+
for (let i = 0; i < 200; i++) {
|
|
17
|
+
lines.push(`import { Component${i} } from './components/c${i}';`);
|
|
18
|
+
}
|
|
19
|
+
// ~300 lines with medium literals (24-31 chars) — captured by OLD, ignored by NEW.
|
|
20
|
+
// These are the "wasted work" cases: URLs, slugs, descriptions, error IDs, etc.
|
|
21
|
+
for (let i = 0; i < 300; i++) {
|
|
22
|
+
const padding = 'abcdefghij'.repeat(2).slice(0, 14 + (i % 8)); // 14-21 chars
|
|
23
|
+
lines.push(`const slug${i} = "user_profile_${padding}";`); // total ~27-34 chars
|
|
24
|
+
}
|
|
25
|
+
// ~300 lines with short literals (<24 chars) — neither regex matches
|
|
26
|
+
for (let i = 0; i < 300; i++) {
|
|
27
|
+
lines.push(`const label${i} = "Click me ${i}";`);
|
|
28
|
+
}
|
|
29
|
+
// ~50 lines with genuinely long literals (32+) — both regexes match
|
|
30
|
+
for (let i = 0; i < 50; i++) {
|
|
31
|
+
const long = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef0123456789'.slice(0, 36 + (i % 8));
|
|
32
|
+
lines.push(`const token${i} = "${long}";`);
|
|
33
|
+
}
|
|
34
|
+
// ~200 lines of boilerplate (no string literals)
|
|
35
|
+
for (let i = 0; i < 200; i++) {
|
|
36
|
+
lines.push(`function helper${i}(x: number) { return x * ${i}; }`);
|
|
37
|
+
}
|
|
38
|
+
return lines.join('\n');
|
|
39
|
+
}
|
|
40
|
+
// --- Old vs new regex ---
|
|
41
|
+
const OLD_LONG_LITERAL = /["'`]{1}([A-Za-z0-9+/_\-]{24,})["'`]{1}/g;
|
|
42
|
+
const NEW_LONG_LITERAL = /["'`]([A-Za-z0-9+/_\-]{32,})["'`]/g;
|
|
43
|
+
// --- Subset of looksHarmlessLiteral, the real downstream cost ---
|
|
44
|
+
// In production the matched literal goes through ~10 regex tests in
|
|
45
|
+
// looksHarmlessLiteral. We approximate that cost here so the bench reflects
|
|
46
|
+
// the actual savings: the OLD path runs these on 24-31 char garbage matches
|
|
47
|
+
// that we always throw away; the NEW path never sees them.
|
|
48
|
+
const HARMLESS_CHECKS = [
|
|
49
|
+
/\S+@\S+/,
|
|
50
|
+
/^data:[a-z]+\/[a-z0-9.+-]+;base64,/i,
|
|
51
|
+
/^\.{0,2}\//,
|
|
52
|
+
/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,
|
|
53
|
+
/^[0-9a-f]{32,128}$/i,
|
|
54
|
+
/^[A-Za-z0-9+/_\-]{16,20}={0,2}$/,
|
|
55
|
+
/^[A-Za-z0-9+/_\-]*(_PUBLIC|_PRIVATE|VITE_|NEXT_PUBLIC|VUE_)[A-Za-z0-9+/_\-]*={0,2}$/,
|
|
56
|
+
/^[MmZzLlHhVvCcSsQqTtAa][0-9eE+.\- ,MmZzLlHhVvCcSsQqTtAa]*$/,
|
|
57
|
+
];
|
|
58
|
+
function looksHarmless(s) {
|
|
59
|
+
return HARMLESS_CHECKS.some((rx) => rx.test(s));
|
|
60
|
+
}
|
|
61
|
+
const source = makeSource();
|
|
62
|
+
const lines = source.split('\n');
|
|
63
|
+
// --- Benchmarks ---
|
|
64
|
+
// Each iteration scans the full synthetic source the way detectSecretsInSource
|
|
65
|
+
// would: per line, run the regex, then the harmless check, then (in the old
|
|
66
|
+
// version) the length filter.
|
|
67
|
+
describe('LONG_LITERAL: {24,} (old) vs {32,} (new)', () => {
|
|
68
|
+
bench('old: regex {24,} + JS-side length filter', () => {
|
|
69
|
+
for (const line of lines) {
|
|
70
|
+
OLD_LONG_LITERAL.lastIndex = 0;
|
|
71
|
+
let m;
|
|
72
|
+
while ((m = OLD_LONG_LITERAL.exec(line)) !== null) {
|
|
73
|
+
const literal = m[1];
|
|
74
|
+
if (looksHarmless(literal))
|
|
75
|
+
continue;
|
|
76
|
+
if (literal.length < 32)
|
|
77
|
+
continue;
|
|
78
|
+
// entropy calc would go here in production
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
bench('new: regex {32,} — engine does the filtering', () => {
|
|
83
|
+
for (const line of lines) {
|
|
84
|
+
NEW_LONG_LITERAL.lastIndex = 0;
|
|
85
|
+
let m;
|
|
86
|
+
while ((m = NEW_LONG_LITERAL.exec(line)) !== null) {
|
|
87
|
+
const literal = m[1];
|
|
88
|
+
if (looksHarmless(literal))
|
|
89
|
+
continue;
|
|
90
|
+
// no length check needed
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
//# sourceMappingURL=Detectsecrets.bench.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Detectsecrets.bench.js","sourceRoot":"","sources":["../../bench/Detectsecrets.bench.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEzC,6DAA6D;AAC7D,4EAA4E;AAC5E,8EAA8E;AAC9E,0D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AAI,OAAO,CAAC,MAAM,GAAG,EAAE;oBAAE,SAAS;gBAClC,2CAA2C;YAC7C,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,KAAK,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACzD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,gBAAgB,CAAC,SAAS,GAAG,CAAC,CAAC;YAC/B,IAAI,CAAyB,CAAC;YAC9B,OAAO,CAAC,CAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;gBAClD,MAAM,OAAO,GAAG,CAAC,CAAC,CAAC,CAAE,CAAC;gBACtB,IAAI,aAAa,CAAC,OAAO,CAAC;oBAAE,SAAS;gBACrC,yBAAyB;YAC3B,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filewalker.bench.d.ts","sourceRoot":"","sources":["../../bench/filewalker.bench.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Benchmarks for findFiles glob matching — verifies that caching compiled
|
|
3
|
+
* regexes (instead of recompiling per call) is faster on realistic workloads.
|
|
4
|
+
*
|
|
5
|
+
* Run with: pnpm vitest bench
|
|
6
|
+
*/
|
|
7
|
+
import { bench, describe } from 'vitest';
|
|
8
|
+
import path from 'path';
|
|
9
|
+
// --- Setup: realistic corpus ---
|
|
10
|
+
// Simulates ~2000 files spread across nested directories with mixed extensions,
|
|
11
|
+
// and a typical set of include + exclude patterns from a scan run.
|
|
12
|
+
const FILE_COUNT = 2000;
|
|
13
|
+
const PATTERNS = [
|
|
14
|
+
// Includes (default extension patterns)
|
|
15
|
+
'**/*.ts',
|
|
16
|
+
'**/*.tsx',
|
|
17
|
+
'**/*.js',
|
|
18
|
+
'**/*.jsx',
|
|
19
|
+
'**/*.mjs',
|
|
20
|
+
'**/*.cjs',
|
|
21
|
+
'**/*.svelte',
|
|
22
|
+
'**/*.vue',
|
|
23
|
+
// Excludes (default patterns + common user excludes)
|
|
24
|
+
'node_modules',
|
|
25
|
+
'dist',
|
|
26
|
+
'build',
|
|
27
|
+
'.git',
|
|
28
|
+
'coverage',
|
|
29
|
+
'*.test.ts',
|
|
30
|
+
'*.spec.ts',
|
|
31
|
+
'__tests__/**',
|
|
32
|
+
];
|
|
33
|
+
const filePaths = Array.from({ length: FILE_COUNT }, (_, i) => {
|
|
34
|
+
const depth = (i % 5) + 1;
|
|
35
|
+
const dirs = Array.from({ length: depth }, (_, d) => `dir${d}`).join('/');
|
|
36
|
+
const ext = ['ts', 'tsx', 'js', 'json', 'md'][i % 5];
|
|
37
|
+
return `${dirs}/file-${i}.${ext}`;
|
|
38
|
+
});
|
|
39
|
+
// --- Old implementation (compiles RegExp on every call) ---
|
|
40
|
+
function matchesGlobPatternUncached(filePath, pattern) {
|
|
41
|
+
const hasSep = /[\/\\]/.test(pattern);
|
|
42
|
+
const subject = hasSep ? filePath : path.basename(filePath);
|
|
43
|
+
const normalized = subject.replace(/\\/g, '/');
|
|
44
|
+
const normalizedPattern = pattern.replace(/\\/g, '/');
|
|
45
|
+
const regexPattern = normalizedPattern
|
|
46
|
+
.replace(/[.+^${}()|[\]\\]/g, '\\$&')
|
|
47
|
+
.replace(/\*\*/g, '___DOUBLESTAR___')
|
|
48
|
+
.replace(/\*/g, '[^/]*')
|
|
49
|
+
.replace(/___DOUBLESTAR___/g, '.*')
|
|
50
|
+
.replace(/\?/g, '[^/]');
|
|
51
|
+
const re = new RegExp(`^${regexPattern}$`);
|
|
52
|
+
return re.test(normalized);
|
|
53
|
+
}
|
|
54
|
+
// --- New implementation (caches compiled regex per pattern) ---
|
|
55
|
+
const globRegexCache = new Map();
|
|
56
|
+
function compileGlob(pattern) {
|
|
57
|
+
const cached = globRegexCache.get(pattern);
|
|
58
|
+
if (cached)
|
|
59
|
+
return cached;
|
|
60
|
+
const normalized = pattern.replace(/\\/g, '/');
|
|
61
|
+
const regexBody = normalized
|
|
62
|
+
.replace(/[.+^${}()|[\]\\]/g, '\\$&')
|
|
63
|
+
.replace(/\*\*/g, '___DS___')
|
|
64
|
+
.replace(/\*/g, '[^/]*')
|
|
65
|
+
.replace(/___DS___/g, '.*')
|
|
66
|
+
.replace(/\?/g, '[^/]');
|
|
67
|
+
const re = new RegExp(`^${regexBody}$`);
|
|
68
|
+
globRegexCache.set(pattern, re);
|
|
69
|
+
return re;
|
|
70
|
+
}
|
|
71
|
+
function matchesGlobPatternCached(filePath, pattern) {
|
|
72
|
+
const hasSep = /[\/\\]/.test(pattern);
|
|
73
|
+
const subject = hasSep ? filePath : path.basename(filePath);
|
|
74
|
+
return compileGlob(pattern).test(subject.replace(/\\/g, '/'));
|
|
75
|
+
}
|
|
76
|
+
// --- Benchmarks ---
|
|
77
|
+
// Each iteration runs every file path against every pattern, which mirrors
|
|
78
|
+
// how shouldInclude / shouldExclude are called during a directory walk.
|
|
79
|
+
describe('matchesGlobPattern: uncached vs cached', () => {
|
|
80
|
+
bench('uncached (old) — compiles RegExp per call', () => {
|
|
81
|
+
for (const filePath of filePaths) {
|
|
82
|
+
for (const pattern of PATTERNS) {
|
|
83
|
+
matchesGlobPatternUncached(filePath, pattern);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
bench('cached (new) — compiles each RegExp once', () => {
|
|
88
|
+
for (const filePath of filePaths) {
|
|
89
|
+
for (const pattern of PATTERNS) {
|
|
90
|
+
matchesGlobPatternCached(filePath, pattern);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
//# sourceMappingURL=filewalker.bench.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filewalker.bench.js","sourceRoot":"","sources":["../../bench/filewalker.bench.ts"],"names":[],"mappings":"AAA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Codebase — verifies that parallel file processing
|
|
3
|
+
* is faster than sequential I/O.
|
|
4
|
+
*
|
|
5
|
+
* Run with: pnpm vitest bench
|
|
6
|
+
*/
|
|
7
|
+
import { bench, describe, beforeAll, afterAll } from 'vitest';
|
|
8
|
+
import fs from 'fs/promises';
|
|
9
|
+
import path from 'path';
|
|
10
|
+
import os from 'os';
|
|
11
|
+
import { createConcurrencyLimit } from '../src/core/helpers/concurrencyLimit.js';
|
|
12
|
+
import { isLikelyMinified } from '../src/core/helpers/isLikelyMinified.js';
|
|
13
|
+
// --- Setup: generate temp files to scan ---
|
|
14
|
+
const FILE_COUNT = 200;
|
|
15
|
+
let tmpDir;
|
|
16
|
+
let files;
|
|
17
|
+
beforeAll(async () => {
|
|
18
|
+
tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), 'dotenv-diff-bench-'));
|
|
19
|
+
files = await Promise.all(Array.from({ length: FILE_COUNT }, async (_, i) => {
|
|
20
|
+
const filePath = path.join(tmpDir, `file-${i}.ts`);
|
|
21
|
+
await fs.writeFile(filePath, `const x = process.env.API_KEY_${i};\nconst y = process.env.SECRET_${i};\n`);
|
|
22
|
+
return filePath;
|
|
23
|
+
}));
|
|
24
|
+
});
|
|
25
|
+
afterAll(async () => {
|
|
26
|
+
await fs.rm(tmpDir, { recursive: true, force: true });
|
|
27
|
+
});
|
|
28
|
+
// --- Helpers (copied logic, no side effects) ---
|
|
29
|
+
async function safeReadFile(filePath) {
|
|
30
|
+
try {
|
|
31
|
+
return await fs.readFile(filePath, 'utf-8');
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
async function processFile(filePath) {
|
|
38
|
+
const content = await safeReadFile(filePath);
|
|
39
|
+
if (!content || isLikelyMinified(content))
|
|
40
|
+
return null;
|
|
41
|
+
return content;
|
|
42
|
+
}
|
|
43
|
+
// --- Benchmarks ---
|
|
44
|
+
describe('scanCodebase: sequential vs parallel', () => {
|
|
45
|
+
bench('sequential (old)', async () => {
|
|
46
|
+
for (const filePath of files) {
|
|
47
|
+
await processFile(filePath);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
bench('parallel with concurrency limit (new)', async () => {
|
|
51
|
+
const limit = createConcurrencyLimit(50);
|
|
52
|
+
await Promise.all(files.map((f) => limit(() => processFile(f))));
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=scanCodebase.bench.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scanCodebase.bench.js","sourceRoot":"","sources":["../../bench/scanCodebase.bench.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAE3E,6CAA6C;AAC7C,MAAM,UAAU,GAAG,GAAG,CAAC;AACvB,IAAI,MAAc,CAAC;AACnB,IAAI,KAAe,CAAC;AAEpB,SAAS,CAAC,KAAK,IAAI,EAAE;IACnB,MAAM,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,oBAAoB,CAAC,CAAC,CAAC;IACxE,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CACvB,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE;QAChD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CA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AAK,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Benchmarks for scanFile pattern matching — verifies that reusing the
|
|
3
|
+
* precompiled pattern regexes is faster than recompiling them via
|
|
4
|
+
* `new RegExp(source, flags)` for every file.
|
|
5
|
+
*
|
|
6
|
+
* Run with: pnpm vitest bench
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=scanFile.bench.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scanFile.bench.d.ts","sourceRoot":"","sources":["../../bench/scanFile.bench.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Benchmarks for scanFile pattern matching — verifies that reusing the
|
|
3
|
+
* precompiled pattern regexes is faster than recompiling them via
|
|
4
|
+
* `new RegExp(source, flags)` for every file.
|
|
5
|
+
*
|
|
6
|
+
* Run with: pnpm vitest bench
|
|
7
|
+
*/
|
|
8
|
+
import { bench, describe } from 'vitest';
|
|
9
|
+
// --- Representative env-detection patterns ---
|
|
10
|
+
// Approximates ENV_PATTERNS: a mix of patterns, most of which do NOT match a
|
|
11
|
+
// given file. The recompile cost is paid per pattern per file regardless of
|
|
12
|
+
// whether the pattern matches anything, so the non-matching ones matter too.
|
|
13
|
+
const PATTERN_SOURCES = [
|
|
14
|
+
{ source: 'process\\.env\\.([A-Za-z_$][\\w$]*)', flags: 'g' },
|
|
15
|
+
{ source: 'process\\.env\\[\\s*[\'"`]([^\'"`]+)[\'"`]\\s*\\]', flags: 'g' },
|
|
16
|
+
{ source: 'import\\.meta\\.env\\.([A-Za-z_$][\\w$]*)', flags: 'g' },
|
|
17
|
+
{
|
|
18
|
+
source: 'import\\.meta\\.env\\[\\s*[\'"`]([^\'"`]+)[\'"`]\\s*\\]',
|
|
19
|
+
flags: 'g',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
source: 'Deno\\.env\\.get\\(\\s*[\'"`]([^\'"`]+)[\'"`]\\s*\\)',
|
|
23
|
+
flags: 'g',
|
|
24
|
+
},
|
|
25
|
+
{ source: 'Bun\\.env\\.([A-Za-z_$][\\w$]*)', flags: 'g' },
|
|
26
|
+
{ source: 'getEnv\\(\\s*[\'"`]([^\'"`]+)[\'"`]\\s*\\)', flags: 'g' },
|
|
27
|
+
{
|
|
28
|
+
source: 'import\\s*\\{([^}]*)\\}\\s*from\\s*[\'"]\\$env/static/private[\'"]',
|
|
29
|
+
flags: 'g',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
source: 'import\\s*\\{([^}]*)\\}\\s*from\\s*[\'"]\\$env/static/public[\'"]',
|
|
33
|
+
flags: 'g',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
source: 'import\\s*\\{([^}]*)\\}\\s*from\\s*[\'"]\\$env/dynamic/private[\'"]',
|
|
37
|
+
flags: 'g',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
source: 'import\\s*\\{([^}]*)\\}\\s*from\\s*[\'"]\\$env/dynamic/public[\'"]',
|
|
41
|
+
flags: 'g',
|
|
42
|
+
},
|
|
43
|
+
{ source: 'env\\.([A-Z_][A-Z0-9_]*)', flags: 'g' },
|
|
44
|
+
{ source: 'useRuntimeConfig\\(\\)\\.([A-Za-z_$][\\w$]*)', flags: 'g' },
|
|
45
|
+
{ source: 'config\\(\\s*[\'"`]([^\'"`]+)[\'"`]\\s*\\)', flags: 'g' },
|
|
46
|
+
];
|
|
47
|
+
// The "new" approach reuses these precompiled regexes across all files.
|
|
48
|
+
const COMPILED = PATTERN_SOURCES.map((p) => new RegExp(p.source, p.flags));
|
|
49
|
+
// --- Synthetic files: realistic mix of env usage and plain code ---
|
|
50
|
+
function makeFile(i) {
|
|
51
|
+
const lines = [];
|
|
52
|
+
for (let j = 0; j < 120; j++) {
|
|
53
|
+
if (j % 9 === 0) {
|
|
54
|
+
lines.push(`const v${j} = process.env.API_KEY_${i}_${j};`);
|
|
55
|
+
}
|
|
56
|
+
else if (j % 13 === 0) {
|
|
57
|
+
lines.push(`const w${j} = import.meta.env.PUBLIC_VAR_${j};`);
|
|
58
|
+
}
|
|
59
|
+
else if (j % 17 === 0) {
|
|
60
|
+
lines.push(`const c${j} = getEnv("DATABASE_URL_${j}");`);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
lines.push(`function fn${i}_${j}(x: number) { return x + ${j}; }`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return lines.join('\n');
|
|
67
|
+
}
|
|
68
|
+
const FILE_COUNT = 150;
|
|
69
|
+
const files = Array.from({ length: FILE_COUNT }, (_, i) => makeFile(i));
|
|
70
|
+
// --- Benchmarks ---
|
|
71
|
+
// Each iteration scans every file with every pattern, mirroring how scanFile
|
|
72
|
+
// is called once per file across a codebase scan.
|
|
73
|
+
describe('scanFile pattern matching: new RegExp vs reuse', () => {
|
|
74
|
+
bench('old: new RegExp per pattern per file', () => {
|
|
75
|
+
for (const content of files) {
|
|
76
|
+
for (const p of PATTERN_SOURCES) {
|
|
77
|
+
const regex = new RegExp(p.source, p.flags);
|
|
78
|
+
let m;
|
|
79
|
+
while ((m = regex.exec(content)) !== null) {
|
|
80
|
+
void m[1];
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
bench('new: reuse precompiled regex, reset lastIndex', () => {
|
|
86
|
+
for (const content of files) {
|
|
87
|
+
for (const regex of COMPILED) {
|
|
88
|
+
regex.lastIndex = 0;
|
|
89
|
+
let m;
|
|
90
|
+
while ((m = regex.exec(content)) !== null) {
|
|
91
|
+
void m[1];
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
//# sourceMappingURL=scanFile.bench.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scanFile.bench.js","sourceRoot":"","sources":["../../bench/scanFile.bench.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEzC,gDAAgD;AAChD,6EAA6E;AAC7E,4EAA4E;AAC5E,6EAA6E;AAC7E,MAAM,eAAe,GAAwC;IAC3D,EAAE,MAAM,EAAE,qCAAqC,EAAE,KAAK,EAAE,GAAG,EAAE;IAC7D,EAAE,MAAM,EAAE,mDAAmD,EAAE,KAAK,EAAE,GAAG,EAAE;IAC3E,EAAE,MAAM,EAAE,2CAA2C,EAAE,KAAK,EAAE,GAAG,EAAE;IACnE;QACE,MAAM,EAAE,yDAAyD;QACjE,KAAK,EAAE,GAAG;KACX;IACD;QACE,MAAM,EAAE,sDAAsD;QAC9D,KAAK,EAAE,GAAG;KACX;IACD,EAAE,MAAM,EAAE,iCAAiC,EAAE,KAAK,EAAE,GAAG,EAAE;IACzD,EAAE,MAAM,EAAE,4CAA4C,EAAE,KAAK,EAAE,GAAG,EAAE;IACpE;QACE,MAAM,EACJ,oEAAoE;QACtE,KAAK,EAAE,GAAG;KACX;IACD;QACE,MAAM,EAAE,mEAAmE;QAC3E,KAAK,EAAE,GAAG;KACX;IACD;QACE,MAAM,EACJ,qEAAqE;QACvE,KAAK,EAAE,GAAG;KACX;IACD;QACE,MAAM,EACJ,oEAAoE;QACtE,KAAK,EAAE,GAAG;KACX;IACD,EAAE,MAAM,EAAE,0BAA0B,EAAE,KAAK,EAAE,GAAG,EAAE;IAClD,EAAE,MAAM,EAAE,8CAA8C,EAAE,KAAK,EAAE,GAAG,EAAE;IACtE,EAAE,MAAM,EAAE,4CAA4C,EAAE,KAAK,EAAE,GAAG,EAAE;CACrE,CAAC;AAEF,wEAAwE;AACxE,MAAM,QAA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AC9D,KAAK,CAAC,sCAAsC,EAAE,GAAG,EAAE;QACjD,KAAK,MAAM,OAAO,IAAI,KAAK,EAAE,CAAC;YAC5B,KAAK,MAAM,CAAC,IAAI,eAAe,EAAE,CAAC;gBAChC,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;gBAC5C,IAAI,CAAyB,CAAC;gBAC9B,OAAO,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;oBAC1C,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBACZ,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,KAAK,CAAC,+CAA+C,EAAE,GAAG,EAAE;QAC1D,KAAK,MAAM,OAAO,IAAI,KAAK,EAAE,CAAC;YAC5B,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE,CAAC;gBAC7B,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC;gBACpB,IAAI,CAAyB,CAAC;gBAC9B,OAAO,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;oBAC1C,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBACZ,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Benchmarks for scanFile's line/column lookup — verifies that precomputing
|
|
3
|
+
* line offsets once and binary-searching beats slicing the file from the
|
|
4
|
+
* start for every match (which is O(matches × file size)).
|
|
5
|
+
*
|
|
6
|
+
* Both benchmarks accumulate their results into `sink`, which is read in
|
|
7
|
+
* afterAll. This prevents the optimizer from eliminating the lookups as dead
|
|
8
|
+
* code, which would otherwise make the binary-search numbers untrustworthy.
|
|
9
|
+
*
|
|
10
|
+
* Run with: pnpm vitest bench
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=scanFile.linecol.bench.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scanFile.linecol.bench.d.ts","sourceRoot":"","sources":["../../bench/scanFile.linecol.bench.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Benchmarks for scanFile's line/column lookup — verifies that precomputing
|
|
3
|
+
* line offsets once and binary-searching beats slicing the file from the
|
|
4
|
+
* start for every match (which is O(matches × file size)).
|
|
5
|
+
*
|
|
6
|
+
* Both benchmarks accumulate their results into `sink`, which is read in
|
|
7
|
+
* afterAll. This prevents the optimizer from eliminating the lookups as dead
|
|
8
|
+
* code, which would otherwise make the binary-search numbers untrustworthy.
|
|
9
|
+
*
|
|
10
|
+
* Run with: pnpm vitest bench
|
|
11
|
+
*/
|
|
12
|
+
import { bench, describe, afterAll } from 'vitest';
|
|
13
|
+
// --- Build one large synthetic file ---
|
|
14
|
+
// The quadratic behavior is within a single file: each match in the OLD path
|
|
15
|
+
// copies everything from the file start up to the match. A big file with many
|
|
16
|
+
// matches spread throughout is the case that hurts.
|
|
17
|
+
const LINE_COUNT = 10_000;
|
|
18
|
+
const sourceLines = [];
|
|
19
|
+
for (let i = 0; i < LINE_COUNT; i++) {
|
|
20
|
+
if (i % 20 === 0) {
|
|
21
|
+
sourceLines.push(` const value${i} = process.env.API_KEY_${i};`);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
sourceLines.push(` // line ${i}: ordinary code doing some work with local values`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const content = sourceLines.join('\n');
|
|
28
|
+
// Collect the absolute offsets of every "process.env." occurrence — these are
|
|
29
|
+
// the match indices scanFile would feed into the line/column lookup.
|
|
30
|
+
const MATCH_TOKEN = 'process.env.';
|
|
31
|
+
const matchIndices = [];
|
|
32
|
+
for (let idx = content.indexOf(MATCH_TOKEN); idx !== -1; idx = content.indexOf(MATCH_TOKEN, idx + MATCH_TOKEN.length)) {
|
|
33
|
+
matchIndices.push(idx);
|
|
34
|
+
}
|
|
35
|
+
// --- OLD: substring + split per match ---
|
|
36
|
+
function oldLineCol(text, matchIndex) {
|
|
37
|
+
const beforeMatch = text.substring(0, matchIndex);
|
|
38
|
+
const line = beforeMatch.split('\n').length;
|
|
39
|
+
const lastNewlineIndex = beforeMatch.lastIndexOf('\n');
|
|
40
|
+
const column = lastNewlineIndex === -1 ? matchIndex + 1 : matchIndex - lastNewlineIndex;
|
|
41
|
+
return { line, column };
|
|
42
|
+
}
|
|
43
|
+
// --- NEW: precompute line offsets once, then binary search per match ---
|
|
44
|
+
function buildLineStarts(lines) {
|
|
45
|
+
const lineStarts = new Array(lines.length);
|
|
46
|
+
let offset = 0;
|
|
47
|
+
for (let i = 0; i < lines.length; i++) {
|
|
48
|
+
lineStarts[i] = offset;
|
|
49
|
+
offset += lines[i].length + 1; // +1 for the stripped '\n'
|
|
50
|
+
}
|
|
51
|
+
return lineStarts;
|
|
52
|
+
}
|
|
53
|
+
function newLineCol(lineStarts, offset) {
|
|
54
|
+
let lo = 0;
|
|
55
|
+
let hi = lineStarts.length - 1;
|
|
56
|
+
while (lo < hi) {
|
|
57
|
+
const mid = (lo + hi + 1) >> 1;
|
|
58
|
+
if (lineStarts[mid] <= offset)
|
|
59
|
+
lo = mid;
|
|
60
|
+
else
|
|
61
|
+
hi = mid - 1;
|
|
62
|
+
}
|
|
63
|
+
return { line: lo + 1, column: offset - lineStarts[lo] + 1 };
|
|
64
|
+
}
|
|
65
|
+
// --- Correctness check: both must agree before the numbers mean anything ---
|
|
66
|
+
{
|
|
67
|
+
const lineStarts = buildLineStarts(sourceLines);
|
|
68
|
+
for (const idx of matchIndices) {
|
|
69
|
+
const a = oldLineCol(content, idx);
|
|
70
|
+
const b = newLineCol(lineStarts, idx);
|
|
71
|
+
if (a.line !== b.line || a.column !== b.column) {
|
|
72
|
+
throw new Error(`line/col mismatch at offset ${idx}: ` +
|
|
73
|
+
`old=${JSON.stringify(a)} new=${JSON.stringify(b)}`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
// Accumulator the optimizer cannot prove is unused — see afterAll below.
|
|
78
|
+
let sink = 0;
|
|
79
|
+
afterAll(() => {
|
|
80
|
+
// Reading sink forces every `sink +=` in the benchmarks to be "live",
|
|
81
|
+
// so the lookup work cannot be eliminated as dead code.
|
|
82
|
+
if (Number.isNaN(sink)) {
|
|
83
|
+
throw new Error('unreachable — sink should never be NaN');
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
// --- Benchmarks ---
|
|
87
|
+
// Each iteration = one scanFile-equivalent pass over a single large file:
|
|
88
|
+
// resolve line/column for every match in it, consuming each result.
|
|
89
|
+
describe('scanFile line/column lookup: substring vs binary search', () => {
|
|
90
|
+
bench('old: substring(0, idx).split per match', () => {
|
|
91
|
+
for (const idx of matchIndices) {
|
|
92
|
+
const r = oldLineCol(content, idx);
|
|
93
|
+
sink += r.line + r.column;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
bench('new: precompute line offsets + binary search', () => {
|
|
97
|
+
// buildLineStarts runs once per file, exactly as in scanFile.
|
|
98
|
+
const lineStarts = buildLineStarts(sourceLines);
|
|
99
|
+
for (const idx of matchIndices) {
|
|
100
|
+
const r = newLineCol(lineStarts, idx);
|
|
101
|
+
sink += r.line + r.column;
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
//# sourceMappingURL=scanFile.linecol.bench.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scanFile.linecol.bench.js","sourceRoot":"","sources":["../../bench/scanFile.linecol.bench.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,KAAK,EAAE,QAAQ,EA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YAAY,EAAE,CAAC;YAC/B,MAAM,CAAC,GAAG,UAAU,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;YACtC,IAAI,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC;QAC5B,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -178,7 +178,7 @@ function skipCommentedUsages(usages) {
|
|
|
178
178
|
/**
|
|
179
179
|
* Recalculates statistics for a scan result after filtering usages.
|
|
180
180
|
* @param scanResult The current scan result
|
|
181
|
-
* @returns
|
|
181
|
+
* @returns void (modifies scanResult in place)
|
|
182
182
|
*/
|
|
183
183
|
function calculateStats(scanResult) {
|
|
184
184
|
const uniqueVariables = new Set(scanResult.used.map((u) => u.variable)).size;
|
|
@@ -197,9 +197,8 @@ function calculateStats(scanResult) {
|
|
|
197
197
|
filesScanned: scanResult.stats.filesScanned,
|
|
198
198
|
totalUsages: scanResult.used.length,
|
|
199
199
|
uniqueVariables,
|
|
200
|
-
warningsCount
|
|
200
|
+
warningsCount,
|
|
201
201
|
duration: scanResult.stats.duration,
|
|
202
202
|
};
|
|
203
|
-
return scanResult;
|
|
204
203
|
}
|
|
205
204
|
//# sourceMappingURL=scanUsage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanUsage.js","sourceRoot":"","sources":["../../../src/commands/scanUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAQ3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE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