fix: emit typed meta-vite page routes from CLI - #747
Conversation
|
Warning Review limit reached
More reviews will be available in 40 minutes and 56 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 (5)
✨ 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-14T22:05:50.134Z · Commit: fabd9f1 |
Fixes #695.
Summary
croco create pagenow emits the current@croco/meta-viteroute shape by default. Generated SSR routes importdefineRoutewithPageRouteDefinition, build a typedrouteobject, and exportdefineRoute(route), matching the current create-croco-app SSR templates. The legacy SPArouteConfigoutput remains explicitly scoped to--mode spafor@croco/frontend-vitescaffolds.변경 사항
PageRouteDefinitionanddefineRoute(route).routeConfiggeneration is documented as the explicit legacy frontend-vite path.@croco/cli.Verification
pnpm --filter @croco/cli exec vitest run src/tests/createPage.spec.ts --reporter verbose- 8 tests passed.pnpm --filter @croco/cli exec vitest run src/tests/integration/e2e.spec.ts --reporter verbose- 7 tests passed.pnpm --filter @croco/cli test- 14 files, 78 tests passed.pnpm --filter @croco/cli typecheck- passed.pnpm --filter @croco/cli build- passed.pnpm --filter @croco/cli lint- passed.pnpm test --filter=@croco/cli- 18 Turbo tasks passed.pnpm typecheck --filter=@croco/meta-vite- 36 Turbo tasks passed.pnpm exec oxfmt --check packages/cli/src/templates/pageRoute.ts packages/cli/src/tests/createPage.spec.ts packages/cli/src/tests/integration/e2e.spec.ts packages/cli/README.md .changeset/cli-meta-vite-page-routes.md- passed.pnpm changeset-required:check- passed.git diff --checkandgit diff --cached --check- passed.pnpm check- passed.pnpm testpassed 197/197 tasks and fullpnpm typecheckpassed 196/196 tasks.Self-review
PageRouteDefinitioncontract. The SPA test now explicitly proves--mode sparemains the onlyrouteConfigbranch and does not import meta-vite.@croco/clibehavior change.Risk
Low. Existing explicit SPA scaffolds keep their
routeConfigoutput. Default SSR generated files become stricter throughPageRouteDefinition, which is the intended current meta-vite contract.