chore(env): remove unused vercel-url env variable (#1779)

* chore(env): remove unused vercel-url env variable

* chore: remove vercel-json file
This commit is contained in:
Meier Lukas
2024-12-26 08:58:27 +01:00
committed by GitHub
parent ef24370a8c
commit ec257e5f60
4 changed files with 11 additions and 45 deletions

View File

@@ -3,10 +3,6 @@ import { z } from "zod";
export const env = createEnv({
shared: {
VERCEL_URL: z
.string()
.optional()
.transform((url) => (url ? `https://${url}` : undefined)),
PORT: z.coerce.number().default(3000),
NODE_ENV: z.enum(["development", "production", "test"]).default("development"),
},
@@ -30,7 +26,6 @@ export const env = createEnv({
* Destructure all variables from `process.env` to make sure they aren't tree-shaken away.
*/
runtimeEnv: {
VERCEL_URL: process.env.VERCEL_URL,
PORT: process.env.PORT,
NODE_ENV: process.env.NODE_ENV,
DOCKER_HOSTNAMES: process.env.DOCKER_HOSTNAMES,

View File

@@ -16,7 +16,6 @@ export const fetchApi = createTRPCClient<AppRouter>({
function getBaseUrl() {
if (typeof window !== "undefined") return window.location.origin;
if (process.env.VERCEL_URL) return `https://${process.env.VERCEL_URL}`;
return `http://localhost:${process.env.PORT ?? 3000}`;
}

View File

@@ -1,8 +1,6 @@
{
"$schema": "https://turborepo.org/schema.json",
"globalDependencies": [
"**/.env"
],
"globalDependencies": ["**/.env"],
"globalEnv": [
"AUTH_LDAP_BASE",
"AUTH_LDAP_BIND_DN",
@@ -40,53 +38,32 @@
"DOCKER_PORTS",
"NODE_ENV",
"PORT",
"SKIP_ENV_VALIDATION",
"VERCEL_URL"
"SKIP_ENV_VALIDATION"
],
"ui": "stream",
"tasks": {
"topo": {
"dependsOn": [
"^topo"
]
"dependsOn": ["^topo"]
},
"build": {
"dependsOn": [
"^build"
],
"outputs": [
".next/**",
"!.next/cache/**",
"next-env.d.ts",
".output/**",
".vercel/output/**"
]
"dependsOn": ["^build"],
"outputs": [".next/**", "!.next/cache/**", "next-env.d.ts", ".output/**", ".vercel/output/**"]
},
"dev": {
"persistent": true,
"cache": false
},
"format": {
"outputs": [
"node_modules/.cache/.prettiercache"
],
"outputs": ["node_modules/.cache/.prettiercache"],
"outputLogs": "new-only"
},
"lint": {
"dependsOn": [
"^topo"
],
"outputs": [
"node_modules/.cache/.eslintcache"
]
"dependsOn": ["^topo"],
"outputs": ["node_modules/.cache/.eslintcache"]
},
"typecheck": {
"dependsOn": [
"^topo"
],
"outputs": [
"node_modules/.cache/tsbuildinfo.json"
]
"dependsOn": ["^topo"],
"outputs": ["node_modules/.cache/tsbuildinfo.json"]
},
"clean": {
"cache": false
@@ -95,4 +72,4 @@
"cache": false
}
}
}
}

View File

@@ -1,5 +0,0 @@
{
"github": {
"silent": true
}
}