fix(cli): align Better Auth Mongo and Convex templates#1047
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughUpdates templates, processors, and tests to support Better-Auth with MongoDB/Mongoose and Convex: dependency bumps, Mongoose schema ObjectId/index changes, Convex env/wiring (CONVEX_SITE_URL, baseURL, eager registration, plugin order), todo ID stringification, pnpm workspace template, and expanded scaffold tests. ChangesBetter-Auth MongoDB + Convex + Todo Integration
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 256b8ad7-7e2e-4645-8af2-0c591f329ca3
📒 Files selected for processing (18)
apps/cli/test/auth.test.tspackages/template-generator/src/processors/auth-deps.tspackages/template-generator/src/processors/db-deps.tspackages/template-generator/src/templates.generated.tspackages/template-generator/src/utils/add-deps.tspackages/template-generator/templates/auth/better-auth/convex/backend/convex/auth.ts.hbspackages/template-generator/templates/auth/better-auth/convex/backend/convex/http.ts.hbspackages/template-generator/templates/auth/better-auth/convex/web/react/react-router/src/lib/auth-client.ts.hbspackages/template-generator/templates/auth/better-auth/convex/web/react/tanstack-router/src/lib/auth-client.ts.hbspackages/template-generator/templates/auth/better-auth/server/db/mongoose/mongodb/src/models/auth.model.ts.hbspackages/template-generator/templates/backend/convex/packages/backend/convex/tsconfig.json.hbspackages/template-generator/templates/db/mongoose/mongodb/src/index.ts.hbspackages/template-generator/templates/examples/todo/server/mongoose/base/src/routers/todo.ts.hbspackages/template-generator/templates/examples/todo/server/mongoose/mongodb/src/models/todo.model.ts.hbspackages/template-generator/templates/examples/todo/web/react/next/src/app/todos/page.tsx.hbspackages/template-generator/templates/examples/todo/web/react/react-router/src/routes/todos.tsx.hbspackages/template-generator/templates/examples/todo/web/react/tanstack-router/src/routes/todos.tsx.hbspackages/template-generator/templates/examples/todo/web/react/tanstack-start/src/routes/todos.tsx.hbs
💤 Files with no reviewable changes (1)
- packages/template-generator/templates/auth/better-auth/convex/backend/convex/http.ts.hbs
ab75e92 to
de24cbd
Compare
de24cbd to
7a51096
Compare
7a51096 to
b6be85e
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: bf9fb97c-4080-4f41-aff0-630be9dc9c62
📒 Files selected for processing (19)
apps/cli/test/auth.test.tspackages/template-generator/src/processors/auth-deps.tspackages/template-generator/src/processors/db-deps.tspackages/template-generator/src/processors/env-vars.tspackages/template-generator/src/templates.generated.tspackages/template-generator/src/utils/add-deps.tspackages/template-generator/templates/auth/better-auth/convex/backend/convex/auth.ts.hbspackages/template-generator/templates/auth/better-auth/convex/backend/convex/http.ts.hbspackages/template-generator/templates/auth/better-auth/convex/web/react/react-router/src/lib/auth-client.ts.hbspackages/template-generator/templates/auth/better-auth/convex/web/react/tanstack-router/src/lib/auth-client.ts.hbspackages/template-generator/templates/auth/better-auth/server/db/mongoose/mongodb/src/models/auth.model.ts.hbspackages/template-generator/templates/backend/convex/packages/backend/convex/tsconfig.json.hbspackages/template-generator/templates/db/mongoose/mongodb/src/index.ts.hbspackages/template-generator/templates/examples/todo/server/mongoose/base/src/routers/todo.ts.hbspackages/template-generator/templates/examples/todo/server/mongoose/mongodb/src/models/todo.model.ts.hbspackages/template-generator/templates/examples/todo/web/react/next/src/app/todos/page.tsx.hbspackages/template-generator/templates/examples/todo/web/react/react-router/src/routes/todos.tsx.hbspackages/template-generator/templates/examples/todo/web/react/tanstack-router/src/routes/todos.tsx.hbspackages/template-generator/templates/examples/todo/web/react/tanstack-start/src/routes/todos.tsx.hbs
💤 Files with no reviewable changes (1)
- packages/template-generator/templates/auth/better-auth/convex/backend/convex/http.ts.hbs
✅ Files skipped from review due to trivial changes (2)
- packages/template-generator/templates/auth/better-auth/convex/web/react/tanstack-router/src/lib/auth-client.ts.hbs
- packages/template-generator/templates/auth/better-auth/convex/web/react/react-router/src/lib/auth-client.ts.hbs
🚧 Files skipped from review as they are similar to previous changes (13)
- packages/template-generator/templates/examples/todo/web/react/tanstack-start/src/routes/todos.tsx.hbs
- packages/template-generator/templates/backend/convex/packages/backend/convex/tsconfig.json.hbs
- packages/template-generator/templates/examples/todo/server/mongoose/base/src/routers/todo.ts.hbs
- packages/template-generator/templates/auth/better-auth/convex/backend/convex/auth.ts.hbs
- packages/template-generator/templates/examples/todo/server/mongoose/mongodb/src/models/todo.model.ts.hbs
- packages/template-generator/templates/examples/todo/web/react/react-router/src/routes/todos.tsx.hbs
- packages/template-generator/src/processors/db-deps.ts
- packages/template-generator/src/utils/add-deps.ts
- packages/template-generator/src/processors/env-vars.ts
- apps/cli/test/auth.test.ts
- packages/template-generator/src/processors/auth-deps.ts
- packages/template-generator/templates/examples/todo/web/react/next/src/app/todos/page.tsx.hbs
- packages/template-generator/templates/auth/better-auth/server/db/mongoose/mongodb/src/models/auth.model.ts.hbs
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/cli/test/pnpm-workspace.test.ts (1)
19-19: 💤 Low valueConsider defensive handling of projectDir.
The non-null assertion assumes
expectSuccessguaranteesprojectDiris set. While this is likely intentional, a more defensive approach would make the contract explicit.🛡️ Optional: Add explicit check
expectSuccess(result); + if (!result.projectDir) { + throw new Error("Expected projectDir to be set after successful test run"); + } - const workspacePath = path.join(result.projectDir!, "pnpm-workspace.yaml"); + const workspacePath = path.join(result.projectDir, "pnpm-workspace.yaml");
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 11f996c0-9f44-4eb7-ab6f-7e98b84abfff
📒 Files selected for processing (5)
apps/cli/test/pnpm-workspace.test.tspackages/template-generator/src/template-handlers/extras.tspackages/template-generator/src/templates.generated.tspackages/template-generator/templates/extras/pnpm-workspace.yamlpackages/template-generator/templates/extras/pnpm-workspace.yaml.hbs
💤 Files with no reviewable changes (1)
- packages/template-generator/templates/extras/pnpm-workspace.yaml
Summary
allowBuildsfor generated stacks that pull lifecycle-script dependencies, including React UI/shadcn, Cloudflare, PWA, Prisma, Node runtime, nx, and lefthookpnpm-workspace.yamlexists even when catalogs do not create it laterValidation
bunx pnpm@11.1.3 installsmoke: TanStack Start + Convex + Better Auth + Cloudflare + Turborepobunx pnpm@11.1.3 installsmoke: Prisma SQLitebunx pnpm@11.1.3 installsmoke: TanStack Router + PWAbunx pnpm@11.1.3 installsmoke: Node runtime + nx + lefthookSummary by CodeRabbit
Tests
Bug Fixes
Refactor
Chores