@@ -56,2 +56,7 @@ function resolvePortAndHost(opts) { | ||
| } | ||
| function toNativeResponse(res) { | ||
| if (res?._toNodeResponse) return res._response; | ||
| if (typeof res?.then === "function") return res.then(toNativeResponse); | ||
| return res; | ||
| } | ||
| function createWaitUntil() { | ||
@@ -71,2 +76,2 @@ const promises = /* @__PURE__ */ new Set(); | ||
| } | ||
| export { createWaitUntil, fmtURL, printListening, resolvePortAndHost, resolveTLSOptions }; | ||
| export { createWaitUntil, fmtURL, printListening, resolvePortAndHost, resolveTLSOptions, toNativeResponse }; |
| import { FastURL } from "../_chunks/_url.mjs"; | ||
| import { createWaitUntil, fmtURL, printListening, resolvePortAndHost, resolveTLSOptions } from "../_chunks/_utils2.mjs"; | ||
| import { createWaitUntil, fmtURL, printListening, resolvePortAndHost, resolveTLSOptions, toNativeResponse } from "../_chunks/_utils2.mjs"; | ||
| import { gracefulShutdownPlugin, wrapFetch } from "../_chunks/_plugins.mjs"; | ||
@@ -49,3 +49,3 @@ const FastResponse = Response; | ||
| }); | ||
| return fetchHandler(request); | ||
| return toNativeResponse(fetchHandler(request)); | ||
| }; | ||
@@ -52,0 +52,0 @@ const tls = resolveTLSOptions(this.options); |
| import { FastURL } from "../_chunks/_url.mjs"; | ||
| import { createWaitUntil, fmtURL, printListening, resolvePortAndHost, resolveTLSOptions } from "../_chunks/_utils2.mjs"; | ||
| import { createWaitUntil, fmtURL, printListening, resolvePortAndHost, resolveTLSOptions, toNativeResponse } from "../_chunks/_utils2.mjs"; | ||
| import { gracefulShutdownPlugin, wrapFetch } from "../_chunks/_plugins.mjs"; | ||
@@ -54,3 +54,3 @@ const FastResponse = Response; | ||
| }); | ||
| return fetchHandler(request); | ||
| return toNativeResponse(fetchHandler(request)); | ||
| }; | ||
@@ -57,0 +57,0 @@ const tls = resolveTLSOptions(this.options); |
+1
-1
@@ -182,3 +182,3 @@ import { bold, cyan, gray, green, magenta, red, url, yellow } from "./_chunks/_utils.mjs"; | ||
| name: "srvx", | ||
| version: "0.11.16", | ||
| version: "0.11.17", | ||
| description: "Universal Server." | ||
@@ -185,0 +185,0 @@ }; |
+1
-1
| { | ||
| "name": "srvx", | ||
| "version": "0.11.17", | ||
| "version": "0.11.18", | ||
| "description": "Universal Server.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://srvx.h3.dev", |
114252
0.23%2533
0.2%