Skip to content

Commit 893cf90

Browse files
committed
feat(next.config.ts): enable nodeMiddleware for enhanced server-side capabilities
chore(package.json): update Next.js version to 15.4.0-canary.116 for latest features and improvements refactor(routes): set runtime to "nodejs" for all API routes and middleware The nodeMiddleware option is enabled to leverage advanced server-side features. The Next.js version is updated to a canary release to access the latest features and improvements. The runtime is explicitly set to "nodejs" for all API routes and middleware to ensure consistent execution environments and optimize server-side operations.
1 parent fff52dc commit 893cf90

File tree

11 files changed

+57
-69
lines changed

11 files changed

+57
-69
lines changed

next.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const nextConfig: NextConfig = {
3838
'framer-motion',
3939
'@tanstack/react-virtual',
4040
],
41+
nodeMiddleware: true,
4142
// Server Actions optimization for Google Drive API
4243
serverActions: {
4344
allowedOrigins: ['localhost:3000', process.env.VERCEL_URL || ''],

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"googleapis": "^150.0.1",
6363
"input-otp": "^1.4.2",
6464
"lucide-react": "^0.525.0",
65-
"next": "^15.3.5",
65+
"next": "^15.4.0-canary.116",
6666
"next-themes": "^0.4.6",
6767
"nextjs-toploader": "^3.8.16",
6868
"react-day-picker": "^9.8.0",

src/app/api/download/[...rest]/route.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { ValidatePaths } from "@/actions/paths";
77

88
import config from "@/config/gIndex.config";
99

10+
export const runtime = "nodejs";
11+
1012
export const dynamic = "force-static";
1113

1214
export async function GET(

src/app/api/internal/check/route.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { encryptionService } from "@/lib/utils.server";
44

55
import config from "@/config/gIndex.config";
66

7+
export const runtime = "nodejs";
8+
79
export const dynamic = "force-dynamic";
810

911
export async function GET() {

src/app/api/internal/encrypt/route.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { type NextRequest, NextResponse } from "next/server";
22

33
import { encryptionService } from "@/lib/utils.server";
44

5+
export const runtime = "nodejs";
6+
57
export const dynamic = "force-dynamic";
68

79
export async function GET(request: NextRequest) {

src/app/api/internal/storage/route.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export const runtime = "nodejs"
12
import { NextResponse } from "next/server";
23
import { GetStorageInfo } from "@/actions/files";
34

src/app/api/og/[encryptedId]/route.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { encryptionService, gdrive } from "@/lib/utils.server";
44

55
import config from "@/config/gIndex.config";
66

7+
export const runtime = "nodejs";
8+
79
export const dynamic = "force-static";
810

911
type Props = {

src/app/api/raw/[...rest]/route.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { encryptionService } from "@/lib/utils.server";
55
import { GetFile } from "@/actions/files";
66
import { ValidatePaths } from "@/actions/paths";
77

8+
export const runtime = "nodejs";
9+
810
export const dynamic = "force-static";
911

1012
export async function GET(

src/app/api/thumb/[encryptedId]/route.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import { encryptionService } from "@/lib/utils.server";
66

77
import config from "@/config/gIndex.config";
88

9+
export const runtime = "nodejs";
10+
911
export const dynamic = "force-dynamic";
1012

1113
type Props = {

0 commit comments

Comments
 (0)