Skip to content

Commit 4875895

Browse files
committed
chore: update hono and improve proxies
1 parent 71a6900 commit 4875895

File tree

6 files changed

+24
-37
lines changed

6 files changed

+24
-37
lines changed

apps/mail-bridge/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"@u22n/tsconfig": "^0.0.2",
2828
"@u22n/utils": "workspace:*",
2929
"drizzle-orm": "^0.30.3",
30-
"hono": "^4.2.8",
30+
"hono": "^4.3.6",
3131
"mailauth": "^4.6.5",
3232
"mailparser": "^3.6.9",
3333
"mysql2": "^3.9.7",

apps/storage/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@u22n/database": "workspace:*",
2121
"@u22n/tsconfig": "^0.0.2",
2222
"@u22n/utils": "workspace:*",
23-
"hono": "^4.2.8",
23+
"hono": "^4.3.6",
2424
"sharp": "^0.33.2",
2525
"unstorage": "^1.10.2",
2626
"zod": "^3.23.8"

apps/storage/proxy/attachment.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,13 @@ export const attachmentProxy = new Hono<Ctx>().get(
7878
Key: `${orgPublicId}/${attachmentId}/${filename}`
7979
});
8080
const url = await getSignedUrl(s3Client, command, { expiresIn: 3600 });
81-
const res = await fetch(url);
81+
const res = await fetch(url).then((res) => c.body(res.body, res));
8282
if (!res.ok) {
8383
return c.json(
8484
{ error: 'Error while fetching attachment' },
8585
{ status: 500 }
8686
);
8787
}
88-
// Copy response as fetch headers are immutable
89-
return new Response(res.body, res);
88+
return res;
9089
}
9190
);

apps/storage/proxy/avatars.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ export const avatarProxy = new Hono<Ctx>().get('/:proxy{.+}', async (c) => {
77
const proxy = c.req.param('proxy');
88
const res = await fetch(
99
`${env.STORAGE_S3_ENDPOINT}/${env.STORAGE_S3_BUCKET_AVATARS}/${proxy}`
10-
);
10+
).then((res) => c.body(res.body, res));
1111
if (res.status === 404) {
1212
return c.json({ error: 'Not Found' }, { status: 404 });
1313
}
14-
// Copy response as fetch headers are immutable
15-
return new Response(res.body, res);
14+
return res;
1615
});

ee/apps/billing/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@u22n/database": "workspace:*",
2323
"@u22n/tsconfig": "^0.0.2",
2424
"@u22n/utils": "workspace:*",
25-
"hono": "^4.2.8",
25+
"hono": "^4.3.6",
2626
"nitropack": "^2.8.1",
2727
"stripe": "^14.17.0",
2828
"superjson": "^2.2.1",

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)