@hono/node-server
Advanced tools
+7
-2
@@ -403,4 +403,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
| [getResponseCache]() { | ||
| const cache = this[cacheKey]; | ||
| const liveHeaders = cache && cache[2] instanceof Headers ? cache[2] : void 0; | ||
| delete this[cacheKey]; | ||
| return this[responseCache] ||= new GlobalResponse(this.#body, this.#init); | ||
| return this[responseCache] ||= new GlobalResponse(this.#body, liveHeaders ? { | ||
| ...this.#init, | ||
| headers: liveHeaders | ||
| } : this.#init); | ||
| } | ||
@@ -418,3 +423,3 @@ constructor(body, init) { | ||
| this.#init = init.#init; | ||
| headers = new Headers(init.#init.headers); | ||
| headers = new Headers(init.headers); | ||
| } | ||
@@ -421,0 +426,0 @@ } else this.#init = init; |
+7
-2
@@ -402,4 +402,9 @@ import { t as X_ALREADY_SENT } from "./constants-BLSFu_RU.mjs"; | ||
| [getResponseCache]() { | ||
| const cache = this[cacheKey]; | ||
| const liveHeaders = cache && cache[2] instanceof Headers ? cache[2] : void 0; | ||
| delete this[cacheKey]; | ||
| return this[responseCache] ||= new GlobalResponse(this.#body, this.#init); | ||
| return this[responseCache] ||= new GlobalResponse(this.#body, liveHeaders ? { | ||
| ...this.#init, | ||
| headers: liveHeaders | ||
| } : this.#init); | ||
| } | ||
@@ -417,3 +422,3 @@ constructor(body, init) { | ||
| this.#init = init.#init; | ||
| headers = new Headers(init.#init.headers); | ||
| headers = new Headers(init.headers); | ||
| } | ||
@@ -420,0 +425,0 @@ } else this.#init = init; |
@@ -6,3 +6,3 @@ import { Context, Env, MiddlewareHandler } from "hono"; | ||
| /** | ||
| * Root path, relative to current working directory from which the app was started. Absolute paths are not supported. | ||
| * Root path. Relative path is based on current working directory from which the app was started. | ||
| */ | ||
@@ -9,0 +9,0 @@ root?: string; |
@@ -6,3 +6,3 @@ import { Context, Env, MiddlewareHandler } from "hono"; | ||
| /** | ||
| * Root path, relative to current working directory from which the app was started. Absolute paths are not supported. | ||
| * Root path. Relative path is based on current working directory from which the app was started. | ||
| */ | ||
@@ -9,0 +9,0 @@ root?: string; |
+1
-1
| { | ||
| "name": "@hono/node-server", | ||
| "version": "2.0.2", | ||
| "version": "2.0.3", | ||
| "description": "Node.js Adapter for Hono", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.mjs", |
105406
0.29%2460
0.41%