Socket
Socket
Sign inDemoInstall

miniflare

Package Overview
Dependencies
Maintainers
1
Versions
305
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

miniflare - npm Package Compare versions

Comparing version 0.0.0-6523db269 to 0.0.0-66ad6dfdc

6

dist/src/workers/assets/assets-kv.worker.js

@@ -13,3 +13,7 @@ // src/workers/assets/assets-kv.worker.ts

let { filePath, contentType } = entry, response = await env[SharedBindings.MAYBE_SERVICE_BLOBS].fetch(
new URL(filePath, "http://placeholder")
new URL(
// somewhere in blobservice I think this is being decoded again
filePath.split("/").map((x) => encodeURIComponent(x)).join("/"),
"http://placeholder"
)
), newResponse = new Response(response.body, response);

@@ -16,0 +20,0 @@ return newResponse.headers.append(

7

dist/src/workers/core/entry.worker.js

@@ -689,3 +689,3 @@ // ../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs

function isObject(value) {
return value && typeof value == "object";
return !!value && typeof value == "object";
}

@@ -695,2 +695,5 @@ function getType(value) {

}
function isInternal(value) {
return isObject(value) && value[Symbol.for("cloudflare:internal-class")];
}
var ProxyServer = class {

@@ -710,3 +713,3 @@ constructor(_state, env) {

let type = getType(value);
if (type === "Object" && !isPlainObject(value) || type === "Promise") {
if ((type === "Object" || isInternal(value)) && !isPlainObject(value) || type === "Promise") {
let address = this.nextHeapAddress++;

@@ -713,0 +716,0 @@ this.heap.set(address, value), assert2(value !== null);

@@ -179,3 +179,5 @@ var __defProp = Object.defineProperty;

get #maybeProducer() {
return this.#producers[this.name];
return Object.values(this.#producers).find(
(p) => p?.queueName === this.name
);
}

@@ -266,13 +268,17 @@ get #maybeConsumer() {

message = async (req) => {
if (this.#maybeConsumer === void 0)
return new Response();
validateMessageSize(req.headers);
let contentType = validateContentType(req.headers), delay = validateMessageDelay(req.headers), body = Buffer2.from(await req.arrayBuffer());
return this.#maybeConsumer === void 0 ? new Response() : (this.#enqueue(
let contentType = validateContentType(req.headers), delay = validateMessageDelay(req.headers) ?? this.#maybeProducer?.deliveryDelay, body = Buffer2.from(await req.arrayBuffer());
return this.#enqueue(
[{ contentType, delaySecs: delay, body }],
this.#maybeProducer?.deliveryDelay
), new Response());
), new Response();
};
batch = async (req) => {
if (this.#maybeConsumer === void 0)
return new Response();
validateBatchSize(req.headers);
let delay = validateMessageDelay(req.headers) ?? this.#maybeProducer?.deliveryDelay, body = QueuesBatchRequestSchema.parse(await req.json());
return this.#maybeConsumer === void 0 ? new Response() : (this.#enqueue(body.messages, delay), new Response());
return this.#enqueue(body.messages, delay), new Response();
};

@@ -279,0 +285,0 @@ };

{
"name": "miniflare",
"version": "0.0.0-6523db269",
"version": "0.0.0-66ad6dfdc",
"description": "Fun, full-featured, fully-local simulator for Cloudflare Workers",

@@ -41,3 +41,3 @@ "keywords": [

"undici": "^5.28.4",
"workerd": "1.20240909.0",
"workerd": "1.20240925.0",
"ws": "^8.17.1",

@@ -49,3 +49,3 @@ "youch": "^3.2.2",

"@ava/typescript": "^4.1.0",
"@cloudflare/workers-types": "^4.20240909.0",
"@cloudflare/workers-types": "^4.20240925.0",
"@microsoft/api-extractor": "^7.47.0",

@@ -83,4 +83,4 @@ "@types/debug": "^4.1.7",

"which": "^2.0.2",
"@cloudflare/kv-asset-handler": "0.3.4",
"@cloudflare/workers-shared": "0.0.0-6523db269"
"@cloudflare/workers-shared": "0.0.0-66ad6dfdc",
"@cloudflare/kv-asset-handler": "0.3.4"
},

@@ -87,0 +87,0 @@ "engines": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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 too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc