Move domain models into domain package with schemas and validate with zod + elysia. Some maintenence as well
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"name": "@blade-and-brawn/portal",
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"@sveltejs/kit": "^2.65.1",
|
||||
"@sveltejs/kit": "^2.66.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
||||
"@types/bun": "^1.3.14",
|
||||
"svelte": "^5.56.3",
|
||||
@@ -22,9 +22,9 @@
|
||||
"dependencies": {
|
||||
"@tailwindcss/vite": "^4.3.1",
|
||||
"daisyui": "^5.5.23",
|
||||
"memoirist": "^0.4.0",
|
||||
"tailwindcss": "^4.3.1",
|
||||
"@blade-and-brawn/calculator": "workspace:*",
|
||||
"@blade-and-brawn/commerce": "workspace:*"
|
||||
"@blade-and-brawn/commerce": "workspace:*",
|
||||
"@blade-and-brawn/domain": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
<script lang="ts">
|
||||
import {
|
||||
LevelCalculator,
|
||||
type LevelCalculatorOutput,
|
||||
type Standards,
|
||||
} from "@blade-and-brawn/calculator";
|
||||
import {
|
||||
Activity,
|
||||
Attribute,
|
||||
Gender,
|
||||
lbToKg,
|
||||
range,
|
||||
type LevelCalculatorOutput,
|
||||
type Standards,
|
||||
type ActivityPerformance,
|
||||
type Player,
|
||||
} from "@blade-and-brawn/calculator";
|
||||
} from "@blade-and-brawn/domain";
|
||||
|
||||
interface CalcData {
|
||||
levels?: LevelCalculatorOutput;
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
<script lang="ts">
|
||||
import {
|
||||
Standards,
|
||||
type Standard,
|
||||
type StandardsConfig,
|
||||
} from "@blade-and-brawn/calculator";
|
||||
import {
|
||||
Activity,
|
||||
cmToIn,
|
||||
kgToLb,
|
||||
range,
|
||||
type Metrics,
|
||||
type Standard,
|
||||
type StandardsConfig,
|
||||
} from "@blade-and-brawn/calculator";
|
||||
} from "@blade-and-brawn/domain";
|
||||
|
||||
interface Props {
|
||||
allStandards: Standards;
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
<script lang="ts">
|
||||
import {
|
||||
Activity,
|
||||
DEFAULT_STANDARDS_DATA,
|
||||
Gender,
|
||||
lbToKg,
|
||||
Standards,
|
||||
type Metrics,
|
||||
type StandardsConfig,
|
||||
} from "@blade-and-brawn/calculator";
|
||||
import {
|
||||
Activity,
|
||||
Gender,
|
||||
lbToKg,
|
||||
type Metrics,
|
||||
} from "@blade-and-brawn/domain";
|
||||
import StandardsTable from "$lib/components/StandardsTable.svelte";
|
||||
import PlayersTable from "$lib/components/PlayersTable.svelte";
|
||||
|
||||
@@ -15,6 +17,7 @@
|
||||
|
||||
const defaultStandards = new Standards(DEFAULT_STANDARDS_DATA);
|
||||
|
||||
// TODO: try to clean this up
|
||||
let input = $state({
|
||||
activity: Activity.BenchPress,
|
||||
metrics: {
|
||||
|
||||
Reference in New Issue
Block a user