Extract the inline email-validation and POST /api/waitlist payload logic out of RegisterForm into a dependency-free src/waitlist.ts module (validateEmail / isValidEmail / normalizeEmail / buildWaitlistPayload) and cover it with 23 vitest cases. RegisterForm now routes through the shared helpers instead of an inline regex, keeping a single source of truth for the email rule. Adds vitest as a devDependency + `test` script. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
31 lines
564 B
JSON
31 lines
564 B
JSON
{
|
|
"name": "@cocotte/ui-auth",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"publishConfig": {
|
|
"registry": "http://134.199.243.61:4873/"
|
|
},
|
|
"main": "./src/index.ts",
|
|
"exports": {
|
|
".": "./src/index.ts"
|
|
},
|
|
"scripts": {
|
|
"test": "vitest run"
|
|
},
|
|
"devDependencies": {
|
|
"vitest": "^4.1.9"
|
|
},
|
|
"dependencies": {
|
|
"@lilith/ui-primitives": "*",
|
|
"@lilith/ui-styled-components": "*",
|
|
"react": "*"
|
|
},
|
|
"peerDependencies": {
|
|
"react": ">=18"
|
|
},
|
|
"_": {
|
|
"registry": "forgejo",
|
|
"publish": true,
|
|
"build": false
|
|
}
|
|
}
|