srvx 0.8.1 → 0.8.2

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.
@@ -44,8 +44,11 @@ declare const NodeResponse: {
44
44
  };
45
45
  };
46
46
  //#endregion
47
+ //#region src/adapters/_node/send.d.ts
48
+ declare function sendNodeResponse(nodeRes: NodeServerResponse, webRes: Response | NodeResponse): Promise<void>;
49
+ //#endregion
47
50
  //#region src/adapters/node.d.ts
48
51
  declare function serve(options: ServerOptions): Server;
49
52
  declare function toNodeHandler(fetchHandler: FetchHandler): NodeHttpHandler;
50
53
  //#endregion
51
- export { NodeResponse as FastResponse, FastURL, NodeRequest, NodeRequestHeaders, NodeResponse, NodeResponseHeaders, serve, toNodeHandler };
54
+ export { NodeResponse as FastResponse, FastURL, NodeRequest, NodeRequestHeaders, NodeResponse, NodeResponseHeaders, sendNodeResponse, serve, toNodeHandler };
@@ -633,17 +633,17 @@ const NodeResponse = /* @__PURE__ */ (() => {
633
633
  #headersObj;
634
634
  clone() {
635
635
  if (this.#responseObj) return this.#responseObj.clone();
636
- if (this.#headersObj) return new globalThis.Response(this.#body, {
636
+ if (this.#headersObj) return new _Response(this.#body, {
637
637
  ...this.#init,
638
- headers: new Headers(this.#headersObj)
638
+ headers: this.#headersObj
639
639
  });
640
- return new globalThis.Response(this.#body, this.#init);
640
+ return new _Response(this.#body, this.#init);
641
641
  }
642
642
  get #response() {
643
643
  if (!this.#responseObj) {
644
644
  this.#responseObj = this.#headersObj ? new globalThis.Response(this.#body, {
645
645
  ...this.#init,
646
- headers: new Headers(this.#headersObj)
646
+ headers: this.#headersObj
647
647
  }) : new globalThis.Response(this.#body, this.#init);
648
648
  this.#body = void 0;
649
649
  this.#init = void 0;
@@ -843,4 +843,4 @@ var NodeServer = class {
843
843
  };
844
844
 
845
845
  //#endregion
846
- export { NodeResponse as FastResponse, FastURL, NodeRequest, NodeRequestHeaders, NodeResponse, NodeResponseHeaders, serve, toNodeHandler };
846
+ export { NodeResponse as FastResponse, FastURL, NodeRequest, NodeRequestHeaders, NodeResponse, NodeResponseHeaders, sendNodeResponse, serve, toNodeHandler };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "srvx",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Universal Server API based on web platform standards. Works seamlessly with Deno, Bun and Node.js.",
5
5
  "homepage": "https://srvx.h3.dev",
6
6
  "repository": "h3js/srvx",