fix: generate repository templates against public contracts - #725
Conversation
|
Warning Review limit reached
More reviews will be available in 30 minutes and 6 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (8)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📊 Benchmark Results❌ Some benchmarks failed
Updated: 2026-06-14T17:18:19.844Z · Commit: 7f2bbaa |
Summary
@croco/clinow generates repository and entity scaffolds that match the public@croco/repository-corecontract, socroco make repository,croco make entity, andcroco create domainno longer emit nonexistentEntityimports or class inheritance from theRepositoryinterface.Fixes #693
변경 사항
import type { Repository }and generate concreteimplements Repository<..., string>method stubs.Entityimport and@Entity()decorator from standalone and domain entity templates.tsc --noEmitcheck against the repository-coreRepositorycontract.@croco/cli.Validation
pnpm --filter @croco/cli exec vitest run src/tests/makeRepository.spec.ts src/tests/makeEntity.spec.ts src/tests/createDomain.spec.ts- 10 tests passed, including generated fixturetsc --noEmit.pnpm test --filter=@croco/cli- 14 files, 73 tests passed.pnpm typecheck --filter=@croco/cli- passed.pnpm check- passed.pnpm changeset-required:check- passed.git diff --check- passed.oxlintandoxfmtpassed.auto-changeset, fulltest(195 tasks), and fulltypecheck(194 tasks) passed after rebasing onto currenttrunk.Self-review gates
makeRepository.spec.ts,makeEntity.spec.ts, andcreateDomain.spec.ts; generated output no longer referencesEntity, no longer extendsRepository, and the generated repository/entity fixture typechecks against theRepositoryinterface contract.Repositorytypes only, no package manifests, dependencies, lockfile, environment assumptions, or secret handling changed, and.changeset/cli-repository-template-contract.mdrecords a patch release.Residual risk
Low. Generated repositories remain placeholder implementations that return
null,[], the input entity, and no-op delete behavior until application code adds real persistence, but they now compile against the current public repository contract.