Skip to content

Commit 2edd115

Browse files
feat: Add a KV caching function and a banner
1 parent c55b6bd commit 2edd115

26 files changed

+374
-101
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"dev": "next dev",
77
"build": "next build",
88
"build:prod": "pnpm run opennext:build && wrangler deploy --dry-run --outdir=dist",
9-
"opennext:build": "export SKIP_LINTER=false && opennextjs-cloudflare",
9+
"opennext:build": "opennextjs-cloudflare",
1010
"build:analyze": "ANALYZE=true next build",
1111
"start": "next start",
1212
"lint": "next lint",
@@ -68,9 +68,9 @@
6868
"zustand": "^5.0.3"
6969
},
7070
"devDependencies": {
71-
"@cloudflare/workers-types": "^4.20250204.0",
71+
"@cloudflare/workers-types": "^4.20250214.0",
7272
"@next/bundle-analyzer": "^15.1.4",
73-
"@opennextjs/cloudflare": "^0.4.8",
73+
"@opennextjs/cloudflare": "^0.5.3",
7474
"@tailwindcss/typography": "^0.5.16",
7575
"@types/ms": "^0.7.34",
7676
"@types/node": "^20",
@@ -87,7 +87,7 @@
8787
"react-email": "3.0.6",
8888
"tailwindcss": "^3.4.1",
8989
"typescript": "^5",
90-
"wrangler": "^3.108.1"
90+
"wrangler": "^3.109.2"
9191
},
9292
"packageManager": "pnpm@9.12.1+sha512.e5a7e52a4183a02d5931057f7a0dbff9d5e9ce3161e33fa68ae392125b79282a8a8a470a51dfc8a0ed86221442eb2fb57019b0990ed24fab519bf0e1bc5ccfc4"
9393
}

pnpm-lock.yaml

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

src/app/(auth)/forgot-password/forgot-password.action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { init } from "@paralleldrive/cuid2";
88
import { eq } from "drizzle-orm";
99
import { getCloudflareContext } from "@opennextjs/cloudflare";
1010
import { getResetTokenKey } from "@/utils/auth-utils";
11-
import { validateTurnstileToken } from "@/utils/validateCaptcha";
11+
import { validateTurnstileToken } from "@/utils/validate-captcha";
1212
import { forgotPasswordSchema } from "@/schemas/forgot-password.schema";
1313
import { withRateLimit, RATE_LIMITS } from "@/utils/with-rate-limit";
1414
import { PASSWORD_RESET_TOKEN_EXPIRATION_SECONDS } from "@/constants";

src/app/(auth)/reset-password/reset-password.action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { createServerAction, ZSAError } from "zsa";
44
import { getDB } from "@/db";
55
import { userTable } from "@/db/schema";
66
import { resetPasswordSchema } from "@/schemas/reset-password.schema";
7-
import { hashPassword } from "@/utils/passwordHasher";
7+
import { hashPassword } from "@/utils/password-hasher";
88
import { eq } from "drizzle-orm";
99
import { getCloudflareContext } from "@opennextjs/cloudflare";
1010
import { getResetTokenKey } from "@/utils/auth-utils";

src/app/(auth)/sign-in/sign-in.actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { createServerAction, ZSAError } from "zsa";
44
import { getDB } from "@/db";
55
import { userTable } from "@/db/schema";
66
import { signInSchema } from "@/schemas/signin.schema";
7-
import { verifyPassword } from "@/utils/passwordHasher";
7+
import { verifyPassword } from "@/utils/password-hasher";
88
import { createAndStoreSession } from "@/utils/auth";
99
import { eq } from "drizzle-orm";
1010
import { RATE_LIMITS, withRateLimit } from "@/utils/with-rate-limit";

src/app/(auth)/sign-up/passkey-sign-up.actions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ import { cookies, headers } from "next/headers";
1111
import { createSession, generateSessionToken, setSessionTokenCookie, canSignUp } from "@/utils/auth";
1212
import type { RegistrationResponseJSON, PublicKeyCredentialCreationOptionsJSON } from "@simplewebauthn/typescript-types";
1313
import { withRateLimit, RATE_LIMITS } from "@/utils/with-rate-limit";
14-
import { getIP } from "@/utils/getIP";
14+
import { getIP } from "@/utils/get-IP";
1515
import { getCloudflareContext } from "@opennextjs/cloudflare";
1616
import { getVerificationTokenKey } from "@/utils/auth-utils";
1717
import { sendVerificationEmail } from "@/utils/email";
1818
import { EMAIL_VERIFICATION_TOKEN_EXPIRATION_SECONDS } from "@/constants";
1919
import { passkeyEmailSchema } from "@/schemas/passkey.schema";
2020
import ms from "ms";
21-
import { validateTurnstileToken } from "@/utils/validateCaptcha";
21+
import { validateTurnstileToken } from "@/utils/validate-captcha";
2222
import { isTurnstileEnabled } from "@/flags";
2323

2424
const PASSKEY_CHALLENGE_COOKIE_NAME = "passkey_challenge";

src/app/(auth)/sign-up/sign-up.actions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { createServerAction, ZSAError } from "zsa"
44
import { getDB } from "@/db"
55
import { userTable } from "@/db/schema"
66
import { signUpSchema } from "@/schemas/signup.schema";
7-
import { hashPassword } from "@/utils/passwordHasher";
7+
import { hashPassword } from "@/utils/password-hasher";
88
import { createSession, generateSessionToken, setSessionTokenCookie, canSignUp } from "@/utils/auth";
99
import { eq } from "drizzle-orm";
1010
import { createId } from "@paralleldrive/cuid2";
@@ -13,8 +13,8 @@ import { getVerificationTokenKey } from "@/utils/auth-utils";
1313
import { sendVerificationEmail } from "@/utils/email";
1414
import { withRateLimit, RATE_LIMITS } from "@/utils/with-rate-limit";
1515
import { EMAIL_VERIFICATION_TOKEN_EXPIRATION_SECONDS } from "@/constants";
16-
import { getIP } from "@/utils/getIP";
17-
import { validateTurnstileToken } from "@/utils/validateCaptcha";
16+
import { getIP } from "@/utils/get-IP";
17+
import { validateTurnstileToken } from "@/utils/validate-captcha";
1818
import { isTurnstileEnabled } from "@/flags";
1919

2020
export const signUpAction = createServerAction()

src/app/(auth)/sso/google/callback/google-callback.action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { eq } from "drizzle-orm";
1212
import { userTable } from "@/db/schema";
1313
import { createAndStoreSession, canSignUp } from "@/utils/auth";
1414
import { isGoogleSSOEnabled } from "@/flags";
15-
import { getIP } from "@/utils/getIP";
15+
import { getIP } from "@/utils/get-IP";
1616

1717
type GoogleSSOResponse = {
1818
/**

src/app/(auth)/sso/google/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
GOOGLE_OAUTH_STATE_COOKIE_NAME,
99
GOOGLE_OAUTH_CODE_VERIFIER_COOKIE_NAME,
1010
} from "@/constants";
11-
import isProd from "@/utils/isProd";
11+
import isProd from "@/utils/is-prod";
1212
import ms from "ms";
1313
import type { ResponseCookie } from "next/dist/compiled/@edge-runtime/cookies";
1414
import { isGoogleSSOEnabled } from "@/flags";

0 commit comments

Comments
 (0)