@whatwg-node/server
Advanced tools
Comparing version 0.9.45 to 0.9.46-rc-20240731130324-01f4df0c229da96d78df1aed0465f151f91c6448
@@ -24,3 +24,3 @@ "use strict"; | ||
} | ||
const newRequest = new fetchAPI.Request(request.url, { | ||
request = new fetchAPI.Request(request.url, { | ||
body: newBody, | ||
@@ -42,3 +42,3 @@ cache: request.cache, | ||
}); | ||
setRequest(newRequest); | ||
setRequest(request); | ||
} | ||
@@ -45,0 +45,0 @@ } |
@@ -27,2 +27,7 @@ "use strict"; | ||
class HTTPError extends Error { | ||
status; | ||
message; | ||
headers; | ||
details; | ||
name = 'HTTPError'; | ||
constructor(status = 500, message, headers = {}, details) { | ||
@@ -34,3 +39,2 @@ super(message); | ||
this.details = details; | ||
this.name = 'HTTPError'; | ||
Error.captureStackTrace(this, HTTPError); | ||
@@ -37,0 +41,0 @@ } |
@@ -73,7 +73,5 @@ "use strict"; | ||
class ServerAdapterRequestAbortSignal extends EventTarget { | ||
constructor() { | ||
super(...arguments); | ||
this.aborted = false; | ||
this._onabort = null; | ||
} | ||
aborted = false; | ||
_onabort = null; | ||
reason; | ||
throwIfAborted() { | ||
@@ -80,0 +78,0 @@ if (this.aborted) { |
@@ -21,3 +21,3 @@ import { decompressedResponseMap, getSupportedEncodings } from '../utils.js'; | ||
} | ||
const newRequest = new fetchAPI.Request(request.url, { | ||
request = new fetchAPI.Request(request.url, { | ||
body: newBody, | ||
@@ -39,3 +39,3 @@ cache: request.cache, | ||
}); | ||
setRequest(newRequest); | ||
setRequest(request); | ||
} | ||
@@ -42,0 +42,0 @@ } |
@@ -22,2 +22,7 @@ import { Response as DefaultResponseCtor } from '@whatwg-node/fetch'; | ||
export class HTTPError extends Error { | ||
status; | ||
message; | ||
headers; | ||
details; | ||
name = 'HTTPError'; | ||
constructor(status = 500, message, headers = {}, details) { | ||
@@ -29,3 +34,2 @@ super(message); | ||
this.details = details; | ||
this.name = 'HTTPError'; | ||
Error.captureStackTrace(this, HTTPError); | ||
@@ -32,0 +36,0 @@ } |
@@ -52,7 +52,5 @@ import { URL } from '@whatwg-node/fetch'; | ||
export class ServerAdapterRequestAbortSignal extends EventTarget { | ||
constructor() { | ||
super(...arguments); | ||
this.aborted = false; | ||
this._onabort = null; | ||
} | ||
aborted = false; | ||
_onabort = null; | ||
reason; | ||
throwIfAborted() { | ||
@@ -59,0 +57,0 @@ if (this.aborted) { |
{ | ||
"name": "@whatwg-node/server", | ||
"version": "0.9.45", | ||
"version": "0.9.46-rc-20240731130324-01f4df0c229da96d78df1aed0465f151f91c6448", | ||
"description": "Fetch API compliant HTTP Server adapter", | ||
@@ -18,3 +18,3 @@ "sideEffects": false, | ||
"engines": { | ||
"node": ">=16.0.0" | ||
"node": ">=18.0.0" | ||
}, | ||
@@ -21,0 +21,0 @@ "main": "cjs/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2876
140492