faf-cli
Version:
😽 TURBO-CAT: The Rapid Catalytic Converter • Project DNA ✨ for ANY AI • Fully Integrated with React, Next.js, Svelte, TypeScript, Vite & n8n • FREE FOREVER • 10,000+ developers • Championship Edition
60 lines • 2.67 kB
JavaScript
;
/**
* 🛂 faf tsa - Dependency Intelligence
* Understanding your project through its dependencies
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.tsaCommand = tsaCommand;
exports.tsaQuickCheck = tsaQuickCheck;
const dependency_tsa_1 = require("../engines/dependency-tsa");
const championship_style_1 = require("../utils/championship-style");
async function tsaCommand(options) {
try {
console.log();
console.log(championship_style_1.FAF_COLORS.fafCyan('🛂 FAF TSA - Dependency Intelligence'));
console.log(championship_style_1.FAF_COLORS.fafWhite('Analyzing your dependencies for context insights...'));
console.log();
const inspector = new dependency_tsa_1.DependencyTSA();
const report = await inspector.inspect();
// Display report
dependency_tsa_1.DependencyTSA.displayReport(report);
// Add to .faf context
if (report.contextScore < 70) {
console.log(championship_style_1.FAF_COLORS.fafOrange('🔍 Your dependency story is complex'));
console.log(championship_style_1.FAF_COLORS.fafWhite('Run: faf tsa --detailed for full analysis'));
}
else {
console.log(championship_style_1.FAF_COLORS.fafGreen('✨ Clear dependency architecture detected!'));
}
// Show the secret sauce hint
if (options.detailed) {
console.log();
console.log(championship_style_1.FAF_COLORS.fafCyan('🔍 How FAF TSA Works:'));
console.log(championship_style_1.FAF_COLORS.fafWhite(' 1. Scans actual usage patterns'));
console.log(championship_style_1.FAF_COLORS.fafWhite(' 2. Ranks dependencies by importance'));
console.log(championship_style_1.FAF_COLORS.fafWhite(' 3. Detects architectural patterns'));
console.log(championship_style_1.FAF_COLORS.fafWhite(' 4. Identifies migration/experimentation'));
console.log(championship_style_1.FAF_COLORS.fafWhite(' 5. Provides context insights for AI'));
console.log();
console.log(championship_style_1.FAF_COLORS.fafOrange('Context intelligence nobody else provides!'));
}
}
catch (error) {
console.error('TSA Inspection failed:', error);
process.exit(1);
}
}
async function tsaQuickCheck() {
/**
* Quick TSA score for inclusion in .faf
*/
try {
const inspector = new dependency_tsa_1.DependencyTSA();
const report = await inspector.inspect();
return report.contextScore;
}
catch {
return 0;
}
}
//# sourceMappingURL=tsa.js.map