Compare commits

..

No commits in common. "11861e5dc07296c84ec07a7f795f22c80719dde0" and "57bf8ffb81ddd0d9501cd07b0c391767c6d9989b" have entirely different histories.

5 changed files with 17 additions and 39 deletions

View file

@ -276,17 +276,14 @@ jobs:
working-directory: backend
run: uv run python -c "import json; from app.main import app; print(json.dumps(app.openapi()))" > /tmp/openapi.json
- name: Regenerate api-types.ts + format (project-local pinned prettier)
- name: Regenerate api-types.ts + format (prettier defaults)
working-directory: frontend
# 1) openapi-typescript из дампнутого файла (эквивалент `npm run codegen`,
# который читает ту же схему по URL). 2) ./node_modules/.bin/prettier —
# PROJECT-LOCAL, pinned (prettier 3.9.0 в devDependencies). НЕ `npx
# prettier` (тот резолвится в плавающий latest и расходится с pre-commit,
# ломая этот gate). Pre-commit hook гоняет тот же локальный prettier 3.9.0
# → байт-в-байт идентичный формат. См. .pre-commit-config.yaml.
# который читает ту же схему по URL). 2) prettier (defaults, как
# pre-commit hook) → формат совпадает с committed-файлом.
run: |
npx openapi-typescript /tmp/openapi.json -o src/lib/api-types.ts
./node_modules/.bin/prettier --write src/lib/api-types.ts
npx prettier --write src/lib/api-types.ts
- name: Assert api-types.ts is up-to-date
working-directory: frontend

View file

@ -30,17 +30,10 @@ repos:
- id: ruff-format
files: ^(backend|tradein-mvp/backend)/
# Frontend — prettier on TS/TSX/JSON.
# additional_dependencies pins the EXACT prettier engine (3.9.0) so this hook
# and CI (`openapi-codegen-check` → ./node_modules/.bin/prettier, also 3.9.0
# via frontend/package.json) format byte-for-byte identically. Без явного pin
# mirrors-prettier@v4.0.0-alpha.8 тянет CLI-обёртку, а CI `npx prettier`
# плавает в latest → расхождение формата → codegen-gate RED. Меняешь версию
# здесь — синхронно меняй prettier в frontend/package.json + lockfile.
# Frontend — prettier on TS/TSX/JSON
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
additional_dependencies: ["prettier@3.9.0"]
files: ^frontend/.*\.(ts|tsx|js|jsx|json|css|md)$
exclude: ^frontend/(node_modules|\.next|package-lock\.json)/

View file

@ -40,7 +40,6 @@
"jsdom": "^25.0.1",
"openapi-typescript": "^7.0.0",
"postcss": "^8.4.0",
"prettier": "3.9.0",
"tailwindcss": "^4.0.0",
"typescript": "5.9.3",
"vitest": "^2.1.9"
@ -14056,22 +14055,6 @@
"node": ">=0.10.0"
}
},
"node_modules/prettier": {
"version": "3.9.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.0.tgz",
"integrity": "sha512-LjIqSIC5VYLzs9WedVmJ2ljNAGnU+DteIClbahu4L/DBeWjZ6iT/k1lAYyu9JUh+1xINxWadaPw/Pl63y/agAw==",
"dev": true,
"license": "MIT",
"bin": {
"prettier": "bin/prettier.cjs"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/pretty-format": {
"version": "27.5.1",
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz",

View file

@ -45,7 +45,6 @@
"jsdom": "^25.0.1",
"openapi-typescript": "^7.0.0",
"postcss": "^8.4.0",
"prettier": "3.9.0",
"tailwindcss": "^4.0.0",
"typescript": "5.9.3",
"vitest": "^2.1.9"

View file

@ -2833,7 +2833,8 @@ export interface components {
nspd_risk_zones?: components["schemas"]["RiskZone"][] | null;
/** Nspd Opportunity Parcels */
nspd_opportunity_parcels?:
components["schemas"]["OpportunityParcel"][] | null;
| components["schemas"]["OpportunityParcel"][]
| null;
/** Nspd Red Lines */
nspd_red_lines?: components["schemas"]["RedLine"][] | null;
/** Nspd Dump */
@ -3751,7 +3752,8 @@ export interface components {
* @description Категория: competition|permitting|demand|risk|other
*/
category?:
("competition" | "permitting" | "demand" | "risk" | "other") | null;
| ("competition" | "permitting" | "demand" | "risk" | "other")
| null;
/**
* Is Confidential
* @description «Непублично» (§7.13): маркировка чувствительной заметки
@ -3844,7 +3846,8 @@ export interface components {
body?: string | null;
/** Category */
category?:
("competition" | "permitting" | "demand" | "risk" | "other") | null;
| ("competition" | "permitting" | "demand" | "risk" | "other")
| null;
/** Is Confidential */
is_confidential?: boolean | null;
/** District */
@ -4627,10 +4630,12 @@ export interface components {
year_built?: number | null;
/** House Type */
house_type?:
("panel" | "brick" | "monolith" | "monolith_brick" | "other") | null;
| ("panel" | "brick" | "monolith" | "monolith_brick" | "other")
| null;
/** Repair State */
repair_state?:
("needs_repair" | "standard" | "good" | "excellent") | null;
| ("needs_repair" | "standard" | "good" | "excellent")
| null;
/** Has Balcony */
has_balcony?: boolean | null;
};
@ -7872,7 +7877,8 @@ export interface operations {
cad_num?: string | null;
/** @description Фильтр по категории */
category?:
("competition" | "permitting" | "demand" | "risk" | "other") | null;
| ("competition" | "permitting" | "demand" | "risk" | "other")
| null;
/** @description Фильтр по пометке «непублично» */
is_confidential?: boolean | null;
/** @description Фильтр по автору */