@miniflare/http-server
Advanced tools
Comparing version 2.12.0 to 2.12.1
@@ -48,3 +48,2 @@ var __create = Object.create; | ||
var import_net = __toModule(require("net")); | ||
var import_web = __toModule(require("stream/web")); | ||
var import_url = __toModule(require("url")); | ||
@@ -402,26 +401,4 @@ var import_zlib = __toModule(require("zlib")); | ||
let body = null; | ||
if (req.method !== "GET" && req.method !== "HEAD") { | ||
let iterator; | ||
body = new import_web.ReadableStream({ | ||
type: "bytes", | ||
start() { | ||
iterator = req[Symbol.asyncIterator](); | ||
}, | ||
async pull(controller) { | ||
const { done, value } = await iterator.next(); | ||
if (done) { | ||
queueMicrotask(() => { | ||
controller.close(); | ||
controller.byobRequest?.respond(0); | ||
}); | ||
} else { | ||
const buffer = Buffer.isBuffer(value) ? value : Buffer.from(value); | ||
controller.enqueue(new Uint8Array(buffer)); | ||
} | ||
}, | ||
async cancel() { | ||
await iterator.return?.(); | ||
} | ||
}); | ||
} | ||
if (req.method !== "GET" && req.method !== "HEAD") | ||
body = req; | ||
const proto = meta?.forwardedProto ?? "https"; | ||
@@ -452,3 +429,4 @@ let ip = meta?.realIp ?? req.socket.remoteAddress ?? ""; | ||
}, | ||
redirect: "manual" | ||
redirect: "manual", | ||
duplex: body === null ? void 0 : "half" | ||
}); | ||
@@ -455,0 +433,0 @@ return { request, url }; |
{ | ||
"name": "@miniflare/http-server", | ||
"version": "2.12.0", | ||
"version": "2.12.1", | ||
"description": "HTTP server module for Miniflare: a fun, full-featured, fully-local simulator for Cloudflare Workers", | ||
@@ -38,8 +38,8 @@ "keywords": [ | ||
"dependencies": { | ||
"@miniflare/core": "2.12.0", | ||
"@miniflare/shared": "2.12.0", | ||
"@miniflare/web-sockets": "2.12.0", | ||
"@miniflare/core": "2.12.1", | ||
"@miniflare/shared": "2.12.1", | ||
"@miniflare/web-sockets": "2.12.1", | ||
"kleur": "^4.1.4", | ||
"selfsigned": "^2.0.0", | ||
"undici": "5.11.0", | ||
"undici": "5.20.0", | ||
"ws": "^8.2.2", | ||
@@ -49,5 +49,5 @@ "youch": "^2.2.2" | ||
"devDependencies": { | ||
"@miniflare/shared-test": "2.12.0", | ||
"@miniflare/shared-test": "2.12.1", | ||
"@types/node-forge": "^0.10.4" | ||
} | ||
} |
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
43882
766
+ Added@miniflare/core@2.12.1(transitive)
+ Added@miniflare/queues@2.12.1(transitive)
+ Added@miniflare/shared@2.12.1(transitive)
+ Added@miniflare/watcher@2.12.1(transitive)
+ Added@miniflare/web-sockets@2.12.1(transitive)
+ Addedundici@5.20.0(transitive)
- Removed@miniflare/core@2.12.0(transitive)
- Removed@miniflare/queues@2.12.0(transitive)
- Removed@miniflare/shared@2.12.0(transitive)
- Removed@miniflare/watcher@2.12.0(transitive)
- Removed@miniflare/web-sockets@2.12.0(transitive)
- Removedundici@5.11.0(transitive)
Updated@miniflare/core@2.12.1
Updated@miniflare/shared@2.12.1
Updatedundici@5.20.0