Repository navigation
Conversation
|
@kzndotsh is attempting to deploy a commit to the Better T Stack Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughThe template generator now defaults missing server URLs to ChangesVercel server URL handling
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The generated Vercel client URLs resolve to the deployment origin with a single 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
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 |
Combined Vercel stacks crashed in getServerUrl when ENV.VITE_SERVER_URL was missing, and .env still seeded localhost instead of the same-origin /api path. Fixes AmanVarshney01#1237
29f76e4 to
4c526bb
Compare
# Conflicts: # apps/cli/test/deployment.test.ts # packages/template-generator/src/core/template-processor.ts # packages/template-generator/src/processors/env-vars.ts
Port AmanVarshney01#1177's Nitro branch into the relocated api/orpc|trpc context templates, point the Nitro CORS middleware at main's varlock env, await the async Cloudflare auth handler, cast Nitro's event.req to Request for the Cloudflare preset, and drop composite from the Nitro tsconfig so Prisma's inferred client type is emittable. Adapt the AmanVarshney01#1177/AmanVarshney01#1242 tests to main's relocated files and harness conventions.
Summary
VITE_SERVER_URL=/apiinapps/web/.envand.env.schemainstead ofhttp://localhost:3000.getServerUrlaccepts a missing env value and falls back to/api, so module load no longer crashes onurl.endsWith.vercel.jsonbuildCommand(VITE_SERVER_URL=/api) and same-origin/apirewrites.Fixes #1237
Local dev. For Vercel-flagged stacks,
bun run devon the Vite port will request/api/trpcon the frontend origin. Usedev:vercelsovercel.jsonrewrites apply. Splitweb+serverdevpreviously talked tohttp://localhost:3000.Test plan
bun run checkcd apps/cli && bun run test(762 pass, 48 skip generated-build samples)check-types,check-test-types,packages/template-generator)VITE_SERVER_URL=/apiSummary by CodeRabbit
/apiserver URL for browser and preview environments.