@optiprune/cli 1.2.9 → 1.2.15
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/config.md +139 -105
- package/dist/cli.js +47 -56
- package/dist/cli.js.map +1 -1
- package/package.json +2 -9
package/config.md
CHANGED
|
@@ -1,108 +1,142 @@
|
|
|
1
|
-
# OptiPrune Configuration
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// --- Output ---
|
|
95
|
-
|
|
96
|
-
// Detailed log output for debugging
|
|
97
|
-
verbose: false,
|
|
98
|
-
|
|
99
|
-
// Output results in JSON format
|
|
100
|
-
json: false
|
|
101
|
-
});
|
|
1
|
+
# OptiPrune Configuration Guide (`config.md`)
|
|
2
|
+
|
|
3
|
+
OptiPrune uses a structured configuration file to define entry points, rule behavior, ignore patterns, and core analysis engine mechanics.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
Create an `optiprune.json` or `optiprune.jsonc` file in the root directory of your project:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
{
|
|
13
|
+
"$schema": "https://raw.githubusercontent.com/optiprune/core/refs/heads/main/schema.json",
|
|
14
|
+
"rootDir": "src",
|
|
15
|
+
"entry": ["src/index.ts", "src/cli.ts"],
|
|
16
|
+
"ignore": ["**/*.test.ts", "**/dist/**"],
|
|
17
|
+
"externalContracts": ["PluginAdapter", "AnalyzerPlugin"],
|
|
18
|
+
"failOn": "high",
|
|
19
|
+
"rules": {
|
|
20
|
+
"unused-variable": "warning",
|
|
21
|
+
"dead-code": "error"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## How OptiPrune Loads Configuration
|
|
29
|
+
|
|
30
|
+
When OptiPrune initializes, it checks the workspace root in the following order of precedence:
|
|
31
|
+
|
|
32
|
+
optiprune.json (Highest Priority )
|
|
33
|
+
|
|
34
|
+
optiprune.jsonc (Allows comments //, /* */, and trailing commas)
|
|
35
|
+
|
|
36
|
+
package.json (Falls back to reading an "optiprune" key)
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Configuration Reference
|
|
41
|
+
|
|
42
|
+
**1. File & Workspace Discovery**rootDir (string, default: ".")
|
|
43
|
+
|
|
44
|
+
Specifies the base directory for source files relative to the project workspace root.
|
|
45
|
+
|
|
46
|
+
entry (string[], default: [])
|
|
47
|
+
|
|
48
|
+
Defines root entry files. Any code reachable from these files (and their dependency trees) is marked as used and protected from unused-code reports.
|
|
49
|
+
|
|
50
|
+
extensions (string[], default: [".ts", ".tsx", ".js", ".jsx"])
|
|
51
|
+
|
|
52
|
+
File extensions that OptiPrune will parse and analyze.
|
|
53
|
+
|
|
54
|
+
ignore (string[], default: [])
|
|
55
|
+
|
|
56
|
+
Glob patterns or directory paths to skip entirely during analysis (e.g., test fixtures, output directories).
|
|
57
|
+
|
|
58
|
+
**2. Export & Contract Safeguards**externalContracts (string[], default: [])
|
|
59
|
+
|
|
60
|
+
List of public API symbol or interface names. Marks these exports as globally used across all execution layers, preventing OptiPrune from flagging them as dead code when building public libraries or plugins.
|
|
61
|
+
|
|
62
|
+
reportUnusedExports (boolean, default: true)
|
|
63
|
+
|
|
64
|
+
When set to true, OptiPrune reports exported functions, types, or variables that have no internal or external references.
|
|
65
|
+
|
|
66
|
+
includeConventionalEntries (boolean, default: true)
|
|
67
|
+
|
|
68
|
+
Automatically treats framework conventions (e.g., index.ts, main.ts, App.tsx) as entry points without needing manual listing in entry.
|
|
69
|
+
|
|
70
|
+
**3. CLI & Execution Controls**failOn ("high" | "medium" | "low" | "info" | "none", default: "high")
|
|
71
|
+
|
|
72
|
+
Determines the minimum issue severity level required to exit the process with a non-zero exit code in CI/CD pipelines.
|
|
73
|
+
|
|
74
|
+
verbose (boolean, default: false)
|
|
75
|
+
|
|
76
|
+
Prints step-by-step diagnostic information to stdout.
|
|
77
|
+
|
|
78
|
+
json (boolean, default: false)
|
|
79
|
+
|
|
80
|
+
Formats output directly as raw JSON for external tool ingestion.
|
|
81
|
+
|
|
82
|
+
**4. Automated Fixes (fix)**
|
|
83
|
+
|
|
84
|
+
Configures the automatic removal of dead code. Can be a boolean or an object for granular control.
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
{
|
|
88
|
+
"fix": {
|
|
89
|
+
"confidence": "medium+",
|
|
90
|
+
"rules": ["exports", "files", "dependencies"],
|
|
91
|
+
"dryRun": false
|
|
92
|
+
}
|
|
93
|
+
}
|
|
102
94
|
```
|
|
103
95
|
|
|
104
|
-
|
|
96
|
+
- **confidence**: Minimum confidence to apply a fix (`high`, `medium+`, `low+`, `all`).
|
|
97
|
+
|
|
98
|
+
- **rules**: Specific rules or categories (`exports`, `files`, `dependencies`) to fix.
|
|
99
|
+
|
|
100
|
+
- **dryRun**: If true, logs what would be fixed without modifying files.
|
|
101
|
+
|
|
102
|
+
**5. Rule Overrides (rules)**Fine-tune or disable specific inspection rules:
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
"rules": {
|
|
106
|
+
"rule-name": "error" | "warning" | "off"
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
- `"error"`: Causes finding to trigger build errors or exit failures.
|
|
111
|
+
|
|
112
|
+
- `"warning"`: Emits warnings without halting execution (unless configured by failOn).
|
|
113
|
+
|
|
114
|
+
- `"off"`: Disables rule checking entirely.
|
|
115
|
+
|
|
116
|
+
**6. Engine & Solver Tuning (layers)**Configure isolated runtimes, SMT solvers, and symbolic execution passes:
|
|
117
|
+
|
|
118
|
+
| Option | Type | Default | Purpose |
|
|
119
|
+
| --- | --- | --- | --- |
|
|
120
|
+
| smtTimeoutMs | number | 10000 | SMT solver execution cap (in milliseconds) per proof path. |
|
|
121
|
+
| isolateMemoryLimitMb | number | 128 | Memory ceiling (in MB) allocated to V8 worker isolates. |
|
|
122
|
+
| enableConcolicProof | boolean | false | Enables concolic analysis to prove dead execution paths. |
|
|
123
|
+
| skip3 | boolean | false | Bypasses Analysis Layer 3. |
|
|
124
|
+
| skip4 | boolean | false | Bypasses Analysis Layer 4. |
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Alternative: package.json Configuration
|
|
129
|
+
|
|
130
|
+
If you do not want an additional configuration file in your root folder, add an "optiprune" field inside package.json:
|
|
105
131
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
132
|
+
```json
|
|
133
|
+
{
|
|
134
|
+
"name": "my-library",
|
|
135
|
+
"version": "1.0.0",
|
|
136
|
+
"optiprune": {
|
|
137
|
+
"entry": ["src/index.ts"],
|
|
138
|
+
"externalContracts": ["MyPublicApi"],
|
|
139
|
+
"failOn": "medium"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
package/dist/cli.js
CHANGED
|
@@ -27,43 +27,6 @@ function getCoreVersion(rootDir) {
|
|
|
27
27
|
catch (e) { }
|
|
28
28
|
return "2.1.5";
|
|
29
29
|
}
|
|
30
|
-
/**
|
|
31
|
-
* Custom Terminal Formatter that includes the new dependency findings.
|
|
32
|
-
*/
|
|
33
|
-
function formatTerminalExtended(report) {
|
|
34
|
-
const output = formatTerminal(report);
|
|
35
|
-
const unusedDevDeps = report.findings.filter((f) => f.rule === "unused-dev-dependency");
|
|
36
|
-
const missingDeps = report.findings.filter((f) => f.rule === "missing-dependency");
|
|
37
|
-
if (unusedDevDeps.length === 0 && missingDeps.length === 0) {
|
|
38
|
-
return output;
|
|
39
|
-
}
|
|
40
|
-
const lines = [];
|
|
41
|
-
lines.push("");
|
|
42
|
-
lines.push(bold("── Dependency Audit ─────────────────────────────────────────────"));
|
|
43
|
-
if (unusedDevDeps.length > 0) {
|
|
44
|
-
lines.push("");
|
|
45
|
-
lines.push(bold(` Unused devDependencies (${unusedDevDeps.length})`));
|
|
46
|
-
lines.push(dim(" These packages are listed in devDependencies but never imported in source code."));
|
|
47
|
-
lines.push("");
|
|
48
|
-
for (const f of unusedDevDeps) {
|
|
49
|
-
const evidence = f.evidence;
|
|
50
|
-
const pkg = evidence?.package || "unknown package";
|
|
51
|
-
lines.push(` ${yellow("▲")} ${bold(pkg)}${dim(" (package.json)")}`);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
if (missingDeps.length > 0) {
|
|
55
|
-
lines.push("");
|
|
56
|
-
lines.push(bold(` Used in code but missing from package.json (${missingDeps.length})`));
|
|
57
|
-
lines.push(dim(" These packages are imported in source files but not declared as any dependency."));
|
|
58
|
-
lines.push("");
|
|
59
|
-
for (const f of missingDeps) {
|
|
60
|
-
const evidence = f.evidence;
|
|
61
|
-
const pkg = evidence?.package || "unknown package";
|
|
62
|
-
lines.push(` ${red("✖")} ${bold(pkg)}`);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return output + "\n" + lines.join("\n");
|
|
66
|
-
}
|
|
67
30
|
program
|
|
68
31
|
.name("optiprune")
|
|
69
32
|
.description("Finds dead code in TypeScript/JavaScript projects.")
|
|
@@ -84,28 +47,56 @@ program
|
|
|
84
47
|
.option("--skip-4", "Skip Layer 4 (Concolic Execution Proofs)")
|
|
85
48
|
.option("-v, --verbose", "Show verbose output and internal graph state")
|
|
86
49
|
.option("--fix", "Automatically remove unused exports, dependencies, and unreachable files")
|
|
50
|
+
.option("--fix-confidence <level>", "Minimum confidence level to fix (high, medium+, low+, all)", "high")
|
|
51
|
+
.option("--fix-rules <rules...>", "Specific rules to fix (exports, files, dependencies, or specific rule names)")
|
|
52
|
+
.option("--dry-run", "Log what would be fixed without changing files")
|
|
87
53
|
.option("--cache-from <path>", "Path to a JSON file to import cache from before analysis")
|
|
88
54
|
.option("--cache-to <path>", "Path to export the resulting cache to after analysis")
|
|
89
|
-
.action(async (options) => {
|
|
55
|
+
.action(async (options, command) => {
|
|
90
56
|
try {
|
|
91
|
-
|
|
92
|
-
//
|
|
93
|
-
//
|
|
57
|
+
// Commander materializes defaults in `options`. Forwarding those values
|
|
58
|
+
// would make them override optiprune.json/jsonc/package.json settings.
|
|
59
|
+
// Only an option explicitly supplied on the command line wins over config.
|
|
60
|
+
const isCliOverride = (name) => command.getOptionValueSource(name) === "cli";
|
|
61
|
+
// Build FixConfig if --fix or other fix-related flags are used
|
|
62
|
+
let fixOption = undefined;
|
|
63
|
+
if (isCliOverride("fix") || isCliOverride("fixConfidence") || isCliOverride("fixRules") || isCliOverride("dryRun")) {
|
|
64
|
+
// Explicitly check if --fix was provided. If it's boolean true or not provided but other fix flags are,
|
|
65
|
+
// we enable fixing with the granular config.
|
|
66
|
+
const fixEnabled = isCliOverride("fix") ? !!options.fix : true;
|
|
67
|
+
if (fixEnabled) {
|
|
68
|
+
fixOption = {
|
|
69
|
+
confidence: options.fixConfidence,
|
|
70
|
+
rules: options.fixRules,
|
|
71
|
+
dryRun: !!options.dryRun
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
fixOption = false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// The core resolves defaults and file configuration. The CLI deliberately
|
|
79
|
+
// provides only explicit user overrides so the documented precedence is:
|
|
80
|
+
// CLI flag > config file > core default.
|
|
94
81
|
const analyzerOptions = {
|
|
95
|
-
rootDir: rootDir,
|
|
96
|
-
entry: options.entry
|
|
97
|
-
extensions: options.extensions
|
|
98
|
-
ignore: options.ignore
|
|
99
|
-
reportUnusedExports
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
82
|
+
...(isCliOverride("rootDir") && { rootDir: options.rootDir }),
|
|
83
|
+
...(isCliOverride("entry") && { entry: options.entry }),
|
|
84
|
+
...(isCliOverride("extensions") && { extensions: options.extensions }),
|
|
85
|
+
...(isCliOverride("ignore") && { ignore: options.ignore }),
|
|
86
|
+
...(isCliOverride("reportUnusedExports") && {
|
|
87
|
+
reportUnusedExports: options.reportUnusedExports,
|
|
88
|
+
}),
|
|
89
|
+
...(isCliOverride("conventionalEntries") && {
|
|
90
|
+
includeConventionalEntries: options.conventionalEntries,
|
|
91
|
+
}),
|
|
92
|
+
...(isCliOverride("failOn") && { failOn: options.failOn }),
|
|
93
|
+
...(isCliOverride("json") && { json: options.json }),
|
|
94
|
+
...(isCliOverride("skip3") && { skip3: options.skip3 }),
|
|
95
|
+
...(isCliOverride("skip4") && { skip4: options.skip4 }),
|
|
96
|
+
...(isCliOverride("verbose") && { verbose: options.verbose }),
|
|
97
|
+
...(fixOption !== undefined && { fix: fixOption }),
|
|
98
|
+
...(isCliOverride("cacheFrom") && { cacheFrom: options.cacheFrom }),
|
|
99
|
+
...(isCliOverride("cacheTo") && { cacheTo: options.cacheTo }),
|
|
109
100
|
};
|
|
110
101
|
const report = await analyze(analyzerOptions);
|
|
111
102
|
if (options.sarif) {
|
|
@@ -115,7 +106,7 @@ program
|
|
|
115
106
|
console.log(JSON.stringify(report, (k, v) => typeof v === 'bigint' ? v.toString() : v, 2));
|
|
116
107
|
}
|
|
117
108
|
else {
|
|
118
|
-
console.log(
|
|
109
|
+
console.log(formatTerminal(report));
|
|
119
110
|
}
|
|
120
111
|
if (shouldFail(report, options.failOn))
|
|
121
112
|
process.exit(1);
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,IAAI,MAAM,OAAO,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,2EAA2E;AAC3E,2DAA2D;AAC3D,aAAa;AACb,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAChF,aAAa;AACb,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAIxE,0BAA0B;AAC1B,MAAM,IAAI,GAAI,CAAC,CAAS,EAAE,EAAE,CAAC,UAAU,CAAC,SAAS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U,CAAC,CAAC;QACvC,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,wBAAwB,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IACxE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@optiprune/cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.15",
|
|
4
4
|
"description": "CLI for resilient static dead-code analyzer for TypeScript and JavaScript workspaces.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -68,12 +68,8 @@
|
|
|
68
68
|
".": "./dist/cli.js",
|
|
69
69
|
"./package.json": "./package.json"
|
|
70
70
|
},
|
|
71
|
-
"exports": {
|
|
72
|
-
".": "./dist/cli.js",
|
|
73
|
-
"./package.json": "./package.json"
|
|
74
|
-
},
|
|
75
71
|
"dependencies": {
|
|
76
|
-
"@optiprune/core": "^1.8
|
|
72
|
+
"@optiprune/core": "^1.11.8",
|
|
77
73
|
"commander": "^15.0.0",
|
|
78
74
|
"pathe": "2.0.3"
|
|
79
75
|
},
|
|
@@ -85,9 +81,6 @@
|
|
|
85
81
|
"build": "tsc -p tsconfig.json",
|
|
86
82
|
"prepublishOnly": "npm run build"
|
|
87
83
|
},
|
|
88
|
-
"engines": {
|
|
89
|
-
"node": "^22.18.0 || >=24.11.0"
|
|
90
|
-
},
|
|
91
84
|
"license": "MIT",
|
|
92
85
|
"author": "DreamLongYT"
|
|
93
86
|
}
|