mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 21:46:49 +00:00
0b4000af81
The server's boot gate only checks that a write route has a Zod DTO, not that the schema constrains anything, and 47 of the 213 exported request schemas hold an open shape: a loose object, a record of unknown, or an unknown field. shared/CLAUDE.md already says to narrow those rather than add new ones, but nothing counted them. scripts/open-request-schemas.mjs walks every exported *RequestSchema and counts its open shapes against a baseline of today's 75. A new request schema may hold none and an existing one no more than its entry; --update only lowers. The CLI checks the built dist/ for CI, and src/open-request-schemas.spec.ts runs the same walk over src/ so the shared test run fails as well. A missing or malformed baseline, or a dist/ without a single request schema, is an error.
96 lines
2.6 KiB
JSON
96 lines
2.6 KiB
JSON
{
|
|
"name": "@trek/shared",
|
|
"version": "4.3.3",
|
|
"private": true,
|
|
"description": "Shared API contracts (Zod schemas) — single source of truth for TREK server and client.",
|
|
"type": "module",
|
|
"main": "./dist/index.cjs",
|
|
"module": "./dist/index.mjs",
|
|
"types": "./dist/index.d.cts",
|
|
"exports": {
|
|
".": {
|
|
"import": {
|
|
"types": "./dist/index.d.mts",
|
|
"default": "./dist/index.mjs"
|
|
},
|
|
"require": {
|
|
"types": "./dist/index.d.cts",
|
|
"default": "./dist/index.cjs"
|
|
}
|
|
},
|
|
"./i18n": {
|
|
"import": {
|
|
"types": "./dist/i18n/index.d.mts",
|
|
"default": "./dist/i18n/index.mjs"
|
|
},
|
|
"require": {
|
|
"types": "./dist/i18n/index.d.cts",
|
|
"default": "./dist/i18n/index.cjs"
|
|
}
|
|
},
|
|
"./i18n/*": {
|
|
"import": {
|
|
"types": "./dist/i18n/*/index.d.mts",
|
|
"default": "./dist/i18n/*/index.mjs"
|
|
},
|
|
"require": {
|
|
"types": "./dist/i18n/*/index.d.cts",
|
|
"default": "./dist/i18n/*/index.cjs"
|
|
}
|
|
},
|
|
"./roadtrip": {
|
|
"import": {
|
|
"types": "./dist/roadtrip/planning.d.mts",
|
|
"default": "./dist/roadtrip/planning.mjs"
|
|
},
|
|
"require": {
|
|
"types": "./dist/roadtrip/planning.d.cts",
|
|
"default": "./dist/roadtrip/planning.cjs"
|
|
}
|
|
}
|
|
},
|
|
"typesVersions": {
|
|
"*": {
|
|
"i18n": [
|
|
"./dist/i18n/index.d.cts"
|
|
],
|
|
"i18n/*": [
|
|
"./dist/i18n/*/index.d.cts"
|
|
]
|
|
}
|
|
},
|
|
"scripts": {
|
|
"build": "tsdown",
|
|
"build:watch": "tsdown --watch --no-clean",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage",
|
|
"typecheck": "tsc --noEmit",
|
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
"format:check": "prettier --check \"src/**/*.ts\"",
|
|
"lint": "eslint --fix \"src/**/*.ts\"",
|
|
"i18n:parity": "node scripts/i18n-parity.mjs",
|
|
"i18n:parity:strict": "node scripts/i18n-parity.mjs --strict",
|
|
"contracts:open": "node scripts/open-request-schemas.mjs"
|
|
},
|
|
"dependencies": {
|
|
"isomorphic-dompurify": "^3.23.0",
|
|
"zod": "^4.6.5"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
"@vitest/coverage-v8": "^4.1.11",
|
|
"eslint": "^10.11.0",
|
|
"eslint-config-flat-gitignore": "^2.4.0",
|
|
"eslint-config-prettier": "^10.1.8",
|
|
"eslint-plugin-prettier": "^5.5.6",
|
|
"prettier": "3.9.8",
|
|
"prettier-plugin-organize-imports": "^4.3.0",
|
|
"tsdown": "^0.23.0",
|
|
"typescript": "^6.0.3",
|
|
"typescript-eslint": "^8.70.0",
|
|
"vitest": "^4.1.11"
|
|
}
|
|
}
|