Skip to content

Commit 1d40ab1

Browse files
authoredMar 13, 2025··
sync with aws@3.5.2 (#455)
1 parent 95caa87 commit 1d40ab1

File tree

6 files changed

+72
-38
lines changed

6 files changed

+72
-38
lines changed
 

‎.changeset/cuddly-bugs-warn.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@opennextjs/cloudflare": patch
3+
---
4+
5+
sync with `@opennextjs/aws@3.5.2`

‎examples/e2e/pages-router/e2e/rewrite.test.ts

+12
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,15 @@ test("Rewrite to external image", async ({ request }) => {
2323
expect(response.headers()["content-type"]).toBe("image/png");
2424
expect(validateMd5(await response.body(), EXT_PNG_MD5)).toBe(true);
2525
});
26+
27+
test("Rewrite with query in destination", async ({ request }) => {
28+
const response = await request.get("/rewriteWithQuery");
29+
expect(response.status()).toBe(200);
30+
expect(await response.json()).toEqual({ query: { q: "1" } });
31+
});
32+
33+
test("Rewrite with query should merge query params", async ({ request }) => {
34+
const response = await request.get("/rewriteWithQuery?b=2");
35+
expect(response.status()).toBe(200);
36+
expect(await response.json()).toEqual({ query: { q: "1", b: "2" } });
37+
});

‎examples/e2e/pages-router/next.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const nextConfig: NextConfig = {
2929
],
3030
rewrites: async () => [
3131
{ source: "/rewrite", destination: "/", locale: false },
32+
{ source: "/rewriteWithQuery", destination: "/api/query?q=1" },
3233
{
3334
source: "/rewriteUsingQuery",
3435
destination: "/:destination/",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import type { NextApiRequest, NextApiResponse } from "next";
2+
3+
export default function handler(req: NextApiRequest, res: NextApiResponse) {
4+
res.status(200).json({ query: req.query });
5+
}

‎packages/cloudflare/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"dependencies": {
7474
"@ast-grep/napi": "^0.36.1",
7575
"@dotenvx/dotenvx": "catalog:",
76-
"@opennextjs/aws": "https://pkg.pr.new/@opennextjs/aws@756",
76+
"@opennextjs/aws": "https://pkg.pr.new/@opennextjs/aws@7e23eee",
7777
"enquirer": "^2.4.1",
7878
"glob": "catalog:",
7979
"yaml": "^2.7.0"

‎pnpm-lock.yaml

+48-37
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.