mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 05:26:47 +00:00
a0e1a39acc
contracts:open in shared only counts exports named *RequestSchema, but the name is a convention: 37 body DTOs wrap a schema called *BodySchema, *InputSchema or plain *Schema, and tags.dto.ts declares its schemas locally. pluginInstanceConfigUpdateSchema (a record of unknown behind PluginConfigDto), createAlbumLinkSchema with five open shapes and a dozen more were never counted, and a new open body under one of those names passed both checks. tests/unit/contracts/dto-open-shapes.test.ts walks the other way round. It finds every class that extends createZodDto under src/, imports it, and counts the open shapes in the schema the Zod pipe validates with shared's walk. Each class is held to scripts/dto-open-shapes-baseline.json, 61 DTOs with 101 open shapes today, and a new DTO may hold none. It fails closed: a createZodDto call that is not an exported class, two DTO classes with one name, an empty tree or an unreadable baseline stop it. It runs with the unit tests; npm run contracts:dto-open runs it on its own and --update only lowers the baseline. The five DTO classes declared inside roadtrip controllers are exported so the walk can reach their schemas. The selector test picks up prettier's wrapping of the cases added before.
146 lines
4.7 KiB
JSON
146 lines
4.7 KiB
JSON
{
|
|
"name": "@trek/server",
|
|
"version": "4.3.3",
|
|
"main": "src/index.ts",
|
|
"scripts": {
|
|
"start": "node --require tsconfig-paths/register dist/index.js",
|
|
"dev": "node scripts/dev.mjs",
|
|
"build": "node scripts/build.mjs",
|
|
"start:prod": "node --require tsconfig-paths/register dist/index.js",
|
|
"reset-admin": "node reset-admin.js",
|
|
"typecheck": "tsc --noEmit",
|
|
"typecheck:tests": "tsc -p tsconfig.tests.json --noEmit",
|
|
"typecheck:scripts": "tsc -p tsconfig.scripts.json --noEmit",
|
|
"db:call-graph": "node scripts/db-call-graph.mjs",
|
|
"lint:size": "node scripts/size-lint.mjs",
|
|
"lint:boundaries": "node scripts/import-boundaries.mjs",
|
|
"contracts:dto-open": "node scripts/dto-open-shapes.mjs",
|
|
"gen:plugin-facts": "node --import tsx scripts/gen-plugin-facts.ts",
|
|
"check:plugin-facts": "node --import tsx scripts/gen-plugin-facts.ts --check",
|
|
"gen:entities": "node --import tsx scripts/generate-entities.ts",
|
|
"check:entities": "node --import tsx scripts/generate-entities.ts --check",
|
|
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
"format:check": "prettier --check \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
|
"lint:check": "eslint .",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:unit": "vitest run tests/unit",
|
|
"test:integration": "vitest run tests/integration",
|
|
"test:ws": "vitest run tests/websocket",
|
|
"test:e2e": "vitest run tests/e2e",
|
|
"test:coverage": "vitest run --coverage"
|
|
},
|
|
"mikro-orm": {
|
|
"configPaths": [
|
|
"./src/mikro-orm.config.ts",
|
|
"./dist/mikro-orm.config.js"
|
|
]
|
|
},
|
|
"dependencies": {
|
|
"@aws-lite/client": "^0.23.7",
|
|
"@aws-lite/s3": "^0.2.7",
|
|
"@mikro-orm/cli": "^7.2.1",
|
|
"@mikro-orm/core": "^7.2.1",
|
|
"@mikro-orm/migrations": "^7.2.1",
|
|
"@mikro-orm/nestjs": "^7.1.0",
|
|
"@mikro-orm/postgresql": "^7.2.1",
|
|
"@mikro-orm/seeder": "^7.2.1",
|
|
"@mikro-orm/sql": "^7.2.1",
|
|
"@mikro-orm/sqlite": "^7.2.1",
|
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
"@nestjs/common": "^11.2.5",
|
|
"@nestjs/config": "^4.0.4",
|
|
"@nestjs/core": "^11.2.5",
|
|
"@nestjs/platform-express": "^11.2.5",
|
|
"@nestjs/platform-ws": "^11.2.5",
|
|
"@nestjs/schedule": "^6.1.3",
|
|
"@nestjs/swagger": "^11.4.7",
|
|
"@nestjs/websockets": "^11.2.5",
|
|
"@simplewebauthn/server": "^13.3.3",
|
|
"@trek/shared": "*",
|
|
"archiver": "^6.0.2",
|
|
"bcryptjs": "^2.4.3",
|
|
"better-sqlite3": "^13.0.3",
|
|
"compression": "^1.8.2",
|
|
"cookie-parser": "^1.4.7",
|
|
"cors": "^2.8.6",
|
|
"cron": "^4.4.0",
|
|
"dotenv": "^16.6.1",
|
|
"exifr": "7.1.3",
|
|
"express": "^4.22.3",
|
|
"fast-xml-parser": "^5.11.1",
|
|
"helmet": "^8.3.0",
|
|
"jimp": "^1.6.1",
|
|
"json5": "^2.2.3",
|
|
"jsonwebtoken": "^9.0.3",
|
|
"kysely": "^0.29.6",
|
|
"multer": "^2.4.0",
|
|
"nestjs-zod": "^5.5.0",
|
|
"nodemailer": "^10.0.13",
|
|
"otplib": "^12.0.1",
|
|
"pdf-parse": "^2.4.5",
|
|
"qrcode": "^1.5.4",
|
|
"reflect-metadata": "^0.2.2",
|
|
"rxjs": "^7.8.2",
|
|
"semver": "^7.8.5",
|
|
"tsconfig-paths": "^4.2.0",
|
|
"tsx": "^4.23.15",
|
|
"typescript": "^6.0.3",
|
|
"tz-lookup": "^6.1.25",
|
|
"undici": "^7.30.0",
|
|
"unzipper": "^0.12.5",
|
|
"uuid": "^14.0.2",
|
|
"ws": "^8.21.3",
|
|
"zod": "^4.6.5"
|
|
},
|
|
"overrides": {
|
|
"hono": "^4.12.16",
|
|
"@hono/node-server": "^1.19.13",
|
|
"picomatch": "^4.0.4",
|
|
"ip-address": "^10.1.1",
|
|
"multer": "^2.4.0",
|
|
"ws": "^8.21.3",
|
|
"qs": "^6.15.2",
|
|
"file-type": "^21.3.4"
|
|
},
|
|
"devDependencies": {
|
|
"@aws-lite/s3-types": "^0.2.8",
|
|
"@eslint/js": "^10.0.1",
|
|
"@mikro-orm/entity-generator": "^7.2.1",
|
|
"@nestjs/testing": "^11.2.5",
|
|
"@swc/core": "^1.16.2",
|
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
"@types/archiver": "^7.0.0",
|
|
"@types/bcryptjs": "^2.4.6",
|
|
"@types/better-sqlite3": "^7.6.13",
|
|
"@types/compression": "^1.8.1",
|
|
"@types/cookie-parser": "^1.4.10",
|
|
"@types/cors": "^2.8.19",
|
|
"@types/express": "^4.17.25",
|
|
"@types/jsonwebtoken": "^9.0.10",
|
|
"@types/multer": "^2.2.0",
|
|
"@types/node": "^25.9.8",
|
|
"@types/nodemailer": "^8.0.2",
|
|
"@types/qrcode": "^1.5.6",
|
|
"@types/semver": "^7.8.0",
|
|
"@types/supertest": "^6.0.3",
|
|
"@types/unzipper": "^0.10.11",
|
|
"@types/uuid": "^10.0.0",
|
|
"@types/ws": "^8.18.1",
|
|
"@vitest/coverage-istanbul": "^4.1.11",
|
|
"@vitest/coverage-v8": "^4.1.11",
|
|
"eslint": "^9.39.5",
|
|
"eslint-config-flat-gitignore": "^2.4.0",
|
|
"eslint-config-prettier": "^10.1.8",
|
|
"eslint-plugin-prettier": "^5.5.6",
|
|
"nodemon": "^3.1.14",
|
|
"prettier": "^3.9.8",
|
|
"prettier-plugin-organize-imports": "^4.3.0",
|
|
"supertest": "^7.2.2",
|
|
"typescript-eslint": "^8.70.0",
|
|
"unplugin-swc": "^1.6.0",
|
|
"vitest": "^4.1.11"
|
|
}
|
|
}
|