faf-cli 4.2.2 โ 4.3.1
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 +266 -90
- package/assets/project-faf-screenshot.png +0 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +40 -22
- package/dist/cli.js.map +1 -1
- package/dist/commands/git.d.ts.map +1 -1
- package/dist/commands/git.js +9 -7
- package/dist/commands/git.js.map +1 -1
- package/dist/commands/readme.d.ts +11 -6
- package/dist/commands/readme.d.ts.map +1 -1
- package/dist/commands/readme.js +167 -120
- package/dist/commands/readme.js.map +1 -1
- package/dist/commands/show.d.ts.map +1 -1
- package/dist/commands/show.js +22 -7
- package/dist/commands/show.js.map +1 -1
- package/dist/commands/sixws.d.ts +6 -0
- package/dist/commands/sixws.d.ts.map +1 -0
- package/dist/commands/sixws.js +154 -0
- package/dist/commands/sixws.js.map +1 -0
- package/dist/github/current-score-calculator.d.ts +15 -0
- package/dist/github/current-score-calculator.d.ts.map +1 -0
- package/dist/github/current-score-calculator.js +125 -0
- package/dist/github/current-score-calculator.js.map +1 -0
- package/dist/github/faf-git-generator.d.ts +58 -0
- package/dist/github/faf-git-generator.d.ts.map +1 -0
- package/dist/github/faf-git-generator.js +557 -0
- package/dist/github/faf-git-generator.js.map +1 -0
- package/dist/github/github-extractor.d.ts +4 -0
- package/dist/github/github-extractor.d.ts.map +1 -1
- package/dist/github/github-extractor.js +27 -0
- package/dist/github/github-extractor.js.map +1 -1
- package/dist/github/repo-selector.d.ts +2 -2
- package/dist/github/repo-selector.d.ts.map +1 -1
- package/dist/github/repo-selector.js +30 -23
- package/dist/github/repo-selector.js.map +1 -1
- package/dist/utils/file-utils.d.ts.map +1 -1
- package/dist/utils/file-utils.js +1 -4
- package/dist/utils/file-utils.js.map +1 -1
- package/dist/utils/slot-counter.d.ts +56 -0
- package/dist/utils/slot-counter.d.ts.map +1 -0
- package/dist/utils/slot-counter.js +100 -0
- package/dist/utils/slot-counter.js.map +1 -0
- package/dist/utils/yaml-generator.d.ts.map +1 -1
- package/dist/utils/yaml-generator.js +3 -7
- package/dist/utils/yaml-generator.js.map +1 -1
- package/package.json +7 -2
- package/project.faf +5 -9
- package/scripts/ANTHROPIC-DEMO.sh +203 -0
- package/scripts/boris-ready.sh +169 -0
- package/scripts/bundle-yaml.js +87 -0
- package/scripts/check-version.js +88 -0
- package/scripts/clean-build.js +34 -0
- package/scripts/cleanup-unused.sh +54 -0
- package/scripts/debug-django.txt +9 -0
- package/scripts/debug-mongo.txt +9 -0
- package/scripts/debug-react.txt +9 -0
- package/scripts/debug-rust.txt +9 -0
- package/scripts/debug-whisper.cpp.txt +9 -0
- package/scripts/evaluate-family-member.ts +300 -0
- package/scripts/generate-docs.ts +358 -0
- package/scripts/generate-drift-reports.sh +111 -0
- package/scripts/industry-showcase.json +122 -0
- package/scripts/mcp-ecosystem-research.sh +58 -0
- package/scripts/migrate-yaml-imports.sh +55 -0
- package/scripts/migrate-yaml.ts +132 -0
- package/scripts/performance-validation.ts +460 -0
- package/scripts/postinstall.js +30 -0
- package/scripts/prepare-release.ts +421 -0
- package/scripts/run-industry-showcase.ts +237 -0
- package/scripts/run-test-showcase.ts +244 -0
- package/scripts/setup-github-watch.sh +43 -0
- package/scripts/sync-version.js +35 -0
- package/scripts/test-integration-detection.ts +93 -0
- package/scripts/test-integration-simple.js +93 -0
- package/scripts/test-medal-progression.sh +143 -0
- package/scripts/test-showcase-results.json +109 -0
- package/scripts/test-showcase.json +32 -0
- package/scripts/update-version.js +148 -0
- package/scripts/verify-build.js +343 -0
- package/scripts/version-check.js +78 -0
- package/scripts/watch-discussions.sh +86 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# ๐งน Clean up unused imports and variables
|
|
3
|
+
|
|
4
|
+
echo "๐งน Cleaning unused imports and variables..."
|
|
5
|
+
|
|
6
|
+
# Files with known unused code to clean
|
|
7
|
+
FILES=(
|
|
8
|
+
"src/commands/ai-enhance.ts"
|
|
9
|
+
"src/commands/convert.ts"
|
|
10
|
+
"src/commands/doctor.ts"
|
|
11
|
+
"src/commands/faf-recover.ts"
|
|
12
|
+
"src/commands/quick.ts"
|
|
13
|
+
"src/engines/fab-formats-processor.ts"
|
|
14
|
+
"src/engines/faf-dna.ts"
|
|
15
|
+
"src/utils/technical-credit.ts"
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
# Remove specific unused imports
|
|
19
|
+
echo "Removing unused imports..."
|
|
20
|
+
|
|
21
|
+
# ai-enhance.ts - remove unused path and findFafFile
|
|
22
|
+
sed -i '' '/^import \* as path from "path";$/d' src/commands/ai-enhance.ts 2>/dev/null || true
|
|
23
|
+
sed -i '' '/import { findFafFile }/d' src/commands/ai-enhance.ts 2>/dev/null || true
|
|
24
|
+
|
|
25
|
+
# Remove unused fs imports where not used
|
|
26
|
+
for file in src/commands/doctor.ts src/commands/validate.ts src/generators/quick-generator.ts; do
|
|
27
|
+
grep -l "import \* as fs" "$file" 2>/dev/null && \
|
|
28
|
+
grep -q "fs\." "$file" || \
|
|
29
|
+
sed -i '' '/^import \* as fs/d' "$file" 2>/dev/null || true
|
|
30
|
+
done
|
|
31
|
+
|
|
32
|
+
# Comment out unused functions instead of deleting (preserve for future)
|
|
33
|
+
echo "Commenting out unused functions..."
|
|
34
|
+
|
|
35
|
+
# ai-enhance.ts - comment out unused helper functions
|
|
36
|
+
sed -i '' '/^function detectEnhancementFocus/,/^}/s/^/\/\/ /' src/commands/ai-enhance.ts 2>/dev/null || true
|
|
37
|
+
sed -i '' '/^function generateEnhancementPrompt/,/^}/s/^/\/\/ /' src/commands/ai-enhance.ts 2>/dev/null || true
|
|
38
|
+
sed -i '' '/^async function executeBig3Enhancement/,/^}/s/^/\/\/ /' src/commands/ai-enhance.ts 2>/dev/null || true
|
|
39
|
+
|
|
40
|
+
# Fix error variables that should be used
|
|
41
|
+
echo "Fixing error handling..."
|
|
42
|
+
|
|
43
|
+
# Replace unused error vars with underscore
|
|
44
|
+
find src -name "*.ts" -exec sed -i '' 's/} catch (error)/} catch (_error)/g' {} \; 2>/dev/null || true
|
|
45
|
+
find src -name "*.ts" -exec sed -i '' 's/catch (err)/catch (_err)/g' {} \; 2>/dev/null || true
|
|
46
|
+
|
|
47
|
+
# Count remaining issues
|
|
48
|
+
echo ""
|
|
49
|
+
echo "๐ Before cleanup:"
|
|
50
|
+
npm run lint 2>&1 | grep "problems" | head -1
|
|
51
|
+
|
|
52
|
+
echo ""
|
|
53
|
+
echo "โ
Cleanup complete!"
|
|
54
|
+
echo "Run 'npm run lint' to see remaining issues"
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
[31mโ No repositories found for 'django/django'[0m
|
|
3
|
+
|
|
4
|
+
[90mSuggestions:[0m
|
|
5
|
+
[90m โข Check spelling[0m
|
|
6
|
+
[90m โข Use full URL: faf git https://github.com/owner/repo[0m
|
|
7
|
+
[90m โข Use owner/repo: faf git owner/repo[0m
|
|
8
|
+
[90m โข Browse popular repos: faf git --list[0m
|
|
9
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
[31mโ No repositories found for 'mongodb/mongo'[0m
|
|
3
|
+
|
|
4
|
+
[90mSuggestions:[0m
|
|
5
|
+
[90m โข Check spelling[0m
|
|
6
|
+
[90m โข Use full URL: faf git https://github.com/owner/repo[0m
|
|
7
|
+
[90m โข Use owner/repo: faf git owner/repo[0m
|
|
8
|
+
[90m โข Browse popular repos: faf git --list[0m
|
|
9
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
[31mโ No repositories found for 'facebook/react'[0m
|
|
3
|
+
|
|
4
|
+
[90mSuggestions:[0m
|
|
5
|
+
[90m โข Check spelling[0m
|
|
6
|
+
[90m โข Use full URL: faf git https://github.com/owner/repo[0m
|
|
7
|
+
[90m โข Use owner/repo: faf git owner/repo[0m
|
|
8
|
+
[90m โข Browse popular repos: faf git --list[0m
|
|
9
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
[31mโ No repositories found for 'rust-lang/rust'[0m
|
|
3
|
+
|
|
4
|
+
[90mSuggestions:[0m
|
|
5
|
+
[90m โข Check spelling[0m
|
|
6
|
+
[90m โข Use full URL: faf git https://github.com/owner/repo[0m
|
|
7
|
+
[90m โข Use owner/repo: faf git owner/repo[0m
|
|
8
|
+
[90m โข Browse popular repos: faf git --list[0m
|
|
9
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
[31mโ No repositories found for 'ggml-org/whisper.cpp'[0m
|
|
3
|
+
|
|
4
|
+
[90mSuggestions:[0m
|
|
5
|
+
[90m โข Check spelling[0m
|
|
6
|
+
[90m โข Use full URL: faf git https://github.com/owner/repo[0m
|
|
7
|
+
[90m โข Use owner/repo: faf git owner/repo[0m
|
|
8
|
+
[90m โข Browse popular repos: faf git --list[0m
|
|
9
|
+
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
#!/usr/bin/env ts-node
|
|
2
|
+
/**
|
|
3
|
+
* FAF Integration Quality Evaluation
|
|
4
|
+
*
|
|
5
|
+
* Evaluates tools for FAF integration based on:
|
|
6
|
+
* - Developer adoption (weekly downloads)
|
|
7
|
+
* - Security & reliability
|
|
8
|
+
* - Active maintenance
|
|
9
|
+
* - MCP server availability
|
|
10
|
+
* - .faf context contribution (slots filled)
|
|
11
|
+
*
|
|
12
|
+
* Championship Standard: 85% minimum quality score required
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import https from 'https';
|
|
16
|
+
import { promisify } from 'util';
|
|
17
|
+
|
|
18
|
+
const get = promisify(https.get);
|
|
19
|
+
|
|
20
|
+
interface IntegrationQuality {
|
|
21
|
+
integration: string;
|
|
22
|
+
weeklyDownloads: number;
|
|
23
|
+
lastPublish: string;
|
|
24
|
+
hasVulnerabilities: boolean;
|
|
25
|
+
qualityScore: number;
|
|
26
|
+
mcpServers: string[];
|
|
27
|
+
contextSlotsFilled: number;
|
|
28
|
+
totalScore: number;
|
|
29
|
+
tier: 'trophy' | 'gold' | 'silver' | 'bronze' | 'yellow' | 'red';
|
|
30
|
+
approved: boolean;
|
|
31
|
+
reasoning: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Minimum quality thresholds for FAF integration approval
|
|
35
|
+
const INTEGRATION_REQUIREMENTS = {
|
|
36
|
+
weeklyDownloads: 100_000, // 100k+ shows real developer adoption
|
|
37
|
+
qualityScore: 85, // Bronze tier minimum (Championship standard)
|
|
38
|
+
maxDaysSincePublish: 90, // Active maintenance within 3 months
|
|
39
|
+
minContextSlots: 2, // Must contribute to 2+ .faf context fields
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
async function fetchJSON(url: string): Promise<any> {
|
|
43
|
+
return new Promise((resolve, reject) => {
|
|
44
|
+
https.get(url, (res) => {
|
|
45
|
+
let data = '';
|
|
46
|
+
res.on('data', (chunk) => data += chunk);
|
|
47
|
+
res.on('end', () => {
|
|
48
|
+
try {
|
|
49
|
+
resolve(JSON.parse(data));
|
|
50
|
+
} catch (e) {
|
|
51
|
+
reject(e);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}).on('error', reject);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function getWeeklyDownloads(pkg: string): Promise<number> {
|
|
59
|
+
try {
|
|
60
|
+
const url = `https://api.npmjs.org/downloads/point/last-week/${pkg}`;
|
|
61
|
+
const data = await fetchJSON(url);
|
|
62
|
+
return data.downloads || 0;
|
|
63
|
+
} catch {
|
|
64
|
+
return 0;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async function getPackageInfo(pkg: string): Promise<any> {
|
|
69
|
+
const url = `https://registry.npmjs.com/${pkg}`;
|
|
70
|
+
return await fetchJSON(url);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function getDaysSincePublish(publishDate: string): number {
|
|
74
|
+
const now = new Date();
|
|
75
|
+
const published = new Date(publishDate);
|
|
76
|
+
const diffTime = Math.abs(now.getTime() - published.getTime());
|
|
77
|
+
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
|
78
|
+
return diffDays;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function calculateMaintenanceScore(info: any): number {
|
|
82
|
+
const latestVersion = info['dist-tags']?.latest;
|
|
83
|
+
if (!latestVersion) return 0;
|
|
84
|
+
|
|
85
|
+
const publishDate = info.time?.[latestVersion];
|
|
86
|
+
if (!publishDate) return 0;
|
|
87
|
+
|
|
88
|
+
const daysSince = getDaysSincePublish(publishDate);
|
|
89
|
+
|
|
90
|
+
// Scoring:
|
|
91
|
+
// < 30 days = 100
|
|
92
|
+
// 30-60 days = 90
|
|
93
|
+
// 60-90 days = 85
|
|
94
|
+
// > 90 days = declining score
|
|
95
|
+
if (daysSince < 30) return 100;
|
|
96
|
+
if (daysSince < 60) return 90;
|
|
97
|
+
if (daysSince < 90) return 85;
|
|
98
|
+
return Math.max(0, 85 - (daysSince - 90));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// MCP servers available for each integration
|
|
102
|
+
const INTEGRATION_MCP_SERVERS: Record<string, string[]> = {
|
|
103
|
+
'react': ['@react-mcp/server', 'react-mcp-tools'],
|
|
104
|
+
'next': ['@vercel/mcp-server', '@nextjs/mcp-tools'],
|
|
105
|
+
'svelte': ['@sveltejs/mcp', 'svelte-kit-mcp'],
|
|
106
|
+
'vue': ['@vue/mcp-server', 'vue-mcp-tools'],
|
|
107
|
+
'vite': ['vite-mcp-server'],
|
|
108
|
+
'typescript': ['typescript-language-server', '@typescript/mcp-tools'],
|
|
109
|
+
'n8n': ['n8n-mcp', 'n8n-nodes-mcp'],
|
|
110
|
+
'@supabase/supabase-js': ['@supabase/mcp-server-supabase'],
|
|
111
|
+
'prisma': ['@prisma/mcp-server'],
|
|
112
|
+
'@vercel/node': ['@vercel/mcp-server'],
|
|
113
|
+
'astro': ['@astro/mcp-server'],
|
|
114
|
+
'zod': ['zod-mcp-validator'],
|
|
115
|
+
'axios': ['http-mcp-tools'],
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
// .faf context slots populated by each integration
|
|
119
|
+
const CONTEXT_CONTRIBUTION: Record<string, string[]> = {
|
|
120
|
+
'react': ['frontend', 'ui_library', 'state_management'],
|
|
121
|
+
'next': ['frontend', 'backend', 'runtime', 'hosting', 'api_type'],
|
|
122
|
+
'svelte': ['frontend', 'ui_library', 'state_management'],
|
|
123
|
+
'vue': ['frontend', 'ui_library', 'state_management'],
|
|
124
|
+
'vite': ['build', 'package_manager'],
|
|
125
|
+
'typescript': ['main_language', 'type_system'],
|
|
126
|
+
'n8n': ['automation_platform', 'workflow_engine', 'integration_layer', 'api_orchestration'],
|
|
127
|
+
'@supabase/supabase-js': ['database', 'backend', 'api_type'],
|
|
128
|
+
'prisma': ['database', 'orm'],
|
|
129
|
+
'@vercel/node': ['runtime', 'hosting'],
|
|
130
|
+
'astro': ['frontend', 'build', 'hosting'],
|
|
131
|
+
'zod': ['validation', 'type_system'],
|
|
132
|
+
'axios': ['http_client', 'api_communication'],
|
|
133
|
+
'dotenv': ['configuration', 'environment'],
|
|
134
|
+
'chalk': ['terminal_ui', 'output_formatting'],
|
|
135
|
+
'yargs': ['cli_framework', 'argument_parsing'],
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
function getTier(score: number): IntegrationQuality['tier'] {
|
|
139
|
+
if (score >= 99) return 'trophy';
|
|
140
|
+
if (score >= 95) return 'gold';
|
|
141
|
+
if (score >= 90) return 'silver';
|
|
142
|
+
if (score >= 85) return 'bronze';
|
|
143
|
+
if (score >= 70) return 'yellow';
|
|
144
|
+
return 'red';
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function getEmoji(tier: IntegrationQuality['tier']): string {
|
|
148
|
+
const emojis = {
|
|
149
|
+
trophy: '๐',
|
|
150
|
+
gold: '๐ฅ',
|
|
151
|
+
silver: '๐ฅ',
|
|
152
|
+
bronze: '๐ฅ',
|
|
153
|
+
yellow: '๐ก',
|
|
154
|
+
red: '๐ด'
|
|
155
|
+
};
|
|
156
|
+
return emojis[tier];
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
async function evaluateIntegration(pkg: string): Promise<IntegrationQuality> {
|
|
160
|
+
console.log(`\n๐ Evaluating Integration: ${pkg}...`);
|
|
161
|
+
|
|
162
|
+
const weeklyDownloads = await getWeeklyDownloads(pkg);
|
|
163
|
+
const info = await getPackageInfo(pkg);
|
|
164
|
+
const maintainedScore = calculateMaintenanceScore(info);
|
|
165
|
+
const mcpServers = INTEGRATION_MCP_SERVERS[pkg] || [];
|
|
166
|
+
const contextSlotsFilled = CONTEXT_CONTRIBUTION[pkg]?.length || 0;
|
|
167
|
+
|
|
168
|
+
// Calculate total score
|
|
169
|
+
let totalScore = 0;
|
|
170
|
+
const scores = {
|
|
171
|
+
downloads: 0,
|
|
172
|
+
maintenance: 0,
|
|
173
|
+
mcp: 0,
|
|
174
|
+
slots: 0
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
// Downloads (30 points max)
|
|
178
|
+
if (weeklyDownloads >= 50_000_000) scores.downloads = 30; // 50M+
|
|
179
|
+
else if (weeklyDownloads >= 10_000_000) scores.downloads = 28; // 10M+
|
|
180
|
+
else if (weeklyDownloads >= 1_000_000) scores.downloads = 25; // 1M+
|
|
181
|
+
else if (weeklyDownloads >= 100_000) scores.downloads = 20; // 100k+
|
|
182
|
+
else scores.downloads = Math.floor((weeklyDownloads / 100_000) * 20);
|
|
183
|
+
|
|
184
|
+
// Maintenance (30 points max)
|
|
185
|
+
scores.maintenance = Math.floor(maintainedScore * 0.3);
|
|
186
|
+
|
|
187
|
+
// MCP availability (20 points max)
|
|
188
|
+
scores.mcp = mcpServers.length > 0 ? 20 : 0;
|
|
189
|
+
|
|
190
|
+
// Context contribution (20 points max)
|
|
191
|
+
scores.slots = Math.min(20, contextSlotsFilled * 5);
|
|
192
|
+
|
|
193
|
+
totalScore = scores.downloads + scores.maintenance + scores.mcp + scores.slots;
|
|
194
|
+
|
|
195
|
+
const tier = getTier(totalScore);
|
|
196
|
+
const approved = totalScore >= INTEGRATION_REQUIREMENTS.qualityScore;
|
|
197
|
+
|
|
198
|
+
const latestVersion = info['dist-tags']?.latest;
|
|
199
|
+
const publishDate = info.time?.[latestVersion] || 'unknown';
|
|
200
|
+
|
|
201
|
+
const reasoning = [
|
|
202
|
+
`Adoption: ${weeklyDownloads.toLocaleString()} developers/week (${scores.downloads}/30 pts)`,
|
|
203
|
+
`Quality: ${maintainedScore}% maintenance score (${scores.maintenance}/30 pts)`,
|
|
204
|
+
`MCP Integration: ${mcpServers.length} server(s) available (${scores.mcp}/20 pts)`,
|
|
205
|
+
`Context: Fills ${contextSlotsFilled} .faf slots (${scores.slots}/20 pts)`,
|
|
206
|
+
`Updated: ${publishDate.split('T')[0]}`
|
|
207
|
+
].join('\n ');
|
|
208
|
+
|
|
209
|
+
console.log(` ${getEmoji(tier)} Quality Score: ${totalScore}/100 (${tier})`);
|
|
210
|
+
console.log(` ${approved ? 'โ
APPROVED' : 'โ NOT APPROVED'}`);
|
|
211
|
+
|
|
212
|
+
return {
|
|
213
|
+
integration: pkg,
|
|
214
|
+
weeklyDownloads,
|
|
215
|
+
lastPublish: publishDate,
|
|
216
|
+
hasVulnerabilities: false, // TODO: Check npm audit
|
|
217
|
+
qualityScore: maintainedScore,
|
|
218
|
+
mcpServers,
|
|
219
|
+
contextSlotsFilled,
|
|
220
|
+
totalScore,
|
|
221
|
+
tier,
|
|
222
|
+
approved,
|
|
223
|
+
reasoning
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
async function main() {
|
|
228
|
+
console.log('๐ FAF Integration Quality Assessment\n');
|
|
229
|
+
console.log('Championship Standard: 85+ quality score required\n');
|
|
230
|
+
console.log('='.repeat(60));
|
|
231
|
+
|
|
232
|
+
const candidates = [
|
|
233
|
+
// Phase 1: Core tooling
|
|
234
|
+
'zod',
|
|
235
|
+
'axios',
|
|
236
|
+
'dotenv',
|
|
237
|
+
'chalk',
|
|
238
|
+
'yargs',
|
|
239
|
+
|
|
240
|
+
// Phase 2: Top frameworks
|
|
241
|
+
'react',
|
|
242
|
+
'next',
|
|
243
|
+
'svelte',
|
|
244
|
+
'vue',
|
|
245
|
+
'vite',
|
|
246
|
+
|
|
247
|
+
// Phase 3: Full coverage
|
|
248
|
+
'typescript',
|
|
249
|
+
'@supabase/supabase-js',
|
|
250
|
+
'prisma',
|
|
251
|
+
'@vercel/node',
|
|
252
|
+
'astro'
|
|
253
|
+
];
|
|
254
|
+
|
|
255
|
+
const evaluations: IntegrationQuality[] = [];
|
|
256
|
+
|
|
257
|
+
for (const pkg of candidates) {
|
|
258
|
+
try {
|
|
259
|
+
const evaluation = await evaluateIntegration(pkg);
|
|
260
|
+
evaluations.push(evaluation);
|
|
261
|
+
await new Promise(resolve => setTimeout(resolve, 200)); // Rate limit
|
|
262
|
+
} catch (error) {
|
|
263
|
+
console.error(`โ Failed to evaluate ${pkg}:`, error);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
console.log('\n' + '='.repeat(60));
|
|
268
|
+
console.log('\n๐ INTEGRATION APPROVAL SUMMARY\n');
|
|
269
|
+
|
|
270
|
+
const approved = evaluations.filter(e => e.approved);
|
|
271
|
+
const needsWork = evaluations.filter(e => !e.approved);
|
|
272
|
+
|
|
273
|
+
console.log(`โ
APPROVED INTEGRATIONS: ${approved.length}/${evaluations.length}`);
|
|
274
|
+
approved.forEach(e => {
|
|
275
|
+
console.log(` ${getEmoji(e.tier)} ${e.integration} - ${e.totalScore}/100 quality score`);
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
console.log(`\nโ ๏ธ NEEDS IMPROVEMENT: ${needsWork.length}/${evaluations.length}`);
|
|
279
|
+
needsWork.forEach(e => {
|
|
280
|
+
console.log(` ${getEmoji(e.tier)} ${e.integration} - ${e.totalScore}/100 (below 85% threshold)`);
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
console.log('\n๐ RECOMMENDED INTEGRATIONS:\n');
|
|
284
|
+
console.log('Add these to package.json to enable smart detection:\n');
|
|
285
|
+
console.log('"dependencies": {');
|
|
286
|
+
approved.forEach((e, i) => {
|
|
287
|
+
const comma = i < approved.length - 1 ? ',' : '';
|
|
288
|
+
console.log(` "${e.integration}": "latest"${comma} // ${e.contextSlotsFilled} context slots`);
|
|
289
|
+
});
|
|
290
|
+
console.log('}');
|
|
291
|
+
|
|
292
|
+
console.log('\n๐ Integration assessment complete!');
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// Run if called directly
|
|
296
|
+
if (require.main === module) {
|
|
297
|
+
main().catch(console.error);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export { evaluateIntegration, type IntegrationQuality };
|