fix(ci): skip lefthook install when .git directory missing
- Prevents lefthook from failing in CI/Vercel environments - Only installs git hooks when in actual git repository 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
23dd6b1a33
commit
0d7a8e4696
6 changed files with 1336 additions and 6 deletions
38
packages/db/test-query.mjs
Normal file
38
packages/db/test-query.mjs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
async function main() {
|
||||
console.log('Testing database connection...');
|
||||
|
||||
// Test 1: Count tools
|
||||
console.time('Count tools');
|
||||
const count = await prisma.tool.count();
|
||||
console.timeEnd('Count tools');
|
||||
console.log(`Total tools: ${count}`);
|
||||
|
||||
// Test 2: Fetch first 20 tools (same as API)
|
||||
console.time('Fetch 20 tools');
|
||||
const tools = await prisma.tool.findMany({
|
||||
orderBy: [{ qualityScore: 'desc' }, { npmDownloadsLastMonth: 'desc' }, { createdAt: 'desc' }],
|
||||
take: 20,
|
||||
});
|
||||
console.timeEnd('Fetch 20 tools');
|
||||
console.log(`Fetched ${tools.length} tools`);
|
||||
|
||||
if (tools.length > 0) {
|
||||
console.log('\nFirst tool:', tools[0].npmPackageName);
|
||||
console.log('Quality score:', tools[0].qualityScore);
|
||||
} else {
|
||||
console.log('\n⚠️ No tools found in database!');
|
||||
}
|
||||
}
|
||||
|
||||
main()
|
||||
.catch((e) => {
|
||||
console.error('❌ Database error:', e.message);
|
||||
process.exit(1);
|
||||
})
|
||||
.finally(async () => {
|
||||
await prisma.$disconnect();
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue