@hono/node-server 2.0.4 → 2.0.6
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/dist/index.cjs +2 -1
- package/dist/index.mjs +2 -1
- package/dist/serve-static.cjs +1 -1
- package/dist/serve-static.mjs +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -404,7 +404,8 @@ var Response$1 = class Response$1 {
|
|
|
404
404
|
const liveHeaders = cache && cache[2] instanceof Headers ? cache[2] : void 0;
|
|
405
405
|
delete this[cacheKey];
|
|
406
406
|
return this[responseCache] ||= new GlobalResponse(this.#body, liveHeaders ? {
|
|
407
|
-
|
|
407
|
+
status: this.#init?.status,
|
|
408
|
+
statusText: this.#init?.statusText,
|
|
408
409
|
headers: liveHeaders
|
|
409
410
|
} : this.#init);
|
|
410
411
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -403,7 +403,8 @@ var Response$1 = class Response$1 {
|
|
|
403
403
|
const liveHeaders = cache && cache[2] instanceof Headers ? cache[2] : void 0;
|
|
404
404
|
delete this[cacheKey];
|
|
405
405
|
return this[responseCache] ||= new GlobalResponse(this.#body, liveHeaders ? {
|
|
406
|
-
|
|
406
|
+
status: this.#init?.status,
|
|
407
|
+
statusText: this.#init?.statusText,
|
|
407
408
|
headers: liveHeaders
|
|
408
409
|
} : this.#init);
|
|
409
410
|
}
|
package/dist/serve-static.cjs
CHANGED
|
@@ -43,7 +43,7 @@ const serveStatic = (options = { root: "" }) => {
|
|
|
43
43
|
if (optionPath) filename = optionPath;
|
|
44
44
|
else try {
|
|
45
45
|
filename = tryDecodeURI(c.req.path);
|
|
46
|
-
if (/(?:^|[\/\\])\.{1,2}(?:$|[\/\\])|[\/\\]{2,}
|
|
46
|
+
if (/(?:^|[\/\\])\.{1,2}(?:$|[\/\\])|[\/\\]{2,}|\\/.test(filename)) throw new Error();
|
|
47
47
|
} catch {
|
|
48
48
|
await options.onNotFound?.(c.req.path, c);
|
|
49
49
|
return next();
|
package/dist/serve-static.mjs
CHANGED
|
@@ -42,7 +42,7 @@ const serveStatic = (options = { root: "" }) => {
|
|
|
42
42
|
if (optionPath) filename = optionPath;
|
|
43
43
|
else try {
|
|
44
44
|
filename = tryDecodeURI(c.req.path);
|
|
45
|
-
if (/(?:^|[\/\\])\.{1,2}(?:$|[\/\\])|[\/\\]{2,}
|
|
45
|
+
if (/(?:^|[\/\\])\.{1,2}(?:$|[\/\\])|[\/\\]{2,}|\\/.test(filename)) throw new Error();
|
|
46
46
|
} catch {
|
|
47
47
|
await options.onNotFound?.(c.req.path, c);
|
|
48
48
|
return next();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hono/node-server",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "Node.js Adapter for Hono",
|
|
5
5
|
"main": "dist/index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"watch": "tsdown --watch",
|
|
73
73
|
"postbuild": "publint",
|
|
74
74
|
"prerelease": "bun run build && bun run test --run",
|
|
75
|
-
"release": "np",
|
|
75
|
+
"release": "np --no-publish",
|
|
76
76
|
"lint": "eslint src test",
|
|
77
77
|
"lint:fix": "eslint src test --fix",
|
|
78
78
|
"format": "prettier --check \"src/**/*.{js,ts}\" \"test/**/*.{js,ts}\"",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"@whatwg-node/fetch": "^0.9.14",
|
|
101
101
|
"eslint": "^9.10.0",
|
|
102
102
|
"hono": "^4.12.8",
|
|
103
|
-
"np": "^
|
|
103
|
+
"np": "^11.2.1",
|
|
104
104
|
"prettier": "^3.2.4",
|
|
105
105
|
"publint": "^0.3.18",
|
|
106
106
|
"supertest": "^6.3.3",
|