Skip to content
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

Emptystring #157

Merged
merged 4 commits into from
Jan 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions apps/web/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@ import { z } from "zod";

export const env = createEnv({
server: {
CLERK_SECRET_KEY: z.string().min(1),
AWS_SES_ACCESS_KEY: z.string().min(1),
AWS_SES_SECRET_ACCESS_KEY: z.string().min(1),
AWS_REGION: z.string().min(1),
AWS_SES_EMAIL_FROM: z.string().min(1),
INTERNAL_AUTH_KEY: z.string().min(64),
BOT_API_URL: z.string().min(1),
CLERK_SECRET_KEY: z.string(),
AWS_SES_ACCESS_KEY: z.string(),
AWS_SES_SECRET_ACCESS_KEY: z.string(),
AWS_REGION: z.string(),
AWS_SES_EMAIL_FROM: z.string(),
INTERNAL_AUTH_KEY: z.string().min(64, {
message: "INTERNAL_AUTH_KEY must be at least 64 characters",
}),
BOT_API_URL: z.string(),
HK_ENV: z.string().min(1),
NODE_ENV: z
.enum(["development", "test", "production"])
.default("development"),
},
client: {
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: z.string().min(1),
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: z.string(),
},
// If you're using Next.js < 13.4.4, you'll need to specify the runtimeEnv manually
// runtimeEnv: {
Expand All @@ -29,4 +31,6 @@ export const env = createEnv({
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY:
process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY,
},
// Enable the flag to treat empty strings as undefined
emptyStringAsUndefined: true,
});
Loading