-
Notifications
You must be signed in to change notification settings - Fork 87
/
env.mjs
68 lines (64 loc) · 2.77 KB
/
env.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import { createEnv } from "@t3-oss/env-nextjs";
import { z } from "zod";
export const env = createEnv({
server: {
GITHUB_PAT: z.string(),
},
client: {
// organization details
NEXT_PUBLIC_ORG_NAME: z.string(),
NEXT_PUBLIC_ORG_INFO: z.string().optional(),
NEXT_PUBLIC_ORG_LOGO: z.string(),
NEXT_PUBLIC_ORG_URL: z.string(),
NEXT_PUBLIC_GITHUB_ORG: z.string(),
NEXT_PUBLIC_SLACK_URL: z.string().url(),
NEXT_PUBLIC_ORG_START_DATE: z.string(),
NEXT_PUBLIC_GITHUB_URL: z.string(),
NEXT_PUBLIC_LINKEDIN_URL: z.string(),
NEXT_PUBLIC_YOUTUBE_URL: z.string(),
NEXT_PUBLIC_X_URL: z.string().optional(),
NEXT_PUBLIC_CONTACT_EMAIL: z.string(),
// SEO details
NEXT_PUBLIC_META_TITLE: z.string(),
NEXT_PUBLIC_META_IMG: z.string(),
NEXT_PUBLIC_META_DESCRIPTION: z.string(),
NEXT_PUBLIC_META_URL: z.string(),
// page details
NEXT_PUBLIC_PAGE_TITLE: z.string(),
NEXT_PUBLIC_CONTRIBUTORS_INFO: z.string().optional(),
NEXT_PUBLIC_LEADERBOARD_DEFAULT_ROLES: z.string().optional(),
NEXT_PUBLIC_FEATURES: z.string(),
NEXT_PUBLIC_DATA_SOURCE: z.string(),
NEXT_PUBLIC_FLAT_REPO_EXPLORER_URL: z.string(),
},
runtimeEnv: {
NEXT_PUBLIC_ORG_NAME: process.env.NEXT_PUBLIC_ORG_NAME,
NEXT_PUBLIC_ORG_INFO: process.env.NEXT_PUBLIC_ORG_INFO,
NEXT_PUBLIC_ORG_LOGO: process.env.NEXT_PUBLIC_ORG_LOGO,
NEXT_PUBLIC_ORG_URL: process.env.NEXT_PUBLIC_ORG_URL,
NEXT_PUBLIC_GITHUB_ORG: process.env.NEXT_PUBLIC_GITHUB_ORG,
NEXT_PUBLIC_SLACK_URL: process.env.NEXT_PUBLIC_SLACK_URL,
NEXT_PUBLIC_META_TITLE: process.env.NEXT_PUBLIC_META_TITLE,
NEXT_PUBLIC_META_IMG: process.env.NEXT_PUBLIC_META_IMG,
NEXT_PUBLIC_META_DESCRIPTION: process.env.NEXT_PUBLIC_META_DESCRIPTION,
NEXT_PUBLIC_META_URL: process.env.NEXT_PUBLIC_META_URL,
NEXT_PUBLIC_PAGE_TITLE: process.env.NEXT_PUBLIC_PAGE_TITLE,
NEXT_PUBLIC_CONTRIBUTORS_INFO: process.env.NEXT_PUBLIC_CONTRIBUTORS_INFO,
NEXT_PUBLIC_ORG_START_DATE: process.env.NEXT_PUBLIC_ORG_START_DATE,
NEXT_PUBLIC_LEADERBOARD_DEFAULT_ROLES:
process.env.NEXT_PUBLIC_LEADERBOARD_DEFAULT_ROLES,
GITHUB_PAT:
process.env.NODE_ENV === "development" && !process.env.GITHUB_PAT
? ""
: process.env.GITHUB_PAT,
NEXT_PUBLIC_FEATURES: process.env.NEXT_PUBLIC_FEATURES,
NEXT_PUBLIC_DATA_SOURCE: process.env.NEXT_PUBLIC_DATA_SOURCE,
NEXT_PUBLIC_FLAT_REPO_EXPLORER_URL:
process.env.NEXT_PUBLIC_FLAT_REPO_EXPLORER_URL,
NEXT_PUBLIC_GITHUB_URL: process.env.NEXT_PUBLIC_GITHUB_URL,
NEXT_PUBLIC_LINKEDIN_URL: process.env.NEXT_PUBLIC_LINKEDIN_URL,
NEXT_PUBLIC_YOUTUBE_URL: process.env.NEXT_PUBLIC_YOUTUBE_URL,
NEXT_PUBLIC_X_URL: process.env.NEXT_PUBLIC_X_URL,
NEXT_PUBLIC_CONTACT_EMAIL: process.env.NEXT_PUBLIC_CONTACT_EMAIL,
},
});