Skip to content

Commit dc66790

Browse files
feat: Update OpenNext (create-cloudflare@2.38.0)
1 parent 329c403 commit dc66790

File tree

9 files changed

+1269
-1257
lines changed

9 files changed

+1269
-1257
lines changed

.cursorrules

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ You are an expert in TypeScript, Node.js, Next.js App Router, React, Shadcn UI,
33
You can refer to the markdown files in `./cursor-docs` to get more context about the project.
44
Do not forget to update the project plan in `./cursor-docs/project-plan.md` as you work on the project.
55

6-
You are also excellent at Cloudflare Workers and other tools like D1 serverless database and KV. You can suggest usage of new tools (changes in wrangler.json file) to add more primitives like:
6+
You are also excellent at Cloudflare Workers and other tools like D1 serverless database and KV. You can suggest usage of new tools (changes in wrangler.jsonc file) to add more primitives like:
77
- R2: File storage
88
- KV: Key-value storage
9-
- Always use the existing KV namespace in `wrangler.json` don't ever create new ones.
9+
- Always use the existing KV namespace in `wrangler.jsonc` don't ever create new ones.
1010
- AI: AI multimodal inference
11-
- others primitives in `wrangler.json`
12-
- After adding a new primitive to `wrangler.json`, always run `pnpm run cf-typegen` to generate the new types.
11+
- others primitives in `wrangler.jsonc`
12+
- After adding a new primitive to `wrangler.jsonc`, always run `pnpm run cf-typegen` to generate the new types.
1313

1414
Authentication:
1515
- The authentication logic is in `src/utils/auth.ts` and `src/utils/kv-session.ts` and is based on Lucia Auth.

.vscode/settings.json

Lines changed: 0 additions & 2 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ Have a look at the [project plan](./cursor-docs/project-plan.md) to get an overv
107107
5. `pnpm dev`
108108
6. Open http://localhost:3000
109109

110-
## Changes to wrangler.json
110+
## Changes to wrangler.jsonc
111111

112-
After making a change to wrangler.json, you need to run `pnpm cf-typegen` to generate the new types.
112+
After making a change to wrangler.jsonc, you need to run `pnpm cf-typegen` to generate the new types.
113113

114114
## Things to change and customize before deploying to production
115115
1. Go to `src/constants.ts` and update it with your project details
@@ -124,7 +124,7 @@ After making a change to wrangler.json, you need to run `pnpm cf-typegen` to gen
124124
2. Set either `RESEND_API_KEY` or `SENDGRID_API_KEY` as a secret in your Cloudflare Worker depending on which email service you want to use.
125125
3. Create a Turnstile catcha in your Cloudflare account, and set the `NEXT_PUBLIC_TURNSTILE_SITE_KEY` as a Github Actions variable.
126126
4. Set `TURNSTILE_SECRET_KEY` as a secret in your Cloudflare Worker.
127-
5. Update the `wrangler.json` file with the new database and KV namespaces and env variables. If you change the D1 database name, you also need to update the `db:migrate:dev` script in the `package.json` file.
127+
5. Update the `wrangler.jsonc` file with the new database and KV namespaces and env variables. If you change the D1 database name, you also need to update the `db:migrate:dev` script in the `package.json` file.
128128
6. Go to https://dash.cloudflare.com/profile/api-tokens and click on "Use template" next to "Edit Cloudflare Workers". On the next, page add the following permissions in addition to the ones from the template:
129129
- Account:AI Gateway:Edit
130130
- Account:Workers AI:Edit
@@ -137,7 +137,7 @@ After making a change to wrangler.json, you need to run `pnpm cf-typegen` to gen
137137
7. Add the API token to the Github repository secrets as `CLOUDFLARE_API_TOKEN`
138138
8. Add the Cloudflare account id to the Github repository variables as `CLOUDFLARE_ACCOUNT_ID`
139139
9. Optional: If you want clear the CDN cache on deploy, add `CLOUDFLARE_ZONE_ID` to the Github repository variables for the zone id of your domain. This is the zone id of your domain, not the account id.
140-
10. Add the database name to the Github repository variables as `DATABASE_ID`. This should match the database name in the `wrangler.json` file.
140+
10. Add the database name to the Github repository variables as `DATABASE_ID`. This should match the database name in the `wrangler.jsonc` file.
141141
11. Push to the main branch
142142

143143
## Email templates

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,20 @@
2121
"@heroicons/react": "^2.2.0",
2222
"@heroui/react": "2.6.12",
2323
"@hookform/resolvers": "^3.10.0",
24-
"@icons-pack/react-simple-icons": "^11.0.1",
24+
"@icons-pack/react-simple-icons": "^11.2.0",
2525
"@marsidev/react-turnstile": "^1.1.0",
2626
"@oslojs/crypto": "^1.0.1",
2727
"@oslojs/encoding": "^1.1.0",
2828
"@paralleldrive/cuid2": "^2.2.2",
29-
"@radix-ui/react-accordion": "^1.2.2",
30-
"@radix-ui/react-avatar": "^1.1.2",
31-
"@radix-ui/react-collapsible": "^1.1.2",
32-
"@radix-ui/react-dialog": "^1.1.4",
33-
"@radix-ui/react-dropdown-menu": "^2.1.4",
34-
"@radix-ui/react-label": "^2.1.1",
35-
"@radix-ui/react-separator": "^1.1.1",
36-
"@radix-ui/react-slot": "^1.1.1",
37-
"@radix-ui/react-tooltip": "^1.1.6",
29+
"@radix-ui/react-accordion": "^1.2.3",
30+
"@radix-ui/react-avatar": "^1.1.3",
31+
"@radix-ui/react-collapsible": "^1.1.3",
32+
"@radix-ui/react-dialog": "^1.1.6",
33+
"@radix-ui/react-dropdown-menu": "^2.1.6",
34+
"@radix-ui/react-label": "^2.1.2",
35+
"@radix-ui/react-separator": "^1.1.2",
36+
"@radix-ui/react-slot": "^1.1.2",
37+
"@radix-ui/react-tooltip": "^1.1.8",
3838
"@react-email/components": "0.0.32",
3939
"@react-email/render": "1.0.4",
4040
"@simplewebauthn/browser": "^13.1.0",
@@ -44,7 +44,7 @@
4444
"class-variance-authority": "^0.7.1",
4545
"clsx": "^2.1.1",
4646
"date-fns": "^4.1.0",
47-
"drizzle-orm": "^0.38.3",
47+
"drizzle-orm": "^0.39.3",
4848
"framer-motion": "^11.16.7",
4949
"ipaddr.js": "^2.2.0",
5050
"lucide-react": "^0.471.0",
@@ -68,17 +68,17 @@
6868
"zustand": "^5.0.3"
6969
},
7070
"devDependencies": {
71-
"@cloudflare/workers-types": "^4.20250129.0",
71+
"@cloudflare/workers-types": "^4.20250204.0",
7272
"@next/bundle-analyzer": "^15.1.4",
73-
"@opennextjs/cloudflare": "^0.4.3",
73+
"@opennextjs/cloudflare": "^0.4.8",
7474
"@tailwindcss/typography": "^0.5.16",
7575
"@types/ms": "^0.7.34",
7676
"@types/node": "^20",
7777
"@types/react": "^18",
7878
"@types/react-dom": "^18",
7979
"@typescript-eslint/eslint-plugin": "^8.20.0",
8080
"@typescript-eslint/parser": "^8.20.0",
81-
"drizzle-kit": "^0.30.1",
81+
"drizzle-kit": "^0.30.4",
8282
"eslint": "^8",
8383
"eslint-config-next": "14.2.23",
8484
"eslint-plugin-import": "^2.31.0",
@@ -87,7 +87,7 @@
8787
"react-email": "3.0.6",
8888
"tailwindcss": "^3.4.1",
8989
"typescript": "^5",
90-
"wrangler": "^3.107.2"
90+
"wrangler": "^3.108.1"
9191
},
9292
"packageManager": "pnpm@9.12.1+sha512.e5a7e52a4183a02d5931057f7a0dbff9d5e9ce3161e33fa68ae392125b79282a8a8a470a51dfc8a0ed86221442eb2fb57019b0990ed24fab519bf0e1bc5ccfc4"
9393
}

0 commit comments

Comments
 (0)