Skip to content

Commit

Permalink
add env variables to env.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
4eyes52 committed Sep 8, 2024
1 parent a9076b6 commit adb9221
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions apps/nextjs/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export const env = createEnv({
NODE_ENV: z
.enum(["development", "production", "test"])
.default("development"),
KEYSTATIC_GITHUB_CLIENT_ID: z.string().optional(),
KEYSTATIC_GITHUB_CLIENT_SECRET: z.string().optional(),
KEYSTATIC_SECRET: z.string().optional(),
},
/**
* Specify your server-side environment variables schema here.
Expand All @@ -19,9 +22,6 @@ export const env = createEnv({
server: {
DATABASE_URL: z.string().url(),
INNGEST_EVENT_KEY: z.string().optional(),
KEYSTATIC_GITHUB_CLIENT_ID: z.string(),
KEYSTATIC_GITHUB_CLIENT_SECRET: z.string(),
KEYSTATIC_SECRET: z.string()
},

/**
Expand All @@ -44,7 +44,7 @@ export const env = createEnv({
NEXT_PUBLIC_ALCHEMY_API: z.string(),
NEXT_PUBLIC_ETHPLORER_APIKEY: z.string(),
// NEXT_PUBLIC_CLIENTVAR: z.string(),
//NEXT_PUBLIC_KEYSTATIC_GITHUB_APP_SLUG: z.string()
NEXT_PUBLIC_KEYSTATIC_GITHUB_APP_SLUG: z.string().optional(),
},
/**
* Destructure all variables from `process.env` to make sure they aren't tree-shaken away.
Expand All @@ -70,6 +70,11 @@ export const env = createEnv({
NEXT_PUBLIC_ETHPLORER_APIKEY: process.env.NEXT_PUBLIC_ETHPLORER_APIKEY,
NEXT_PUBLIC_RESERVOIR_API_KEY: process.env.NEXT_PUBLIC_RESERVOIR_API_KEY,
// NEXT_PUBLIC_CLIENTVAR: process.env.NEXT_PUBLIC_CLIENTVAR,
NEXT_PUBLIC_KEYSTATIC_GITHUB_APP_SLUG:
process.env.NEXT_PUBLIC_KEYSTATIC_GITHUB_APP_SLUG,
KEYSTATIC_GITHUB_CLIENT_ID: process.env.KEYSTATIC_GITHUB_CLIENT_ID,
KEYSTATIC_GITHUB_CLIENT_SECRET: process.env.KEYSTATIC_GITHUB_CLIENT_ID,
KEYSTATIC_SECRET: process.env.KEYSTATIC_GITHUB_CLIENT_ID,
},
skipValidation:
!!process.env.CI ||
Expand Down

0 comments on commit adb9221

Please sign in to comment.