@hono/node-server
Advanced tools
Comparing version 1.12.0 to 1.12.1
@@ -387,14 +387,20 @@ "use strict"; | ||
if (internalBody) { | ||
if (internalBody.length) { | ||
resHeaderRecord["content-length"] = internalBody.length; | ||
} | ||
outgoing.writeHead(res.status, resHeaderRecord); | ||
if (typeof internalBody.source === "string" || internalBody.source instanceof Uint8Array) { | ||
outgoing.end(internalBody.source); | ||
} else if (internalBody.source instanceof Blob) { | ||
outgoing.end(new Uint8Array(await internalBody.source.arrayBuffer())); | ||
const { length, source, stream } = internalBody; | ||
if (source instanceof Uint8Array && source.byteLength !== length) { | ||
} else { | ||
await writeFromReadableStream(internalBody.stream, outgoing); | ||
if (length) { | ||
resHeaderRecord["content-length"] = length; | ||
} | ||
outgoing.writeHead(res.status, resHeaderRecord); | ||
if (typeof source === "string" || source instanceof Uint8Array) { | ||
outgoing.end(source); | ||
} else if (source instanceof Blob) { | ||
outgoing.end(new Uint8Array(await source.arrayBuffer())); | ||
} else { | ||
await writeFromReadableStream(stream, outgoing); | ||
} | ||
return; | ||
} | ||
} else if (res.body) { | ||
} | ||
if (res.body) { | ||
const { | ||
@@ -401,0 +407,0 @@ "transfer-encoding": transferEncoding, |
@@ -381,14 +381,20 @@ "use strict"; | ||
if (internalBody) { | ||
if (internalBody.length) { | ||
resHeaderRecord["content-length"] = internalBody.length; | ||
} | ||
outgoing.writeHead(res.status, resHeaderRecord); | ||
if (typeof internalBody.source === "string" || internalBody.source instanceof Uint8Array) { | ||
outgoing.end(internalBody.source); | ||
} else if (internalBody.source instanceof Blob) { | ||
outgoing.end(new Uint8Array(await internalBody.source.arrayBuffer())); | ||
const { length, source, stream } = internalBody; | ||
if (source instanceof Uint8Array && source.byteLength !== length) { | ||
} else { | ||
await writeFromReadableStream(internalBody.stream, outgoing); | ||
if (length) { | ||
resHeaderRecord["content-length"] = length; | ||
} | ||
outgoing.writeHead(res.status, resHeaderRecord); | ||
if (typeof source === "string" || source instanceof Uint8Array) { | ||
outgoing.end(source); | ||
} else if (source instanceof Blob) { | ||
outgoing.end(new Uint8Array(await source.arrayBuffer())); | ||
} else { | ||
await writeFromReadableStream(stream, outgoing); | ||
} | ||
return; | ||
} | ||
} else if (res.body) { | ||
} | ||
if (res.body) { | ||
const { | ||
@@ -395,0 +401,0 @@ "transfer-encoding": transferEncoding, |
@@ -383,14 +383,20 @@ "use strict"; | ||
if (internalBody) { | ||
if (internalBody.length) { | ||
resHeaderRecord["content-length"] = internalBody.length; | ||
} | ||
outgoing.writeHead(res.status, resHeaderRecord); | ||
if (typeof internalBody.source === "string" || internalBody.source instanceof Uint8Array) { | ||
outgoing.end(internalBody.source); | ||
} else if (internalBody.source instanceof Blob) { | ||
outgoing.end(new Uint8Array(await internalBody.source.arrayBuffer())); | ||
const { length, source, stream } = internalBody; | ||
if (source instanceof Uint8Array && source.byteLength !== length) { | ||
} else { | ||
await writeFromReadableStream(internalBody.stream, outgoing); | ||
if (length) { | ||
resHeaderRecord["content-length"] = length; | ||
} | ||
outgoing.writeHead(res.status, resHeaderRecord); | ||
if (typeof source === "string" || source instanceof Uint8Array) { | ||
outgoing.end(source); | ||
} else if (source instanceof Blob) { | ||
outgoing.end(new Uint8Array(await source.arrayBuffer())); | ||
} else { | ||
await writeFromReadableStream(stream, outgoing); | ||
} | ||
return; | ||
} | ||
} else if (res.body) { | ||
} | ||
if (res.body) { | ||
const { | ||
@@ -397,0 +403,0 @@ "transfer-encoding": transferEncoding, |
@@ -381,14 +381,20 @@ "use strict"; | ||
if (internalBody) { | ||
if (internalBody.length) { | ||
resHeaderRecord["content-length"] = internalBody.length; | ||
} | ||
outgoing.writeHead(res.status, resHeaderRecord); | ||
if (typeof internalBody.source === "string" || internalBody.source instanceof Uint8Array) { | ||
outgoing.end(internalBody.source); | ||
} else if (internalBody.source instanceof Blob) { | ||
outgoing.end(new Uint8Array(await internalBody.source.arrayBuffer())); | ||
const { length, source, stream } = internalBody; | ||
if (source instanceof Uint8Array && source.byteLength !== length) { | ||
} else { | ||
await writeFromReadableStream(internalBody.stream, outgoing); | ||
if (length) { | ||
resHeaderRecord["content-length"] = length; | ||
} | ||
outgoing.writeHead(res.status, resHeaderRecord); | ||
if (typeof source === "string" || source instanceof Uint8Array) { | ||
outgoing.end(source); | ||
} else if (source instanceof Blob) { | ||
outgoing.end(new Uint8Array(await source.arrayBuffer())); | ||
} else { | ||
await writeFromReadableStream(stream, outgoing); | ||
} | ||
return; | ||
} | ||
} else if (res.body) { | ||
} | ||
if (res.body) { | ||
const { | ||
@@ -395,0 +401,0 @@ "transfer-encoding": transferEncoding, |
{ | ||
"name": "@hono/node-server", | ||
"version": "1.12.0", | ||
"version": "1.12.1", | ||
"description": "Node.js Adapter for Hono", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
162278
4921