chore(githooks): Conditionally run test-flows#92
Merged
Conversation
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
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
| @Post('/') | ||
| @Body(schema) | ||
| handle(req: express.Request, res: express.Response) { | ||
| res.json(req.body); |
| @Get('/') | ||
| @Query(schema) | ||
| handle(req: express.Request, res: express.Response) { | ||
| res.json(req.query); |
960d8e4 to
4244e78
Compare
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
test-flows
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
a51d558 to
0049192
Compare
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
5732c78 to
b5d7701
Compare
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
b5d7701 to
7b9b898
Compare
Autofix formatting during generator test runs by using --write. Remove the redundant biome check entry from contributor docs.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Closes #
Type of change
Changes
Testing
Checklist
Screenshots