9b24e299db
GRO-1325 was marked done but never implemented. This adds the missing Better-Auth user + account seeding for UAT email+password logins. For each SEED_UAT_*_PASSWORD env var present, the seed now: 1. Creates (or links to existing) a Better-Auth user record with emailVerified: true 2. Creates a credential account with providerId: "credential" and a bcrypt-hashed password (using better-auth/crypto) 3. Links the staff record to the Better-Auth user via userId Idempotent: skips user/account creation if already seeded. Updated UAT_PLAYBOOK.md §4.1 — TC-API-1.4 through 1.9 now reference the new seed provisioning (GRO-1325 was the missing piece). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
40 lines
938 B
JSON
40 lines
938 B
JSON
{
|
|
"name": "@groombook/db",
|
|
"version": "0.0.1",
|
|
"private": true,
|
|
"type": "module",
|
|
"main": "./dist/index.js",
|
|
"types": "./src/index.ts",
|
|
"exports": {
|
|
".": {
|
|
"default": "./dist/index.js",
|
|
"types": "./src/index.ts"
|
|
},
|
|
"./factories": {
|
|
"default": "./src/factories.ts",
|
|
"types": "./src/factories.ts"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"build": "tsc --project .",
|
|
"generate": "drizzle-kit generate",
|
|
"migrate": "drizzle-kit migrate",
|
|
"seed": "tsx src/seed.ts",
|
|
"reset": "tsx src/reset.ts && drizzle-kit migrate && tsx src/seed.ts",
|
|
"studio": "drizzle-kit studio",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"better-auth": "^1.5.6",
|
|
"drizzle-orm": "^0.38.4",
|
|
"postgres": "^3.4.5"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^22.10.7",
|
|
"drizzle-kit": "^0.30.4",
|
|
"tsx": "^4.19.0",
|
|
"typescript": "^5.7.3"
|
|
},
|
|
"license": "AGPL-3.0-only"
|
|
}
|