claude-flow-novice 2.2.4 ā 2.2.5
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/package.json +9 -8
- package/scripts/.claude-flow/metrics/agent-metrics.json +1 -0
- package/scripts/.claude-flow/metrics/performance.json +9 -0
- package/scripts/.claude-flow/metrics/task-metrics.json +10 -0
- package/scripts/CLEANUP_OPTIMIZATION_REPORT.json +312 -0
- package/scripts/CLEANUP_PERFORMANCE_OPTIMIZATION.md +387 -0
- package/scripts/CLEANUP_QUICK_START.md +268 -0
- package/scripts/CLEANUP_TEST_RESULTS.md +205 -0
- package/scripts/README.md +339 -0
- package/scripts/ace-query.sh +384 -0
- package/scripts/agent-token-analysis.js +430 -0
- package/scripts/auto-setup.js +332 -0
- package/scripts/build/README.md +167 -0
- package/scripts/build/build-config.js +27 -0
- package/scripts/build/build-prompt-copier.sh +30 -0
- package/scripts/build/performance-monitor.js +869 -0
- package/scripts/build/prepare-publish.js +150 -0
- package/scripts/build/typescript-fixer.js +621 -0
- package/scripts/build/unified-builder.sh +428 -0
- package/scripts/build/update-bin-version.js +32 -0
- package/scripts/build/validate-agents.js +238 -0
- package/scripts/build-index.js +43 -0
- package/scripts/build-orchestrator.js +320 -0
- package/scripts/check-routing-stats.cjs +122 -0
- package/scripts/ci-validation.js +375 -0
- package/scripts/cleanup-blocking-coordination.sh +420 -0
- package/scripts/cleanup-idle-sessions.sh +59 -0
- package/scripts/collect-build-metrics.js +65 -0
- package/scripts/demo/README.md +79 -0
- package/scripts/demo/autoscaling-demo-simplified.js +963 -0
- package/scripts/demo/comprehensive-dashboard-test.js +693 -0
- package/scripts/demo/confidence-log.js +87 -0
- package/scripts/demo/confidence-report.js +82 -0
- package/scripts/demo/demo-multi-swarm-coordination.js +325 -0
- package/scripts/demo/demo-production-deployment.js +399 -0
- package/scripts/demo/demo-visualization-system.js +149 -0
- package/scripts/demo/performance-analysis.cjs +71 -0
- package/scripts/demo/performance-analysis.js +71 -0
- package/scripts/demo/test-autoscaling-demo.js +314 -0
- package/scripts/dependency-optimizer.js +349 -0
- package/scripts/dependency-security-assessment.js +331 -0
- package/scripts/deploy-sdk.sh +176 -0
- package/scripts/deployment-readiness-report.json +179 -0
- package/scripts/dev/README.md +264 -0
- package/scripts/dev/claude-flow-wrapper.sh +35 -0
- package/scripts/dev/claude-monitor.py +419 -0
- package/scripts/dev/claude-sparc.sh +562 -0
- package/scripts/dev/claude-wrapper.sh +17 -0
- package/scripts/dev/demo-phase3-compliance.js +172 -0
- package/scripts/dev/demo-task-system.ts +224 -0
- package/scripts/dev/deployment-validator.js +315 -0
- package/scripts/dev/spawn-claude-terminal.sh +32 -0
- package/scripts/dev/start-portal.sh +506 -0
- package/scripts/dev/start-web-ui.js +15 -0
- package/scripts/dev/stop-portal.sh +311 -0
- package/scripts/dev/validate-examples.ts +288 -0
- package/scripts/dev/validate-phase2.cjs +451 -0
- package/scripts/dev/validate-phase2.js +785 -0
- package/scripts/dev/validate-phase3.cjs +208 -0
- package/scripts/dev/validate-security-remediation.js +1 -0
- package/scripts/ecosystem.config.cjs +90 -0
- package/scripts/fix-js-extensions.js +167 -0
- package/scripts/generate-basic-types.js +73 -0
- package/scripts/generate-changelog.js +318 -0
- package/scripts/git-hooks/pre-commit.sh +143 -0
- package/scripts/health-checks.js +634 -0
- package/scripts/hook-wrapper.sh +54 -0
- package/scripts/install/README.md +375 -0
- package/scripts/install/REDIS_SETUP_VALIDATION.json +245 -0
- package/scripts/install/check-prerequisites.js +303 -0
- package/scripts/install/config-wizard.js +606 -0
- package/scripts/install/dependency-checker.js +385 -0
- package/scripts/install/health-check.js +765 -0
- package/scripts/install/install.js +256 -0
- package/scripts/install/installation-benchmark.js +461 -0
- package/scripts/install/quick-install.js +720 -0
- package/scripts/install/quick-start-wizard.js +295 -0
- package/scripts/install/redis-cli.js +289 -0
- package/scripts/install/redis-install-guides.md +407 -0
- package/scripts/install/redis-setup.js +559 -0
- package/scripts/install/redis-test.js +278 -0
- package/scripts/install/service-manager.js +672 -0
- package/scripts/install/setup.js +832 -0
- package/scripts/install/uninstall.js +526 -0
- package/scripts/install/update.js +461 -0
- package/scripts/install-pre-commit-hook.sh +127 -0
- package/scripts/legacy/README.md +272 -0
- package/scripts/legacy/batch-fix-ts.sh +54 -0
- package/scripts/legacy/build-migration.sh +105 -0
- package/scripts/legacy/build-monitor.js +209 -0
- package/scripts/legacy/build-with-filter.sh +84 -0
- package/scripts/legacy/build-workaround.sh +71 -0
- package/scripts/legacy/fix-ts-advanced.js +358 -0
- package/scripts/legacy/fix-ts-final.sh +50 -0
- package/scripts/legacy/fix-ts-targeted.sh +49 -0
- package/scripts/legacy/fix-typescript-errors.js +305 -0
- package/scripts/legacy/force-build.sh +63 -0
- package/scripts/legacy/optimize-performance.js +400 -0
- package/scripts/legacy/performance-monitor.js +263 -0
- package/scripts/legacy/performance-monitoring.js +532 -0
- package/scripts/legacy/performance-test-runner.js +645 -0
- package/scripts/legacy/quick-fix-ts.js +281 -0
- package/scripts/legacy/safe-build.sh +63 -0
- package/scripts/memory-monitor-coordinator.js +322 -0
- package/scripts/migrate-to-sdk.sh +520 -0
- package/scripts/migration/QUICK-START.md +189 -0
- package/scripts/migration/QUICK-START.md.backup-1760135091363 +189 -0
- package/scripts/migration/README.md +464 -0
- package/scripts/migration/TASK-1.3.2-COMPLETION-REPORT.md +500 -0
- package/scripts/migration/TASK-1.3.2-COMPLETION-REPORT.md.backup-1760135091348 +500 -0
- package/scripts/migration/UPDATE-PATHS-README.md +464 -0
- package/scripts/migration/UPDATE-PATHS-README.md.backup-1760135091337 +464 -0
- package/scripts/migration/example-patterns.json +19 -0
- package/scripts/migration/install-arm64.js +78 -0
- package/scripts/migration/install.js +83 -0
- package/scripts/migration/migrate-hooks.js +173 -0
- package/scripts/migration/migration-examples.ts +318 -0
- package/scripts/migration/reorganize-workspace.js +504 -0
- package/scripts/migration/test-update-paths.js +359 -0
- package/scripts/migration/update-paths.js +664 -0
- package/scripts/migration/validate-migration.js +647 -0
- package/scripts/monitor-loop.sh +65 -0
- package/scripts/monitor-memory.sh +47 -0
- package/scripts/monitor-migration.js +339 -0
- package/scripts/monitor.py +43 -0
- package/scripts/monitoring/README.md +178 -0
- package/scripts/monitoring/alert-monitor.sh +220 -0
- package/scripts/monitoring/analyze-resources.sh +199 -0
- package/scripts/monitoring/dashboards/rate-limiting-dashboard.json +211 -0
- package/scripts/monitoring/dynamic-monitor.sh +85 -0
- package/scripts/monitoring/launch-stability-test.sh +184 -0
- package/scripts/monitoring/monitor-test.sh +93 -0
- package/scripts/monitoring/pre-test-validation.sh +208 -0
- package/scripts/monitoring/quick-test-alerting.sh +118 -0
- package/scripts/monitoring/quick-test-rate-limiting.sh +206 -0
- package/scripts/monitoring/rate-limiting-monitor.sh +380 -0
- package/scripts/monitoring/resource-monitor.sh +126 -0
- package/scripts/monitoring/stability-monitor.js +429 -0
- package/scripts/monitoring/test-monitor-quick.sh +54 -0
- package/scripts/monitoring/view-alerts.sh +307 -0
- package/scripts/npm-metrics-collector.js +482 -0
- package/scripts/npm-package-validation.cjs +299 -0
- package/scripts/optimization/build-optimizer.js +438 -0
- package/scripts/optimization/config-validator.js +761 -0
- package/scripts/optimization/test-optimization.js +432 -0
- package/scripts/optimization/unified-activation.js +839 -0
- package/scripts/optimize-package-swarm.js +54 -0
- package/scripts/performance/ACTIVATION_COMMANDS.md +292 -0
- package/scripts/performance/sqlite-enhanced-activation.sh +583 -0
- package/scripts/performance/test-enhanced-backend.sh +504 -0
- package/scripts/performance-monitor.js +644 -0
- package/scripts/performance-test-runner.js +698 -0
- package/scripts/post-deployment-monitoring.js +350 -0
- package/scripts/post-edit-pipeline.js +2091 -0
- package/scripts/post-install-claude-md.js +78 -0
- package/scripts/postinstall.js +79 -0
- package/scripts/pre-publish-validation.cjs +212 -0
- package/scripts/pre-publish-validation.js +429 -0
- package/scripts/redis-lua/cleanup-blocking-coordination.lua +198 -0
- package/scripts/release-announcement.js +425 -0
- package/scripts/release-notification.js +248 -0
- package/scripts/release-rollback.js +376 -0
- package/scripts/release-validation.js +460 -0
- package/scripts/rollback-sdk.sh +66 -0
- package/scripts/run-production-validation.ts +590 -0
- package/scripts/run-stability-validation.sh +687 -0
- package/scripts/security/README.md +339 -0
- package/scripts/security/deployment-validation.cjs +279 -0
- package/scripts/security/envelope-encryption-confidence-report.cjs +422 -0
- package/scripts/security/install-git-hooks.sh +132 -0
- package/scripts/security/install-git-secrets.sh +295 -0
- package/scripts/security/rotate-api-keys.js +469 -0
- package/scripts/security/ruv-swarm-safe.js +74 -0
- package/scripts/security/security-audit.cjs +538 -0
- package/scripts/security/setup-redis-auth.sh +397 -0
- package/scripts/security/validate-envelope-encryption.cjs +340 -0
- package/scripts/security-scan.js +492 -0
- package/scripts/src/web/frontend/.claude-flow/metrics/agent-metrics.json +1 -0
- package/scripts/src/web/frontend/.claude-flow/metrics/performance.json +9 -0
- package/scripts/src/web/frontend/.claude-flow/metrics/task-metrics.json +10 -0
- package/scripts/switch-api.sh +158 -0
- package/scripts/sync-agents.js +290 -0
- package/scripts/test/50-agent-test.js +625 -0
- package/scripts/test/NEW_STABILITY_TEST_GUIDE.md +407 -0
- package/scripts/test/README.md +236 -0
- package/scripts/test/STABILITY_TEST_EXAMPLE.md +347 -0
- package/scripts/test/STABILITY_TEST_README.md +480 -0
- package/scripts/test/agent-worker.js +309 -0
- package/scripts/test/ai-coordination-test.js +650 -0
- package/scripts/test/ai-mesh-coordination-test.js +416 -0
- package/scripts/test/check-links.ts +274 -0
- package/scripts/test/check-performance-regression.ts +168 -0
- package/scripts/test/cli-agent-coordination-test.js +313 -0
- package/scripts/test/coordinator-multilingual-test.js +396 -0
- package/scripts/test/coordinator-transparency-demo.js +585 -0
- package/scripts/test/coverage-report.ts +692 -0
- package/scripts/test/generate-swarm-tests.js +633 -0
- package/scripts/test/integration-test-validation.cjs +253 -0
- package/scripts/test/load-test-swarm.js +576 -0
- package/scripts/test/mesh-coordination-zero-overlap-test.js +740 -0
- package/scripts/test/multilingual-hello-world-test.js +390 -0
- package/scripts/test/quick-multilingual-demo.js +464 -0
- package/scripts/test/real-agent-test.js +312 -0
- package/scripts/test/run-phase3-compliance-tests.js +427 -0
- package/scripts/test/run-stability-test-examples.sh +292 -0
- package/scripts/test/stability-results/stability-metrics.jsonl +83 -0
- package/scripts/test/stability-results/stability-test-report.json +128 -0
- package/scripts/test/stability-results/stability-test.log +1827 -0
- package/scripts/test/stability-test-50-agents.js +734 -0
- package/scripts/test/test-batch-tasks.ts +29 -0
- package/scripts/test/test-byzantine-resolution.js +246 -0
- package/scripts/test/test-claude-spawn-options.sh +63 -0
- package/scripts/test/test-cli-wizard.js +331 -0
- package/scripts/test/test-comprehensive.js +401 -0
- package/scripts/test/test-coordination-features.ts +238 -0
- package/scripts/test/test-fallback-systems.js +276 -0
- package/scripts/test/test-init-command.ts +302 -0
- package/scripts/test/test-mcp.ts +251 -0
- package/scripts/test/test-runner.ts +568 -0
- package/scripts/test/test-swarm-integration.sh +92 -0
- package/scripts/test/test-swarm.ts +142 -0
- package/scripts/test/validation-summary.ts +408 -0
- package/scripts/test-cleanup-performance.sh +416 -0
- package/scripts/test-dashboard-auth.cjs +203 -0
- package/scripts/test-docker-deployment.sh +207 -0
- package/scripts/test-npm-package.cjs +167 -0
- package/scripts/test-provider-routing.cjs +226 -0
- package/scripts/test-routing-telemetry.cjs +147 -0
- package/scripts/test-runner.cjs +154 -0
- package/scripts/test-zai-10k.cjs +81 -0
- package/scripts/test-zai-api.cjs +191 -0
- package/scripts/test-zai-diagnostic.cjs +151 -0
- package/scripts/test-zai-final.cjs +128 -0
- package/scripts/test-zai-with-env.cjs +85 -0
- package/scripts/utils/README.md +261 -0
- package/scripts/utils/clean-build-artifacts.sh +94 -0
- package/scripts/utils/cleanup-root.sh +69 -0
- package/scripts/utils/fix-cliffy-imports.js +307 -0
- package/scripts/utils/fix-duplicate-imports.js +114 -0
- package/scripts/utils/fix-error-handling.cjs +70 -0
- package/scripts/utils/fix-import-paths.js +104 -0
- package/scripts/utils/fix-imports.js +116 -0
- package/scripts/utils/fix-shebang.js +78 -0
- package/scripts/utils/fix-test-modules.js +27 -0
- package/scripts/utils/fix-timezone-issue-246.js +200 -0
- package/scripts/utils/fix-ts-comprehensive.py +182 -0
- package/scripts/utils/fix-ts-targeted-batch.js +250 -0
- package/scripts/utils/remove-benchmark-conflicts.sh +140 -0
- package/scripts/utils/simple-test-fixer.js +190 -0
- package/scripts/utils/validate-metrics-structure.cjs +144 -0
- package/scripts/validate-agent-hooks.js +506 -0
- package/scripts/validate-changelog.js +241 -0
- package/scripts/validate-coordination-cli.js +69 -0
- package/scripts/validate-coordination-toggle-integration.cjs +501 -0
- package/scripts/validate-docker-infrastructure.sh +502 -0
- package/scripts/validate-entry-points.js +300 -0
- package/scripts/validate-stage3-performance.ts +377 -0
- package/scripts/validate-template-bundling.js +180 -0
- package/scripts/validation/README.md +33 -0
- package/scripts/validation/acl-security-validation.cjs +214 -0
- package/scripts/validation/acl-security-validation.js +402 -0
- package/scripts/validation/byzantine-verification.js +407 -0
- package/scripts/validation/final-phase-2-consensus.cjs +219 -0
- package/scripts/validation/final-security-validation.js +791 -0
- package/scripts/validation/final-wasm-validation.cjs +840 -0
- package/scripts/validation/integration-test-analysis.js +105 -0
- package/scripts/validation/phase-0-comprehensive-validation.js +474 -0
- package/scripts/validation/phase-0-consensus-report.js +139 -0
- package/scripts/validation/phase-0-final-report.js +112 -0
- package/scripts/validation/phase-0-redis-consensus-report.js +129 -0
- package/scripts/validation/phase-0-validation-improved.js +490 -0
- package/scripts/validation/phase-0-validation-test.js +65 -0
- package/scripts/validation/phase-1-consensus-report.cjs +342 -0
- package/scripts/validation/phase-1-consensus-validation.cjs +551 -0
- package/scripts/validation/phase-1-consensus-validation.js +551 -0
- package/scripts/validation/phase-2-consensus-report.cjs +186 -0
- package/scripts/validation/phase-2-validation.cjs +171 -0
- package/scripts/validation/phase-2-validation.js +171 -0
- package/scripts/validation/phase-4-consensus-report.js +181 -0
- package/scripts/validation/phase-4-final-validation.js +351 -0
- package/scripts/validation/phase-5-consensus-report.cjs +113 -0
- package/scripts/validation/phase-5-consensus-report.js +113 -0
- package/scripts/validation/security-analysis.js +49 -0
- package/scripts/validation/security-validation.js +492 -0
- package/scripts/validation/simple-security-validation.js +464 -0
- package/scripts/verify-installation.js +112 -0
- package/scripts/verify-mcp-server.js +86 -0
- package/scripts/verify-sdk-phase1.cjs +293 -0
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Unified TypeScript Fixer - Consolidates 6+ TypeScript fix scripts
|
|
5
|
+
* Phase 12: Script Consolidation - TypeScript Error Resolution
|
|
6
|
+
*
|
|
7
|
+
* Consolidates:
|
|
8
|
+
* - fix-typescript-errors.js
|
|
9
|
+
* - fix-ts-advanced.js
|
|
10
|
+
* - fix-ts-targeted.sh
|
|
11
|
+
* - fix-ts-final.sh
|
|
12
|
+
* - quick-fix-ts.js
|
|
13
|
+
* - batch-fix-ts.sh
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { promises as fs } from 'fs';
|
|
17
|
+
import path from 'path';
|
|
18
|
+
import { exec } from 'child_process';
|
|
19
|
+
import { promisify } from 'util';
|
|
20
|
+
|
|
21
|
+
const execAsync = promisify(exec);
|
|
22
|
+
|
|
23
|
+
class TypeScriptFixer {
|
|
24
|
+
constructor() {
|
|
25
|
+
this.version = '1.0.0';
|
|
26
|
+
this.fixedFiles = new Set();
|
|
27
|
+
this.errorStats = {};
|
|
28
|
+
this.fixStrategies = new Map();
|
|
29
|
+
this.setupFixStrategies();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
setupFixStrategies() {
|
|
33
|
+
// Basic error fixes (from fix-typescript-errors.js)
|
|
34
|
+
this.fixStrategies.set('basic', {
|
|
35
|
+
name: 'Basic Error Fixes',
|
|
36
|
+
description: 'Standard TypeScript error patterns',
|
|
37
|
+
fixes: this.getBasicFixes()
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// Advanced fixes (from fix-ts-advanced.js)
|
|
41
|
+
this.fixStrategies.set('advanced', {
|
|
42
|
+
name: 'Advanced Error Fixes',
|
|
43
|
+
description: 'Complex TypeScript error patterns',
|
|
44
|
+
fixes: this.getAdvancedFixes()
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// Targeted fixes (from fix-ts-targeted.sh equivalent)
|
|
48
|
+
this.fixStrategies.set('targeted', {
|
|
49
|
+
name: 'Targeted Fixes',
|
|
50
|
+
description: 'File-specific targeted fixes',
|
|
51
|
+
fixes: this.getTargetedFixes()
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// Quick fixes (from quick-fix-ts.js)
|
|
55
|
+
this.fixStrategies.set('quick', {
|
|
56
|
+
name: 'Quick Fixes',
|
|
57
|
+
description: 'Fast common pattern fixes',
|
|
58
|
+
fixes: this.getQuickFixes()
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// Batch fixes (from batch-fix-ts.sh equivalent)
|
|
62
|
+
this.fixStrategies.set('batch', {
|
|
63
|
+
name: 'Batch Fixes',
|
|
64
|
+
description: 'Bulk operation fixes',
|
|
65
|
+
fixes: this.getBatchFixes()
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
getBasicFixes() {
|
|
70
|
+
return {
|
|
71
|
+
// TS1361: Import type issues
|
|
72
|
+
TS1361: {
|
|
73
|
+
pattern: /error TS1361: '([^']+)' cannot be used as a value/,
|
|
74
|
+
fix: async (file, match) => {
|
|
75
|
+
const content = await fs.readFile(file, 'utf8');
|
|
76
|
+
const updated = content.replace(
|
|
77
|
+
/import type \{([^}]*)\} from '([^']+)'/g,
|
|
78
|
+
(m, imports, path) => {
|
|
79
|
+
if (imports.includes(match[1])) {
|
|
80
|
+
return `import { ${imports} } from '${path}'`;
|
|
81
|
+
}
|
|
82
|
+
return m;
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
if (updated !== content) {
|
|
86
|
+
await fs.writeFile(file, updated);
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
// TS2339: Property does not exist
|
|
94
|
+
TS2339: {
|
|
95
|
+
pattern: /error TS2339: Property '([^']+)' does not exist on type '([^']+)'/,
|
|
96
|
+
fix: async (file, match) => {
|
|
97
|
+
const content = await fs.readFile(file, 'utf8');
|
|
98
|
+
const property = match[1];
|
|
99
|
+
const type = match[2];
|
|
100
|
+
|
|
101
|
+
if (type === 'never') {
|
|
102
|
+
const updated = content.replace(
|
|
103
|
+
new RegExp(`(\\w+)\\.${property}`, 'g'),
|
|
104
|
+
`($1 as any).${property}`
|
|
105
|
+
);
|
|
106
|
+
if (updated !== content) {
|
|
107
|
+
await fs.writeFile(file, updated);
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
// TS2304: Cannot find name
|
|
116
|
+
TS2304: {
|
|
117
|
+
pattern: /error TS2304: Cannot find name '([^']+)'/,
|
|
118
|
+
fix: async (file, match) => {
|
|
119
|
+
const name = match[1];
|
|
120
|
+
const content = await fs.readFile(file, 'utf8');
|
|
121
|
+
|
|
122
|
+
const commonImports = {
|
|
123
|
+
'process': "import process from 'node:process';",
|
|
124
|
+
'Buffer': "import { Buffer } from 'node:buffer';",
|
|
125
|
+
'URL': "import { URL } from 'node:url';",
|
|
126
|
+
'__dirname': "import { dirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nconst __dirname = dirname(fileURLToPath(import.meta.url));",
|
|
127
|
+
'__filename': "import { fileURLToPath } from 'node:url';\nconst __filename = fileURLToPath(import.meta.url);"
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
if (commonImports[name] && !content.includes(commonImports[name])) {
|
|
131
|
+
const lines = content.split('\n');
|
|
132
|
+
const importIndex = lines.findIndex(line => line.startsWith('import'));
|
|
133
|
+
if (importIndex !== -1) {
|
|
134
|
+
lines.splice(importIndex, 0, commonImports[name]);
|
|
135
|
+
await fs.writeFile(file, lines.join('\n'));
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return false;
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
// TS2307: Cannot find module
|
|
144
|
+
TS2307: {
|
|
145
|
+
pattern: /error TS2307: Cannot find module '([^']+)'/,
|
|
146
|
+
fix: async (file, match) => {
|
|
147
|
+
const modulePath = match[1];
|
|
148
|
+
const content = await fs.readFile(file, 'utf8');
|
|
149
|
+
|
|
150
|
+
if (!modulePath.endsWith('.js') && modulePath.startsWith('.')) {
|
|
151
|
+
const updated = content.replace(
|
|
152
|
+
new RegExp(`from '${modulePath.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}'`, 'g'),
|
|
153
|
+
`from '${modulePath}.js'`
|
|
154
|
+
);
|
|
155
|
+
if (updated !== content) {
|
|
156
|
+
await fs.writeFile(file, updated);
|
|
157
|
+
return true;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
getAdvancedFixes() {
|
|
167
|
+
return {
|
|
168
|
+
// Advanced property fixes
|
|
169
|
+
propertyFixes: async (files) => {
|
|
170
|
+
const fixes = [];
|
|
171
|
+
for (const file of files) {
|
|
172
|
+
try {
|
|
173
|
+
const content = await fs.readFile(file, 'utf8');
|
|
174
|
+
let updated = content;
|
|
175
|
+
|
|
176
|
+
// Fix Command interface issues
|
|
177
|
+
updated = updated.replace(/\.arguments\(/g, '.args(');
|
|
178
|
+
updated = updated.replace(/\.outputHelp\(\)/g, '.help()');
|
|
179
|
+
updated = updated.replace(/config\.capabilities/g, '(config as any).capabilities');
|
|
180
|
+
updated = updated.replace(/task\.parameters/g, '(task as any).parameters');
|
|
181
|
+
|
|
182
|
+
if (updated !== content) {
|
|
183
|
+
await fs.writeFile(file, updated);
|
|
184
|
+
fixes.push(file);
|
|
185
|
+
}
|
|
186
|
+
} catch (err) {
|
|
187
|
+
// Ignore file access errors
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return fixes;
|
|
191
|
+
},
|
|
192
|
+
|
|
193
|
+
// Advanced type assertion fixes
|
|
194
|
+
typeAssertions: async (files) => {
|
|
195
|
+
const fixes = [];
|
|
196
|
+
for (const file of files) {
|
|
197
|
+
try {
|
|
198
|
+
const content = await fs.readFile(file, 'utf8');
|
|
199
|
+
let updated = content;
|
|
200
|
+
|
|
201
|
+
// Fix array push operations
|
|
202
|
+
updated = updated.replace(
|
|
203
|
+
/(\w+)\.push\(/g,
|
|
204
|
+
(match, varName) => {
|
|
205
|
+
if (content.includes(`${varName} = []`) || content.includes(`${varName}: []`)) {
|
|
206
|
+
return `(${varName} as any[]).push(`;
|
|
207
|
+
}
|
|
208
|
+
return match;
|
|
209
|
+
}
|
|
210
|
+
);
|
|
211
|
+
|
|
212
|
+
// Fix never type arrays
|
|
213
|
+
updated = updated.replace(/: never\[\]/g, ': any[]');
|
|
214
|
+
updated = updated.replace(/= \[\] as never\[\]/g, '= [] as any[]');
|
|
215
|
+
|
|
216
|
+
if (updated !== content) {
|
|
217
|
+
await fs.writeFile(file, updated);
|
|
218
|
+
fixes.push(file);
|
|
219
|
+
}
|
|
220
|
+
} catch (err) {
|
|
221
|
+
// Ignore file access errors
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
return fixes;
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
getTargetedFixes() {
|
|
230
|
+
return {
|
|
231
|
+
// File-specific fixes
|
|
232
|
+
cliCommands: async () => {
|
|
233
|
+
const files = await this.findFiles('src/cli/commands/*.ts');
|
|
234
|
+
const fixes = [];
|
|
235
|
+
|
|
236
|
+
for (const file of files) {
|
|
237
|
+
try {
|
|
238
|
+
const content = await fs.readFile(file, 'utf8');
|
|
239
|
+
let updated = content;
|
|
240
|
+
|
|
241
|
+
// Fix common CLI command issues
|
|
242
|
+
updated = updated.replace(/program\.name\(\)/g, '(program as any).name()');
|
|
243
|
+
updated = updated.replace(/status\./g, '(status as any).');
|
|
244
|
+
|
|
245
|
+
if (updated !== content) {
|
|
246
|
+
await fs.writeFile(file, updated);
|
|
247
|
+
fixes.push(file);
|
|
248
|
+
}
|
|
249
|
+
} catch (err) {
|
|
250
|
+
// Ignore file access errors
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
return fixes;
|
|
254
|
+
},
|
|
255
|
+
|
|
256
|
+
// Agent-specific fixes
|
|
257
|
+
agentFiles: async () => {
|
|
258
|
+
const files = await this.findFiles('src/cli/agents/*.ts');
|
|
259
|
+
const fixes = [];
|
|
260
|
+
|
|
261
|
+
for (const file of files) {
|
|
262
|
+
try {
|
|
263
|
+
const content = await fs.readFile(file, 'utf8');
|
|
264
|
+
let updated = content;
|
|
265
|
+
|
|
266
|
+
// Fix agent capability issues
|
|
267
|
+
updated = updated.replace(/agent\.capabilities/g, '(agent as any).capabilities');
|
|
268
|
+
updated = updated.replace(/swarm\.agents/g, '(swarm as any).agents');
|
|
269
|
+
|
|
270
|
+
if (updated !== content) {
|
|
271
|
+
await fs.writeFile(file, updated);
|
|
272
|
+
fixes.push(file);
|
|
273
|
+
}
|
|
274
|
+
} catch (err) {
|
|
275
|
+
// Ignore file access errors
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
return fixes;
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
getQuickFixes() {
|
|
284
|
+
return {
|
|
285
|
+
// Quick pattern replacements
|
|
286
|
+
commonPatterns: async (files) => {
|
|
287
|
+
const fixes = [];
|
|
288
|
+
const patterns = [
|
|
289
|
+
{ from: /export type \{([^}]+)\} from/g, to: 'export { type $1 } from' },
|
|
290
|
+
{ from: /import type \{([^}]+)\} from '([^']+)'/g, to: 'import { type $1 } from \'$2\'' },
|
|
291
|
+
{ from: /as never\b/g, to: 'as any' },
|
|
292
|
+
{ from: /: never\b/g, to: ': any' }
|
|
293
|
+
];
|
|
294
|
+
|
|
295
|
+
for (const file of files) {
|
|
296
|
+
try {
|
|
297
|
+
const content = await fs.readFile(file, 'utf8');
|
|
298
|
+
let updated = content;
|
|
299
|
+
|
|
300
|
+
for (const pattern of patterns) {
|
|
301
|
+
updated = updated.replace(pattern.from, pattern.to);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
if (updated !== content) {
|
|
305
|
+
await fs.writeFile(file, updated);
|
|
306
|
+
fixes.push(file);
|
|
307
|
+
}
|
|
308
|
+
} catch (err) {
|
|
309
|
+
// Ignore file access errors
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
return fixes;
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
getBatchFixes() {
|
|
318
|
+
return {
|
|
319
|
+
// Bulk operations
|
|
320
|
+
bulkImportFixes: async (files) => {
|
|
321
|
+
const fixes = [];
|
|
322
|
+
for (const file of files) {
|
|
323
|
+
try {
|
|
324
|
+
const content = await fs.readFile(file, 'utf8');
|
|
325
|
+
let updated = content;
|
|
326
|
+
|
|
327
|
+
// Add missing .js extensions in bulk
|
|
328
|
+
updated = updated.replace(/from '(\.[^']+)'/g, (match, path) => {
|
|
329
|
+
if (!path.endsWith('.js') && !path.endsWith('.json')) {
|
|
330
|
+
return `from '${path}.js'`;
|
|
331
|
+
}
|
|
332
|
+
return match;
|
|
333
|
+
});
|
|
334
|
+
|
|
335
|
+
if (updated !== content) {
|
|
336
|
+
await fs.writeFile(file, updated);
|
|
337
|
+
fixes.push(file);
|
|
338
|
+
}
|
|
339
|
+
} catch (err) {
|
|
340
|
+
// Ignore file access errors
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
return fixes;
|
|
344
|
+
},
|
|
345
|
+
|
|
346
|
+
// Bulk type fixes
|
|
347
|
+
bulkTypeFixes: async (files) => {
|
|
348
|
+
const fixes = [];
|
|
349
|
+
for (const file of files) {
|
|
350
|
+
try {
|
|
351
|
+
const content = await fs.readFile(file, 'utf8');
|
|
352
|
+
let updated = content;
|
|
353
|
+
|
|
354
|
+
// Replace problematic types in bulk
|
|
355
|
+
updated = updated.replace(/\bany\[\]/g, 'unknown[]');
|
|
356
|
+
updated = updated.replace(/\bnever\[\]/g, 'any[]');
|
|
357
|
+
|
|
358
|
+
if (updated !== content) {
|
|
359
|
+
await fs.writeFile(file, updated);
|
|
360
|
+
fixes.push(file);
|
|
361
|
+
}
|
|
362
|
+
} catch (err) {
|
|
363
|
+
// Ignore file access errors
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
return fixes;
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
async findFiles(pattern) {
|
|
372
|
+
try {
|
|
373
|
+
const { stdout } = await execAsync(`find . -path "${pattern}" -name "*.ts" 2>/dev/null || true`);
|
|
374
|
+
return stdout.trim().split('\n').filter(f => f && f.length > 0);
|
|
375
|
+
} catch (err) {
|
|
376
|
+
return [];
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
async getTypeScriptErrors() {
|
|
381
|
+
try {
|
|
382
|
+
const { stdout } = await execAsync('npm run build:types 2>&1 || npm run typecheck 2>&1 || true');
|
|
383
|
+
const errors = stdout.split('\n').filter(line => line.includes('error TS'));
|
|
384
|
+
|
|
385
|
+
// Group errors by type
|
|
386
|
+
const errorGroups = {};
|
|
387
|
+
for (const error of errors) {
|
|
388
|
+
const match = error.match(/error TS(\d+):/);
|
|
389
|
+
if (match) {
|
|
390
|
+
const code = `TS${match[1]}`;
|
|
391
|
+
if (!errorGroups[code]) {
|
|
392
|
+
errorGroups[code] = [];
|
|
393
|
+
}
|
|
394
|
+
errorGroups[code].push(error);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
return { errors, errorGroups, total: errors.length };
|
|
399
|
+
} catch (err) {
|
|
400
|
+
return { errors: [], errorGroups: {}, total: 0 };
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
async applyFixes(strategy = 'all', options = {}) {
|
|
405
|
+
console.log(`š§ Applying TypeScript fixes - Strategy: ${strategy}`);
|
|
406
|
+
console.log(`š TypeScript Fixer v${this.version}`);
|
|
407
|
+
|
|
408
|
+
const { dryRun = false, verbose = false, maxFiles = 100 } = options;
|
|
409
|
+
|
|
410
|
+
// Get current errors
|
|
411
|
+
const errorInfo = await this.getTypeScriptErrors();
|
|
412
|
+
console.log(`\nš Found ${errorInfo.total} TypeScript errors`);
|
|
413
|
+
|
|
414
|
+
if (errorInfo.total === 0) {
|
|
415
|
+
console.log('ā
No TypeScript errors found!');
|
|
416
|
+
return { success: true, fixed: 0, errors: 0 };
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
// Show error breakdown
|
|
420
|
+
console.log('\nš Error Breakdown:');
|
|
421
|
+
Object.entries(errorInfo.errorGroups)
|
|
422
|
+
.sort((a, b) => b[1].length - a[1].length)
|
|
423
|
+
.slice(0, 10)
|
|
424
|
+
.forEach(([code, errors]) => {
|
|
425
|
+
console.log(` ${code}: ${errors.length} errors`);
|
|
426
|
+
});
|
|
427
|
+
|
|
428
|
+
const files = await this.findFiles('src/**/*.ts');
|
|
429
|
+
const limitedFiles = files.slice(0, maxFiles);
|
|
430
|
+
|
|
431
|
+
if (dryRun) {
|
|
432
|
+
console.log(`\nš Dry run mode - would process ${limitedFiles.length} files`);
|
|
433
|
+
return { success: true, fixed: 0, errors: errorInfo.total };
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
let totalFixed = 0;
|
|
437
|
+
|
|
438
|
+
// Apply strategy-specific fixes
|
|
439
|
+
if (strategy === 'all' || strategy === 'basic') {
|
|
440
|
+
console.log('\nš§ Applying basic fixes...');
|
|
441
|
+
const basicFixes = this.fixStrategies.get('basic').fixes;
|
|
442
|
+
|
|
443
|
+
for (const [errorCode, fixConfig] of Object.entries(basicFixes)) {
|
|
444
|
+
if (errorInfo.errorGroups[errorCode]) {
|
|
445
|
+
const errors = errorInfo.errorGroups[errorCode].slice(0, 50);
|
|
446
|
+
for (const error of errors) {
|
|
447
|
+
const fileMatch = error.match(/([^(]+)\(/);
|
|
448
|
+
if (fileMatch) {
|
|
449
|
+
const file = fileMatch[1];
|
|
450
|
+
const match = error.match(fixConfig.pattern);
|
|
451
|
+
if (match) {
|
|
452
|
+
try {
|
|
453
|
+
const fixed = await fixConfig.fix(file, match);
|
|
454
|
+
if (fixed) {
|
|
455
|
+
totalFixed++;
|
|
456
|
+
this.fixedFiles.add(file);
|
|
457
|
+
}
|
|
458
|
+
} catch (err) {
|
|
459
|
+
if (verbose) {
|
|
460
|
+
console.error(`Error fixing ${file}: ${err.message}`);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
if (strategy === 'all' || strategy === 'advanced') {
|
|
471
|
+
console.log('\nš§ Applying advanced fixes...');
|
|
472
|
+
const advancedFixes = this.fixStrategies.get('advanced').fixes;
|
|
473
|
+
|
|
474
|
+
const propertyFixes = await advancedFixes.propertyFixes(limitedFiles);
|
|
475
|
+
const typeFixes = await advancedFixes.typeAssertions(limitedFiles);
|
|
476
|
+
|
|
477
|
+
totalFixed += propertyFixes.length + typeFixes.length;
|
|
478
|
+
propertyFixes.forEach(file => this.fixedFiles.add(file));
|
|
479
|
+
typeFixes.forEach(file => this.fixedFiles.add(file));
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
if (strategy === 'all' || strategy === 'targeted') {
|
|
483
|
+
console.log('\nš§ Applying targeted fixes...');
|
|
484
|
+
const targetedFixes = this.fixStrategies.get('targeted').fixes;
|
|
485
|
+
|
|
486
|
+
const cliFixes = await targetedFixes.cliCommands();
|
|
487
|
+
const agentFixes = await targetedFixes.agentFiles();
|
|
488
|
+
|
|
489
|
+
totalFixed += cliFixes.length + agentFixes.length;
|
|
490
|
+
cliFixes.forEach(file => this.fixedFiles.add(file));
|
|
491
|
+
agentFixes.forEach(file => this.fixedFiles.add(file));
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
if (strategy === 'all' || strategy === 'quick') {
|
|
495
|
+
console.log('\nš§ Applying quick fixes...');
|
|
496
|
+
const quickFixes = this.fixStrategies.get('quick').fixes;
|
|
497
|
+
|
|
498
|
+
const patternFixes = await quickFixes.commonPatterns(limitedFiles);
|
|
499
|
+
totalFixed += patternFixes.length;
|
|
500
|
+
patternFixes.forEach(file => this.fixedFiles.add(file));
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
if (strategy === 'all' || strategy === 'batch') {
|
|
504
|
+
console.log('\nš§ Applying batch fixes...');
|
|
505
|
+
const batchFixes = this.fixStrategies.get('batch').fixes;
|
|
506
|
+
|
|
507
|
+
const importFixes = await batchFixes.bulkImportFixes(limitedFiles);
|
|
508
|
+
const typeFixes = await batchFixes.bulkTypeFixes(limitedFiles);
|
|
509
|
+
|
|
510
|
+
totalFixed += importFixes.length + typeFixes.length;
|
|
511
|
+
importFixes.forEach(file => this.fixedFiles.add(file));
|
|
512
|
+
typeFixes.forEach(file => this.fixedFiles.add(file));
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
// Check remaining errors
|
|
516
|
+
console.log('\nš Checking remaining errors...');
|
|
517
|
+
const finalErrorInfo = await this.getTypeScriptErrors();
|
|
518
|
+
|
|
519
|
+
console.log('\nš Fix Results:');
|
|
520
|
+
console.log(` Files processed: ${limitedFiles.length}`);
|
|
521
|
+
console.log(` Files modified: ${this.fixedFiles.size}`);
|
|
522
|
+
console.log(` Fixes applied: ${totalFixed}`);
|
|
523
|
+
console.log(` Errors before: ${errorInfo.total}`);
|
|
524
|
+
console.log(` Errors after: ${finalErrorInfo.total}`);
|
|
525
|
+
console.log(` Errors fixed: ${errorInfo.total - finalErrorInfo.total}`);
|
|
526
|
+
|
|
527
|
+
const success = finalErrorInfo.total < errorInfo.total;
|
|
528
|
+
|
|
529
|
+
if (success) {
|
|
530
|
+
console.log('ā
TypeScript fixes applied successfully!');
|
|
531
|
+
|
|
532
|
+
// Coordination hook
|
|
533
|
+
try {
|
|
534
|
+
await execAsync('npx claude-flow@alpha hooks post-edit --file "typescript-fixer" --memory-key "swarm/phase12/ts-fixes"');
|
|
535
|
+
} catch (err) {
|
|
536
|
+
// Ignore hook errors
|
|
537
|
+
}
|
|
538
|
+
} else {
|
|
539
|
+
console.log('ā ļø Some errors may require manual intervention');
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
return {
|
|
543
|
+
success,
|
|
544
|
+
fixed: totalFixed,
|
|
545
|
+
errorsBefore: errorInfo.total,
|
|
546
|
+
errorsAfter: finalErrorInfo.total,
|
|
547
|
+
filesModified: this.fixedFiles.size
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
printUsage() {
|
|
552
|
+
console.log('TypeScript Fixer v' + this.version);
|
|
553
|
+
console.log('Unified TypeScript error fixing utility');
|
|
554
|
+
console.log('');
|
|
555
|
+
console.log('Usage: node typescript-fixer.js [strategy] [options]');
|
|
556
|
+
console.log('');
|
|
557
|
+
console.log('Strategies:');
|
|
558
|
+
for (const [key, strategy] of this.fixStrategies) {
|
|
559
|
+
console.log(` ${key.padEnd(12)} ${strategy.description}`);
|
|
560
|
+
}
|
|
561
|
+
console.log(' all Apply all fix strategies (default)');
|
|
562
|
+
console.log('');
|
|
563
|
+
console.log('Options:');
|
|
564
|
+
console.log(' --dry-run Show what would be fixed without making changes');
|
|
565
|
+
console.log(' --verbose Show detailed output');
|
|
566
|
+
console.log(' --max-files Maximum number of files to process (default: 100)');
|
|
567
|
+
console.log(' --help Show this help');
|
|
568
|
+
console.log('');
|
|
569
|
+
console.log('Examples:');
|
|
570
|
+
console.log(' node typescript-fixer.js');
|
|
571
|
+
console.log(' node typescript-fixer.js basic --dry-run');
|
|
572
|
+
console.log(' node typescript-fixer.js advanced --verbose');
|
|
573
|
+
console.log(' node typescript-fixer.js quick --max-files 50');
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
// Main execution
|
|
578
|
+
async function main() {
|
|
579
|
+
const args = process.argv.slice(2);
|
|
580
|
+
const fixer = new TypeScriptFixer();
|
|
581
|
+
|
|
582
|
+
let strategy = 'all';
|
|
583
|
+
const options = {};
|
|
584
|
+
|
|
585
|
+
// Parse arguments
|
|
586
|
+
for (let i = 0; i < args.length; i++) {
|
|
587
|
+
const arg = args[i];
|
|
588
|
+
|
|
589
|
+
if (arg === '--help' || arg === '-h') {
|
|
590
|
+
fixer.printUsage();
|
|
591
|
+
process.exit(0);
|
|
592
|
+
} else if (arg === '--dry-run') {
|
|
593
|
+
options.dryRun = true;
|
|
594
|
+
} else if (arg === '--verbose') {
|
|
595
|
+
options.verbose = true;
|
|
596
|
+
} else if (arg === '--max-files') {
|
|
597
|
+
options.maxFiles = parseInt(args[++i]) || 100;
|
|
598
|
+
} else if (fixer.fixStrategies.has(arg) || arg === 'all') {
|
|
599
|
+
strategy = arg;
|
|
600
|
+
} else {
|
|
601
|
+
console.error(`Unknown argument: ${arg}`);
|
|
602
|
+
fixer.printUsage();
|
|
603
|
+
process.exit(1);
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
try {
|
|
608
|
+
const result = await fixer.applyFixes(strategy, options);
|
|
609
|
+
process.exit(result.success ? 0 : 1);
|
|
610
|
+
} catch (error) {
|
|
611
|
+
console.error('ā Error during TypeScript fixing:', error.message);
|
|
612
|
+
process.exit(1);
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
// Execute if run directly
|
|
617
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
618
|
+
main();
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
export { TypeScriptFixer };
|