build(deps-dev): bump h3 from 1.6.5 to 1.6.6 (#83)

* build(deps-dev): bump h3 from 1.6.5 to 1.6.6

Bumps [h3](https://github.com/unjs/h3) from 1.6.5 to 1.6.6.
- [Release notes](https://github.com/unjs/h3/releases)
- [Changelog](https://github.com/unjs/h3/blob/main/CHANGELOG.md)
- [Commits](https://github.com/unjs/h3/compare/v1.6.5...v1.6.6)

---
updated-dependencies:
- dependency-name: h3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Rebuild dist with new dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
This commit is contained in:
dependabot[bot]
2023-05-15 18:22:19 +01:00
committed by GitHub
parent 88a3deb2ec
commit e53d19fad7
4 changed files with 25 additions and 17 deletions
+18 -10
View File
@@ -1388,23 +1388,31 @@ function getRequestHeader(event, name) {
return value;
}
const getHeader = (/* unused pure expression or super */ null && (getRequestHeader));
function getRequestHost(event) {
const xForwardedHost = event.node.req.headers["x-forwarded-host"];
if (xForwardedHost) {
return xForwardedHost;
function getRequestHost(event, opts = {}) {
if (opts.xForwardedHost) {
const xForwardedHost = event.node.req.headers["x-forwarded-host"];
if (xForwardedHost) {
return xForwardedHost;
}
}
return event.node.req.headers.host || "localhost";
}
function getRequestProtocol(event) {
if (event.node.req.headers["x-forwarded-proto"] === "https") {
function getRequestProtocol(event, opts = {}) {
if (opts.xForwardedProto !== false && event.node.req.headers["x-forwarded-proto"] === "https") {
return "https";
}
return event.node.req.connection.encrypted ? "https" : "http";
}
function getRequestURL(event) {
const host = getRequestHost(event);
const DOUBLE_SLASH_RE = /[/\\]{2,}/g;
function getRequestPath(event) {
const path = (event.node.req.url || "/").replace(DOUBLE_SLASH_RE, "/");
return path;
}
function getRequestURL(event, opts = {}) {
const host = getRequestHost(event, opts);
const protocol = getRequestProtocol(event);
return new URL(event.path || "/", `${protocol}://${host}`);
const path = getRequestPath(event);
return new URL(path, `${protocol}://${host}`);
}
const RawBodySymbol = Symbol.for("h3RawBody");
@@ -2216,7 +2224,7 @@ class H3Event {
this.node = { req, res };
}
get path() {
return this.req.url;
return getRequestPath(this);
}
/** @deprecated Please use `event.node.req` instead. **/
get req() {
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -49,7 +49,7 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vitest": "^0.2.2",
"get-port-please": "^3.0.1",
"h3": "^1.6.5",
"h3": "^1.6.6",
"js-yaml": "^4.1.0",
"listhen": "^1.0.4",
"msw": "^1.2.1",
+5 -5
View File
@@ -3114,9 +3114,9 @@ __metadata:
languageName: node
linkType: hard
"h3@npm:^1.6.5":
version: 1.6.5
resolution: "h3@npm:1.6.5"
"h3@npm:^1.6.6":
version: 1.6.6
resolution: "h3@npm:1.6.6"
dependencies:
cookie-es: ^1.0.0
defu: ^6.1.2
@@ -3125,7 +3125,7 @@ __metadata:
radix3: ^1.0.1
ufo: ^1.1.2
uncrypto: ^0.1.2
checksum: 23b34f7cc62a46bcf5ac2e51b39af4a4ff425483b90cde8ca8310e8dcd6d1f7c2377dd72f26c1fcaff88497bd14957f2fd14422e2306990b4541d23077f1e131
checksum: 58a24d0f5eeff0e36caf7299d0237c43e0e10b9fcc8f8858aec51bcac0a0ab6ed28ebff199119a62e5571c0c35e6788acb69fe63468ff04c3134598c7ee46f1a
languageName: node
linkType: hard
@@ -5266,7 +5266,7 @@ __metadata:
eslint-plugin-prettier: ^4.2.1
eslint-plugin-vitest: ^0.2.2
get-port-please: ^3.0.1
h3: ^1.6.5
h3: ^1.6.6
js-yaml: ^4.1.0
listhen: ^1.0.4
msw: ^1.2.1