refactor: rename exportName to name across entire codebase
- Database: Migrate column export_name to name in tools table - Prisma schema: Update Tool model to use name field - Sync routes: Update keyword and changes sync to use name - Railway executor: Update API endpoints to use name parameter - API routes: Update all tool routes to use name field - Web app: Update all pages and components - Playground: Update tool loader and sidebar - create-basic-tools: Update types and generators - Scripts: Update sync and test scripts Database migration was done via direct SQL: ALTER TABLE tools RENAME COLUMN export_name TO name; The unique constraint remains on (package_id, name). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
deb9e3ae06
commit
e84eda7525
44 changed files with 222 additions and 233 deletions
|
|
@ -66,14 +66,14 @@ async function syncHello() {
|
|||
for (const toolDef of validation.tools || []) {
|
||||
const tool = await prisma.tool.upsert({
|
||||
where: {
|
||||
packageId_exportName: {
|
||||
packageId_name: {
|
||||
packageId: packageRecord.id,
|
||||
exportName: toolDef.exportName,
|
||||
name: toolDef.name,
|
||||
},
|
||||
},
|
||||
create: {
|
||||
packageId: packageRecord.id,
|
||||
exportName: toolDef.exportName,
|
||||
name: toolDef.name,
|
||||
description: toolDef.description,
|
||||
parameters: toolDef.parameters ? (toolDef.parameters as any) : undefined,
|
||||
returns: toolDef.returns ? (toolDef.returns as any) : undefined,
|
||||
|
|
@ -88,13 +88,12 @@ async function syncHello() {
|
|||
},
|
||||
});
|
||||
|
||||
console.log(`✅ Tool upserted: ${tool.exportName} (${tool.id})`);
|
||||
console.log(`✅ Tool upserted: ${tool.name} (${tool.id})`);
|
||||
}
|
||||
|
||||
// Delete orphaned tools
|
||||
const orphanedTools = existingTools.filter(
|
||||
(existingTool) =>
|
||||
!validation.tools?.some((toolDef) => toolDef.exportName === existingTool.exportName)
|
||||
(existingTool) => !validation.tools?.some((toolDef) => toolDef.name === existingTool.name)
|
||||
);
|
||||
|
||||
if (orphanedTools.length > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue