Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

miniflare

Package Overview
Dependencies
Maintainers
1
Versions
466
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-9442ec755 to 0.0.0-9649dbc74

16

dist/src/workers/queues/broker.worker.js

@@ -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-9442ec755",
"version": "0.0.0-9649dbc74",
"description": "Fun, full-featured, fully-local simulator for Cloudflare Workers",

@@ -81,4 +81,4 @@ "keywords": [

"which": "^2.0.2",
"@cloudflare/workers-shared": "0.0.0-9442ec755",
"@cloudflare/kv-asset-handler": "0.3.4"
"@cloudflare/kv-asset-handler": "0.3.4",
"@cloudflare/workers-shared": "0.0.0-9649dbc74"
},

@@ -85,0 +85,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

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