entkapp 5.0.0 → 5.2.0

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.
Files changed (34) hide show
  1. package/README.md +63 -20
  2. package/bin/cli.js +2 -2
  3. package/index.js +38 -2241
  4. package/package.json +1 -1
  5. package/src/EngineContext.js +1 -1
  6. package/src/Initializer.js +82 -0
  7. package/src/analyzers/CodeSmellAnalyzer.js +106 -0
  8. package/src/ast/ASTAnalyzer.js +29 -14
  9. package/src/ast/BarrelParser.js +22 -20
  10. package/src/ast/OxcAnalyzer.js +33 -409
  11. package/src/index.js +78 -8
  12. package/src/performance/WorkerTaskRunner.js +7 -7
  13. package/src/plugins/BasePlugin.js +171 -2
  14. package/src/plugins/PluginRegistry.js +193 -81
  15. package/src/plugins/ecosystems/BackendServices.js +168 -32
  16. package/src/plugins/ecosystems/GenericPlugins.js +51 -34
  17. package/src/plugins/ecosystems/ModernFrameworks.js +97 -94
  18. package/src/plugins/ecosystems/MorePlugins.js +429 -51
  19. package/src/plugins/ecosystems/NewPlugins.js +526 -0
  20. package/src/plugins/ecosystems/NextJsPlugin.js +18 -6
  21. package/src/plugins/ecosystems/PluginLoader.js +190 -17
  22. package/src/plugins/ecosystems/TypeScriptPlugin.js +10 -10
  23. package/src/plugins/ecosystems/UltimateBundle.js +168 -0
  24. package/src/resolution/BuildOrchestrator.js +46 -0
  25. package/src/resolution/CircularDetector.js +64 -25
  26. package/src/resolution/ConfigGenerator.js +83 -0
  27. package/src/resolution/DepencyResolver.js +12 -1
  28. package/src/resolution/DependencyFixer.js +88 -0
  29. package/src/resolution/EntryPointDetector.js +4 -4
  30. package/src/resolution/GraphAnalyzer.js +80 -0
  31. package/src/resolution/MigrationAnalyzer.js +60 -0
  32. package/src/resolution/PathMapper.js +47 -3
  33. package/src/resolution/WorkSpaceGraph.js +4 -1
  34. package/docs.zip +0 -0
package/README.md CHANGED
@@ -1,33 +1,76 @@
1
- # 🕸️ entkapp
1
+ # 🕸️ entkapp Ultimate v5.2.0
2
2
 
3
3
  > **The Ultimate Enterprise Codebase Janitor.** Faster than Knip with OXC integration, type-aware analysis, and automated structural healing. Fully standalone - solving what Knip cannot.
4
4
 
5
5
  ![Version](https://img.shields.io/npm/v/entkapp) ![License](https://img.shields.io/badge/license-Apache--2.0-green.svg) ![Performance](https://img.shields.io/badge/performance-OXC--Inside-blueviolet.svg)
6
6
 
7
- ## 🌐 Meaning
8
- **entkapp** (German: *entkappen*) — meaning "to decap" or "to uncap."
9
- It represents the process of stripping away the unnecessary layers of a codebase to reveal its clean, functional core.
10
-
11
-
12
7
  ---
13
8
 
14
- `entkapp` is a next-generation tool designed to declutter your JavaScript and TypeScript projects. It finds unused files, unused dependencies, dead code, circular dependencies, and more. It is built to be a direct and superior competitor to `knip.dev`.
9
+ `entkapp` ist eine next-generation Engine zur statischen Code-Analyse, die die Stabilität der bewährten Version 7 mit den Hochleistungs-Features der Version 9 kombiniert. Sie findet ungenutzte Dateien, tote Exports, zirkuläre Abhängigkeiten und Sicherheitsrisiken schneller als jedes andere Tool im Ökosystem.
15
10
 
16
- ## 🚀 Why entkapp over Knip?
11
+ ## 🚀 Warum entkapp?
17
12
 
18
- * **⚡ Blazing Fast:** Powered by `oxc-parser` (Rust-based) for lightning-fast AST traversal.
19
- * **🔌 Massive Plugin Ecosystem:** Over 20+ built-in plugins (Next.js, Nuxt, SvelteKit, Tailwind, Jest, Vitest, Playwright, etc.).
20
- * **💀 True Dead Code Detection:** Advanced graph-based reachability analysis to find truly dead files and unused exports.
21
- * **🔄 Circular Dependency Detection:** High-performance Tarjan-based algorithm to detect circular dependencies.
22
- * **🔐 Secrets Scanning:** Automatically detects hardcoded API keys, tokens, and credentials.
23
- * **🛡️ Supply Chain Guard:** Detects typosquatting and verifies integrity lockfile hashes.
24
- * **🛠️ Automated Structural Healing:** Automatically fixes structural issues with git-based rollback protection and SHA-256 transaction integrity.
25
- * **⚛️ Framework Precision:** Enhanced support for JSX, Decorators, and Monorepos with reliable cross-thread data merging.
26
- * **⚙️ Flexible Configuration:** Supports `entkapp.json`, `entkapp.ts`, `entkapp.config.js`, and more.
13
+ * **⚡ Blazing Fast:** Nutzt den Rust-basierten `oxc-parser` für extrem schnelle AST-Traversierung, kombiniert mit der TypeScript Compiler API für tiefe semantische Analysen.
14
+ * **🏗️ v7 Stability:** Nutzt die robuste Kern-Logik der Version 7 für zuverlässiges Symbol-Tracking und Erreichbarkeits-Graphen.
15
+ * **🔌 Massives Plugin-System:** Über 80+ integrierte Plugins (React, Vue, Svelte, Angular, Next.js, Nuxt, SvelteKit, Astro, Vite, Webpack, Turbo, Nx, Tailwind, ESLint, Prettier und viele mehr).
16
+ * **💀 True Dead Code Detection:** Fortschrittliche graphbasierte Analyse zur Identifizierung von wirklich verwaistem Code.
17
+ * **🔄 Circular Dependency Detection:** Hochperformante Erkennung von zirkulären Abhängigkeiten mittels Tarjan's Algorithmus.
18
+ * **🔐 Secrets Scanning:** Automatische Erkennung von hartkodierten API-Keys, Tokens und Anmeldedaten.
19
+ * **🛠️ Automated Structural Healing:** Repariert Abhängigkeitsprobleme und strukturelle Fehler automatisch mit Git-basiertem Rollback-Schutz.
27
20
 
28
21
  ## 📦 Installation
29
22
 
30
23
  ```bash
31
- npm install -D entkapp
32
- # or
33
- pnpm add -D entkapp
24
+ # Direkt ausführen ohne Installation (empfohlen)
25
+ npx entkapp
26
+
27
+ # Oder global installieren
28
+ npm install -g entkapp
29
+ ```
30
+
31
+ ## 🛠️ Nutzung
32
+
33
+ ### Interaktiver Modus (Standard)
34
+ Startet den interaktiven Analyse- und Scaffolding-Workflow:
35
+ ```bash
36
+ npx entkapp
37
+ ```
38
+
39
+ ### Headless Analyse-Modus
40
+ Ideal für CI/CD-Pipelines. Führt die Analyse ohne Prompts durch und gibt JSON aus:
41
+ ```bash
42
+ npx entkapp --analyze
43
+ ```
44
+
45
+ ### Auto-Fix Modus
46
+ Behebt automatisch Abhängigkeitskonflikte und strukturelle Probleme:
47
+ ```bash
48
+ npx entkapp --fix
49
+ ```
50
+
51
+ ### Zusätzliche Optionen
52
+ ```bash
53
+ npx entkapp --cwd ./mein-projekt # Analysiert ein spezifisches Verzeichnis
54
+ npx entkapp --verbose # Aktiviert detailliertes Logging
55
+ npx entkapp --version # Zeigt die Versionsnummer
56
+ npx entkapp --help # Zeigt das Hilfe-Panel
57
+ ```
58
+
59
+ ## 🧠 Fortgeschrittene Architektur
60
+
61
+ ### Incremental Caching
62
+ `entkapp` verwendet eine persistente Graph-Status-Schicht (`.entkapp-cache`). Es berechnet SHA-256 Hashes von Dateipuffern, um das AST-Parsing für unveränderte Dateien zu überspringen.
63
+
64
+ ### Parallel Analysis
65
+ Bei größeren Codebasen verteilt `entkapp` die Arbeitslast automatisch auf mehrere CPU-Threads mittels Node.js Worker Threads.
66
+
67
+ ### Pluggable Architecture
68
+ Die Engine ist modular aufgebaut:
69
+ - **`EntkappEngine`**: Der zentrale Orchestrator.
70
+ - **`PluginRegistry`**: Verwaltet den Lebenszyklus der Framework-Plugins.
71
+ - **`ASTAnalyzer` / `OxcAnalyzer`**: Multi-pass AST-Walker für tiefgehende Analysen.
72
+ - **`SelfHealer`**: Transaktionales Refactoring mit Git-State-Capture und Rollback.
73
+
74
+ ## 📄 Lizenz
75
+
76
+ Apache-2.0
package/bin/cli.js CHANGED
@@ -28,7 +28,7 @@ async function bootstrap() {
28
28
  program
29
29
  .name('entkapp')
30
30
  .description(ansis.cyan('The Ultimate Enterprise Codebase Janitor with OXC integration, type-aware analysis, and automated structural healing.'))
31
- .version(packageJsonContent.version || '5.0.0');
31
+ .version(packageJsonContent.version || '5.1.0');
32
32
 
33
33
  program
34
34
  .option('-c, --cwd <path>', 'Specify the execution context root directory', process.cwd())
@@ -132,7 +132,7 @@ async function bootstrap() {
132
132
  }, timeoutMs);
133
133
  timeoutTimer.unref(); // Allow process to exit if work finishes
134
134
 
135
- console.log(ansis.bold.green(`\n📦 entkapp v${packageJsonContent.version || '5.0.0'} Engine Activation`));
135
+ console.log(ansis.bold.green(`\n📦 entkapp v${packageJsonContent.version || '5.1.0'} Engine Activation`));
136
136
  console.log(ansis.dim('------------------------------------------------------------'));
137
137
  console.log(`${ansis.bold('Target Workspace Root :')} ${ansis.blue(targetCwd)}`);
138
138
  console.log(`${ansis.bold('Refactoring Mode :')} ${options.fix ? ansis.yellow('Active Fixing & Self-Healing Enabled') : ansis.gray('Dry-Run Reporting Only')}`);