feat(shared): add @solelog/shared contracts package and wire packages/* workspace

This commit is contained in:
Bas van Rossem
2026-06-17 13:26:07 +02:00
parent 1d395b417b
commit f83c9a6384
5 changed files with 56 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
{
"name": "@solelog/shared",
"version": "0.0.0",
"private": true,
"type": "module",
"main": "./src/index.ts",
"types": "./src/index.ts",
"exports": {
".": "./src/index.ts"
},
"dependencies": {
"zod": "^3.23.8"
}
}

View File

@@ -0,0 +1,18 @@
import { z } from 'zod';
export const HealthResponse = z.object({
status: z.literal('ok'),
});
export type HealthResponse = z.infer<typeof HealthResponse>;
export const PublicUser = z.object({
id: z.string(),
email: z.string().email(),
name: z.string(),
});
export type PublicUser = z.infer<typeof PublicUser>;
export const MeResponse = z.object({
user: PublicUser,
});
export type MeResponse = z.infer<typeof MeResponse>;

View File

@@ -0,0 +1,13 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "Bundler",
"strict": true,
"declaration": true,
"skipLibCheck": true,
"esModuleInterop": true,
"verbatimModuleSyntax": true
},
"include": ["src"]
}