@lunora/queue 1.0.0-alpha.23 → 1.0.0-alpha.25
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-
|
|
1
|
+
import{createQueueCaptureSink as t,shouldCaptureQueue as r}from"./packem_shared/createQueueCaptureSink-saac8Ywl.mjs";import{createQueueContext as a}from"./packem_shared/createQueueContext-D7m3HzzL.mjs";import{default as i}from"./packem_shared/createQueues-lUaHm_Qo.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};
|
package/dist/packem_shared/{createQueueContext-jtkVvBM-.mjs → createQueueContext-D7m3HzzL.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import i from"./createQueues-
|
|
1
|
+
import i from"./createQueues-lUaHm_Qo.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
|
+
import{LunoraError as i}from"@lunora/errors";const c=100,d=o=>({send:async(s,n)=>{await o.send(s,n)},sendBatch:async(s,n)=>{const t=[...s];if(t.length>c)throw new i("VALIDATION_ERROR",`@lunora/queue: sendBatch exceeds ${String(c)} (got ${String(t.length)}) — split across calls`);await o.sendBatch(t,n)}}),g=o=>{const s=o.bindings??{},n=Object.create(null);for(const[r,e]of Object.entries(s))n[r]=d(e);const t=Object.keys(n),u=r=>{const e=t.length===0?"no queues are declared":`known queues: ${t.join(", ")}`,a=()=>Promise.reject(new Error(`@lunora/queue: no queue named "${r}" (${e})`));return{send:a,sendBatch:a}};return new Proxy(n,{get(r,e){if(typeof e=="string")return Object.hasOwn(r,e)?r[e]:u(e)}})};export{g as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/queue",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.25",
|
|
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.
|
|
48
|
-
"@lunora/platform": "1.0.0-alpha.
|
|
47
|
+
"@lunora/errors": "1.0.0-alpha.20",
|
|
48
|
+
"@lunora/platform": "1.0.0-alpha.9"
|
|
49
49
|
},
|
|
50
50
|
"engines": {
|
|
51
51
|
"node": "^22.15.0 || >=24.11.0"
|
|
@@ -1 +0,0 @@
|
|
|
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};
|