-
-
Notifications
You must be signed in to change notification settings - Fork 183
feat(cli): add Render and Vercel deployment targets #507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+492
−27
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
5aacc9d
feat(cli): add --deployment render flag with GitHub handoff
cursoragent f164a40
feat(cli): harden Render and add Vercel deployment
tannerlinsley 8e13051
fix(create): type generated worker manifests
tannerlinsley 0840537
fix(create): harden partner deployment metadata
tannerlinsley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| --- | ||
| '@tanstack/cli': minor | ||
| '@tanstack/create': minor | ||
| --- | ||
|
|
||
| Add Gold partner deployment targets for Render and Vercel to React and Solid | ||
| scaffolds. Render generates package-manager-aware Blueprint commands, while | ||
| Vercel generates explicit framework detection and Nitro Build Output API | ||
| support. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
packages/create/src/frameworks/react/add-ons/sentry/package.json
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
packages/create/src/frameworks/react/add-ons/sentry/package.json.ejs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "scripts": { | ||
| "build": "<%= addOnEnabled.vercel ? 'vite build' : 'vite build && cp instrument.server.mjs .output/server' %>", | ||
| "dev": "<%= addOnEnabled.vercel ? 'dotenv -e .env.local -- vite dev --port 3000' : 'dotenv -e .env.local -- sh -c \"NODE_OPTIONS=\'--import ./instrument.server.mjs\' vite dev --port 3000\"' %>", | ||
| "start": "<%= addOnEnabled.vercel ? 'node .output/server/index.mjs' : 'node --import ./.output/server/instrument.server.mjs .output/server/index.mjs' %>" | ||
| }, | ||
| "dependencies": { | ||
| "@sentry/tanstackstart-react": "^10.67.0", | ||
| "dotenv-cli": "^11.0.0" | ||
| }, | ||
| "pnpm": { | ||
| "onlyBuiltDependencies": [ | ||
| "@sentry/cli" | ||
| ] | ||
| } | ||
| } |
15 changes: 15 additions & 0 deletions
15
packages/create/src/frameworks/react/hosts/render/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| ## Deploy to Render | ||
|
|
||
| This project includes a Render Blueprint: | ||
|
|
||
| 1. Push this repo to GitHub, GitLab, or Bitbucket | ||
| 2. In Render, choose **New > Blueprint** and connect this repo | ||
| 3. Render reads `render.yaml` and creates the web service | ||
| 4. In the Render Dashboard, add any secrets from `.env.example` under **Environment** | ||
| 5. Deploy | ||
|
|
||
| The Nitro server handles SSR, server functions, API routes, and static assets. | ||
| Render provides `PORT` automatically; Nitro reads it at runtime. | ||
|
|
||
| Need a database? Add one from the Render Dashboard, then connect it via | ||
| environment variables. See https://render.com/docs/databases for options. |
15 changes: 15 additions & 0 deletions
15
packages/create/src/frameworks/react/hosts/render/assets/render.yaml.ejs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| services: | ||
| - type: web | ||
| runtime: node | ||
| name: tanstack-start-app | ||
| buildCommand: <%= packageManager %> install && <%= getPackageManagerRunScript('build') %> | ||
|
tannerlinsley marked this conversation as resolved.
|
||
| startCommand: <%= getPackageManagerRunScript('start') %> | ||
| envVars: | ||
| <% if (packageManager === 'bun') { -%> | ||
| - key: BUN_VERSION | ||
| value: '1.3.14' | ||
| <% } -%> | ||
| - key: NITRO_PRESET | ||
| value: render-com | ||
| - key: HOST | ||
| value: 0.0.0.0 | ||
21 changes: 21 additions & 0 deletions
21
packages/create/src/frameworks/react/hosts/render/info.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "name": "Render", | ||
| "description": "Deploy to Render (full-stack cloud platform with GitHub integration).", | ||
| "link": "https://render.com/", | ||
| "phase": "add-on", | ||
| "modes": ["file-router"], | ||
| "type": "deployment", | ||
| "supportedPackageManagers": ["npm", "yarn", "pnpm", "bun"], | ||
| "category": "deploy", | ||
| "exclusive": ["deploy"], | ||
| "color": "#46E3B7", | ||
| "priority": 150, | ||
| "partner": { "id": "render", "tier": "gold" }, | ||
| "integrations": [ | ||
| { | ||
| "type": "vite-plugin", | ||
| "import": "import { nitro } from 'nitro/vite'", | ||
| "code": "nitro({ rollupConfig: { external: [/^@sentry\\//] } })" | ||
| } | ||
| ] | ||
| } |
8 changes: 8 additions & 0 deletions
8
packages/create/src/frameworks/react/hosts/render/package.json.ejs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "scripts": { | ||
| "start": "<%= addOnEnabled.sentry ? 'node --import ./.output/server/instrument.server.mjs .output/server/index.mjs' : 'node .output/server/index.mjs' %>" | ||
| }, | ||
| "dependencies": { | ||
| "nitro": "3.0.260610-beta" | ||
| } | ||
| } |
13 changes: 13 additions & 0 deletions
13
packages/create/src/frameworks/react/hosts/vercel/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| ## Deploy to Vercel | ||
|
|
||
| 1. Push this repo to GitHub, GitLab, or Bitbucket | ||
| 2. In Vercel, choose **Add New > Project** and import the repo | ||
| 3. Keep the detected TanStack Start framework settings | ||
| 4. Add production values from `.env.example` under **Settings > Environment Variables** | ||
| 5. Deploy | ||
|
|
||
| Vercel runs the build script and deploys Nitro's output as Vercel Functions and | ||
| static assets. The included `vercel.json` makes framework detection explicit. | ||
|
|
||
| Variables prefixed with `VITE_` are included in the browser bundle. Keep secrets | ||
| unprefixed so they remain server-only. |
12 changes: 12 additions & 0 deletions
12
packages/create/src/frameworks/react/hosts/vercel/assets/src/server.ts.ejs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <% if (!addOnEnabled.sentry) { ignoreFile(); return; } -%> | ||
| import '../instrument.server.mjs' | ||
| import { wrapFetchWithSentry } from '@sentry/tanstackstart-react' | ||
| import handler, { createServerEntry } from '@tanstack/react-start/server-entry' | ||
|
|
||
| export default createServerEntry( | ||
| wrapFetchWithSentry({ | ||
| fetch(request: Request) { | ||
| return handler.fetch(request) | ||
| }, | ||
| }), | ||
| ) |
4 changes: 4 additions & 0 deletions
4
packages/create/src/frameworks/react/hosts/vercel/assets/vercel.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "$schema": "https://openapi.vercel.sh/vercel.json", | ||
| "framework": "tanstack-start" | ||
| } |
21 changes: 21 additions & 0 deletions
21
packages/create/src/frameworks/react/hosts/vercel/info.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "name": "Vercel", | ||
| "description": "Deploy to Vercel (Functions, static assets, and Git previews).", | ||
| "link": "https://vercel.com/docs/frameworks/full-stack/tanstack-start", | ||
| "phase": "add-on", | ||
| "modes": ["file-router"], | ||
| "type": "deployment", | ||
| "supportedPackageManagers": ["npm", "yarn", "pnpm", "bun"], | ||
| "category": "deploy", | ||
| "exclusive": ["deploy"], | ||
| "color": "#000000", | ||
| "priority": 140, | ||
| "partner": { "id": "vercel", "tier": "gold" }, | ||
| "integrations": [ | ||
| { | ||
| "type": "vite-plugin", | ||
| "import": "import { nitro } from 'nitro/vite'", | ||
| "code": "nitro()" | ||
| } | ||
| ] | ||
| } |
5 changes: 5 additions & 0 deletions
5
packages/create/src/frameworks/react/hosts/vercel/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "dependencies": { | ||
| "nitro": "3.0.260610-beta" | ||
| } | ||
| } |
15 changes: 15 additions & 0 deletions
15
packages/create/src/frameworks/solid/hosts/render/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| ## Deploy to Render | ||
|
|
||
| This project includes a Render Blueprint: | ||
|
|
||
| 1. Push this repo to GitHub, GitLab, or Bitbucket | ||
| 2. In Render, choose **New > Blueprint** and connect this repo | ||
| 3. Render reads `render.yaml` and creates the web service | ||
| 4. In the Render Dashboard, add any secrets from `.env.example` under **Environment** | ||
| 5. Deploy | ||
|
|
||
| The Nitro server handles SSR, server functions, API routes, and static assets. | ||
| Render provides `PORT` automatically; Nitro reads it at runtime. | ||
|
|
||
| Need a database? Add one from the Render Dashboard, then connect it via | ||
| environment variables. See https://render.com/docs/databases for options. |
15 changes: 15 additions & 0 deletions
15
packages/create/src/frameworks/solid/hosts/render/assets/render.yaml.ejs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| services: | ||
| - type: web | ||
| runtime: node | ||
| name: tanstack-start-app | ||
| buildCommand: <%= packageManager %> install && <%= getPackageManagerRunScript('build') %> | ||
| startCommand: <%= getPackageManagerRunScript('start') %> | ||
| envVars: | ||
| <% if (packageManager === 'bun') { -%> | ||
| - key: BUN_VERSION | ||
| value: '1.3.14' | ||
| <% } -%> | ||
| - key: NITRO_PRESET | ||
| value: render-com | ||
| - key: HOST | ||
| value: 0.0.0.0 |
21 changes: 21 additions & 0 deletions
21
packages/create/src/frameworks/solid/hosts/render/info.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "name": "Render", | ||
| "description": "Deploy to Render (full-stack cloud platform with GitHub integration).", | ||
| "link": "https://render.com/", | ||
| "phase": "add-on", | ||
| "modes": ["file-router"], | ||
| "type": "deployment", | ||
| "supportedPackageManagers": ["npm", "yarn", "pnpm", "bun"], | ||
| "category": "deploy", | ||
| "exclusive": ["deploy"], | ||
| "color": "#46E3B7", | ||
| "priority": 150, | ||
| "partner": { "id": "render", "tier": "gold" }, | ||
| "integrations": [ | ||
| { | ||
| "type": "vite-plugin", | ||
| "import": "import { nitro } from 'nitro/vite'", | ||
| "code": "nitro()" | ||
| } | ||
| ] | ||
| } |
8 changes: 8 additions & 0 deletions
8
packages/create/src/frameworks/solid/hosts/render/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "scripts": { | ||
| "start": "node .output/server/index.mjs" | ||
| }, | ||
| "dependencies": { | ||
| "nitro": "3.0.260610-beta" | ||
| } | ||
| } |
13 changes: 13 additions & 0 deletions
13
packages/create/src/frameworks/solid/hosts/vercel/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| ## Deploy to Vercel | ||
|
|
||
| 1. Push this repo to GitHub, GitLab, or Bitbucket | ||
| 2. In Vercel, choose **Add New > Project** and import the repo | ||
| 3. Keep the detected TanStack Start framework settings | ||
| 4. Add production values from `.env.example` under **Settings > Environment Variables** | ||
| 5. Deploy | ||
|
|
||
| Vercel runs the build script and deploys Nitro's output as Vercel Functions and | ||
| static assets. The included `vercel.json` makes framework detection explicit. | ||
|
|
||
| Variables prefixed with `VITE_` are included in the browser bundle. Keep secrets | ||
| unprefixed so they remain server-only. |
4 changes: 4 additions & 0 deletions
4
packages/create/src/frameworks/solid/hosts/vercel/assets/vercel.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "$schema": "https://openapi.vercel.sh/vercel.json", | ||
| "framework": "tanstack-start" | ||
| } |
21 changes: 21 additions & 0 deletions
21
packages/create/src/frameworks/solid/hosts/vercel/info.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "name": "Vercel", | ||
| "description": "Deploy to Vercel (Functions, static assets, and Git previews).", | ||
| "link": "https://vercel.com/docs/frameworks/full-stack/tanstack-start", | ||
| "phase": "add-on", | ||
| "modes": ["file-router"], | ||
| "type": "deployment", | ||
| "supportedPackageManagers": ["npm", "yarn", "pnpm", "bun"], | ||
| "category": "deploy", | ||
| "exclusive": ["deploy"], | ||
| "color": "#000000", | ||
| "priority": 140, | ||
| "partner": { "id": "vercel", "tier": "gold" }, | ||
| "integrations": [ | ||
| { | ||
| "type": "vite-plugin", | ||
| "import": "import { nitro } from 'nitro/vite'", | ||
| "code": "nitro()" | ||
| } | ||
| ] | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't render also be added here @tannerlinsley