@optiprune/cli 1.2.8 → 1.2.13
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 +113 -0
- package/config.md +120 -0
- package/dist/cli.js +1 -38
- package/dist/cli.js.map +1 -1
- package/logo.svg +22 -0
- package/package.json +6 -6
package/README.md
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+

|
|
2
|
+

|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
# 🚀 OptiPrune
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 💎 The Vision
|
|
9
|
+
Most dead-code analyzers just guess. They look at import graphs and hope they don't miss anything critical. This leads to **false positives**, broken builds, and developer frustration.
|
|
10
|
+
|
|
11
|
+
**OptiPrune is different.** We use formal logic, isolated execution, and a high-performance engine to not just find dead code, but to mathematically **prove** it.
|
|
12
|
+
|
|
13
|
+
> **"Stop Guessing, Start Proving."**
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## ⚡ The 3 Pillars of Superiority
|
|
18
|
+
|
|
19
|
+
### 1. Raw Power: The Yuku Engine (Zig)
|
|
20
|
+
While other tools are throttled by the N-API bottleneck, OptiPrune utilizes the **Yuku Engine** written in **Zig**. It minimizes the overhead between native performance and the JavaScript runtime.
|
|
21
|
+
* **The Result:** Up to 3x faster parsing than traditional tools, even in massive monorepos.
|
|
22
|
+
|
|
23
|
+
### 2. Deep Intelligence: SMT & Z3 Solver
|
|
24
|
+
OptiPrune is the first analyzer to use a real **SMT Solver (Z3)**. We don't just analyze if a function is exported; we analyze if the code *inside* the function is logically reachable.
|
|
25
|
+
* **The Result:** Detects dead logic paths (e.g., impossible `if` conditions) that are completely invisible to Knip.
|
|
26
|
+
|
|
27
|
+
### 3. Absolute Precision: WASM Sandbox Execution
|
|
28
|
+
Dynamic imports are the final boss of static analysis. OptiPrune solves this through a **WASM-based QuickJS sandbox**. We securely execute critical code snippets to resolve paths at runtime.
|
|
29
|
+
* **The Result:** Zero false alarms for dynamic paths. If OptiPrune says it's dead, it's dead.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 🥊 OptiPrune vs. Knip: The Head-to-Head
|
|
34
|
+
|
|
35
|
+
| Feature | Knip | OptiPrune |
|
|
36
|
+
| :--- | :--- | :--- |
|
|
37
|
+
| **Engine** | Babel / OXC (Standard) | **Yuku / Zig (Hyper-Speed)** |
|
|
38
|
+
| **Logic Analysis** | Heuristics (Guessing) | **Z3 SMT Solver (Proving)** |
|
|
39
|
+
| **Dynamic Paths** | Pattern Matching | **WASM Sandbox Execution** |
|
|
40
|
+
| **Interface Audit** | Ignores Members | **Deep Member-Level Analysis** |
|
|
41
|
+
| **Framework Support** | Plugins (Core-Level) | **7-Layer Semantic Context** |
|
|
42
|
+
| **False Positives** | High (in complex setups) | **Near-Zero (Context Aware)** |
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 🏗️ The 7-Layer Architecture
|
|
47
|
+
OptiPrune operates in seven specialized layers to guarantee maximum accuracy:
|
|
48
|
+
|
|
49
|
+
1. **Layer 1: Discovery** – Ultra-fast file scanning.
|
|
50
|
+
2. **Layer 2: Basic CFG** – Detects standard dead code after terminal statements.
|
|
51
|
+
3. **Layer 3: SMT Logic** – Mathematical path proofs with Z3.
|
|
52
|
+
4. **Layer 4: WASM Sandbox** – Dynamic path resolution via execution.
|
|
53
|
+
5. **Layer 6: Schema Shield** – Protection for Zod, Decorators & Contracts.
|
|
54
|
+
6. **Layer 6: Dependency Audit** – Scans lockfiles & package.json scripts.
|
|
55
|
+
7. **Layer 7: Topology Engine** – Understands NestJS DI & Event Buses.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 📈 Benchmark Numbers (Real-World Test)
|
|
60
|
+
*Tested on a NestJS project with 1000+ files.*
|
|
61
|
+
|
|
62
|
+
* **Knip Speed:** 1.26s (with crash risks on complex types)
|
|
63
|
+
* **OptiPrune Speed:** **0.87s** (Stable & Precise)
|
|
64
|
+
* **Accuracy:** OptiPrune found **15% more** real dead code (unused interface properties & logical errors) that Knip completely missed.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Installation
|
|
69
|
+
|
|
70
|
+
Install Optiprune as a dev dependency via pnpm, npm, or yarn:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
pnpm add -D @optiprune/core
|
|
74
|
+
# or
|
|
75
|
+
npm install --save-dev @optiprune/core
|
|
76
|
+
# or
|
|
77
|
+
yarn add -D @optiprune/core
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Usage
|
|
82
|
+
|
|
83
|
+
Run Optiprune from your project root:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npx @optiprune/cli
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### CLI Options (@optiprune/cli)
|
|
90
|
+
|
|
91
|
+
| Flag | Description | Default |
|
|
92
|
+
| :--- | :--- | :--- |
|
|
93
|
+
| `-r, --rootDir` | Project root directory | `process.cwd()` |
|
|
94
|
+
| `-e, --entry` | Entry point patterns (glob) | `[]` |
|
|
95
|
+
| `-i, --ignore` | Patterns to ignore | `[]` |
|
|
96
|
+
| `--no-report-unused-exports` | Disable unused export reporting | `false` |
|
|
97
|
+
| `--fail-on` | Fail on confidence (high/medium/low/none) | `high` |
|
|
98
|
+
| `--json` | Output as JSON | `false` |
|
|
99
|
+
| `--sarif` | Output as SARIF | `false` |
|
|
100
|
+
| `--skip-3` | Skip Layer 3 (SMT Constraint Solver) | `false` |
|
|
101
|
+
| `--skip-4` | Skip Layer 4 (Concolic Execution Proofs) | `false` |
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## 🤝 Join the Revolution
|
|
106
|
+
OptiPrune isn't just a tool. It's a technical statement. Help us save the world from dirty code.
|
|
107
|
+
|
|
108
|
+
**GitHub:** [DreamLongYT/optiprune](https://github.com/optiprune/core)
|
|
109
|
+
**Web:** [opti.drml.int.yt](https://opti.drml.int.yt)
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
# Config
|
|
113
|
+
To setup OptiPrune, see [config.md](config.md) for more
|
package/config.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
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
|
+
```jsonc
|
|
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
|
+
## How OptiPrune Loads Configuration
|
|
28
|
+
When OptiPrune initializes, it checks the workspace root in the following order of precedence:
|
|
29
|
+
|
|
30
|
+
optiprune.json (Highest Priority)
|
|
31
|
+
|
|
32
|
+
optiprune.jsonc (Allows comments //, /* */, and trailing commas)
|
|
33
|
+
|
|
34
|
+
package.json (Falls back to reading an "optiprune" key)
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Configuration Reference
|
|
39
|
+
**1. File & Workspace Discovery**
|
|
40
|
+
rootDir (string, default: ".")
|
|
41
|
+
|
|
42
|
+
Specifies the base directory for source files relative to the project workspace root.
|
|
43
|
+
|
|
44
|
+
entry (string[], default: [])
|
|
45
|
+
|
|
46
|
+
Defines root entry files. Any code reachable from these files (and their dependency trees) is marked as used and protected from unused-code reports.
|
|
47
|
+
|
|
48
|
+
extensions (string[], default: [".ts", ".tsx", ".js", ".jsx"])
|
|
49
|
+
|
|
50
|
+
File extensions that OptiPrune will parse and analyze.
|
|
51
|
+
|
|
52
|
+
ignore (string[], default: [])
|
|
53
|
+
|
|
54
|
+
Glob patterns or directory paths to skip entirely during analysis (e.g., test fixtures, output directories).
|
|
55
|
+
|
|
56
|
+
**2. Export & Contract Safeguards**
|
|
57
|
+
externalContracts (string[], default: [])
|
|
58
|
+
|
|
59
|
+
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.
|
|
60
|
+
|
|
61
|
+
reportUnusedExports (boolean, default: true)
|
|
62
|
+
|
|
63
|
+
When set to true, OptiPrune reports exported functions, types, or variables that have no internal or external references.
|
|
64
|
+
|
|
65
|
+
includeConventionalEntries (boolean, default: true)
|
|
66
|
+
|
|
67
|
+
Automatically treats framework conventions (e.g., index.ts, main.ts, App.tsx) as entry points without needing manual listing in entry.
|
|
68
|
+
|
|
69
|
+
**3. CLI & Execution Controls**
|
|
70
|
+
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. Rule Overrides (rules)**
|
|
83
|
+
Fine-tune or disable specific inspection rules:
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
"rules": {
|
|
87
|
+
"rule-name": "error" | "warning" | "off"
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
- `"error"`: Causes finding to trigger build errors or exit failures.
|
|
92
|
+
- `"warning"`: Emits warnings without halting execution (unless configured by failOn).
|
|
93
|
+
- `"off"`: Disables rule checking entirely.
|
|
94
|
+
|
|
95
|
+
**5. Engine & Solver Tuning (layers)**
|
|
96
|
+
Configure isolated runtimes, SMT solvers, and symbolic execution passes:
|
|
97
|
+
|
|
98
|
+
| Option | Type | Default | Purpose |
|
|
99
|
+
| :----- | :--- | :------ | :------ |
|
|
100
|
+
| smtTimeoutMs | number | 10000 | SMT solver execution cap (in milliseconds) per proof path.|
|
|
101
|
+
| isolateMemoryLimitMb | number | 128 | Memory ceiling (in MB) allocated to V8 worker isolates. |
|
|
102
|
+
| enableConcolicProof | boolean | false | Enables concolic analysis to prove dead execution paths. |
|
|
103
|
+
| skip3 | boolean | false | Bypasses Analysis Layer 3. |
|
|
104
|
+
| skip4 | boolean | false | Bypasses Analysis Layer 4. |
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
## Alternative: package.json Configuration
|
|
108
|
+
If you do not want an additional configuration file in your root folder, add an "optiprune" field inside package.json:
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"name": "my-library",
|
|
113
|
+
"version": "1.0.0",
|
|
114
|
+
"optiprune": {
|
|
115
|
+
"entry": ["src/index.ts"],
|
|
116
|
+
"externalContracts": ["MyPublicApi"],
|
|
117
|
+
"failOn": "medium"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
```
|
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.")
|
|
@@ -115,7 +78,7 @@ program
|
|
|
115
78
|
console.log(JSON.stringify(report, (k, v) => typeof v === 'bigint' ? v.toString() : v, 2));
|
|
116
79
|
}
|
|
117
80
|
else {
|
|
118
|
-
console.log(
|
|
81
|
+
console.log(formatTerminal(report));
|
|
119
82
|
}
|
|
120
83
|
if (shouldFail(report, options.failOn))
|
|
121
84
|
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,CAAC;AAClD,MAAM,MAAM,GAAE,CAAC,CAAS,EAAE,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC;AACnD,MAAM,GAAG,GAAK,CAAC,CAAS,EAAE,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC;AACnD,MAAM,GAAG,GAAK,CAAC,CAAS,EAAE,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC;AAElD,yCAAyC;AACzC,SAAS,cAAc,CAAC,OAAe;IACrC,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,2CAA2C,CAAC,CAAC;QAClF,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAC7B,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;YAC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J,OAAO,CAAC,2BAA2B,CAAC;KACpC,WAAW,CAAC,6DAA6D,CAAC;KAC1E,MAAM,CAAC,sBAAsB,EAAE,+BAA+B,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;KAC9E,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;IACpC,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QACjD,MAAM,WAAW,CAAC,OAAO,EAAE,UAAU,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/logo.svg
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" style="width:100%;height:100%">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="opti-grad-1" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
4
|
+
<stop offset="0%" stop-color="#6366F1"></stop>
|
|
5
|
+
<stop offset="50%" stop-color="#8B5CF6"></stop>
|
|
6
|
+
<stop offset="100%" stop-color="#D946EF"></stop>
|
|
7
|
+
</linearGradient>
|
|
8
|
+
<linearGradient id="opti-grad-2" x1="0%" y1="100%" x2="100%" y2="0%">
|
|
9
|
+
<stop offset="0%" stop-color="#06B6D4"></stop>
|
|
10
|
+
<stop offset="100%" stop-color="#3B82F6"></stop>
|
|
11
|
+
</linearGradient>
|
|
12
|
+
<filter id="glow" x="-20%" y="-20%" width="140%" height="140%">
|
|
13
|
+
<feDropShadow dx="0" dy="8" stdDeviation="16" flood-color="#8B5CF6" flood-opacity="0.35"></feDropShadow>
|
|
14
|
+
</filter>
|
|
15
|
+
</defs>
|
|
16
|
+
<g filter="url(#glow)">
|
|
17
|
+
<path d="M 256 64 C 362 64, 448 150, 448 256 C 448 290, 439 322, 423 350 L 340 267 C 352 240, 345 208, 321 184 C 297 160, 265 153, 238 165 L 155 82 C 185 70, 220 64, 256 64 Z" fill="url(#opti-grad-1)"></path>
|
|
18
|
+
<path d="M 256 448 C 150 448, 64 362, 64 256 C 64 222, 73 190, 89 162 L 172 245 C 160 272, 167 304, 191 328 C 215 352, 247 359, 274 347 L 357 430 C 327 442, 292 448, 256 448 Z" fill="url(#opti-grad-1)"></path>
|
|
19
|
+
<polygon points="110,410 410,110 380,80 80,380" fill="url(#opti-grad-2)" opacity="0.9"></polygon>
|
|
20
|
+
</g>
|
|
21
|
+
<circle cx="256" cy="256" r="28" fill="#FFFFFF" opacity="0.95"></circle>
|
|
22
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@optiprune/cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.13",
|
|
4
4
|
"description": "CLI for resilient static dead-code analyzer for TypeScript and JavaScript workspaces.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -59,14 +59,17 @@
|
|
|
59
59
|
"files": [
|
|
60
60
|
"dist",
|
|
61
61
|
"README.md",
|
|
62
|
-
"LICENSE"
|
|
62
|
+
"LICENSE",
|
|
63
|
+
"config.md",
|
|
64
|
+
"package.json",
|
|
65
|
+
"logo.svg"
|
|
63
66
|
],
|
|
64
67
|
"exports": {
|
|
65
68
|
".": "./dist/cli.js",
|
|
66
69
|
"./package.json": "./package.json"
|
|
67
70
|
},
|
|
68
71
|
"dependencies": {
|
|
69
|
-
"@optiprune/core": "
|
|
72
|
+
"@optiprune/core": "^1.11.6",
|
|
70
73
|
"commander": "^15.0.0",
|
|
71
74
|
"pathe": "2.0.3"
|
|
72
75
|
},
|
|
@@ -78,9 +81,6 @@
|
|
|
78
81
|
"build": "tsc -p tsconfig.json",
|
|
79
82
|
"prepublishOnly": "npm run build"
|
|
80
83
|
},
|
|
81
|
-
"engines": {
|
|
82
|
-
"node": "^22.18.0 || >=24.11.0"
|
|
83
|
-
},
|
|
84
84
|
"license": "MIT",
|
|
85
85
|
"author": "DreamLongYT"
|
|
86
86
|
}
|