veza/apps/web/scripts
senke a170504784
Some checks failed
Veza CI / Backend (Go) (push) Failing after 0s
Veza CI / Frontend (Web) (push) Failing after 0s
Veza CI / Rust (Stream Server) (push) Failing after 0s
Frontend CI / test (push) Failing after 0s
Security Scan / Secret Scanning (gitleaks) (push) Failing after 0s
Veza CI / Notify on failure (push) Failing after 0s
chore(web): install orval + mutator for OpenAPI code generation (v1.0.8 P1)
Phase 1 of the OpenAPI typegen migration. Brings orval@8.8.1 into the
monorepo (workspace-hoisted) and wires a custom mutator so generated
calls route through the existing Axios instance — interceptors for
auth / CSRF / retry / offline-queue / logging keep firing unchanged.

200 .ts files generated from veza-backend-api/openapi.yaml (3441 LOC),
covering 13 tags (auth, track, user, playlist, marketplace, chat,
dashboard, webhook, validation, logging, audit, comment, users).

Changes:

- apps/web/orval.config.ts (NEW): generator config, output
  src/services/generated/, tags-split mode, vezaMutator.
- apps/web/src/services/api/orval-mutator.ts (NEW): translates
  orval's (url, RequestInit) convention into AxiosRequestConfig
  then apiClient. Forwards AbortSignal for React Query cancellation.
- apps/web/scripts/generate-types.sh: runs BOTH generators during
  the migration (legacy typescript-axios + orval). B9 drops step 1.
- apps/web/scripts/check-types-sync.sh: extended to check drift on
  both output trees.
- apps/web/eslint.config.js: ignores src/services/generated/
  (orval emits overloaded function declarations that trip no-redeclare).
- .gitignore: narrowed the bare `api` SELinux rule to `/api` plus
  `/veza-backend-api/api`. The old rule silently ignored
  apps/web/src/services/api/ new files including orval-mutator.ts.
- apps/web/package.json + package-lock.json: orval@^8.8.1 added
  as devDependency, plus @commitlint/cli + @commitlint/config-conventional
  (referenced by .husky/commit-msg but missing from deps).

Out of scope: no hand-written service changes. Pilot developer.ts
lands in B2, bulk migration in B3-B8, cleanup in B9.

npm run typecheck and npm run lint both green (0 errors).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 00:18:14 +02:00
..
analyze-errors.js chore(dx): add .cursorrules and design system audit documentation 2026-02-05 14:20:06 +01:00
audit-storybook.js chore(v0.102): consolidate remaining changes — docs, frontend, backend 2026-02-20 13:02:12 +01:00
capture-visual-baseline.mjs ui(storybook): add allowedHosts config and update DESIGN_TOKENS docs 2026-02-08 22:49:24 +01:00
check-bundle-size.mjs stabilisation commit: while implementing v0.10.5 2026-03-09 19:36:33 +01:00
check-types-sync.sh chore(web): install orval + mutator for OpenAPI code generation (v1.0.8 P1) 2026-04-24 00:18:14 +02:00
check_backend.sh fix(MVP-006): Standardize environment variable names (VITE_API_BASE_URL → VITE_API_URL) 2025-12-22 22:56:37 +01:00
codemod-typography-arbitrary.mjs docs: add UI/UX audit reports and design system documentation 2026-02-08 22:49:40 +01:00
compare-visual.mjs feat(web): UI premium Discord/Spotify-like — tokens, shadows, focus, layout 2026-02-08 17:15:58 +01:00
debug-story.js chore(dx): add .cursorrules and design system audit documentation 2026-02-05 14:20:06 +01:00
fix-failing-tests.sh chore: resolve property mismatches and type conflicts for snake_case alignment 2026-01-07 11:15:48 +01:00
fix-ui-imports.sh chore: resolve property mismatches and type conflicts for snake_case alignment 2026-01-07 11:15:48 +01:00
fix-unused-vars.sh chore: resolve property mismatches and type conflicts for snake_case alignment 2026-01-07 11:15:48 +01:00
generate-types.sh chore(web): install orval + mutator for OpenAPI code generation (v1.0.8 P1) 2026-04-24 00:18:14 +02:00
generate-visual-report.mjs feat(web): UI premium Discord/Spotify-like — tokens, shadows, focus, layout 2026-02-08 17:15:58 +01:00
replace-console-logs.sh [LOGGING] Fix #10: Erreurs silencieuses - Ajout de logs avec contexte pour toutes les erreurs dans core/auth et core/track 2026-01-04 01:44:15 +01:00
report-arbitrary-values.mjs feat(web): UI premium Discord/Spotify-like — tokens, shadows, focus, layout 2026-02-08 17:15:58 +01:00
serve-storybook-static.cjs test(storybook): Playwright suite for full Storybook + Spotify/Discord polish 2026-02-07 20:30:49 +01:00
start-backend-and-dev.sh chore: playwright workflow, docs, rapports audit, visual-tests, tmt unit 2026-02-11 22:19:34 +01:00
start_lab.sh fix(MVP-006): Standardize environment variable names (VITE_API_BASE_URL → VITE_API_URL) 2025-12-22 22:56:37 +01:00
storybook-coverage.sh stabilisation: fix commit 2026-02-03 09:56:11 +01:00
validate-storybook.cjs feat(web): add validate:storybook script (build, serve 6007, audit) 2026-02-14 14:02:57 +01:00
visual-diff.js feat(e2e): Playwright + pixelmatch stack for pixel-perfect visual regression 2026-02-07 20:01:30 +01:00
wrap_msw_handlers.py chore(dx): add .cursorrules and design system audit documentation 2026-02-05 14:20:06 +01:00