@lunora/queue 1.0.0-alpha.14 → 1.0.0-alpha.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{createQueueCaptureSink as t,shouldCaptureQueue as r}from"./packem_shared/createQueueCaptureSink-saac8Ywl.mjs";import{createQueueContext as a}from"./packem_shared/createQueueContext-BuXG9VQI.mjs";import{default as i}from"./packem_shared/createQueues-BZBGfWI4.mjs";import{defineQueue as p,isQueueDefinition as m,queueBindingName as x,queueDefaultName as Q}from"./packem_shared/defineQueue-DJYVNfQY.mjs";import{dispatchQueueBatch as d}from"./packem_shared/dispatchQueueBatch-BYb3OFCX.mjs";import{createQueueRunContext as C}from"./packem_shared/createQueueRunContext-Dg_fCCaC.mjs";export{t as createQueueCaptureSink,a as createQueueContext,C as createQueueRunContext,i as createQueues,p as defineQueue,d as dispatchQueueBatch,m as isQueueDefinition,x as queueBindingName,Q as queueDefaultName,r as shouldCaptureQueue};
1
+ import{createQueueCaptureSink as t,shouldCaptureQueue as r}from"./packem_shared/createQueueCaptureSink-saac8Ywl.mjs";import{createQueueContext as a}from"./packem_shared/createQueueContext-jtkVvBM-.mjs";import{default as i}from"./packem_shared/createQueues-CrQQIHtU.mjs";import{defineQueue as p,isQueueDefinition as m,queueBindingName as x,queueDefaultName as Q}from"./packem_shared/defineQueue-DJYVNfQY.mjs";import{dispatchQueueBatch as d}from"./packem_shared/dispatchQueueBatch-BYb3OFCX.mjs";import{createQueueRunContext as C}from"./packem_shared/createQueueRunContext-Dg_fCCaC.mjs";export{t as createQueueCaptureSink,a as createQueueContext,C as createQueueRunContext,i as createQueues,p as defineQueue,d as dispatchQueueBatch,m as isQueueDefinition,x as queueBindingName,Q as queueDefaultName,r as shouldCaptureQueue};
@@ -1 +1 @@
1
- import i from"./createQueues-BZBGfWI4.mjs";const f=(e,c)=>{const t={};for(const o of c){const n=e[o.binding];n&&typeof n.send=="function"&&typeof n.sendBatch=="function"&&(t[o.exportName]=n)}return i({bindings:t})};export{f as createQueueContext};
1
+ import i from"./createQueues-CrQQIHtU.mjs";const f=(e,c)=>{const t={};for(const o of c){const n=e[o.binding];n&&typeof n.send=="function"&&typeof n.sendBatch=="function"&&(t[o.exportName]=n)}return i({bindings:t})};export{f as createQueueContext};
@@ -0,0 +1 @@
1
+ const u=o=>({send:async(s,n)=>{await o.send(s,n)},sendBatch:async(s,n)=>{const t=[...s];if(t.length>100)throw new Error(`@lunora/queue: sendBatch exceeds ${String(100)} (got ${String(t.length)}) — split across calls`);await o.sendBatch(t,n)}}),d=o=>{const s=o.bindings??{},n=Object.create(null);for(const[r,e]of Object.entries(s))n[r]=u(e);const t=Object.keys(n),a=r=>{const e=t.length===0?"no queues are declared":`known queues: ${t.join(", ")}`,c=()=>Promise.reject(new Error(`@lunora/queue: no queue named "${r}" (${e})`));return{send:c,sendBatch:c}};return new Proxy(n,{get(r,e){if(typeof e=="string")return Object.hasOwn(r,e)?r[e]:a(e)}})};export{d as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunora/queue",
3
- "version": "1.0.0-alpha.14",
3
+ "version": "1.0.0-alpha.16",
4
4
  "description": "Cloudflare Queues for Lunora: defineQueue producers + consumers, the ctx.queues surface, and the generated queue() worker handler",
5
5
  "keywords": [
6
6
  "background-jobs",
@@ -44,8 +44,8 @@
44
44
  "access": "public"
45
45
  },
46
46
  "dependencies": {
47
- "@lunora/errors": "1.0.0-alpha.11",
48
- "@lunora/platform": "1.0.0-alpha.2"
47
+ "@lunora/errors": "1.0.0-alpha.12",
48
+ "@lunora/platform": "1.0.0-alpha.4"
49
49
  },
50
50
  "engines": {
51
51
  "node": "^22.15.0 || >=24.11.0"
@@ -1 +0,0 @@
1
- const u=r=>({send:async(s,n)=>{await r.send(s,n)},sendBatch:async(s,n)=>{await r.sendBatch(s,n)}}),d=r=>{const s=r.bindings??{},n=Object.create(null);for(const[t,e]of Object.entries(s))n[t]=u(e);const c=Object.keys(n),a=t=>{const e=c.length===0?"no queues are declared":`known queues: ${c.join(", ")}`,o=()=>Promise.reject(new Error(`@lunora/queue: no queue named "${t}" (${e})`));return{send:o,sendBatch:o}};return new Proxy(n,{get(t,e){if(typeof e=="string")return Object.hasOwn(t,e)?t[e]:a(e)}})};export{d as default};