Skip to content

fix: emit typed meta-vite page routes from CLI - #747

Merged
kang-heewon merged 1 commit into
trunkfrom
fix/695-meta-vite-page-routes
Jun 14, 2026
Merged

fix: emit typed meta-vite page routes from CLI#747
kang-heewon merged 1 commit into
trunkfrom
fix/695-meta-vite-page-routes

Conversation

@kang-heewon

Copy link
Copy Markdown
Member

Fixes #695.

Summary

croco create page now emits the current @croco/meta-vite route shape by default. Generated SSR routes import defineRoute with PageRouteDefinition, build a typed route object, and export defineRoute(route), matching the current create-croco-app SSR templates. The legacy SPA routeConfig output remains explicitly scoped to --mode spa for @croco/frontend-vite scaffolds.

변경 사항

  • Updated the CLI SSR page route template to use PageRouteDefinition and defineRoute(route).
  • Added assertions and a generated SSR fixture typecheck for the meta-vite route contract.
  • Clarified tests and README wording so SPA routeConfig generation is documented as the explicit legacy frontend-vite path.
  • Added a patch changeset for @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 --check and git diff --cached --check - passed.
  • pnpm check - passed.
  • Pre-push Lefthook: full pnpm test passed 197/197 tasks and full pnpm typecheck passed 196/196 tasks.

Self-review

  • Correctness and regression: PASS. Issue [cli] page 생성기가 현재 meta-vite defineRoute 계약이 아닌 구형 라우트 설정을 방출함 #695 acceptance is covered by the default SSR generator assertions and the generated SSR fixture typecheck against a PageRouteDefinition contract. The SPA test now explicitly proves --mode spa remains the only routeConfig branch and does not import meta-vite.
  • API, security, compatibility, and release: PASS. The change updates generated output only; no runtime exports, package manifests, dependencies, lockfile entries, secrets, or environment assumptions changed. A patch changeset covers the @croco/cli behavior change.
  • Maintainability and minimality: PASS. The implementation diff is limited to the CLI route template, focused CLI tests, README wording, and release metadata. No new abstraction or unrelated cleanup is included.

Risk

Low. Existing explicit SPA scaffolds keep their routeConfig output. Default SSR generated files become stricter through PageRouteDefinition, which is the intended current meta-vite contract.

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@kang-heewon, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d8a90340-3ae9-4a13-8001-377d7f46d143

📥 Commits

Reviewing files that changed from the base of the PR and between 1cd17aa and d6266a4.

📒 Files selected for processing (5)
  • .changeset/cli-meta-vite-page-routes.md
  • packages/cli/README.md
  • packages/cli/src/templates/pageRoute.ts
  • packages/cli/src/tests/createPage.spec.ts
  • packages/cli/src/tests/integration/e2e.spec.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/695-meta-vite-page-routes

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

📊 Benchmark Results

❌ Some benchmarks failed

Benchmark p75 Threshold Baseline vs Baseline Status
CrocoApp benchmarks 3.2μs - - - ⚠️
EventBusConfig.start (10 handlers) 1.4μs - 9.0μs -84.5%
EventPublisher.publishNow single event 1.7μs - - - ⚠️
DefaultHandlerResolver.resolve × 10 0.1μs - 0.2μs -60.0%
Container.get singleton (cold) 1.0μs - 0.5μs +96.2%
Container.register × 50 components 10.6μs - 8.0μs +32.3%
Container.validate (50 components) 27.7μs - 25.0μs +11.0%
Container.get singleton (warm) 0.4μs - 0.3μs +23.7%
TelemetryRuntime benchmarks 2.0μs - 2.0μs +2.2%

Updated: 2026-06-14T22:05:50.134Z · Commit: fabd9f1

@kang-heewon
kang-heewon merged commit ae98a01 into trunk Jun 14, 2026
7 of 8 checks passed
@kang-heewon
kang-heewon deleted the fix/695-meta-vite-page-routes branch June 14, 2026 22:13
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.

[cli] page 생성기가 현재 meta-vite defineRoute 계약이 아닌 구형 라우트 설정을 방출함

1 participant