Skip to content

Commit bb80923

Browse files
committedJan 25, 2025·
preset fixes
1 parent 23f7115 commit bb80923

File tree

4 files changed

+24
-3
lines changed

4 files changed

+24
-3
lines changed
 

‎.changeset/tough-schools-drum.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@t3-oss/env-core": minor
3+
---
4+
5+
update uploadthing preset to v7. add `uploadthingV6` for legacy config

‎.changeset/yellow-carrots-joke.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@t3-oss/env-core": patch
3+
---
4+
5+
add neonVercel preset

‎docs/src/app/docs/customization/page.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ env.VERCEL_URL; // string
9797
T3 Env ships the following presets out of the box, all importable from the `/presets` entrypoint.
9898

9999
- `vercel` - Vercel environment variables. See full list [here](https://vercel.com/docs/projects/environment-variables/system-environment-variables#system-environment-variables).
100+
- `neonVercel` - Neon provided system environment variables when using the Vercel integration. See full list [here](https://neon.tech/docs/guides/vercel-native-integration#environment-variables-set-by-the-integration).
100101
- `uploadthing` - All environment variables required to use [UploadThing](https://uploadthing.com/). More info [here](https://docs.uploadthing.com/getting-started/appdir#add-env-variables).
101102
- `render` - Render environment variables. See full list [here](https://docs.render.com/environment-variables#all-runtimes).
102103
- `railway` - Railway provided system environment variables. See full list [here](https://docs.railway.app/reference/variables#railway-provided-variables).

‎packages/core/src/presets.ts

+13-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const vercel = () =>
3737
* Neon for Vercel Environment Variables
3838
* @see https://neon.tech/docs/guides/vercel-native-integration#environment-variables-set-by-the-integration
3939
*/
40-
export const neon_vercel = () =>
40+
export const neonVercel = () =>
4141
createEnv({
4242
server: {
4343
DATABASE_URL: z.string(),
@@ -59,14 +59,24 @@ export const neon_vercel = () =>
5959
runtimeEnv: process.env,
6060
});
6161

62+
/**
63+
* @see https://v6.docs.uploadthing.com/getting-started/nuxt#add-env-variables
64+
*/
65+
export const uploadthingV6 = () =>
66+
createEnv({
67+
server: {
68+
UPLOADTHING_TOKEN: z.string(),
69+
},
70+
runtimeEnv: process.env,
71+
});
72+
6273
/**
6374
* @see https://docs.uploadthing.com/getting-started/appdir#add-env-variables
6475
*/
6576
export const uploadthing = () =>
6677
createEnv({
6778
server: {
68-
UPLOADTHING_SECRET: z.string(),
69-
UPLOADTHING_APP_ID: z.string().optional(),
79+
UPLOADTHING_TOKEN: z.string(),
7080
},
7181
runtimeEnv: process.env,
7282
});

0 commit comments

Comments
 (0)