create-kofi-stack 1.2.11 → 1.2.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2768,11 +2768,11 @@ export async function protectRoute(request: Request) {
2768
2768
  }
2769
2769
  `;
2770
2770
  await writeFile(path12.join(appDir, "src/lib/arcjet.ts"), content);
2771
- const middlewareContent = `import { NextResponse } from 'next/server'
2771
+ const proxyContent = `import { NextResponse } from 'next/server'
2772
2772
  import type { NextRequest } from 'next/server'
2773
2773
  import { aj } from '@/lib/arcjet'
2774
2774
 
2775
- export async function middleware(request: NextRequest) {
2775
+ export async function proxy(request: NextRequest) {
2776
2776
  // Only protect API routes
2777
2777
  if (request.nextUrl.pathname.startsWith('/api')) {
2778
2778
  const decision = await aj.protect(request)
@@ -2792,7 +2792,7 @@ export const config = {
2792
2792
  matcher: '/api/:path*',
2793
2793
  }
2794
2794
  `;
2795
- await writeFile(path12.join(appDir, "src/middleware.ts"), middlewareContent);
2795
+ await writeFile(path12.join(appDir, "src/proxy.ts"), proxyContent);
2796
2796
  }
2797
2797
  async function generateUpstash(appDir) {
2798
2798
  const content = `import { Ratelimit } from '@upstash/ratelimit'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-kofi-stack",
3
- "version": "1.2.11",
3
+ "version": "1.2.12",
4
4
  "description": "Scaffold opinionated full-stack projects with Next.js, Convex, Better-Auth, and more",
5
5
  "type": "module",
6
6
  "bin": {