entkapp 5.5.0 → 5.6.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.
- package/README.md +1 -1
- package/bin/cli.js +2 -2
- package/bin/cli.mjs +175 -0
- package/index.cjs +18 -0
- package/index.mjs +51 -0
- package/package.json +7 -6
- package/src/EngineContext.mjs +428 -0
- package/src/Initializer.mjs +82 -0
- package/src/analyzers/CodeSmellAnalyzer.mjs +106 -0
- package/src/analyzers/OxcAnalyzer.mjs +11 -0
- package/src/api/HeadlessAPI.js +31 -16
- package/src/api/HeadlessAPI.mjs +369 -0
- package/src/api/PluginSDK.mjs +135 -0
- package/src/ast/ASTAnalyzer.js +17 -3
- package/src/ast/ASTAnalyzer.mjs +742 -0
- package/src/ast/AdvancedAnalysis.mjs +586 -0
- package/src/ast/BarrelParser.mjs +230 -0
- package/src/ast/DeadCodeDetector.js +7 -5
- package/src/ast/DeadCodeDetector.mjs +92 -0
- package/src/ast/MagicDetector.mjs +203 -0
- package/src/ast/OxcAnalyzer.mjs +188 -0
- package/src/ast/SecretScanner.mjs +374 -0
- package/src/healing/GitSandbox.mjs +82 -0
- package/src/healing/SelfHealer.mjs +48 -0
- package/src/index.js +37 -1
- package/src/index.mjs +1176 -0
- package/src/performance/GraphCache.mjs +108 -0
- package/src/performance/SupplyChainGuard.mjs +92 -0
- package/src/performance/WorkerPool.mjs +132 -0
- package/src/performance/WorkerTaskRunner.mjs +144 -0
- package/src/plugins/BasePlugin.mjs +240 -0
- package/src/plugins/PluginRegistry.mjs +203 -0
- package/src/plugins/ecosystems/BackendServices.mjs +197 -0
- package/src/plugins/ecosystems/GenericPlugins.mjs +142 -0
- package/src/plugins/ecosystems/ModernFrameworks.mjs +162 -0
- package/src/plugins/ecosystems/MorePlugins.mjs +562 -0
- package/src/plugins/ecosystems/NewPlugins.mjs +526 -0
- package/src/plugins/ecosystems/NextJsPlugin.mjs +45 -0
- package/src/plugins/ecosystems/PluginLoader.mjs +193 -0
- package/src/plugins/ecosystems/TypeScriptPlugin.mjs +56 -0
- package/src/plugins/ecosystems/UltimateBundle.mjs +1182 -0
- package/src/refractor/ImpactAnalyzer.mjs +92 -0
- package/src/refractor/SourceRewriter.mjs +86 -0
- package/src/refractor/TransactionManager.mjs +5 -0
- package/src/refractor/TypeIntegrity.mjs +4 -0
- package/src/resolution/BuildOrchestrator.mjs +46 -0
- package/src/resolution/CircularDetector.mjs +91 -0
- package/src/resolution/ConfigGenerator.mjs +83 -0
- package/src/resolution/ConfigLoader.mjs +94 -0
- package/src/resolution/DepencyResolver.mjs +66 -0
- package/src/resolution/DependencyFixer.mjs +88 -0
- package/src/resolution/DependencyProfiler.mjs +286 -0
- package/src/resolution/EntryPointDetector.mjs +134 -0
- package/src/resolution/FrameworkConfigParser.mjs +119 -0
- package/src/resolution/GraphAnalyzer.mjs +80 -0
- package/src/resolution/MigrationAnalyzer.mjs +60 -0
- package/src/resolution/PathMapper.mjs +82 -0
- package/src/resolution/TSConfigLoader.mjs +162 -0
- package/src/resolution/WorkSpaceGraph.mjs +183 -0
- package/src/resolution/WorkspaceDiagnostic.mjs +139 -0
- package/test.js +76 -0
- package/wrangler.toml +6 -0
package/src/index.js
CHANGED
|
@@ -347,7 +347,18 @@ export class RefactoringEngine {
|
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
if (entryCount === 0) {
|
|
350
|
-
console.log(ansis.bold.
|
|
350
|
+
console.log(ansis.bold.yellow(' 🚨 ALARM: Keine einzige Datei wurde als Entry Point markiert! Greife auf Fallbacks zurück...'));
|
|
351
|
+
const fallbackFiles = ['index.js', 'index.mjs', 'src/index.js', 'src/index.mjs', 'main.js', 'src/main.js'];
|
|
352
|
+
for (const fallback of fallbackFiles) {
|
|
353
|
+
const absFallback = path.resolve(this.context.cwd, fallback).replace(/\\/g, '/');
|
|
354
|
+
if (this.context.projectGraph.has(absFallback)) {
|
|
355
|
+
const node = this.context.projectGraph.get(absFallback);
|
|
356
|
+
node.isEntry = true;
|
|
357
|
+
console.log(ansis.green(` • 💎 FALLBACK ENTRY: ${fallback}`));
|
|
358
|
+
entryCount++;
|
|
359
|
+
break;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
351
362
|
}
|
|
352
363
|
|
|
353
364
|
// Mark workspace packages as used to block false alarms in the manifest auditor
|
|
@@ -743,6 +754,31 @@ export class RefactoringEngine {
|
|
|
743
754
|
await this.typeIntegrity.synchronizeDeclarationFile(absPath, unusedExport.symbol);
|
|
744
755
|
}
|
|
745
756
|
}
|
|
757
|
+
|
|
758
|
+
// --- FIXED: Added dependency removal logic ---
|
|
759
|
+
for (const dep of (analysisSummary.unusedDependencies || [])) {
|
|
760
|
+
try {
|
|
761
|
+
const absPath = path.resolve(this.context.cwd, dep.manifest);
|
|
762
|
+
const pkgContent = await fs.readFile(absPath, 'utf8');
|
|
763
|
+
const pkg = JSON.parse(pkgContent);
|
|
764
|
+
|
|
765
|
+
let removed = false;
|
|
766
|
+
if (pkg.dependencies && pkg.dependencies[dep.package]) {
|
|
767
|
+
delete pkg.dependencies[dep.package];
|
|
768
|
+
removed = true;
|
|
769
|
+
} else if (pkg.devDependencies && pkg.devDependencies[dep.package]) {
|
|
770
|
+
delete pkg.devDependencies[dep.package];
|
|
771
|
+
removed = true;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
if (removed) {
|
|
775
|
+
console.log(ansis.red(`📦 Removing unused dependency [${dep.package}] from ${dep.manifest}`));
|
|
776
|
+
await this.txManager.stageWrite(absPath, JSON.stringify(pkg, null, 2) + '\n');
|
|
777
|
+
}
|
|
778
|
+
} catch (e) {
|
|
779
|
+
console.error(ansis.red(`❌ Failed to remove dependency ${dep.package}: ${e.message}`));
|
|
780
|
+
}
|
|
781
|
+
}
|
|
746
782
|
});
|
|
747
783
|
} else {
|
|
748
784
|
console.log(ansis.bold.yellow('\n⚠️ Optimization plan aborted by user. No changes applied.'));
|