feat: add shared @sexy.pivoine.art/types package and fix type safety across frontend/backend
- Create packages/types with shared TypeScript domain model interfaces (User, Video, Model, Article, Comment, Recording, etc.) - Wire both frontend and backend packages to use @sexy.pivoine.art/types via workspace:* - Update backend Pothos objectRef types to use shared interfaces instead of inline types - Update frontend $lib/types.ts to re-export from shared package - Fix all type errors introduced by more accurate nullable types (avatar/banner as string|null UUIDs, author nullable, events/device_info as object[]) - Add artist_name to comment user select in backend resolver - Widen utility function signatures (getAssetUrl, getUserInitials, calcReadingTime) to accept null/undefined Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
12
pnpm-lock.yaml
generated
12
pnpm-lock.yaml
generated
@@ -53,6 +53,9 @@ importers:
|
||||
'@pothos/plugin-errors':
|
||||
specifier: ^4.2.0
|
||||
version: 4.9.0(@pothos/core@4.12.0(graphql@16.13.1))(graphql@16.13.1)
|
||||
'@sexy.pivoine.art/types':
|
||||
specifier: workspace:*
|
||||
version: link:../types
|
||||
argon2:
|
||||
specifier: ^0.43.0
|
||||
version: 0.43.1
|
||||
@@ -151,6 +154,9 @@ importers:
|
||||
'@sexy.pivoine.art/buttplug':
|
||||
specifier: workspace:*
|
||||
version: link:../buttplug
|
||||
'@sexy.pivoine.art/types':
|
||||
specifier: workspace:*
|
||||
version: link:../types
|
||||
graphql:
|
||||
specifier: ^16.11.0
|
||||
version: 16.13.1
|
||||
@@ -252,6 +258,12 @@ importers:
|
||||
specifier: 3.5.0
|
||||
version: 3.5.0(vite@7.3.1(@types/node@25.3.3)(jiti@2.6.1)(lightningcss@1.31.1)(terser@5.46.0)(tsx@4.21.0))
|
||||
|
||||
packages/types:
|
||||
devDependencies:
|
||||
typescript:
|
||||
specifier: ^5.9.3
|
||||
version: 5.9.3
|
||||
|
||||
packages:
|
||||
|
||||
'@antfu/install-pkg@1.1.0':
|
||||
|
||||
Reference in New Issue
Block a user