Skip to content

chore(githooks): Conditionally run test-flows#92

Merged
mathieusouflis merged 23 commits into
mainfrom
feat/91-decorators-validation-openapi
May 8, 2026
Merged

chore(githooks): Conditionally run test-flows#92
mathieusouflis merged 23 commits into
mainfrom
feat/91-decorators-validation-openapi

Conversation

@mathieusouflis
Copy link
Copy Markdown
Member

@mathieusouflis mathieusouflis commented May 7, 2026

Summary

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor (no behavior change)
  • Performance improvement
  • Documentation
  • CI/CD / tooling
  • Breaking change

Changes

  • Improove cache on test flows
  • Add new flows questions

Testing

  • Added / updated tests
  • Manually tested locally
  • All existing tests pass

Checklist

  • Lint passes
  • Tests pass
  • Build succeeds
  • Documentation updated if applicable

Screenshots

Add runtime deps: zod, @asteasolutions/zod-to-openapi,
reflect-metadata, swagger-ui-express, and @types/swagger-ui-express.
Enable tsconfig compilerOptions experimentalDecorators and
emitDecoratorMetadata.
feat(generators): Add decorators core generator
Add generator that wires decorator runtime into an MVC skeleton.
Emits a sample ExampleController, Zod validator schemas, an app.ts
bootstrap mounting the DecoratorRouter and Swagger UI, and an E2E
Vitest test
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@Post('/')
@Body(schema)
handle(req: express.Request, res: express.Response) {
res.json(req.body);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

won't fix

@Get('/')
@Query(schema)
handle(req: express.Request, res: express.Response) {
res.json(req.query);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't fix

@mathieusouflis mathieusouflis force-pushed the feat/91-decorators-validation-openapi branch from 960d8e4 to 4244e78 Compare May 8, 2026 09:26
Add generator that wires decorators into clean-architecture projects.
Includes manifest, generator implementation, templates for app
bootstrap,
example controller, validators, docs, and an E2E Vitest test.
Convert several auth controllers and routes to templates so generators
can opt into decorator-based wiring and register AuthController in
src/app.ts when decorators are enabled.

Mount BetterAuth's toNodeHandler directly in src/app.ts (remove the
intermediate auth route) and bump auth_better_auth manifest to v0.2.0.
Wire decorator-based runtime into the init flow and documentation.
Add user-facing decorators guide, contributor flow docs, and generator
notes; update CHANGELOG and README. Include classic JSDoc Swagger
fallback, register a Zod validation constant, adapt BetterAuth mounting,
and ignore .devfleet-worktrees in .gitignore.
Set ts-backend-decorators-validation to false in existing test flows and
add four new flows that enable decorators validation using Zod and
Postgres/JWT combos

New files:
-
  tools/test-flow/testdata/202605070101_express_clean_arch_decorators_zod.json
- tools/test-flow/testdata/202605070102_express_mvc_decorators_zod.json
-
  tools/test-flow/testdata/202605070103_express_clean_arch_decorators_postgres_jwt.json
-
  tools/test-flow/testdata/202605070104_express_mvc_decorators_postgres_jwt.json
Skip slow make test-flows unless changes touch generators/, flows/,
tools/test-flow/, internal/, pkg/, or plugins/. Add set -e, upstream
diff detection, and clearer hook output.
Commands are cacheable by default; manifests may opt out via
dotapi.Command.NoCache. Cache entries live in .test-flow-cache
(gitignored); cache schema bumped to v2. New CLI flags: -no-cache to
force a re-run and -keep-going to run all cases (runner is fail-fast by
default). Failed runs do not write cache entries.
Introduce corsOptions utility and wire it into generated apps
Add CORS_ORIGIN to .env.example with usage guidance
Clarify sample controllers to return synthetic payloads and
update tests accordingly
@mathieusouflis mathieusouflis force-pushed the feat/91-decorators-validation-openapi branch from a51d558 to 0049192 Compare May 8, 2026 09:51
AppendStringSet appends string values into a JSON array at a dotted
path, deduplicating and sorting entries for deterministic output.
Update generators to use it to pre-approve built dependencies
(esbuild, @scarf/scarf, @biomejs/biome) for pnpm 10
Update example controllers to return description as
JSON.stringify(params/body)
and remove unused void statements. Use local constants (appPath,
exportText)
when patching src/app.ts. Throw TypeError for non-callable decorator
handlers.
Use replaceAll for path-to-OpenAPI conversion
@mathieusouflis mathieusouflis force-pushed the feat/91-decorators-validation-openapi branch from 5732c78 to b5d7701 Compare May 8, 2026 12:02
Use a global allow for CI test installs by running
`pnpm install --dangerously-allow-all-builds` instead of per-generator
pre-approvals of built dependencies
@mathieusouflis mathieusouflis force-pushed the feat/91-decorators-validation-openapi branch from b5d7701 to 7b9b898 Compare May 8, 2026 12:06
Autofix formatting during generator test runs by using --write.
Remove the redundant biome check entry from contributor docs.
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

@mathieusouflis mathieusouflis merged commit d66a260 into main May 8, 2026
12 of 13 checks passed
@mathieusouflis mathieusouflis deleted the feat/91-decorators-validation-openapi branch May 8, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setup une validation des données et une génération de documentation universelle

2 participants