@hono/node-server
Advanced tools
+7
-3
@@ -305,8 +305,12 @@ "use strict"; | ||
| function writeFromReadableStreamDefaultReader(reader, writable, currentReadPromise) { | ||
| const handleError = () => { | ||
| const cancel = (error) => { | ||
| reader.cancel(error).catch(() => { | ||
| }); | ||
| }; | ||
| writable.on("error", handleError); | ||
| writable.on("close", cancel); | ||
| writable.on("error", cancel); | ||
| (currentReadPromise ?? reader.read()).then(flow, handleStreamError); | ||
| return reader.closed.finally(() => { | ||
| writable.off("error", handleError); | ||
| writable.off("close", cancel); | ||
| writable.off("error", cancel); | ||
| }); | ||
@@ -313,0 +317,0 @@ function handleStreamError(error) { |
+7
-3
@@ -266,8 +266,12 @@ // src/server.ts | ||
| function writeFromReadableStreamDefaultReader(reader, writable, currentReadPromise) { | ||
| const handleError = () => { | ||
| const cancel = (error) => { | ||
| reader.cancel(error).catch(() => { | ||
| }); | ||
| }; | ||
| writable.on("error", handleError); | ||
| writable.on("close", cancel); | ||
| writable.on("error", cancel); | ||
| (currentReadPromise ?? reader.read()).then(flow, handleStreamError); | ||
| return reader.closed.finally(() => { | ||
| writable.off("error", handleError); | ||
| writable.off("close", cancel); | ||
| writable.off("error", cancel); | ||
| }); | ||
@@ -274,0 +278,0 @@ function handleStreamError(error) { |
+7
-3
@@ -297,8 +297,12 @@ "use strict"; | ||
| function writeFromReadableStreamDefaultReader(reader, writable, currentReadPromise) { | ||
| const handleError = () => { | ||
| const cancel = (error) => { | ||
| reader.cancel(error).catch(() => { | ||
| }); | ||
| }; | ||
| writable.on("error", handleError); | ||
| writable.on("close", cancel); | ||
| writable.on("error", cancel); | ||
| (currentReadPromise ?? reader.read()).then(flow, handleStreamError); | ||
| return reader.closed.finally(() => { | ||
| writable.off("error", handleError); | ||
| writable.off("close", cancel); | ||
| writable.off("error", cancel); | ||
| }); | ||
@@ -305,0 +309,0 @@ function handleStreamError(error) { |
@@ -263,8 +263,12 @@ // src/listener.ts | ||
| function writeFromReadableStreamDefaultReader(reader, writable, currentReadPromise) { | ||
| const handleError = () => { | ||
| const cancel = (error) => { | ||
| reader.cancel(error).catch(() => { | ||
| }); | ||
| }; | ||
| writable.on("error", handleError); | ||
| writable.on("close", cancel); | ||
| writable.on("error", cancel); | ||
| (currentReadPromise ?? reader.read()).then(flow, handleStreamError); | ||
| return reader.closed.finally(() => { | ||
| writable.off("error", handleError); | ||
| writable.off("close", cancel); | ||
| writable.off("error", cancel); | ||
| }); | ||
@@ -271,0 +275,0 @@ function handleStreamError(error) { |
+7
-3
@@ -301,8 +301,12 @@ "use strict"; | ||
| function writeFromReadableStreamDefaultReader(reader, writable, currentReadPromise) { | ||
| const handleError = () => { | ||
| const cancel = (error) => { | ||
| reader.cancel(error).catch(() => { | ||
| }); | ||
| }; | ||
| writable.on("error", handleError); | ||
| writable.on("close", cancel); | ||
| writable.on("error", cancel); | ||
| (currentReadPromise ?? reader.read()).then(flow, handleStreamError); | ||
| return reader.closed.finally(() => { | ||
| writable.off("error", handleError); | ||
| writable.off("close", cancel); | ||
| writable.off("error", cancel); | ||
| }); | ||
@@ -309,0 +313,0 @@ function handleStreamError(error) { |
+7
-3
@@ -266,8 +266,12 @@ // src/server.ts | ||
| function writeFromReadableStreamDefaultReader(reader, writable, currentReadPromise) { | ||
| const handleError = () => { | ||
| const cancel = (error) => { | ||
| reader.cancel(error).catch(() => { | ||
| }); | ||
| }; | ||
| writable.on("error", handleError); | ||
| writable.on("close", cancel); | ||
| writable.on("error", cancel); | ||
| (currentReadPromise ?? reader.read()).then(flow, handleStreamError); | ||
| return reader.closed.finally(() => { | ||
| writable.off("error", handleError); | ||
| writable.off("close", cancel); | ||
| writable.off("error", cancel); | ||
| }); | ||
@@ -274,0 +278,0 @@ function handleStreamError(error) { |
+7
-3
@@ -33,8 +33,12 @@ "use strict"; | ||
| function writeFromReadableStreamDefaultReader(reader, writable, currentReadPromise) { | ||
| const handleError = () => { | ||
| const cancel = (error) => { | ||
| reader.cancel(error).catch(() => { | ||
| }); | ||
| }; | ||
| writable.on("error", handleError); | ||
| writable.on("close", cancel); | ||
| writable.on("error", cancel); | ||
| (currentReadPromise ?? reader.read()).then(flow, handleStreamError); | ||
| return reader.closed.finally(() => { | ||
| writable.off("error", handleError); | ||
| writable.off("close", cancel); | ||
| writable.off("error", cancel); | ||
| }); | ||
@@ -41,0 +45,0 @@ function handleStreamError(error) { |
+7
-3
@@ -6,8 +6,12 @@ // src/utils.ts | ||
| function writeFromReadableStreamDefaultReader(reader, writable, currentReadPromise) { | ||
| const handleError = () => { | ||
| const cancel = (error) => { | ||
| reader.cancel(error).catch(() => { | ||
| }); | ||
| }; | ||
| writable.on("error", handleError); | ||
| writable.on("close", cancel); | ||
| writable.on("error", cancel); | ||
| (currentReadPromise ?? reader.read()).then(flow, handleStreamError); | ||
| return reader.closed.finally(() => { | ||
| writable.off("error", handleError); | ||
| writable.off("close", cancel); | ||
| writable.off("error", cancel); | ||
| }); | ||
@@ -14,0 +18,0 @@ function handleStreamError(error) { |
+7
-3
@@ -299,8 +299,12 @@ "use strict"; | ||
| function writeFromReadableStreamDefaultReader(reader, writable, currentReadPromise) { | ||
| const handleError = () => { | ||
| const cancel = (error) => { | ||
| reader.cancel(error).catch(() => { | ||
| }); | ||
| }; | ||
| writable.on("error", handleError); | ||
| writable.on("close", cancel); | ||
| writable.on("error", cancel); | ||
| (currentReadPromise ?? reader.read()).then(flow, handleStreamError); | ||
| return reader.closed.finally(() => { | ||
| writable.off("error", handleError); | ||
| writable.off("close", cancel); | ||
| writable.off("error", cancel); | ||
| }); | ||
@@ -307,0 +311,0 @@ function handleStreamError(error) { |
+7
-3
@@ -263,8 +263,12 @@ // src/listener.ts | ||
| function writeFromReadableStreamDefaultReader(reader, writable, currentReadPromise) { | ||
| const handleError = () => { | ||
| const cancel = (error) => { | ||
| reader.cancel(error).catch(() => { | ||
| }); | ||
| }; | ||
| writable.on("error", handleError); | ||
| writable.on("close", cancel); | ||
| writable.on("error", cancel); | ||
| (currentReadPromise ?? reader.read()).then(flow, handleStreamError); | ||
| return reader.closed.finally(() => { | ||
| writable.off("error", handleError); | ||
| writable.off("close", cancel); | ||
| writable.off("error", cancel); | ||
| }); | ||
@@ -271,0 +275,0 @@ function handleStreamError(error) { |
+1
-1
| { | ||
| "name": "@hono/node-server", | ||
| "version": "1.19.4", | ||
| "version": "1.19.5", | ||
| "description": "Node.js Adapter for Hono", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
205020
0.51%6047
0.67%