- Add @tpmjs/db package with Prisma ORM setup - Define Tool model with NPM metadata and TPMJS fields - Define SyncCheckpoint model for tracking sync worker progress - Define SyncLog model for audit trail of sync operations - Add Prisma client singleton with dev logging - Add seed script for initializing sync checkpoints - Include comprehensive README with setup instructions Package includes: - Complete Prisma schema matching NPM_MIRROR.md spec - Three models: Tool, SyncCheckpoint, SyncLog - Indexes for performance on key fields - TypeScript support via @tpmjs/tsconfig - Scripts for db:migrate, db:push, db:studio, db:seed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
26 lines
605 B
JSON
26 lines
605 B
JSON
{
|
|
"name": "@tpmjs/db",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"main": "./src/index.ts",
|
|
"types": "./src/index.ts",
|
|
"scripts": {
|
|
"db:generate": "prisma generate",
|
|
"db:push": "prisma db push",
|
|
"db:migrate": "prisma migrate dev",
|
|
"db:studio": "prisma studio",
|
|
"db:seed": "tsx prisma/seed.ts",
|
|
"type-check": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@prisma/client": "^6.2.0"
|
|
},
|
|
"devDependencies": {
|
|
"@tpmjs/tsconfig": "workspace:*",
|
|
"@types/node": "^22.10.2",
|
|
"prisma": "^6.2.0",
|
|
"tsx": "^4.19.2",
|
|
"typescript": "^5.9.3"
|
|
}
|
|
}
|