Skip to content

Commit 00bbf71

Browse files
committed
Update zod and cleanup env variable checking
1 parent d8b1329 commit 00bbf71

File tree

3 files changed

+23
-14
lines changed

3 files changed

+23
-14
lines changed

app/env.server.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const envSchema = z.object({
2626
FLY_APP_NAME: z.string(),
2727

2828
// Get from https://app.convertkit.com/account_settings/advanced_settings
29-
CONVERTKIT_KEY: z.string(),
29+
CONVERTKIT_KEY: z.string().optional().superRefine(requiredInProduction),
3030

3131
// A token to increase the rate limiting from 60/hr to 1000/hr
3232
GITHUB_TOKEN: z.string().optional().superRefine(requiredInProduction),
@@ -37,6 +37,9 @@ const envSchema = z.object({
3737
// Package from which to base docs version
3838
RELEASE_PACKAGE: z.string(),
3939

40+
FASTLY_API_TOKEN: z.string().optional().superRefine(requiredInProduction),
41+
FASTLY_SERVICE_ID: z.string().optional().superRefine(requiredInProduction),
42+
4043
// For development, reading the docs from a local repo
4144
LOCAL_REPO_RELATIVE_PATH: z
4245
.string()

package-lock.json

Lines changed: 16 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@
7373
"unified": "^10.1.2",
7474
"unist-util-visit": "^4.1.2",
7575
"yaml": "^1.10.2",
76-
"zod": "^3.20.6"
76+
"zod": "^3.22.4"
7777
},
7878
"devDependencies": {
7979
"@remix-run/dev": "2.4.1",
8080
"@remix-run/eslint-config": "2.4.1",
81-
"@testing-library/jest-dom": "^6.1.6",
81+
"@testing-library/jest-dom": "^6.2.0",
8282
"@types/follow-redirects": "^1.14.4",
8383
"@types/gunzip-maybe": "^1.4.2",
84-
"@types/luxon": "^3.3.7",
84+
"@types/luxon": "^3.3.8",
8585
"@types/parse-link-header": "^2.0.3",
8686
"@types/react": "^18.2.46",
8787
"@types/react-dom": "^18.2.18",

0 commit comments

Comments
 (0)