- Add `^@/` to pathNot to allow Next.js `@/` path alias - Add `^@tpmjs/` to pathNot to allow workspace package imports - Fixes architecture check failures in CI - Apply Biome formatting to check-tool.mjs and sync-single-tool.mjs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
35 lines
1 KiB
JavaScript
35 lines
1 KiB
JavaScript
import { PrismaClient } from '@prisma/client';
|
|
import { fetchLatestPackageWithMetadata } from '@tpmjs/npm-client';
|
|
|
|
const prisma = new PrismaClient();
|
|
|
|
async function main() {
|
|
const packageName = '@tpmjs/text-transformer';
|
|
|
|
console.log(`Fetching metadata for ${packageName}...`);
|
|
const pkg = await fetchLatestPackageWithMetadata(packageName);
|
|
|
|
if (!pkg) {
|
|
console.error('Package not found!');
|
|
return;
|
|
}
|
|
|
|
console.log(`Found ${packageName} v${pkg.version}`);
|
|
console.log(`README length: ${pkg.readme ? pkg.readme.length : 0} chars`);
|
|
console.log(`Keywords: ${(pkg.topLevelKeywords || pkg.keywords || []).join(', ')}`);
|
|
|
|
// Update the tool in the database
|
|
await prisma.tool.update({
|
|
where: { npmPackageName: packageName },
|
|
data: {
|
|
npmReadme: pkg.readme || null,
|
|
npmKeywords: pkg.topLevelKeywords || pkg.keywords || [],
|
|
npmAuthor: pkg.author || null,
|
|
npmMaintainers: pkg.maintainers || null,
|
|
},
|
|
});
|
|
|
|
console.log('\n✅ Tool updated successfully!');
|
|
}
|
|
|
|
main().finally(() => prisma.$disconnect());
|