Sign In

srvx

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

srvx - npm Package Compare versions

Comparing version
0.12.6
to
0.12.7
+6
-3
dist/adapters/node.mjs

@@ -324,2 +324,5 @@ import { FastURL, lazyInherit } from "../_chunks/_url.mjs";

}
function isBodySourceFinished(req) {
return isClientGone(req) || req.destroyed || req.readableEnded;
}
const NodeRequest = /* @__PURE__ */ (() => {

@@ -428,4 +431,4 @@ const NativeRequest = getNativeRequest();

if (this.#hasBody() && !this.#bodyUsed) {
stream = Readable.toWeb(this.#req);
if (Readable.isDisturbed(stream)) stream = erroredStream(this.#bodyError());
if (isBodySourceFinished(this.#req)) stream = erroredStream(this.#bodyError());
else stream = Readable.toWeb(this.#req);
}

@@ -451,3 +454,3 @@ if (stream && this.#maxRequestBodySize !== void 0) stream = limitBodyStream(stream, this.#maxRequestBodySize);

#readBuffered() {
if (isClientGone(this.#req) || this.#req.destroyed || this.#req.readableEnded) return Promise.reject(this.#bodyError());
if (isBodySourceFinished(this.#req)) return Promise.reject(this.#bodyError());
return readBody(this.#req, this.#maxRequestBodySize);

@@ -454,0 +457,0 @@ }

@@ -222,3 +222,3 @@ import { bold, cyan, gray, green, magenta, red, url, yellow } from "./_chunks/_utils.mjs";

name: "srvx",
version: "0.12.5",
version: "0.12.6",
description: "Universal Server."

@@ -225,0 +225,0 @@ };

{
"name": "srvx",
"version": "0.12.6",
"version": "0.12.7",
"description": "Universal Server.",

@@ -5,0 +5,0 @@ "homepage": "https://srvx.h3.dev",