hono 4.7.10 → 4.7.11
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.
package/README.md
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
[](https://github.com/honojs/hono/commits/main)
|
|
25
25
|
[](https://codecov.io/github/honojs/hono)
|
|
26
26
|
[](https://discord.gg/KMh2eNSdxV)
|
|
27
|
+
[](https://deepwiki.com/honojs/hono)
|
|
27
28
|
|
|
28
29
|
Hono - _**means flame🔥 in Japanese**_ - is a small, simple, and ultrafast web framework built on Web Standards. It works on any JavaScript runtime: Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, AWS Lambda, Lambda@Edge, and Node.js.
|
|
29
30
|
|
package/dist/cjs/hono-base.js
CHANGED
|
@@ -31,7 +31,8 @@ const notFoundHandler = (c) => {
|
|
|
31
31
|
};
|
|
32
32
|
const errorHandler = (err, c) => {
|
|
33
33
|
if ("getResponse" in err) {
|
|
34
|
-
|
|
34
|
+
const res = err.getResponse();
|
|
35
|
+
return c.newResponse(res.body, res);
|
|
35
36
|
}
|
|
36
37
|
console.error(err);
|
|
37
38
|
return c.text("Internal Server Error", 500);
|
|
@@ -31,8 +31,9 @@ const RETAINED_304_HEADERS = [
|
|
|
31
31
|
"expires",
|
|
32
32
|
"vary"
|
|
33
33
|
];
|
|
34
|
+
const stripWeak = (tag) => tag.replace(/^W\//, "");
|
|
34
35
|
function etagMatches(etag2, ifNoneMatch) {
|
|
35
|
-
return ifNoneMatch != null && ifNoneMatch.split(/,\s*/).
|
|
36
|
+
return ifNoneMatch != null && ifNoneMatch.split(/,\s*/).some((t) => stripWeak(t) === stripWeak(etag2));
|
|
36
37
|
}
|
|
37
38
|
function initializeGenerator(generator) {
|
|
38
39
|
if (!generator) {
|
package/dist/hono-base.js
CHANGED
|
@@ -9,7 +9,8 @@ var notFoundHandler = (c) => {
|
|
|
9
9
|
};
|
|
10
10
|
var errorHandler = (err, c) => {
|
|
11
11
|
if ("getResponse" in err) {
|
|
12
|
-
|
|
12
|
+
const res = err.getResponse();
|
|
13
|
+
return c.newResponse(res.body, res);
|
|
13
14
|
}
|
|
14
15
|
console.error(err);
|
|
15
16
|
return c.text("Internal Server Error", 500);
|
|
@@ -8,8 +8,9 @@ var RETAINED_304_HEADERS = [
|
|
|
8
8
|
"expires",
|
|
9
9
|
"vary"
|
|
10
10
|
];
|
|
11
|
+
var stripWeak = (tag) => tag.replace(/^W\//, "");
|
|
11
12
|
function etagMatches(etag2, ifNoneMatch) {
|
|
12
|
-
return ifNoneMatch != null && ifNoneMatch.split(/,\s*/).
|
|
13
|
+
return ifNoneMatch != null && ifNoneMatch.split(/,\s*/).some((t) => stripWeak(t) === stripWeak(etag2));
|
|
13
14
|
}
|
|
14
15
|
function initializeGenerator(generator) {
|
|
15
16
|
if (!generator) {
|
|
@@ -6,7 +6,7 @@ import type { Context } from '../../context';
|
|
|
6
6
|
export type Runtime = "node" | "deno" | "bun" | "workerd" | "fastly" | "edge-light" | "other";
|
|
7
7
|
export declare const env: <T extends Record<string, unknown>, C extends Context = Context<{
|
|
8
8
|
Bindings: T;
|
|
9
|
-
}>>(c: T extends Record<string, unknown> ? Context : C, runtime?: Runtime) => T & C["env"];
|
|
9
|
+
}, any, {}>>(c: T extends Record<string, unknown> ? Context : C, runtime?: Runtime) => T & C["env"];
|
|
10
10
|
export declare const knownUserAgents: Partial<Record<Runtime, string>>;
|
|
11
11
|
export declare const getRuntimeKey: () => Runtime;
|
|
12
12
|
export declare const checkUserAgentEquals: (platform: string) => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hono",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.11",
|
|
4
4
|
"description": "Web framework built on Web Standards",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -653,6 +653,7 @@
|
|
|
653
653
|
"@types/jsdom": "^21.1.7",
|
|
654
654
|
"@types/node": "20.11.4",
|
|
655
655
|
"@types/supertest": "^2.0.16",
|
|
656
|
+
"@typescript/native-preview": "7.0.0-dev.20250523.1",
|
|
656
657
|
"@vitest/coverage-v8": "^3.0.5",
|
|
657
658
|
"arg": "^5.0.2",
|
|
658
659
|
"bun-types": "^1.1.39",
|