diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 65dd9e98..d91e1bda 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -100,7 +100,7 @@ jobs: uses: actions/setup-node@v4 with: cache: pnpm # cache pnpm store - node-version: 22.x + node-version: 24.x - name: Install packages run: pnpm install diff --git a/.github/workflows/local.yml b/.github/workflows/local.yml index 1adeb1a1..62a97855 100644 --- a/.github/workflows/local.yml +++ b/.github/workflows/local.yml @@ -30,28 +30,43 @@ jobs: - name: Build examples apps with local configuration shell: bash - run: pnpm -r openbuild:local + run: pnpm openbuild:local # Remember to add more ports here if we add new examples app - name: Start the local OpenNext servers shell: bash run: | - pnpm -r openbuild:local:start & - for port in 3001 3002 3003; do - echo "Checking port $port..." - for attempt in {1..20}; do - sleep 0.5 - if curl --silent --fail http://localhost:$port > /dev/null; then - echo "Server on $port is ready" - break - fi - if [ $attempt -eq 20 ]; then - echo "Server on $port failed to start" - exit 1 - fi - echo "Waiting for server on $port, attempt $attempt..." - done + pnpm openbuild:local:start & + + # Check all ports in parallel with generous timeout + pids=() + for port in 3001 3002 3003 3004; do + ( + echo "Checking port $port..." + for attempt in $(seq 1 40); do + sleep 1 + if curl --silent --fail http://localhost:$port > /dev/null 2>&1; then + echo "Server on $port is ready" + exit 0 + fi + echo "Waiting for server on $port, attempt $attempt..." + done + echo "ERROR: Server on $port failed to start" + exit 1 + ) & + pids+=($!) + done + + # Wait for all background checks and collect exit codes + failed=0 + for pid in "${pids[@]}"; do + wait $pid || failed=1 done + + if [ $failed -eq 1 ]; then + echo "One or more servers failed to start" + exit 1 + fi - name: Run E2E Test locally shell: bash run: | diff --git a/create-cloudflare/next/package.json b/create-cloudflare/next/package.json index 06e2cbe7..082d5397 100644 --- a/create-cloudflare/next/package.json +++ b/create-cloudflare/next/package.json @@ -20,12 +20,12 @@ }, "devDependencies": { "@tailwindcss/postcss": "^4", - "@types/node": "^22", + "@types/node": "^24", "@types/react": "^19", "@types/react-dom": "^19", "oxlint": "^1.42.0", "tailwindcss": "^4", - "typescript": "^5.7.4", + "typescript": "catalog:", "wrangler": "^4.59.3" } } diff --git a/examples-cloudflare/bugs/gh-119/.gitignore b/examples-cloudflare/bugs/gh-119/.gitignore deleted file mode 100644 index 69566c5f..00000000 --- a/examples-cloudflare/bugs/gh-119/.gitignore +++ /dev/null @@ -1,47 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.* -.yarn/* -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/versions - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# env files (can opt-in for committing if needed) -.env* - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts - -# playwright -/test-results/ -/playwright-report/ -/blob-report/ -/playwright/.cache/ - diff --git a/examples-cloudflare/bugs/gh-119/README.md b/examples-cloudflare/bugs/gh-119/README.md deleted file mode 100644 index e215bc4c..00000000 --- a/examples-cloudflare/bugs/gh-119/README.md +++ /dev/null @@ -1,36 +0,0 @@ -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). - -## Getting Started - -First, run the development server: - -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. diff --git a/examples-cloudflare/bugs/gh-119/app/favicon.ico b/examples-cloudflare/bugs/gh-119/app/favicon.ico deleted file mode 100644 index 718d6fea..00000000 Binary files a/examples-cloudflare/bugs/gh-119/app/favicon.ico and /dev/null differ diff --git a/examples-cloudflare/bugs/gh-119/app/fonts/GeistMonoVF.woff b/examples-cloudflare/bugs/gh-119/app/fonts/GeistMonoVF.woff deleted file mode 100644 index f2ae185c..00000000 Binary files a/examples-cloudflare/bugs/gh-119/app/fonts/GeistMonoVF.woff and /dev/null differ diff --git a/examples-cloudflare/bugs/gh-119/app/fonts/GeistVF.woff b/examples-cloudflare/bugs/gh-119/app/fonts/GeistVF.woff deleted file mode 100644 index 1b62daac..00000000 Binary files a/examples-cloudflare/bugs/gh-119/app/fonts/GeistVF.woff and /dev/null differ diff --git a/examples-cloudflare/bugs/gh-119/app/globals.css b/examples-cloudflare/bugs/gh-119/app/globals.css deleted file mode 100644 index f101930c..00000000 --- a/examples-cloudflare/bugs/gh-119/app/globals.css +++ /dev/null @@ -1,21 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -:root { - --background: #ffffff; - --foreground: #171717; -} - -@media (prefers-color-scheme: dark) { - :root { - --background: #0a0a0a; - --foreground: #ededed; - } -} - -body { - color: var(--foreground); - background: var(--background); - font-family: Arial, Helvetica, sans-serif; -} diff --git a/examples-cloudflare/bugs/gh-119/app/layout.tsx b/examples-cloudflare/bugs/gh-119/app/layout.tsx deleted file mode 100644 index 3d10f520..00000000 --- a/examples-cloudflare/bugs/gh-119/app/layout.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import "./globals.css"; - -import type { Metadata } from "next"; -import localFont from "next/font/local"; - -const geistSans = localFont({ - src: "./fonts/GeistVF.woff", - variable: "--font-geist-sans", - weight: "100 900", -}); -const geistMono = localFont({ - src: "./fonts/GeistMonoVF.woff", - variable: "--font-geist-mono", - weight: "100 900", -}); - -export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", -}; - -export default function RootLayout({ - children, -}: Readonly<{ - children: React.ReactNode; -}>) { - return ( - - {children} - - ); -} diff --git a/examples-cloudflare/bugs/gh-119/app/page.tsx b/examples-cloudflare/bugs/gh-119/app/page.tsx deleted file mode 100644 index fbad9f8f..00000000 --- a/examples-cloudflare/bugs/gh-119/app/page.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import Image from "next/image"; - -export default function Home() { - return ( -
-
- Next.js logo -
    -
  1. - Get started by editing{" "} - - app/page.tsx - - . -
  2. -
  3. Save and see your changes instantly.
  4. -
- -
- - Vercel logomark - Deploy now - - - Read our docs - -
-
- -
- ); -} diff --git a/examples-cloudflare/bugs/gh-119/e2e/base.spec.ts b/examples-cloudflare/bugs/gh-119/e2e/base.spec.ts deleted file mode 100644 index 9fe2a947..00000000 --- a/examples-cloudflare/bugs/gh-119/e2e/base.spec.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { test, expect } from "@playwright/test"; - -test.describe("bugs/gh-119", () => { - test("the index page of the application shows the Next.js logo", async ({ page }) => { - await page.goto("/"); - await expect(page.getByAltText("Next.js logo")).toBeVisible(); - }); -}); diff --git a/examples-cloudflare/bugs/gh-119/e2e/playwright.config.ts b/examples-cloudflare/bugs/gh-119/e2e/playwright.config.ts deleted file mode 100644 index 8677f9be..00000000 --- a/examples-cloudflare/bugs/gh-119/e2e/playwright.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { configurePlaywright } from "../../../common/config-e2e"; - -export default configurePlaywright("gh-119"); diff --git a/examples-cloudflare/bugs/gh-119/next.config.ts b/examples-cloudflare/bugs/gh-119/next.config.ts deleted file mode 100644 index d0793cd5..00000000 --- a/examples-cloudflare/bugs/gh-119/next.config.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { NextConfig } from "next"; - -const nextConfig: NextConfig = { - typescript: { ignoreBuildErrors: true }, - eslint: { ignoreDuringBuilds: true }, -}; - -export default nextConfig; diff --git a/examples-cloudflare/bugs/gh-119/open-next.config.ts b/examples-cloudflare/bugs/gh-119/open-next.config.ts deleted file mode 100644 index ffd98878..00000000 --- a/examples-cloudflare/bugs/gh-119/open-next.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { defineCloudflareConfig } from "@opennextjs/cloudflare"; - -export default defineCloudflareConfig(); diff --git a/examples-cloudflare/bugs/gh-119/package.json b/examples-cloudflare/bugs/gh-119/package.json deleted file mode 100644 index f1213118..00000000 --- a/examples-cloudflare/bugs/gh-119/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "examples-cloudflare/gh-119", - "version": "0.1.0", - "private": true, - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start", - "lint": "next lint", - "build:worker": "pnpm opennextjs-cloudflare build", - "preview:worker": "pnpm opennextjs-cloudflare preview", - "preview": "pnpm build:worker && pnpm preview:worker", - "e2e": "playwright test -c e2e/playwright.config.ts", - "cf-typegen": "wrangler types --env-interface CloudflareEnv" - }, - "dependencies": { - "next": "15.5.9", - "react": "^18.3.1", - "react-dom": "^18.3.1" - }, - "devDependencies": { - "@opennextjs/cloudflare": "workspace:*", - "@playwright/test": "catalog:", - "@types/node": "^22", - "@types/react": "^18", - "@types/react-dom": "^18", - "postcss": "^8", - "tailwindcss": "^3.4.1", - "typescript": "^5", - "wrangler": "catalog:" - } -} diff --git a/examples-cloudflare/bugs/gh-119/postcss.config.mjs b/examples-cloudflare/bugs/gh-119/postcss.config.mjs deleted file mode 100644 index f6c3605a..00000000 --- a/examples-cloudflare/bugs/gh-119/postcss.config.mjs +++ /dev/null @@ -1,8 +0,0 @@ -/** @type {import('postcss-load-config').Config} */ -const config = { - plugins: { - tailwindcss: {}, - }, -}; - -export default config; diff --git a/examples-cloudflare/bugs/gh-119/public/file.svg b/examples-cloudflare/bugs/gh-119/public/file.svg deleted file mode 100644 index 004145cd..00000000 --- a/examples-cloudflare/bugs/gh-119/public/file.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/examples-cloudflare/bugs/gh-119/public/globe.svg b/examples-cloudflare/bugs/gh-119/public/globe.svg deleted file mode 100644 index 567f17b0..00000000 --- a/examples-cloudflare/bugs/gh-119/public/globe.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/examples-cloudflare/bugs/gh-119/public/next.svg b/examples-cloudflare/bugs/gh-119/public/next.svg deleted file mode 100644 index 5174b28c..00000000 --- a/examples-cloudflare/bugs/gh-119/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/examples-cloudflare/bugs/gh-119/public/vercel.svg b/examples-cloudflare/bugs/gh-119/public/vercel.svg deleted file mode 100644 index 77053960..00000000 --- a/examples-cloudflare/bugs/gh-119/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/examples-cloudflare/bugs/gh-119/public/window.svg b/examples-cloudflare/bugs/gh-119/public/window.svg deleted file mode 100644 index b2b2a44f..00000000 --- a/examples-cloudflare/bugs/gh-119/public/window.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/examples-cloudflare/bugs/gh-119/tailwind.config.ts b/examples-cloudflare/bugs/gh-119/tailwind.config.ts deleted file mode 100644 index c93eb9ca..00000000 --- a/examples-cloudflare/bugs/gh-119/tailwind.config.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { Config } from "tailwindcss"; - -export default { - content: [ - "./pages/**/*.{js,ts,jsx,tsx,mdx}", - "./components/**/*.{js,ts,jsx,tsx,mdx}", - "./app/**/*.{js,ts,jsx,tsx,mdx}", - ], - theme: { - extend: { - colors: { - background: "var(--background)", - foreground: "var(--foreground)", - }, - }, - }, - plugins: [], -} satisfies Config; diff --git a/examples-cloudflare/bugs/gh-119/tsconfig.json b/examples-cloudflare/bugs/gh-119/tsconfig.json deleted file mode 100644 index 53b6ed51..00000000 --- a/examples-cloudflare/bugs/gh-119/tsconfig.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2017", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "plugins": [ - { - "name": "next" - } - ], - "paths": { - "@/*": ["./*"] - } - }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules", "open-next.config.ts"] -} diff --git a/examples-cloudflare/bugs/gh-119/wrangler.jsonc b/examples-cloudflare/bugs/gh-119/wrangler.jsonc deleted file mode 100644 index c8ecfcee..00000000 --- a/examples-cloudflare/bugs/gh-119/wrangler.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "node_modules/wrangler/config-schema.json", - "main": ".open-next/worker.js", - "name": "gh-119", - "compatibility_date": "2024-12-30", - "compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"], - "assets": { - "directory": ".open-next/assets", - "binding": "ASSETS" - } -} diff --git a/examples-cloudflare/bugs/gh-219/.dev.vars b/examples-cloudflare/bugs/gh-219/.dev.vars deleted file mode 100644 index 17f2dcc2..00000000 --- a/examples-cloudflare/bugs/gh-219/.dev.vars +++ /dev/null @@ -1 +0,0 @@ -NEXTJS_ENV=development \ No newline at end of file diff --git a/examples-cloudflare/bugs/gh-219/.gitignore b/examples-cloudflare/bugs/gh-219/.gitignore deleted file mode 100644 index 4212e83f..00000000 --- a/examples-cloudflare/bugs/gh-219/.gitignore +++ /dev/null @@ -1,56 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.* -.yarn/* -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/versions - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* -.pnpm-debug.log* - -# env files (can opt-in for committing if needed) -.env* - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts - -# Firebase -.firebase/ -firebase-debug.log -.env -.env.local -.env.development -.env.test -.env.production - -# playwright -/test-results/ -/playwright-report/ -/blob-report/ -/playwright/.cache/ diff --git a/examples-cloudflare/bugs/gh-219/README.md b/examples-cloudflare/bugs/gh-219/README.md deleted file mode 100644 index acfd4ae9..00000000 --- a/examples-cloudflare/bugs/gh-219/README.md +++ /dev/null @@ -1,38 +0,0 @@ -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). - -## Getting Started - -First, run the development server: - -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. - -# opentelemetry-issue diff --git a/examples-cloudflare/bugs/gh-219/e2e/base.spec.ts b/examples-cloudflare/bugs/gh-219/e2e/base.spec.ts deleted file mode 100644 index 45ab6fa9..00000000 --- a/examples-cloudflare/bugs/gh-219/e2e/base.spec.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { test, expect } from "@playwright/test"; - -test.describe("bugs/gh-219", () => { - test("the index page of the application shows the Next.js logo", async ({ page }) => { - await page.goto("/"); - await expect(page.getByAltText("Next.js logo")).toBeVisible(); - }); -}); diff --git a/examples-cloudflare/bugs/gh-219/e2e/playwright.config.ts b/examples-cloudflare/bugs/gh-219/e2e/playwright.config.ts deleted file mode 100644 index d42e84f4..00000000 --- a/examples-cloudflare/bugs/gh-219/e2e/playwright.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { configurePlaywright } from "../../../common/config-e2e"; - -export default configurePlaywright("gh-219"); diff --git a/examples-cloudflare/bugs/gh-219/next.config.ts b/examples-cloudflare/bugs/gh-219/next.config.ts deleted file mode 100644 index d0793cd5..00000000 --- a/examples-cloudflare/bugs/gh-219/next.config.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { NextConfig } from "next"; - -const nextConfig: NextConfig = { - typescript: { ignoreBuildErrors: true }, - eslint: { ignoreDuringBuilds: true }, -}; - -export default nextConfig; diff --git a/examples-cloudflare/bugs/gh-219/open-next.config.ts b/examples-cloudflare/bugs/gh-219/open-next.config.ts deleted file mode 100644 index ffd98878..00000000 --- a/examples-cloudflare/bugs/gh-219/open-next.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { defineCloudflareConfig } from "@opennextjs/cloudflare"; - -export default defineCloudflareConfig(); diff --git a/examples-cloudflare/bugs/gh-219/package.json b/examples-cloudflare/bugs/gh-219/package.json deleted file mode 100644 index 2d60db64..00000000 --- a/examples-cloudflare/bugs/gh-219/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "examples-cloudflare/gh-219", - "version": "0.1.0", - "private": true, - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start", - "lint": "next lint", - "build:worker": "pnpm opennextjs-cloudflare build", - "preview:worker": "pnpm opennextjs-cloudflare preview", - "preview": "pnpm build:worker && pnpm preview:worker", - "e2e": "playwright test -c e2e/playwright.config.ts", - "deploy:worker": "pnpm run build:worker && pnpm wrangler deploy" - }, - "dependencies": { - "@hookform/resolvers": "^3.9.1", - "@libsql/client": "^0.14.0", - "@t3-oss/env-nextjs": "^0.11.1", - "@tanstack/react-table": "^8.20.6", - "better-sqlite3": "^11.7.0", - "class-variance-authority": "^0.7.1", - "clsx": "^2.1.1", - "drizzle-orm": "^0.38.3", - "firebase": "^11.1.0", - "firebase-admin": "^13.0.2", - "lucide-react": "^0.469.0", - "nanoid": "^5.0.9", - "next": "15.5.9", - "next-auth": "^4.24.11", - "next-themes": "^0.4.4", - "qrcode.react": "^4.2.0", - "react": "^19.0.3", - "react-dom": "^19.0.3", - "react-hook-form": "^7.54.2", - "react-icons": "^5.4.0", - "sonner": "^1.7.1", - "tailwind-merge": "^2.6.0", - "tailwindcss-animate": "^1.0.7", - "zod": "^3.24.1" - }, - "devDependencies": { - "@cloudflare/workers-types": "catalog:", - "@opennextjs/cloudflare": "workspace:*", - "@playwright/test": "catalog:", - "@types/better-sqlite3": "^7.6.12", - "@types/node": "^22", - "@types/react": "^19", - "@types/react-dom": "^19", - "cross-env": "^7.0.3", - "drizzle-kit": "^0.30.1", - "postcss": "^8", - "tailwindcss": "^3.4.1", - "typescript": "^5", - "vercel": "^39.2.2", - "wrangler": "catalog:" - } -} diff --git a/examples-cloudflare/bugs/gh-219/postcss.config.mjs b/examples-cloudflare/bugs/gh-219/postcss.config.mjs deleted file mode 100644 index f6c3605a..00000000 --- a/examples-cloudflare/bugs/gh-219/postcss.config.mjs +++ /dev/null @@ -1,8 +0,0 @@ -/** @type {import('postcss-load-config').Config} */ -const config = { - plugins: { - tailwindcss: {}, - }, -}; - -export default config; diff --git a/examples-cloudflare/bugs/gh-219/public/file.svg b/examples-cloudflare/bugs/gh-219/public/file.svg deleted file mode 100644 index 004145cd..00000000 --- a/examples-cloudflare/bugs/gh-219/public/file.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/examples-cloudflare/bugs/gh-219/public/globe.svg b/examples-cloudflare/bugs/gh-219/public/globe.svg deleted file mode 100644 index 567f17b0..00000000 --- a/examples-cloudflare/bugs/gh-219/public/globe.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/examples-cloudflare/bugs/gh-219/public/next.svg b/examples-cloudflare/bugs/gh-219/public/next.svg deleted file mode 100644 index 5174b28c..00000000 --- a/examples-cloudflare/bugs/gh-219/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/examples-cloudflare/bugs/gh-219/public/vercel.svg b/examples-cloudflare/bugs/gh-219/public/vercel.svg deleted file mode 100644 index 77053960..00000000 --- a/examples-cloudflare/bugs/gh-219/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/examples-cloudflare/bugs/gh-219/public/window.svg b/examples-cloudflare/bugs/gh-219/public/window.svg deleted file mode 100644 index b2b2a44f..00000000 --- a/examples-cloudflare/bugs/gh-219/public/window.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/examples-cloudflare/bugs/gh-219/src/app/favicon.ico b/examples-cloudflare/bugs/gh-219/src/app/favicon.ico deleted file mode 100644 index 718d6fea..00000000 Binary files a/examples-cloudflare/bugs/gh-219/src/app/favicon.ico and /dev/null differ diff --git a/examples-cloudflare/bugs/gh-219/src/app/globals.css b/examples-cloudflare/bugs/gh-219/src/app/globals.css deleted file mode 100644 index f101930c..00000000 --- a/examples-cloudflare/bugs/gh-219/src/app/globals.css +++ /dev/null @@ -1,21 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -:root { - --background: #ffffff; - --foreground: #171717; -} - -@media (prefers-color-scheme: dark) { - :root { - --background: #0a0a0a; - --foreground: #ededed; - } -} - -body { - color: var(--foreground); - background: var(--background); - font-family: Arial, Helvetica, sans-serif; -} diff --git a/examples-cloudflare/bugs/gh-219/src/app/layout.tsx b/examples-cloudflare/bugs/gh-219/src/app/layout.tsx deleted file mode 100644 index 3db18ea3..00000000 --- a/examples-cloudflare/bugs/gh-219/src/app/layout.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import "./globals.css"; - -import type { Metadata } from "next"; -import { Geist, Geist_Mono } from "next/font/google"; - -const geistSans = Geist({ - variable: "--font-geist-sans", - subsets: ["latin"], -}); - -const geistMono = Geist_Mono({ - variable: "--font-geist-mono", - subsets: ["latin"], -}); - -export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", -}; - -export default function RootLayout({ - children, -}: Readonly<{ - children: React.ReactNode; -}>) { - return ( - - {children} - - ); -} diff --git a/examples-cloudflare/bugs/gh-219/src/app/page.tsx b/examples-cloudflare/bugs/gh-219/src/app/page.tsx deleted file mode 100644 index 42598ee0..00000000 --- a/examples-cloudflare/bugs/gh-219/src/app/page.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import Image from "next/image"; - -export default function Home() { - return ( -
-
- Next.js logo -
    -
  1. - Get started by editing{" "} - - src/app/page.tsx - - . -
  2. -
  3. Save and see your changes instantly.
  4. -
- -
- - Vercel logomark - Deploy now - - - Read our docs - -
-
- -
- ); -} diff --git a/examples-cloudflare/bugs/gh-219/src/firebase/config.js b/examples-cloudflare/bugs/gh-219/src/firebase/config.js deleted file mode 100644 index 2e8d38ed..00000000 --- a/examples-cloudflare/bugs/gh-219/src/firebase/config.js +++ /dev/null @@ -1,23 +0,0 @@ -import { initializeApp } from "firebase/app"; -import { getAuth } from "firebase/auth"; -import { getFirestore } from "firebase/firestore"; -import { getStorage } from "firebase/storage"; - -const firebaseConfig = { - apiKey: process.env.REACT_APP_FIREBASE_API_KEY, - authDomain: process.env.REACT_APP_FIREBASE_AUTH_DOMAIN, - projectId: process.env.REACT_APP_FIREBASE_PROJECT_ID, - storageBucket: process.env.REACT_APP_FIREBASE_STORAGE_BUCKET, - messagingSenderId: process.env.REACT_APP_FIREBASE_MESSAGING_SENDER_ID, - appId: process.env.REACT_APP_FIREBASE_APP_ID, -}; - -// Initialize Firebase -const app = initializeApp(firebaseConfig); - -// Initialize Firebase services -export const auth = getAuth(app); -export const db = getFirestore(app); -export const storage = getStorage(app); - -export default app; diff --git a/examples-cloudflare/bugs/gh-219/tailwind.config.ts b/examples-cloudflare/bugs/gh-219/tailwind.config.ts deleted file mode 100644 index 5d3c1bd2..00000000 --- a/examples-cloudflare/bugs/gh-219/tailwind.config.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { Config } from "tailwindcss"; - -export default { - content: [ - "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", - "./src/components/**/*.{js,ts,jsx,tsx,mdx}", - "./src/app/**/*.{js,ts,jsx,tsx,mdx}", - ], - theme: { - extend: { - colors: { - background: "var(--background)", - foreground: "var(--foreground)", - }, - }, - }, - plugins: [], -} satisfies Config; diff --git a/examples-cloudflare/bugs/gh-219/tsconfig.json b/examples-cloudflare/bugs/gh-219/tsconfig.json deleted file mode 100644 index d55979b5..00000000 --- a/examples-cloudflare/bugs/gh-219/tsconfig.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2017", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "plugins": [ - { - "name": "next" - } - ], - "paths": { - "@/*": ["./src/*"] - } - }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules", "open-next.config.ts"] -} diff --git a/examples-cloudflare/bugs/gh-219/wrangler.jsonc b/examples-cloudflare/bugs/gh-219/wrangler.jsonc deleted file mode 100644 index 87558ac3..00000000 --- a/examples-cloudflare/bugs/gh-219/wrangler.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "node_modules/wrangler/config-schema.json", - "main": ".open-next/worker.js", - "name": "gh-219", - "compatibility_date": "2024-12-30", - "compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"], - "assets": { - "directory": ".open-next/assets", - "binding": "ASSETS" - } -} diff --git a/examples-cloudflare/bugs/gh-223/.gitignore b/examples-cloudflare/bugs/gh-223/.gitignore deleted file mode 100644 index b5348851..00000000 --- a/examples-cloudflare/bugs/gh-223/.gitignore +++ /dev/null @@ -1,53 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js -.yarn/install-state.gz - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env*.local - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts - - -# Cloudflare related -/.open-next -/.wrangler - -# wrangler files -.wrangler -.dev.vars - -/.vscode - -# playwright -/test-results/ -/playwright-report/ -/blob-report/ -/playwright/.cache/ \ No newline at end of file diff --git a/examples-cloudflare/bugs/gh-223/README.md b/examples-cloudflare/bugs/gh-223/README.md deleted file mode 100644 index c4033664..00000000 --- a/examples-cloudflare/bugs/gh-223/README.md +++ /dev/null @@ -1,36 +0,0 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). - -## Getting Started - -First, run the development server: - -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. diff --git a/examples-cloudflare/bugs/gh-223/app/api/image/route.ts b/examples-cloudflare/bugs/gh-223/app/api/image/route.ts deleted file mode 100644 index d8552fd4..00000000 --- a/examples-cloudflare/bugs/gh-223/app/api/image/route.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { NextRequest, NextResponse } from "next/server"; - -import { getImageUrl } from "../../../src/utils/s3Bucket"; - -export async function GET(request: NextRequest) { - const searchParams = request.nextUrl.searchParams; - const fileName = searchParams.get("fileName"); - return NextResponse.json( - { - image: fileName ? await getImageUrl(fileName) : "", - }, - { - status: 200, - } - ); -} diff --git a/examples-cloudflare/bugs/gh-223/app/favicon.ico b/examples-cloudflare/bugs/gh-223/app/favicon.ico deleted file mode 100644 index 718d6fea..00000000 Binary files a/examples-cloudflare/bugs/gh-223/app/favicon.ico and /dev/null differ diff --git a/examples-cloudflare/bugs/gh-223/app/globals.css b/examples-cloudflare/bugs/gh-223/app/globals.css deleted file mode 100644 index 3422b7e6..00000000 --- a/examples-cloudflare/bugs/gh-223/app/globals.css +++ /dev/null @@ -1,29 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -:root { - --foreground-rgb: 0, 0, 0; - --background-start-rgb: 214, 219, 220; - --background-end-rgb: 255, 255, 255; -} - -@media (prefers-color-scheme: dark) { - :root { - --foreground-rgb: 255, 255, 255; - --background-start-rgb: 0, 0, 0; - --background-end-rgb: 0, 0, 0; - } -} - -body { - color: rgb(var(--foreground-rgb)); - background: linear-gradient(to bottom, transparent, rgb(var(--background-end-rgb))) - rgb(var(--background-start-rgb)); -} - -@layer utilities { - .text-balance { - text-wrap: balance; - } -} diff --git a/examples-cloudflare/bugs/gh-223/app/layout.tsx b/examples-cloudflare/bugs/gh-223/app/layout.tsx deleted file mode 100644 index eb2b4dd9..00000000 --- a/examples-cloudflare/bugs/gh-223/app/layout.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import "./globals.css"; - -import type { Metadata } from "next"; -import { Inter } from "next/font/google"; - -const inter = Inter({ subsets: ["latin"] }); - -export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", -}; - -export default function RootLayout({ - children, -}: Readonly<{ - children: React.ReactNode; -}>) { - return ( - - {children} - - ); -} diff --git a/examples-cloudflare/bugs/gh-223/app/page.tsx b/examples-cloudflare/bugs/gh-223/app/page.tsx deleted file mode 100644 index cadc560e..00000000 --- a/examples-cloudflare/bugs/gh-223/app/page.tsx +++ /dev/null @@ -1,113 +0,0 @@ -"use client"; - -import Image from "next/image"; - -export default function Home() { - return ( -
-
-

- Get started by editing  - src/app/page.tsx -

-
- - By{" "} - Vercel Logo - -
-
- -
- Next.js Logo -
- -
- -

- Docs{" "} - - -> - -

-

- Find in-depth information about Next.js features and API. -

-
- - -

- Learn{" "} - - -> - -

-

- Learn about Next.js in an interactive course with quizzes! -

-
- - -

- Templates{" "} - - -> - -

-

Explore starter templates for Next.js.

-
- - -

- Deploy{" "} - - -> - -

-

- Instantly deploy your Next.js site to a shareable URL with Vercel. -

-
-
-
- ); -} diff --git a/examples-cloudflare/bugs/gh-223/e2e/base.spec.ts b/examples-cloudflare/bugs/gh-223/e2e/base.spec.ts deleted file mode 100644 index f79ad9ac..00000000 --- a/examples-cloudflare/bugs/gh-223/e2e/base.spec.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { test, expect } from "@playwright/test"; - -test.describe("bugs/gh-223", () => { - test("api route", async ({ page }) => { - const res = await page.request.get("/api/image"); - expect(res.status()).toEqual(200); - expect((await res.json()).image).toEqual(""); - }); -}); diff --git a/examples-cloudflare/bugs/gh-223/e2e/playwright.config.ts b/examples-cloudflare/bugs/gh-223/e2e/playwright.config.ts deleted file mode 100644 index 6cf894bc..00000000 --- a/examples-cloudflare/bugs/gh-223/e2e/playwright.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { configurePlaywright } from "../../../common/config-e2e"; - -export default configurePlaywright("gh-223"); diff --git a/examples-cloudflare/bugs/gh-223/next.config.mjs b/examples-cloudflare/bugs/gh-223/next.config.mjs deleted file mode 100644 index 51c629d2..00000000 --- a/examples-cloudflare/bugs/gh-223/next.config.mjs +++ /dev/null @@ -1,7 +0,0 @@ -/** @type {import('next').NextConfig} */ -const nextConfig = { - typescript: { ignoreBuildErrors: true }, - eslint: { ignoreDuringBuilds: true }, -}; - -export default nextConfig; diff --git a/examples-cloudflare/bugs/gh-223/open-next.config.ts b/examples-cloudflare/bugs/gh-223/open-next.config.ts deleted file mode 100644 index ffd98878..00000000 --- a/examples-cloudflare/bugs/gh-223/open-next.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { defineCloudflareConfig } from "@opennextjs/cloudflare"; - -export default defineCloudflareConfig(); diff --git a/examples-cloudflare/bugs/gh-223/package.json b/examples-cloudflare/bugs/gh-223/package.json deleted file mode 100644 index bdedf95d..00000000 --- a/examples-cloudflare/bugs/gh-223/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "examples-cloudflare/gh-223", - "version": "0.1.0", - "private": true, - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start", - "lint": "next lint", - "build:worker": "pnpm opennextjs-cloudflare build", - "preview:worker": "pnpm opennextjs-cloudflare preview", - "preview": "pnpm build:worker && pnpm preview:worker", - "e2e": "playwright test -c e2e/playwright.config.ts", - "deploy:worker": "pnpm run build:worker && pnpm wrangler deploy" - }, - "dependencies": { - "@aws-sdk/client-s3": "^3.971.0", - "@aws-sdk/s3-request-presigner": "^3.971.0", - "next": "15.5.9", - "react": "^19.0.3", - "react-dom": "^19.0.3" - }, - "devDependencies": { - "@cloudflare/workers-types": "catalog:", - "@opennextjs/cloudflare": "workspace:*", - "@playwright/test": "catalog:", - "@types/node": "^22.10.2", - "@types/react": "^19.0.3", - "@types/react-dom": "^19.0.3", - "postcss": "^8.4.49", - "tailwindcss": "^3.4.17", - "typescript": "^5.7.2", - "wrangler": "catalog:" - } -} diff --git a/examples-cloudflare/bugs/gh-223/postcss.config.mjs b/examples-cloudflare/bugs/gh-223/postcss.config.mjs deleted file mode 100644 index f6c3605a..00000000 --- a/examples-cloudflare/bugs/gh-223/postcss.config.mjs +++ /dev/null @@ -1,8 +0,0 @@ -/** @type {import('postcss-load-config').Config} */ -const config = { - plugins: { - tailwindcss: {}, - }, -}; - -export default config; diff --git a/examples-cloudflare/bugs/gh-223/public/next.svg b/examples-cloudflare/bugs/gh-223/public/next.svg deleted file mode 100644 index 5174b28c..00000000 --- a/examples-cloudflare/bugs/gh-223/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/examples-cloudflare/bugs/gh-223/public/vercel.svg b/examples-cloudflare/bugs/gh-223/public/vercel.svg deleted file mode 100644 index d2f84222..00000000 --- a/examples-cloudflare/bugs/gh-223/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/examples-cloudflare/bugs/gh-223/src/utils/common.ts b/examples-cloudflare/bugs/gh-223/src/utils/common.ts deleted file mode 100644 index 0e757e29..00000000 --- a/examples-cloudflare/bugs/gh-223/src/utils/common.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Optional: Check file size (e.g., max 5MB) -export const MAX_FILE_SIZE = 5 * 1024 * 1024; // 5MB - -export const validateImageFile = (file: File): void => { - const allowedImageTypes = ["image/jpeg", "image/png", "image/gif", "image/jpg"]; - - // Check file type - if (!allowedImageTypes.includes(file.type)) { - throw new Error("Invalid file type. Please upload a valid image file."); - } - - if (file.size > MAX_FILE_SIZE) { - throw new Error("File size exceeds the maximum limit of 5MB."); - } -}; - -export const getImageUrlFromS3 = async (fileName: string) => { - try { - const url = await fetch(`/api/image?fileName=${fileName}`, { - method: "GET", - }); - //@ts-ignore - const { image } = await url.json(); - return image; - } catch (error) { - console.log({ error }); - throw new Error("Failed to get image"); - } -}; diff --git a/examples-cloudflare/bugs/gh-223/src/utils/s3Bucket.ts b/examples-cloudflare/bugs/gh-223/src/utils/s3Bucket.ts deleted file mode 100644 index e16908cd..00000000 --- a/examples-cloudflare/bugs/gh-223/src/utils/s3Bucket.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { GetObjectCommand, S3Client } from "@aws-sdk/client-s3"; -import { getSignedUrl } from "@aws-sdk/s3-request-presigner"; - -/** - * This function should only be used inside api calls - */ -export const getImageUrl = async (fileName: string) => { - try { - const s3Client = new S3Client({ - region: "REGION", - endpoint: "ENDPOINT", - credentials: { - accessKeyId: "ACCESS_KEY_ID", - secretAccessKey: "SECRET_ACCESS_KEY", - }, - }); - - const command = new GetObjectCommand({ - Key: fileName.trim().toLowerCase().replace(/ /g, "-"), - Bucket: process.env.CLOUDFLARE_R2_BUCKET || "", - ResponseExpires: new Date(Date.now() + 3600), - }); - const presignedUrl = await getSignedUrl(s3Client, command); - - return presignedUrl; - } catch (error) { - console.log({ error }); - throw new Error("Failed to get image"); - } -}; diff --git a/examples-cloudflare/bugs/gh-223/tailwind.config.ts b/examples-cloudflare/bugs/gh-223/tailwind.config.ts deleted file mode 100644 index 86fc7b5d..00000000 --- a/examples-cloudflare/bugs/gh-223/tailwind.config.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { Config } from "tailwindcss"; - -const config: Config = { - content: [ - "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", - "./src/components/**/*.{js,ts,jsx,tsx,mdx}", - "./src/app/**/*.{js,ts,jsx,tsx,mdx}", - ], - theme: { - extend: { - backgroundImage: { - "gradient-radial": "radial-gradient(var(--tw-gradient-stops))", - "gradient-conic": "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))", - }, - }, - }, - plugins: [], -}; -export default config; diff --git a/examples-cloudflare/bugs/gh-223/tsconfig.json b/examples-cloudflare/bugs/gh-223/tsconfig.json deleted file mode 100644 index ee0c2d8d..00000000 --- a/examples-cloudflare/bugs/gh-223/tsconfig.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "compilerOptions": { - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "plugins": [ - { - "name": "next" - } - ], - "paths": { - "@/*": ["./src/*"] - }, - "types": ["@cloudflare/workers-types/2023-07-01"], - "target": "ES2017" - }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules", "open-next.config.ts"] -} diff --git a/examples-cloudflare/bugs/gh-223/wrangler.jsonc b/examples-cloudflare/bugs/gh-223/wrangler.jsonc deleted file mode 100644 index 87558ac3..00000000 --- a/examples-cloudflare/bugs/gh-223/wrangler.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "node_modules/wrangler/config-schema.json", - "main": ".open-next/worker.js", - "name": "gh-219", - "compatibility_date": "2024-12-30", - "compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"], - "assets": { - "directory": ".open-next/assets", - "binding": "ASSETS" - } -} diff --git a/examples-cloudflare/create-next-app/.gitignore b/examples-cloudflare/create-next-app/.gitignore deleted file mode 100644 index 3a282111..00000000 --- a/examples-cloudflare/create-next-app/.gitignore +++ /dev/null @@ -1,45 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js -.yarn/install-state.gz - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env*.local - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts - -# wrangler -.wrangler - -# playwright -/test-results/ -/playwright-report/ -/blob-report/ -/playwright/.cache/ diff --git a/examples-cloudflare/create-next-app/README.md b/examples-cloudflare/create-next-app/README.md deleted file mode 100644 index e215bc4c..00000000 --- a/examples-cloudflare/create-next-app/README.md +++ /dev/null @@ -1,36 +0,0 @@ -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). - -## Getting Started - -First, run the development server: - -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. diff --git a/examples-cloudflare/create-next-app/e2e/base.spec.ts b/examples-cloudflare/create-next-app/e2e/base.spec.ts deleted file mode 100644 index eda4eaef..00000000 --- a/examples-cloudflare/create-next-app/e2e/base.spec.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { test, expect } from "@playwright/test"; - -test.describe("create-next-app", () => { - test("the index page of the application shows the Next.js logo", async ({ page }) => { - await page.goto("/"); - await expect(page.getByAltText("Next.js logo")).toBeVisible(); - }); -}); diff --git a/examples-cloudflare/create-next-app/e2e/playwright.config.ts b/examples-cloudflare/create-next-app/e2e/playwright.config.ts deleted file mode 100644 index f3cf5fe4..00000000 --- a/examples-cloudflare/create-next-app/e2e/playwright.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { configurePlaywright } from "../../common/config-e2e"; - -export default configurePlaywright("create-next-app", { multipleBrowsers: true }); diff --git a/examples-cloudflare/create-next-app/next.config.mjs b/examples-cloudflare/create-next-app/next.config.mjs deleted file mode 100644 index 2bd0079f..00000000 --- a/examples-cloudflare/create-next-app/next.config.mjs +++ /dev/null @@ -1,11 +0,0 @@ -import { initOpenNextCloudflareForDev } from "@opennextjs/cloudflare"; - -initOpenNextCloudflareForDev(); - -/** @type {import('next').NextConfig} */ -const nextConfig = { - typescript: { ignoreBuildErrors: true }, - eslint: { ignoreDuringBuilds: true }, -}; - -export default nextConfig; diff --git a/examples-cloudflare/create-next-app/open-next.config.ts b/examples-cloudflare/create-next-app/open-next.config.ts deleted file mode 100644 index ffd98878..00000000 --- a/examples-cloudflare/create-next-app/open-next.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { defineCloudflareConfig } from "@opennextjs/cloudflare"; - -export default defineCloudflareConfig(); diff --git a/examples-cloudflare/create-next-app/package.json b/examples-cloudflare/create-next-app/package.json deleted file mode 100644 index 1611543f..00000000 --- a/examples-cloudflare/create-next-app/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "examples-cloudflare/create-next-app", - "version": "0.1.0", - "private": true, - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start", - "lint": "next lint", - "build:worker": "pnpm opennextjs-cloudflare build", - "preview:worker": "pnpm opennextjs-cloudflare preview", - "preview": "pnpm build:worker && pnpm preview:worker", - "e2e": "playwright test -c e2e/playwright.config.ts" - }, - "dependencies": { - "next": "catalog:", - "react": "catalog:", - "react-dom": "catalog:" - }, - "devDependencies": { - "@opennextjs/cloudflare": "workspace:*", - "@playwright/test": "catalog:", - "@types/node": "catalog:", - "@types/react": "catalog:", - "@types/react-dom": "catalog:", - "postcss": "^8", - "tailwindcss": "^3.4.1", - "typescript": "catalog:", - "wrangler": "catalog:" - } -} diff --git a/examples-cloudflare/create-next-app/postcss.config.mjs b/examples-cloudflare/create-next-app/postcss.config.mjs deleted file mode 100644 index f6c3605a..00000000 --- a/examples-cloudflare/create-next-app/postcss.config.mjs +++ /dev/null @@ -1,8 +0,0 @@ -/** @type {import('postcss-load-config').Config} */ -const config = { - plugins: { - tailwindcss: {}, - }, -}; - -export default config; diff --git a/examples-cloudflare/create-next-app/public/next.svg b/examples-cloudflare/create-next-app/public/next.svg deleted file mode 100644 index 5174b28c..00000000 --- a/examples-cloudflare/create-next-app/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/examples-cloudflare/create-next-app/public/vercel.svg b/examples-cloudflare/create-next-app/public/vercel.svg deleted file mode 100644 index d2f84222..00000000 --- a/examples-cloudflare/create-next-app/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/examples-cloudflare/create-next-app/src/app/favicon.ico b/examples-cloudflare/create-next-app/src/app/favicon.ico deleted file mode 100644 index 718d6fea..00000000 Binary files a/examples-cloudflare/create-next-app/src/app/favicon.ico and /dev/null differ diff --git a/examples-cloudflare/create-next-app/src/app/fonts/GeistMonoVF.woff b/examples-cloudflare/create-next-app/src/app/fonts/GeistMonoVF.woff deleted file mode 100644 index f2ae185c..00000000 Binary files a/examples-cloudflare/create-next-app/src/app/fonts/GeistMonoVF.woff and /dev/null differ diff --git a/examples-cloudflare/create-next-app/src/app/fonts/GeistVF.woff b/examples-cloudflare/create-next-app/src/app/fonts/GeistVF.woff deleted file mode 100644 index 1b62daac..00000000 Binary files a/examples-cloudflare/create-next-app/src/app/fonts/GeistVF.woff and /dev/null differ diff --git a/examples-cloudflare/create-next-app/src/app/globals.css b/examples-cloudflare/create-next-app/src/app/globals.css deleted file mode 100644 index 1a4fd67a..00000000 --- a/examples-cloudflare/create-next-app/src/app/globals.css +++ /dev/null @@ -1,27 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -:root { - --background: #ffffff; - --foreground: #171717; -} - -@media (prefers-color-scheme: dark) { - :root { - --background: #0a0a0a; - --foreground: #ededed; - } -} - -body { - color: var(--foreground); - background: var(--background); - font-family: Arial, Helvetica, sans-serif; -} - -@layer utilities { - .text-balance { - text-wrap: balance; - } -} diff --git a/examples-cloudflare/create-next-app/src/app/layout.tsx b/examples-cloudflare/create-next-app/src/app/layout.tsx deleted file mode 100644 index 3d10f520..00000000 --- a/examples-cloudflare/create-next-app/src/app/layout.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import "./globals.css"; - -import type { Metadata } from "next"; -import localFont from "next/font/local"; - -const geistSans = localFont({ - src: "./fonts/GeistVF.woff", - variable: "--font-geist-sans", - weight: "100 900", -}); -const geistMono = localFont({ - src: "./fonts/GeistMonoVF.woff", - variable: "--font-geist-mono", - weight: "100 900", -}); - -export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", -}; - -export default function RootLayout({ - children, -}: Readonly<{ - children: React.ReactNode; -}>) { - return ( - - {children} - - ); -} diff --git a/examples-cloudflare/create-next-app/src/app/page.tsx b/examples-cloudflare/create-next-app/src/app/page.tsx deleted file mode 100644 index f1b83089..00000000 --- a/examples-cloudflare/create-next-app/src/app/page.tsx +++ /dev/null @@ -1,111 +0,0 @@ -import Image from "next/image"; - -export default function Home() { - return ( -
-
-

- Get started by editing  - src/app/page.tsx -

-
- - By{" "} - Vercel Logo - -
-
- -
- Next.js Logo -
- -
- -

- Docs{" "} - - -> - -

-

- Find in-depth information about Next.js features and API. -

-
- - -

- Learn{" "} - - -> - -

-

- Learn about Next.js in an interactive course with quizzes! -

-
- - -

- Templates{" "} - - -> - -

-

Explore starter templates for Next.js.

-
- - -

- Deploy{" "} - - -> - -

-

- Instantly deploy your Next.js site to a shareable URL with Vercel. -

-
-
-
- ); -} diff --git a/examples-cloudflare/create-next-app/tailwind.config.ts b/examples-cloudflare/create-next-app/tailwind.config.ts deleted file mode 100644 index 45e6dc97..00000000 --- a/examples-cloudflare/create-next-app/tailwind.config.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { Config } from "tailwindcss"; - -const config: Config = { - content: [ - "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", - "./src/components/**/*.{js,ts,jsx,tsx,mdx}", - "./src/app/**/*.{js,ts,jsx,tsx,mdx}", - ], - theme: { - extend: { - colors: { - background: "var(--background)", - foreground: "var(--foreground)", - }, - }, - }, - plugins: [], -}; -export default config; diff --git a/examples-cloudflare/create-next-app/tsconfig.json b/examples-cloudflare/create-next-app/tsconfig.json deleted file mode 100644 index e1b0b279..00000000 --- a/examples-cloudflare/create-next-app/tsconfig.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "compilerOptions": { - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "plugins": [ - { - "name": "next" - } - ], - "paths": { - "@/*": ["./src/*"] - }, - "target": "ES2017" - }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", ".next/dev/types/**/*.ts"], - "exclude": ["node_modules", "open-next.config.ts"] -} diff --git a/examples-cloudflare/create-next-app/wrangler.jsonc b/examples-cloudflare/create-next-app/wrangler.jsonc deleted file mode 100644 index db23504e..00000000 --- a/examples-cloudflare/create-next-app/wrangler.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "node_modules/wrangler/config-schema.json", - "main": ".open-next/worker.js", - "name": "create-next-app", - "compatibility_date": "2024-12-30", - "compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"], - "assets": { - "directory": ".open-next/assets", - "binding": "ASSETS" - } -} diff --git a/examples-cloudflare/e2e/app-pages-router/app/albums/@modal/(.)[album]/[song]/page.tsx b/examples-cloudflare/e2e/app-pages-router/app/albums/@modal/(.)[album]/[song]/page.tsx index 347fd4f2..24c8c1fc 100644 --- a/examples-cloudflare/e2e/app-pages-router/app/albums/@modal/(.)[album]/[song]/page.tsx +++ b/examples-cloudflare/e2e/app-pages-router/app/albums/@modal/(.)[album]/[song]/page.tsx @@ -1,5 +1,5 @@ -import { getSong } from "examples-cloudflare/e2e-shared/api"; -import Modal from "examples-cloudflare/e2e-shared/components/Modal"; +import { getSong } from "@examples-cloudflare/e2e-shared/api"; +import Modal from "@examples-cloudflare/e2e-shared/components/Modal"; type Props = { params: Promise<{ diff --git a/examples-cloudflare/e2e/app-pages-router/app/albums/@modal/(.)[album]/page.tsx b/examples-cloudflare/e2e/app-pages-router/app/albums/@modal/(.)[album]/page.tsx index a52c8de6..6adde51e 100644 --- a/examples-cloudflare/e2e/app-pages-router/app/albums/@modal/(.)[album]/page.tsx +++ b/examples-cloudflare/e2e/app-pages-router/app/albums/@modal/(.)[album]/page.tsx @@ -1,4 +1,4 @@ -import Modal from "examples-cloudflare/e2e-shared/components/Modal"; +import Modal from "@examples-cloudflare/e2e-shared/components/Modal"; type Props = { params: Promise<{ diff --git a/examples-cloudflare/e2e/app-pages-router/app/albums/[album]/[song]/page.tsx b/examples-cloudflare/e2e/app-pages-router/app/albums/[album]/[song]/page.tsx index 0f11957f..196c1912 100644 --- a/examples-cloudflare/e2e/app-pages-router/app/albums/[album]/[song]/page.tsx +++ b/examples-cloudflare/e2e/app-pages-router/app/albums/[album]/[song]/page.tsx @@ -1,4 +1,4 @@ -import { getSong } from "examples-cloudflare/e2e-shared/api"; +import { getSong } from "@examples-cloudflare/e2e-shared/api"; type Props = { params: Promise<{ diff --git a/examples-cloudflare/e2e/app-pages-router/app/albums/page.tsx b/examples-cloudflare/e2e/app-pages-router/app/albums/page.tsx index 04afa633..04e0f8c7 100644 --- a/examples-cloudflare/e2e/app-pages-router/app/albums/page.tsx +++ b/examples-cloudflare/e2e/app-pages-router/app/albums/page.tsx @@ -1,5 +1,5 @@ -import { getAlbums } from "examples-cloudflare/e2e-shared/api"; -import Album from "examples-cloudflare/e2e-shared/components/Album"; +import { getAlbums } from "@examples-cloudflare/e2e-shared/api"; +import Album from "@examples-cloudflare/e2e-shared/components/Album"; export default async function AlbumPage() { const albums = await getAlbums(); diff --git a/examples-cloudflare/e2e/app-pages-router/app/page.tsx b/examples-cloudflare/e2e/app-pages-router/app/page.tsx index 665a9172..77ba27ad 100644 --- a/examples-cloudflare/e2e/app-pages-router/app/page.tsx +++ b/examples-cloudflare/e2e/app-pages-router/app/page.tsx @@ -1,4 +1,4 @@ -import Nav from "examples-cloudflare/e2e-shared/components/Nav"; +import Nav from "@examples-cloudflare/e2e-shared/components/Nav"; export default function Home() { return ( diff --git a/examples-cloudflare/e2e/app-pages-router/app/server-actions/client.tsx b/examples-cloudflare/e2e/app-pages-router/app/server-actions/client.tsx index d8ff4026..8fe320f2 100644 --- a/examples-cloudflare/e2e/app-pages-router/app/server-actions/client.tsx +++ b/examples-cloudflare/e2e/app-pages-router/app/server-actions/client.tsx @@ -1,7 +1,7 @@ "use client"; -import type { Song as SongType } from "examples-cloudflare/e2e-shared/api"; -import { getSong } from "examples-cloudflare/e2e-shared/api"; -import Song from "examples-cloudflare/e2e-shared/components/Album/Song"; +import type { Song as SongType } from "@examples-cloudflare/e2e-shared/api"; +import { getSong } from "@examples-cloudflare/e2e-shared/api"; +import Song from "@examples-cloudflare/e2e-shared/components/Album/Song"; import { useCallback, useState, useTransition } from "react"; export default function Client() { diff --git a/examples-cloudflare/e2e/app-pages-router/package.json b/examples-cloudflare/e2e/app-pages-router/package.json index 203d5868..327825a1 100644 --- a/examples-cloudflare/e2e/app-pages-router/package.json +++ b/examples-cloudflare/e2e/app-pages-router/package.json @@ -17,8 +17,8 @@ "e2e-turbopack": "playwright test -c e2e/playwright.turbopack.config.ts" }, "dependencies": { + "@examples-cloudflare/e2e-shared": "workspace:*", "@opennextjs/cloudflare": "workspace:*", - "examples-cloudflare/e2e-shared": "workspace:*", "next": "catalog:e2e", "react": "catalog:e2e", "react-dom": "catalog:e2e" @@ -31,7 +31,7 @@ "autoprefixer": "catalog:e2e", "postcss": "catalog:e2e", "tailwindcss": "catalog:e2e", - "typescript": "catalog:default", + "typescript": "catalog:", "wrangler": "catalog:" } } diff --git a/examples-cloudflare/e2e/app-pages-router/tsconfig.json b/examples-cloudflare/e2e/app-pages-router/tsconfig.json index 1e537a92..cad470ea 100644 --- a/examples-cloudflare/e2e/app-pages-router/tsconfig.json +++ b/examples-cloudflare/e2e/app-pages-router/tsconfig.json @@ -21,7 +21,7 @@ ], "paths": { "@/*": ["./*"], - "examples-cloudflare/e2e-shared": ["../shared"] + "@examples-cloudflare/e2e-shared": ["../shared"] } }, "include": [ diff --git a/examples-cloudflare/e2e/app-router/app/albums/@modal/(.)[album]/[song]/page.tsx b/examples-cloudflare/e2e/app-router/app/albums/@modal/(.)[album]/[song]/page.tsx index 347fd4f2..24c8c1fc 100644 --- a/examples-cloudflare/e2e/app-router/app/albums/@modal/(.)[album]/[song]/page.tsx +++ b/examples-cloudflare/e2e/app-router/app/albums/@modal/(.)[album]/[song]/page.tsx @@ -1,5 +1,5 @@ -import { getSong } from "examples-cloudflare/e2e-shared/api"; -import Modal from "examples-cloudflare/e2e-shared/components/Modal"; +import { getSong } from "@examples-cloudflare/e2e-shared/api"; +import Modal from "@examples-cloudflare/e2e-shared/components/Modal"; type Props = { params: Promise<{ diff --git a/examples-cloudflare/e2e/app-router/app/albums/@modal/(.)[album]/page.tsx b/examples-cloudflare/e2e/app-router/app/albums/@modal/(.)[album]/page.tsx index a52c8de6..6adde51e 100644 --- a/examples-cloudflare/e2e/app-router/app/albums/@modal/(.)[album]/page.tsx +++ b/examples-cloudflare/e2e/app-router/app/albums/@modal/(.)[album]/page.tsx @@ -1,4 +1,4 @@ -import Modal from "examples-cloudflare/e2e-shared/components/Modal"; +import Modal from "@examples-cloudflare/e2e-shared/components/Modal"; type Props = { params: Promise<{ diff --git a/examples-cloudflare/e2e/app-router/app/albums/[album]/[song]/page.tsx b/examples-cloudflare/e2e/app-router/app/albums/[album]/[song]/page.tsx index 0f11957f..196c1912 100644 --- a/examples-cloudflare/e2e/app-router/app/albums/[album]/[song]/page.tsx +++ b/examples-cloudflare/e2e/app-router/app/albums/[album]/[song]/page.tsx @@ -1,4 +1,4 @@ -import { getSong } from "examples-cloudflare/e2e-shared/api"; +import { getSong } from "@examples-cloudflare/e2e-shared/api"; type Props = { params: Promise<{ diff --git a/examples-cloudflare/e2e/app-router/app/albums/page.tsx b/examples-cloudflare/e2e/app-router/app/albums/page.tsx index 04afa633..04e0f8c7 100644 --- a/examples-cloudflare/e2e/app-router/app/albums/page.tsx +++ b/examples-cloudflare/e2e/app-router/app/albums/page.tsx @@ -1,5 +1,5 @@ -import { getAlbums } from "examples-cloudflare/e2e-shared/api"; -import Album from "examples-cloudflare/e2e-shared/components/Album"; +import { getAlbums } from "@examples-cloudflare/e2e-shared/api"; +import Album from "@examples-cloudflare/e2e-shared/components/Album"; export default async function AlbumPage() { const albums = await getAlbums(); diff --git a/examples-cloudflare/e2e/app-router/app/page.tsx b/examples-cloudflare/e2e/app-router/app/page.tsx index 74b124fc..ceb43657 100644 --- a/examples-cloudflare/e2e/app-router/app/page.tsx +++ b/examples-cloudflare/e2e/app-router/app/page.tsx @@ -1,4 +1,4 @@ -import Nav from "examples-cloudflare/e2e-shared/components/Nav"; +import Nav from "@examples-cloudflare/e2e-shared/components/Nav"; export default function Home() { return ( diff --git a/examples-cloudflare/e2e/app-router/app/server-actions/client.tsx b/examples-cloudflare/e2e/app-router/app/server-actions/client.tsx index d8ff4026..8fe320f2 100644 --- a/examples-cloudflare/e2e/app-router/app/server-actions/client.tsx +++ b/examples-cloudflare/e2e/app-router/app/server-actions/client.tsx @@ -1,7 +1,7 @@ "use client"; -import type { Song as SongType } from "examples-cloudflare/e2e-shared/api"; -import { getSong } from "examples-cloudflare/e2e-shared/api"; -import Song from "examples-cloudflare/e2e-shared/components/Album/Song"; +import type { Song as SongType } from "@examples-cloudflare/e2e-shared/api"; +import { getSong } from "@examples-cloudflare/e2e-shared/api"; +import Song from "@examples-cloudflare/e2e-shared/components/Album/Song"; import { useCallback, useState, useTransition } from "react"; export default function Client() { diff --git a/examples-cloudflare/e2e/app-router/next.config.ts b/examples-cloudflare/e2e/app-router/next.config.ts index 12cc9bb3..ad1ee5c8 100644 --- a/examples-cloudflare/e2e/app-router/next.config.ts +++ b/examples-cloudflare/e2e/app-router/next.config.ts @@ -3,7 +3,7 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { poweredByHeader: false, cleanDistDir: true, - transpilePackages: ["examples-cloudflare/e2e-shared"], + transpilePackages: ["@examples-cloudflare/e2e-shared"], output: "standalone", // outputFileTracingRoot: "../sst", typescript: { diff --git a/examples-cloudflare/e2e/app-router/package.json b/examples-cloudflare/e2e/app-router/package.json index a52334b4..d1924fbb 100644 --- a/examples-cloudflare/e2e/app-router/package.json +++ b/examples-cloudflare/e2e/app-router/package.json @@ -17,8 +17,8 @@ "e2e-turbopack": "playwright test -c e2e/playwright.turbopack.config.ts" }, "dependencies": { + "@examples-cloudflare/e2e-shared": "workspace:*", "@opennextjs/cloudflare": "workspace:*", - "examples-cloudflare/e2e-shared": "workspace:*", "next": "catalog:e2e", "react": "catalog:e2e", "react-dom": "catalog:e2e" @@ -31,7 +31,7 @@ "autoprefixer": "catalog:e2e", "postcss": "catalog:e2e", "tailwindcss": "catalog:e2e", - "typescript": "catalog:default", + "typescript": "catalog:", "wrangler": "catalog:" } } diff --git a/examples-cloudflare/e2e/app-router/tsconfig.json b/examples-cloudflare/e2e/app-router/tsconfig.json index 1e537a92..cad470ea 100644 --- a/examples-cloudflare/e2e/app-router/tsconfig.json +++ b/examples-cloudflare/e2e/app-router/tsconfig.json @@ -21,7 +21,7 @@ ], "paths": { "@/*": ["./*"], - "examples-cloudflare/e2e-shared": ["../shared"] + "@examples-cloudflare/e2e-shared": ["../shared"] } }, "include": [ diff --git a/examples-cloudflare/e2e/experimental/package.json b/examples-cloudflare/e2e/experimental/package.json index 38f3c112..a2b07c3f 100644 --- a/examples-cloudflare/e2e/experimental/package.json +++ b/examples-cloudflare/e2e/experimental/package.json @@ -24,7 +24,7 @@ "@types/node": "catalog:e2e", "@types/react": "catalog:e2e", "@types/react-dom": "catalog:e2e", - "typescript": "catalog:default", + "typescript": "catalog:", "wrangler": "catalog:" } } diff --git a/examples-cloudflare/e2e/experimental/tsconfig.json b/examples-cloudflare/e2e/experimental/tsconfig.json index 99cb56b6..33b2e06a 100644 --- a/examples-cloudflare/e2e/experimental/tsconfig.json +++ b/examples-cloudflare/e2e/experimental/tsconfig.json @@ -23,5 +23,5 @@ } }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", ".next/dev/types/**/*.ts"], - "exclude": ["node_modules"] + "exclude": ["node_modules", "open-next.config.ts"] } diff --git a/examples-cloudflare/e2e/pages-router/next.config.ts b/examples-cloudflare/e2e/pages-router/next.config.ts index 21bba587..384c6aad 100644 --- a/examples-cloudflare/e2e/pages-router/next.config.ts +++ b/examples-cloudflare/e2e/pages-router/next.config.ts @@ -1,7 +1,7 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { - transpilePackages: ["examples-cloudflare/e2e-shared", "react", "react-dom"], + transpilePackages: ["@examples-cloudflare/e2e-shared", "react", "react-dom"], i18n: { locales: ["en", "nl"], defaultLocale: "en", diff --git a/examples-cloudflare/e2e/pages-router/package.json b/examples-cloudflare/e2e/pages-router/package.json index 24b8f5ce..9bec254e 100644 --- a/examples-cloudflare/e2e/pages-router/package.json +++ b/examples-cloudflare/e2e/pages-router/package.json @@ -17,8 +17,8 @@ "e2e-turbopack": "playwright test -c e2e/playwright.turbopack.config.ts" }, "dependencies": { + "@examples-cloudflare/e2e-shared": "workspace:*", "@opennextjs/cloudflare": "workspace:*", - "examples-cloudflare/e2e-shared": "workspace:*", "next": "catalog:e2e", "react": "catalog:e2e", "react-dom": "catalog:e2e" @@ -31,7 +31,7 @@ "autoprefixer": "catalog:e2e", "postcss": "catalog:e2e", "tailwindcss": "catalog:e2e", - "typescript": "catalog:default", + "typescript": "catalog:", "wrangler": "catalog:" } } diff --git a/examples-cloudflare/e2e/pages-router/src/components/home.tsx b/examples-cloudflare/e2e/pages-router/src/components/home.tsx index 5503490c..c848324f 100644 --- a/examples-cloudflare/e2e/pages-router/src/components/home.tsx +++ b/examples-cloudflare/e2e/pages-router/src/components/home.tsx @@ -1,4 +1,4 @@ -import Nav from "examples-cloudflare/e2e-shared/components/Nav"; +import Nav from "@examples-cloudflare/e2e-shared/components/Nav"; import Head from "next/head"; export default function Home() { diff --git a/examples-cloudflare/e2e/pages-router/tsconfig.json b/examples-cloudflare/e2e/pages-router/tsconfig.json index 5730c142..90a8624b 100644 --- a/examples-cloudflare/e2e/pages-router/tsconfig.json +++ b/examples-cloudflare/e2e/pages-router/tsconfig.json @@ -17,7 +17,7 @@ "baseUrl": ".", "paths": { "@/*": ["./src/*"], - "examples-cloudflare/e2e-shared": ["../shared"] + "@examples-cloudflare/e2e-shared": ["../shared"] } }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "../utils.ts"], diff --git a/examples-cloudflare/e2e/shared/package.json b/examples-cloudflare/e2e/shared/package.json index 607bfd9a..96d7c092 100644 --- a/examples-cloudflare/e2e/shared/package.json +++ b/examples-cloudflare/e2e/shared/package.json @@ -1,5 +1,5 @@ { - "name": "examples-cloudflare/e2e-shared", + "name": "@examples-cloudflare/e2e-shared", "version": "0.0.0", "private": true, "scripts": { diff --git a/examples-cloudflare/middleware/.env b/examples-cloudflare/middleware/.env deleted file mode 100644 index 7300e230..00000000 --- a/examples-cloudflare/middleware/.env +++ /dev/null @@ -1 +0,0 @@ -CLERK_ENCRYPTION_KEY="key" diff --git a/examples-cloudflare/middleware/.gitignore b/examples-cloudflare/middleware/.gitignore deleted file mode 100755 index 998933bb..00000000 --- a/examples-cloudflare/middleware/.gitignore +++ /dev/null @@ -1,42 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js -.yarn/install-state.gz - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env*.local - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts - -# playwright -/test-results/ -/playwright-report/ -/blob-report/ -/playwright/.cache/ diff --git a/examples-cloudflare/middleware/README.md b/examples-cloudflare/middleware/README.md deleted file mode 100755 index a8eeb816..00000000 --- a/examples-cloudflare/middleware/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# Middleware - -This example shows how to use [Middleware in Next.js](https://nextjs.org/docs/app/building-your-application/routing/middleware) to run code before a request is completed. - -The index page ([`app/page.tsx`](app/page.tsx)) has a list of links to pages with `redirect`, `rewrite`, or normal behavior. - -On the Middleware file ([`middleware.ts`](middleware.ts)) the routes are already being filtered by defining a `matcher` on the exported config. If you want the Middleware to run for every request, you can remove the `matcher`. - -## Deploy your own - -Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example): - -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/middleware&project-name=middleware&repository-name=middleware) - -## How to use - -Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example: - -```bash -npx create-next-app --example middleware middleware-app -``` - -```bash -yarn create next-app --example middleware middleware-app -``` - -```bash -pnpm create next-app --example middleware middleware-app -``` - -Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples-cloudflare/middleware/app/about/page.tsx b/examples-cloudflare/middleware/app/about/page.tsx deleted file mode 100644 index da125747..00000000 --- a/examples-cloudflare/middleware/app/about/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function AboutPage() { - return

About

; -} diff --git a/examples-cloudflare/middleware/app/about2/page.tsx b/examples-cloudflare/middleware/app/about2/page.tsx deleted file mode 100644 index 31fcb8c4..00000000 --- a/examples-cloudflare/middleware/app/about2/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function About2Page() { - return

About 2

; -} diff --git a/examples-cloudflare/middleware/app/another/page.tsx b/examples-cloudflare/middleware/app/another/page.tsx deleted file mode 100644 index b4e3ecf1..00000000 --- a/examples-cloudflare/middleware/app/another/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function AnotherPage() { - return

Another

; -} diff --git a/examples-cloudflare/middleware/app/clerk/route.ts b/examples-cloudflare/middleware/app/clerk/route.ts deleted file mode 100644 index 99230885..00000000 --- a/examples-cloudflare/middleware/app/clerk/route.ts +++ /dev/null @@ -1,3 +0,0 @@ -export async function POST(request: Request) { - return new Response(`Hello clerk`); -} diff --git a/examples-cloudflare/middleware/app/layout.tsx b/examples-cloudflare/middleware/app/layout.tsx deleted file mode 100644 index 308ce0c6..00000000 --- a/examples-cloudflare/middleware/app/layout.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import type { Metadata } from "next"; - -export default function RootLayout({ children }: { children: React.ReactNode }) { - return ( - - {children} - - ); -} - -export const metadata: Metadata = { - title: "Next.js Middleware example", - description: "Redirect and rewrite pages using Next.js Middleware.", -}; diff --git a/examples-cloudflare/middleware/app/middleware/page.tsx b/examples-cloudflare/middleware/app/middleware/page.tsx deleted file mode 100644 index ead59e0a..00000000 --- a/examples-cloudflare/middleware/app/middleware/page.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { headers } from "next/headers"; - -export default async function MiddlewarePage() { - const cloudflareContextHeader = (await headers()).get("x-cloudflare-context"); - - return ( - <> -

Via middleware

-

- The value of the x-cloudflare-context header is:
- - {cloudflareContextHeader} - -

- - ); -} diff --git a/examples-cloudflare/middleware/app/page.tsx b/examples-cloudflare/middleware/app/page.tsx deleted file mode 100755 index 234fd787..00000000 --- a/examples-cloudflare/middleware/app/page.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import Link from "next/link"; - -export default function Home() { - return ( -
-

Index

-

- Go to about page (will redirect) -

-

- Go to another page (will rewrite) -

-

- Go to about 2 page (no redirect or rewrite) -

-

- Go to middleware page (using NextResponse.next()) -

-
- ); -} diff --git a/examples-cloudflare/middleware/app/redirected/page.tsx b/examples-cloudflare/middleware/app/redirected/page.tsx deleted file mode 100644 index 7c4d480c..00000000 --- a/examples-cloudflare/middleware/app/redirected/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function RedirectedPage() { - return

Redirected from /about

; -} diff --git a/examples-cloudflare/middleware/app/rewrite/page.tsx b/examples-cloudflare/middleware/app/rewrite/page.tsx deleted file mode 100644 index ee87ede1..00000000 --- a/examples-cloudflare/middleware/app/rewrite/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function RewritePage() { - return

Rewrite

; -} diff --git a/examples-cloudflare/middleware/e2e/base.spec.ts b/examples-cloudflare/middleware/e2e/base.spec.ts deleted file mode 100644 index eff0f5be..00000000 --- a/examples-cloudflare/middleware/e2e/base.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { test, expect } from "@playwright/test"; - -test.describe("middleware", () => { - test("redirect", async ({ page }) => { - await page.goto("/"); - await page.click('[href="/about"]'); - await page.waitForURL("**/redirected"); - expect(await page.textContent("h1")).toContain("Redirected"); - }); - - test("rewrite", async ({ page }) => { - await page.goto("/"); - await page.click('[href="/another"]'); - await page.waitForURL("**/another"); - expect(await page.textContent("h1")).toContain("Rewrite"); - }); - - test("no matching middleware", async ({ page }) => { - await page.goto("/"); - await page.click('[href="/about2"]'); - await page.waitForURL("**/about2"); - expect(await page.textContent("h1")).toContain("About 2"); - }); - - test("matching noop middleware", async ({ page }) => { - await page.goto("/"); - await page.click('[href="/middleware"]'); - await page.waitForURL("**/middleware"); - expect(await page.textContent("h1")).toContain("Via middleware"); - }); - - // Test for https://github.com/opennextjs/opennextjs-cloudflare/issues/201 - test("clerk middleware", async ({ page }) => { - const res = await page.request.post("/clerk", { data: "some body" }); - expect(res.ok()).toEqual(true); - expect(res.status()).toEqual(200); - await expect(res.text()).resolves.toEqual("Hello clerk"); - }); -}); diff --git a/examples-cloudflare/middleware/e2e/cloudflare-context.spec.ts b/examples-cloudflare/middleware/e2e/cloudflare-context.spec.ts deleted file mode 100644 index 6d3c89dd..00000000 --- a/examples-cloudflare/middleware/e2e/cloudflare-context.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { test, expect } from "@playwright/test"; - -test.describe("middleware/cloudflare-context", () => { - test("middlewares have access to the cloudflare context", async ({ page }) => { - await page.goto("/middleware"); - const cloudflareContextHeaderElement = page.getByTestId("cloudflare-context-header"); - expect(await cloudflareContextHeaderElement.textContent()).toContain( - "typeof `cloudflareContext.env` = object" - ); - }); -}); diff --git a/examples-cloudflare/middleware/e2e/playwright.config.ts b/examples-cloudflare/middleware/e2e/playwright.config.ts deleted file mode 100644 index 75ff66cc..00000000 --- a/examples-cloudflare/middleware/e2e/playwright.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { configurePlaywright } from "../../common/config-e2e"; - -export default configurePlaywright("middleware", { multipleBrowsers: true }); diff --git a/examples-cloudflare/middleware/e2e/playwright.dev.config.ts b/examples-cloudflare/middleware/e2e/playwright.dev.config.ts deleted file mode 100644 index c2589f84..00000000 --- a/examples-cloudflare/middleware/e2e/playwright.dev.config.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { configurePlaywright } from "../../common/config-e2e"; - -export default configurePlaywright("middleware", { - isWorker: false, -}); diff --git a/examples-cloudflare/middleware/middleware.ts b/examples-cloudflare/middleware/middleware.ts deleted file mode 100644 index 843d8926..00000000 --- a/examples-cloudflare/middleware/middleware.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { clerkMiddleware } from "@clerk/nextjs/server"; -import { getCloudflareContext } from "@opennextjs/cloudflare"; -import { NextRequest, NextResponse, NextFetchEvent } from "next/server"; - -export function middleware(request: NextRequest, event: NextFetchEvent) { - console.log("middleware"); - if (request.nextUrl.pathname === "/about") { - return NextResponse.redirect(new URL("/redirected", request.url)); - } - if (request.nextUrl.pathname === "/another") { - return NextResponse.rewrite(new URL("/rewrite", request.url)); - } - if (request.nextUrl.pathname === "/clerk") { - return clerkMiddleware(async () => {}, { - publishableKey: "pk_test_ZXhhbXBsZS5hY2NvdW50cy5kZXYk", - secretKey: "skey", - })(request, event); - } - - const requestHeaders = new Headers(request.headers); - const cloudflareContext = getCloudflareContext(); - - requestHeaders.set( - "x-cloudflare-context", - `typeof \`cloudflareContext.env\` = ${typeof cloudflareContext.env}` - ); - - return NextResponse.next({ - request: { - headers: requestHeaders, - }, - }); -} - -export const config = { - matcher: ["/about/:path*", "/another/:path*", "/middleware/:path*", "/clerk"], -}; diff --git a/examples-cloudflare/middleware/next.config.mjs b/examples-cloudflare/middleware/next.config.mjs deleted file mode 100644 index 2bd0079f..00000000 --- a/examples-cloudflare/middleware/next.config.mjs +++ /dev/null @@ -1,11 +0,0 @@ -import { initOpenNextCloudflareForDev } from "@opennextjs/cloudflare"; - -initOpenNextCloudflareForDev(); - -/** @type {import('next').NextConfig} */ -const nextConfig = { - typescript: { ignoreBuildErrors: true }, - eslint: { ignoreDuringBuilds: true }, -}; - -export default nextConfig; diff --git a/examples-cloudflare/middleware/open-next.config.ts b/examples-cloudflare/middleware/open-next.config.ts deleted file mode 100644 index ffd98878..00000000 --- a/examples-cloudflare/middleware/open-next.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { defineCloudflareConfig } from "@opennextjs/cloudflare"; - -export default defineCloudflareConfig(); diff --git a/examples-cloudflare/middleware/package.json b/examples-cloudflare/middleware/package.json deleted file mode 100644 index 66dde54c..00000000 --- a/examples-cloudflare/middleware/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "examples-cloudflare/middleware", - "private": true, - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start", - "lint": "next lint", - "build:worker": "pnpm opennextjs-cloudflare build", - "preview:worker": "pnpm opennextjs-cloudflare preview", - "preview": "pnpm build:worker && pnpm preview:worker", - "e2e": "playwright test -c e2e/playwright.config.ts", - "e2e:dev": "playwright test -c e2e/playwright.dev.config.ts" - }, - "dependencies": { - "@clerk/nextjs": "^6.21.0", - "next": "catalog:", - "react": "catalog:", - "react-dom": "catalog:" - }, - "devDependencies": { - "@opennextjs/cloudflare": "workspace:*", - "@playwright/test": "catalog:", - "@types/node": "catalog:", - "@types/react": "catalog:", - "@types/react-dom": "catalog:", - "typescript": "catalog:", - "wrangler": "catalog:" - } -} diff --git a/examples-cloudflare/middleware/public/favicon.ico b/examples-cloudflare/middleware/public/favicon.ico deleted file mode 100755 index 718d6fea..00000000 Binary files a/examples-cloudflare/middleware/public/favicon.ico and /dev/null differ diff --git a/examples-cloudflare/middleware/public/vercel.svg b/examples-cloudflare/middleware/public/vercel.svg deleted file mode 100755 index fbf0e25a..00000000 --- a/examples-cloudflare/middleware/public/vercel.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - \ No newline at end of file diff --git a/examples-cloudflare/middleware/tsconfig.json b/examples-cloudflare/middleware/tsconfig.json deleted file mode 100755 index 32f841ea..00000000 --- a/examples-cloudflare/middleware/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "plugins": [ - { - "name": "next" - } - ] - }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules", "open-next.config.ts", "worker.ts"] -} diff --git a/examples-cloudflare/middleware/wrangler.jsonc b/examples-cloudflare/middleware/wrangler.jsonc deleted file mode 100644 index 92ac1f42..00000000 --- a/examples-cloudflare/middleware/wrangler.jsonc +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "node_modules/wrangler/config-schema.json", - "main": ".open-next/worker.js", - "name": "middleware", - "compatibility_date": "2024-12-30", - "compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"], - "assets": { - "directory": ".open-next/assets", - "binding": "ASSETS" - }, - "vars": { - "MY_VAR": "my-var" - }, - "kv_namespaces": [{ "binding": "MY_KV", "id": "" }] -} diff --git a/examples-cloudflare/next-partial-prerendering/.gitignore b/examples-cloudflare/next-partial-prerendering/.gitignore deleted file mode 100755 index 05bb836c..00000000 --- a/examples-cloudflare/next-partial-prerendering/.gitignore +++ /dev/null @@ -1,40 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js -/.yarn - -# testing -/coverage -playwright-report -test-results - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* -.pnpm-debug.log* - -# local env files -.env* -!.env*.example - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts diff --git a/examples-cloudflare/next-partial-prerendering/.prettierrc b/examples-cloudflare/next-partial-prerendering/.prettierrc deleted file mode 100644 index 62532247..00000000 --- a/examples-cloudflare/next-partial-prerendering/.prettierrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "singleQuote": true -} diff --git a/examples-cloudflare/next-partial-prerendering/README.md b/examples-cloudflare/next-partial-prerendering/README.md deleted file mode 100755 index 967c9811..00000000 --- a/examples-cloudflare/next-partial-prerendering/README.md +++ /dev/null @@ -1,23 +0,0 @@ -## Next.js Partial Prerendering - -This is a demo of [Next.js](https://nextjs.org) using [Partial Prerendering](https://nextjs.org/docs/app/api-reference/next-config-js/partial-prerendering). - -This template uses the new Next.js [App Router](https://nextjs.org/docs/app). This includes support for enhanced layouts, colocation of components, tests, and styles, component-level data fetching, and more. - -It also uses the experimental Partial Prerendering feature available in Next.js 14. Partial Prerendering combines ultra-quick static edge delivery with fully dynamic capabilities and we believe it has the potential to [become the default rendering model for web applications](https://vercel.com/blog/partial-prerendering-with-next-js-creating-a-new-default-rendering-model), bringing together the best of static site generation and dynamic delivery. - -> ⚠️ Please note that PPR is an experimental technology that is not recommended for production. You may run into some DX issues, especially on larger code bases. - -## How it works - -The index route `/` uses Partial Prerendering through: - -1. Enabling the experimental flag in `next.config.js`. - -```js -experimental: { - ppr: true, -}, -``` - -2. Using `` to wrap Dynamic content. diff --git a/examples-cloudflare/next-partial-prerendering/app/favicon.ico b/examples-cloudflare/next-partial-prerendering/app/favicon.ico deleted file mode 100644 index af984505..00000000 Binary files a/examples-cloudflare/next-partial-prerendering/app/favicon.ico and /dev/null differ diff --git a/examples-cloudflare/next-partial-prerendering/app/layout.tsx b/examples-cloudflare/next-partial-prerendering/app/layout.tsx deleted file mode 100644 index 73e4e969..00000000 --- a/examples-cloudflare/next-partial-prerendering/app/layout.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { Metadata } from "next"; - -import { CartCountProvider } from "#/components/cart-count-context"; -import { Header } from "#/components/header"; -import { Sidebar } from "#/components/sidebar"; - -import { GlobalStyles } from "./styles"; - -export const metadata: Metadata = { - metadataBase: new URL("https://partialprerendering.com"), - title: "Next.js Partial Prerendering", - description: "A demo of Next.js using Partial Prerendering.", - openGraph: { - title: "Next.js Partial Prerendering", - description: "A demo of Next.js using Partial Prerendering.", - }, - twitter: { - card: "summary_large_image", - }, -}; - -export default function RootLayout({ children }: { children: React.ReactNode }) { - return ( - - - - - - -
-
-
-
- -
-
- - {children} -
-
-
-
-
-
- - - ); -} diff --git a/examples-cloudflare/next-partial-prerendering/app/not-found.tsx b/examples-cloudflare/next-partial-prerendering/app/not-found.tsx deleted file mode 100644 index caea3a91..00000000 --- a/examples-cloudflare/next-partial-prerendering/app/not-found.tsx +++ /dev/null @@ -1,8 +0,0 @@ -export default function NotFound() { - return ( -
-

Not Found

-

Could not find requested resource

-
- ); -} diff --git a/examples-cloudflare/next-partial-prerendering/app/opengraph-image.png b/examples-cloudflare/next-partial-prerendering/app/opengraph-image.png deleted file mode 100644 index 44fd1ebe..00000000 Binary files a/examples-cloudflare/next-partial-prerendering/app/opengraph-image.png and /dev/null differ diff --git a/examples-cloudflare/next-partial-prerendering/app/page.tsx b/examples-cloudflare/next-partial-prerendering/app/page.tsx deleted file mode 100644 index 5f6decda..00000000 --- a/examples-cloudflare/next-partial-prerendering/app/page.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { Suspense } from "react"; - -import { Ping } from "#/components/ping"; -import { RecommendedProducts, RecommendedProductsSkeleton } from "#/components/recommended-products"; -import { Reviews, ReviewsSkeleton } from "#/components/reviews"; -import { SingleProduct } from "#/components/single-product"; - -export default function Page() { - return ( -
- - - - - }> - - - - - - }> - - -
- ); -} diff --git a/examples-cloudflare/next-partial-prerendering/app/styles.tsx b/examples-cloudflare/next-partial-prerendering/app/styles.tsx deleted file mode 100644 index 4427b397..00000000 --- a/examples-cloudflare/next-partial-prerendering/app/styles.tsx +++ /dev/null @@ -1,13 +0,0 @@ -export function GlobalStyles() { - return ( -