h3 1.15.9 → 1.15.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/dist/index.cjs +4 -2
- package/dist/index.mjs +4 -2
- package/package.json +10 -13
package/dist/index.cjs
CHANGED
|
@@ -1999,8 +1999,10 @@ function createAppEventHandler(stack, options) {
|
|
|
1999
1999
|
const spacing = options.debug ? 2 : void 0;
|
|
2000
2000
|
return eventHandler(async (event) => {
|
|
2001
2001
|
event.node.req.originalUrl = event.node.req.originalUrl || event.node.req.url || "/";
|
|
2002
|
-
const
|
|
2002
|
+
const _rawReqUrl = event.node.req.url || "/";
|
|
2003
|
+
const _reqPath = _decodePath(event._path || _rawReqUrl);
|
|
2003
2004
|
event._path = _reqPath;
|
|
2005
|
+
const _needsRawUrl = _reqPath !== _rawReqUrl;
|
|
2004
2006
|
let _layerPath;
|
|
2005
2007
|
if (options.onRequest) {
|
|
2006
2008
|
await options.onRequest(event);
|
|
@@ -2018,7 +2020,7 @@ function createAppEventHandler(stack, options) {
|
|
|
2018
2020
|
continue;
|
|
2019
2021
|
}
|
|
2020
2022
|
event._path = _layerPath;
|
|
2021
|
-
event.node.req.url = _layerPath;
|
|
2023
|
+
event.node.req.url = _needsRawUrl ? layer.route.length > 1 ? _rawReqUrl.slice(layer.route.length) || "/" : _rawReqUrl : _layerPath;
|
|
2022
2024
|
const val = await layer.handler(event);
|
|
2023
2025
|
const _body = val === void 0 ? void 0 : await val;
|
|
2024
2026
|
if (_body !== void 0) {
|
package/dist/index.mjs
CHANGED
|
@@ -1992,8 +1992,10 @@ function createAppEventHandler(stack, options) {
|
|
|
1992
1992
|
const spacing = options.debug ? 2 : void 0;
|
|
1993
1993
|
return eventHandler(async (event) => {
|
|
1994
1994
|
event.node.req.originalUrl = event.node.req.originalUrl || event.node.req.url || "/";
|
|
1995
|
-
const
|
|
1995
|
+
const _rawReqUrl = event.node.req.url || "/";
|
|
1996
|
+
const _reqPath = _decodePath(event._path || _rawReqUrl);
|
|
1996
1997
|
event._path = _reqPath;
|
|
1998
|
+
const _needsRawUrl = _reqPath !== _rawReqUrl;
|
|
1997
1999
|
let _layerPath;
|
|
1998
2000
|
if (options.onRequest) {
|
|
1999
2001
|
await options.onRequest(event);
|
|
@@ -2011,7 +2013,7 @@ function createAppEventHandler(stack, options) {
|
|
|
2011
2013
|
continue;
|
|
2012
2014
|
}
|
|
2013
2015
|
event._path = _layerPath;
|
|
2014
|
-
event.node.req.url = _layerPath;
|
|
2016
|
+
event.node.req.url = _needsRawUrl ? layer.route.length > 1 ? _rawReqUrl.slice(layer.route.length) || "/" : _rawReqUrl : _layerPath;
|
|
2015
2017
|
const val = await layer.handler(event);
|
|
2016
2018
|
const _body = val === void 0 ? void 0 : await val;
|
|
2017
2019
|
if (_body !== void 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "h3",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.11",
|
|
4
4
|
"description": "Minimal H(TTP) framework built for high performance and portability.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "h3js/h3",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"test:types": "tsgo --noEmit"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"cookie-es": "^1.2.
|
|
35
|
+
"cookie-es": "^1.2.3",
|
|
36
36
|
"crossws": "^0.3.5",
|
|
37
|
-
"defu": "^6.1.
|
|
37
|
+
"defu": "^6.1.6",
|
|
38
38
|
"destr": "^2.0.5",
|
|
39
39
|
"iron-webcrypto": "^1.2.1",
|
|
40
40
|
"node-mock-http": "^1.0.4",
|
|
@@ -48,16 +48,16 @@
|
|
|
48
48
|
"@types/node": "^25.5.0",
|
|
49
49
|
"@types/supertest": "^7.2.0",
|
|
50
50
|
"@typescript/native-preview": "latest",
|
|
51
|
-
"@vitest/coverage-v8": "^4.1.
|
|
51
|
+
"@vitest/coverage-v8": "^4.1.2",
|
|
52
52
|
"autocannon": "^8.0.0",
|
|
53
53
|
"automd": "^0.4.3",
|
|
54
54
|
"changelogen": "^0.6.2",
|
|
55
55
|
"connect": "^3.7.0",
|
|
56
|
-
"eslint": "^10.0
|
|
56
|
+
"eslint": "^10.1.0",
|
|
57
57
|
"eslint-config-unjs": "^0.6.2",
|
|
58
58
|
"express": "^5.2.1",
|
|
59
|
-
"get-port": "^7.
|
|
60
|
-
"h3": "^1.15.
|
|
59
|
+
"get-port": "^7.2.0",
|
|
60
|
+
"h3": "^1.15.10",
|
|
61
61
|
"jiti": "^2.6.1",
|
|
62
62
|
"listhen": "^1.9.0",
|
|
63
63
|
"node-fetch-native": "^1.6.7",
|
|
@@ -65,14 +65,11 @@
|
|
|
65
65
|
"react": "^19.2.4",
|
|
66
66
|
"react-dom": "^19.2.4",
|
|
67
67
|
"supertest": "^7.2.2",
|
|
68
|
-
"typescript": "^
|
|
68
|
+
"typescript": "^6.0.2",
|
|
69
69
|
"unbuild": "^3.6.1",
|
|
70
|
-
"undici": "^7.24.
|
|
71
|
-
"vitest": "^4.1.
|
|
70
|
+
"undici": "^7.24.7",
|
|
71
|
+
"vitest": "^4.1.2",
|
|
72
72
|
"zod": "^4.3.6"
|
|
73
73
|
},
|
|
74
|
-
"resolutions": {
|
|
75
|
-
"h3": "^1.14.0"
|
|
76
|
-
},
|
|
77
74
|
"packageManager": "pnpm@10.28.0"
|
|
78
75
|
}
|