@lunora/server 1.0.0-alpha.77 → 1.0.0-alpha.78
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 +1 -1
- package/dist/packem_shared/{PRESENCE_DEFAULT_TTL_MS-DdrSmNQi.mjs → PRESENCE_DEFAULT_TTL_MS-CEc-TxVw.mjs} +1 -1
- package/dist/packem_shared/defineIdentity-DwkNKwYa.mjs +1 -0
- package/dist/packem_shared/initLunora-CRypyq1P.mjs +1 -0
- package/dist/types.d.mts +6 -4
- package/dist/types.d.ts +6 -4
- package/package.json +2 -2
- package/dist/packem_shared/defineIdentity-p1mHXs8W.mjs +0 -1
- package/dist/packem_shared/initLunora-CgovElX2.mjs +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{initLunora as t}from"./packem_shared/initLunora-
|
|
1
|
+
import{initLunora as t}from"./packem_shared/initLunora-CRypyq1P.mjs";import{createSecrets as i}from"./packem_shared/createSecrets-CyrEddTF.mjs";import{LunoraEnvError as f,defineEnv as s,redactSecrets as m}from"./packem_shared/LunoraEnvError-CjFbbR9t.mjs";import{LunoraError as p}from"./packem_shared/LunoraError-DcKdk9Ti.mjs";import{bindOrm as c,bindTableFacade as l}from"./packem_shared/bindOrm-lWdeDi9P.mjs";import{httpAction as u,httpRoute as g,httpRouter as S,isSafeHeaderValue as R,serveStorageObject as h}from"./packem_shared/httpAction-Ddi7f0t6.mjs";import{defineIdentity as P}from"./packem_shared/defineIdentity-DwkNKwYa.mjs";import{onConnect as A,onDisconnect as I}from"./packem_shared/onConnect-DI23ecHU.mjs";import{DEFAULT_LIMIT as y,DEFAULT_MAX_LIMIT as M,clampLimit as _,defineListArgs as D}from"./packem_shared/DEFAULT_LIMIT-B947Pbij.mjs";import{defineMigration as k}from"./packem_shared/defineMigration-7GI9Qbtd.mjs";import{defineMutator as C}from"./packem_shared/defineMutator-DKy8UtbB.mjs";import{c as N,d as O,a as U,b as j,e as w,f as B,g as W,h as H,i as J,j as X,k as q,m as z}from"./packem_shared/plugin-CV2Fae9w.mjs";import{PRESENCE_DEFAULT_TTL_MS as K,PRESENCE_TABLE as Q,definePresence as Y,presenceExtension as Z}from"./packem_shared/PRESENCE_DEFAULT_TTL_MS-CEc-TxVw.mjs";import{protectPublic as ee}from"./packem_shared/protectPublic-Bo4G9xaV.mjs";import{defineShape as oe}from"./packem_shared/defineShape-DYxbNl5W.mjs";import{anyApi as ne}from"./types.mjs";import{cronJobs as ae}from"@lunora/scheduler";import{ValidationError as se,v as me}from"@lunora/values";import{allowAll as pe,deny as xe,isDeny as ce,toWhereInput as le}from"./packem_shared/allowAll-DkRAgItV.mjs";import{asBucketStorage as ue}from"./packem_shared/asBucketStorage-BthCnWop.mjs";import{buildMaskRegistry as Se}from"./packem_shared/buildMaskRegistry-72SL8fJn.mjs";import{buildRlsReadRegistry as he,composeShapeReadWhere as Le}from"./packem_shared/buildRlsReadRegistry-Deq8inqS.mjs";import{createPolicyDsl as be,definePermission as Ae,definePolicies as Ie,definePolicy as Te,defineRole as ye}from"./packem_shared/createPolicyDsl-DNfByAUX.mjs";import{defineStorageRule as _e,defineStorageRules as De}from"./packem_shared/defineStorageRule-BvxHVq3b.mjs";import{mask as ke}from"./packem_shared/mask-CfHNITgg.mjs";import{r as Ce}from"./packem_shared/middleware-DEW0yLvU.mjs";import{storageRules as Ne}from"./packem_shared/storageRules-CTnby6M1.mjs";const e="0.0.0";export{y as DEFAULT_LIMIT,M as DEFAULT_MAX_LIMIT,f as LunoraEnvError,p as LunoraError,K as PRESENCE_DEFAULT_TTL_MS,Q as PRESENCE_TABLE,e as VERSION,se as ValidationError,pe as allowAll,ne as anyApi,ue as asBucketStorage,c as bindOrm,l as bindTableFacade,Se as buildMaskRegistry,he as buildRlsReadRegistry,_ as clampLimit,N as composePluginMiddleware,Le as composeShapeReadWhere,be as createPolicyDsl,i as createSecrets,ae as cronJobs,O as defineAggregateIndex,U as defineComponent,s as defineEnv,P as defineIdentity,D as defineListArgs,k as defineMigration,C as defineMutator,Ae as definePermission,j as definePlugin,Ie as definePolicies,Te as definePolicy,Y as definePresence,w as defineRankIndex,ye as defineRole,B as defineSchema,W as defineSchemaExtension,oe as defineShape,_e as defineStorageRule,De as defineStorageRules,H as defineTable,J as defineVectorIndex,xe as deny,u as httpAction,g as httpRoute,S as httpRouter,X as indexFieldsFromSchema,t as initLunora,q as installPlugins,ce as isDeny,R as isSafeHeaderValue,ke as mask,z as mergeSchemaExtension,A as onConnect,I as onDisconnect,Z as presenceExtension,ee as protectPublic,m as redactSecrets,Ce as rls,h as serveStorageObject,Ne as storageRules,le as toWhereInput,me as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{v as t}from"@lunora/values";import{initLunora as R}from"./initLunora-
|
|
1
|
+
import{v as t}from"@lunora/values";import{initLunora as R}from"./initLunora-CRypyq1P.mjs";import{LunoraError as S}from"./LunoraError-DcKdk9Ti.mjs";import{onDisconnect as T}from"./onConnect-DI23ecHU.mjs";import{g,h as q,a as v}from"./plugin-CV2Fae9w.mjs";const D=3e4,p=4096,u="presence",b="present",m=`${u}_${b}`,M=g(u,{tables:{[b]:q({data:t.optional(t.record(t.string(),t.any())),lastSeen:t.number(),roomId:t.string(),sessionId:t.string(),userId:t.optional(t.string())}).index("byRoomSession",["roomId","sessionId"]).index("byRoom",["roomId"])}}),{mutation:E,query:A}=R.dataModel().create(),F=(f={})=>{const I=f.ttlMs??D,w=Math.max(0,Math.min(f.disconnectGraceMs??0,I)),y=E.input({data:t.optional(t.record(t.string(),t.any())),roomId:t.string(),sessionId:t.string()}).mutation(async({args:o,ctx:n})=>{const r=Date.now(),i=n.auth.userId??void 0;if(o.data!==void 0&&new TextEncoder().encode(JSON.stringify(o.data)).length>p)throw new S("BAD_REQUEST",`presence data exceeds the ${String(p)}-byte limit`);const e=await n.db.query(m).withIndex("byRoomSession",c=>c.eq("roomId",o.roomId).eq("sessionId",o.sessionId)).first();if(e&&(e.userId??void 0)!==i)throw new S("FORBIDDEN","presence heartbeat denied: this (roomId, sessionId) is held by another identity");const d={lastSeen:r,roomId:o.roomId,sessionId:o.sessionId,...o.data===void 0?{}:{data:o.data},...i===void 0?{}:{userId:i}};return await(e?n.db.patch(e._id,d):n.db.insert(m,d)),{lastSeen:r}}),h=A.input({roomId:t.string()}).query(async({args:o,ctx:n})=>{const r=Date.now()-I,e=(await n.db.query(m).withIndex("byRoom",s=>s.eq("roomId",o.roomId)).collect()).filter(s=>s.lastSeen>r).toSorted((s,a)=>a.lastSeen-s.lastSeen),d=new Set,c=[];for(const s of e){const a=s.userId;if(a!==void 0){if(d.has(a))continue;d.add(a)}const l={lastSeen:s.lastSeen,roomId:s.roomId};a!==void 0&&(l.userId=a),s.data!==void 0&&(l.data=s.data),c.push(l)}return c}),_={...E.input({roomId:t.string()}).mutation(async({args:o,ctx:n})=>{const r=Date.now()-I,i=await n.db.query(m).withIndex("byRoom",e=>e.eq("roomId",o.roomId)).filter(e=>e.lastSeen<=r).collect();return await Promise.all(i.map(e=>n.db.delete(e._id))),{deleted:i.length}}),visibility:"internal"},x=T(async(o,n)=>{const r=n.context?.roomId,i=n.context?.sessionId;if(typeof r!="string"||typeof i!="string")return;const e=await o.db.query(m).withIndex("byRoomSession",s=>s.eq("roomId",r).eq("sessionId",i)).first();if(!e)return;const d=n.userId??void 0;if((e.userId??void 0)!==d)return;if(w===0){await o.db.delete(e._id);return}const c=Math.min(e.lastSeen,Date.now()+w-I);await o.db.patch(e._id,{lastSeen:c})});return v(u,{extension:M,functions:{disconnect:x,heartbeat:y,listPresent:h,sweep:_}})};export{D as PRESENCE_DEFAULT_TTL_MS,m as PRESENCE_TABLE,F as definePresence,M as presenceExtension};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{LunoraError as d}from"@lunora/errors";import{parseValidatorMap as s,ValidationError as l}from"@lunora/values";const u=new Set(["array","bigint","boolean","bytes","date","geoPoint","null","number","object","optional","record","timestamp"]),p=(o,n={})=>{const r=o,e=r.userId;if(e===void 0||u.has(e.kind))throw new d("INTERNAL","defineIdentity: the claim map must declare a required string `userId` validator (e.g. `v.string()` or `v.id(...)`)");const a=n.onInvalid??"anonymous";return{__lunoraIdentity:!0,claims:r,onInvalid:a,validate:i=>{try{return s(r,i,"identity"),{ok:!0}}catch(t){return{error:t instanceof l?t.message:String(t),ok:!1}}}}};export{p as defineIdentity};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{v as f}from"./functions-B2-H4PQT.mjs";import{readMaskTag as M}from"./buildMaskRegistry-72SL8fJn.mjs";import{r as h}from"./policy-tag-D4RzgQnw.mjs";import{r as j}from"./run-middleware-B-JeGGp9.mjs";const x=(e,r)=>r===void 0||typeof e!="object"||e===null?e:Object.assign(Object.create(Object.getPrototypeOf(e)),e,{meta:r}),i=(e,r)=>j(e,r,o=>o),_=(e,r,o,a,n)=>async(s,u)=>{const c=f(e,u),t=await i(r,x(s,n)),l=await o({args:c,ctx:t});return a?a.parse(l):l},q=(e,r,o,a)=>(n,s,u)=>{const c=f(e,s);return(async function*(){const l=await i(r,x(n,a)),m=o({args:c,ctx:l,signal:u})[Symbol.asyncIterator]();try{for(;;){if(u.aborted)return;const w=await m.next();if(w.done||u.aborted)return;yield w.value}}finally{await m.return?.()}})()},g=e=>{const r=e.map(o=>h(o)).filter(o=>o!==void 0);return r.length>0?{tags:r}:void 0},p=e=>{const r=new Map;for(const o of e){const a=M(o);if(a)for(const[n,s]of a.columns){const u=r.get(n)??new Set;for(const c of s)u.add(c);r.set(n,u)}}return r.size>0?r:void 0},d=(e,r,o)=>({__lunoraProcedure:e,...o?{__lunoraVisibility:o}:{},input:a=>d(e,{...r,args:{...r.args,...a}},o),[e]:a=>{const n=g(r.middlewares),s=p(r.middlewares);return{args:r.args,...r.expose?{expose:r.expose}:{},handler:_(r.args,r.middlewares,a,r.output,r.meta),kind:e,...s?{maskedTables:s}:{},...r.meta?{meta:r.meta}:{},...n?{rls:n}:{},...o?{visibility:o}:{},...r.x402?{x402:r.x402}:{}}},meta:a=>d(e,{...r,meta:Object.freeze({...r.meta,...a})},o),output:a=>d(e,{...r,output:a},o),...e==="query"?{stream:(a,n)=>{const s=g(r.middlewares),u=p(r.middlewares),c=n?.durable===!0?{}:n?.durable;return{args:r.args,...c?{durable:c}:{},...r.expose?{expose:r.expose}:{},handler:q(r.args,r.middlewares,a,r.meta),kind:"stream",...u?{maskedTables:u}:{},...r.meta?{meta:r.meta}:{},...s?{rls:s}:{},...o?{visibility:o}:{},...r.x402?{x402:r.x402}:{}}}}:{},use:a=>d(e,{...r,middlewares:[...r.middlewares,a]},o),...o?{}:{expose:a=>d(e,{...r,expose:a},o)},...o?{}:{x402:a=>d(e,{...r,x402:a},o)}}),y={dataModel:()=>({create:e=>({action:d("action",{args:{},middlewares:[]}),internalAction:d("action",{args:{},middlewares:[]},"internal"),internalMutation:d("mutation",{args:{},middlewares:[]},"internal"),internalQuery:d("query",{args:{},middlewares:[]},"internal"),mutation:d("mutation",{args:{},middlewares:[]}),query:d("query",{args:{},middlewares:[]})})})};export{y as initLunora};
|
package/dist/types.d.mts
CHANGED
|
@@ -557,7 +557,7 @@ interface RegisteredFunction<A extends ArgsValidator, R, Kind extends FunctionKi
|
|
|
557
557
|
* middleware (via `ctx.meta`) and tooling can read the same object; absent
|
|
558
558
|
* when the chain never called `.meta()`.
|
|
559
559
|
*/
|
|
560
|
-
readonly meta?: Record<string, unknown
|
|
560
|
+
readonly meta?: Readonly<Record<string, unknown>>;
|
|
561
561
|
readonly visibility?: FunctionVisibility;
|
|
562
562
|
/**
|
|
563
563
|
* Set by the `.x402({ price })` builder modifier. Marks the procedure as paid
|
|
@@ -655,6 +655,8 @@ interface RegisteredStream<A extends ArgsValidator, R> {
|
|
|
655
655
|
readonly durable?: DurableStreamOptions;
|
|
656
656
|
readonly handler: (context: unknown, args: InferArgs<A>, signal: AbortSignal) => AsyncIterable<R>;
|
|
657
657
|
readonly kind: "stream";
|
|
658
|
+
/** Static per-procedure metadata attached via `.meta()`. See {@link RegisteredFunction.meta}. */
|
|
659
|
+
readonly meta?: Readonly<Record<string, unknown>>;
|
|
658
660
|
readonly visibility?: FunctionVisibility;
|
|
659
661
|
}
|
|
660
662
|
/**
|
|
@@ -1955,7 +1957,7 @@ interface QueryCtx {
|
|
|
1955
1957
|
* enforce (`ctx.meta.rateLimit`, …) instead of having it hard-wired at each
|
|
1956
1958
|
* `.use()` site; absent when the procedure never called `.meta()`.
|
|
1957
1959
|
*/
|
|
1958
|
-
readonly meta?: Record<string, unknown
|
|
1960
|
+
readonly meta?: Readonly<Record<string, unknown>>;
|
|
1959
1961
|
readonly metrics: LunoraMetrics;
|
|
1960
1962
|
/**
|
|
1961
1963
|
* Wall-clock time (epoch ms) the function began, captured once so the whole
|
|
@@ -2010,7 +2012,7 @@ interface MutationCtx {
|
|
|
2010
2012
|
* enforce (`ctx.meta.rateLimit`, …) instead of having it hard-wired at each
|
|
2011
2013
|
* `.use()` site; absent when the procedure never called `.meta()`.
|
|
2012
2014
|
*/
|
|
2013
|
-
readonly meta?: Record<string, unknown
|
|
2015
|
+
readonly meta?: Readonly<Record<string, unknown>>;
|
|
2014
2016
|
readonly metrics: LunoraMetrics;
|
|
2015
2017
|
/**
|
|
2016
2018
|
* Wall-clock time (epoch ms) the function began, captured once so the whole
|
|
@@ -2083,7 +2085,7 @@ interface ActionCtx {
|
|
|
2083
2085
|
* enforce (`ctx.meta.rateLimit`, …) instead of having it hard-wired at each
|
|
2084
2086
|
* `.use()` site; absent when the procedure never called `.meta()`.
|
|
2085
2087
|
*/
|
|
2086
|
-
readonly meta?: Record<string, unknown
|
|
2088
|
+
readonly meta?: Readonly<Record<string, unknown>>;
|
|
2087
2089
|
readonly metrics: LunoraMetrics;
|
|
2088
2090
|
/**
|
|
2089
2091
|
* Wall-clock time (epoch ms) the action began, captured once for convenience
|
package/dist/types.d.ts
CHANGED
|
@@ -557,7 +557,7 @@ interface RegisteredFunction<A extends ArgsValidator, R, Kind extends FunctionKi
|
|
|
557
557
|
* middleware (via `ctx.meta`) and tooling can read the same object; absent
|
|
558
558
|
* when the chain never called `.meta()`.
|
|
559
559
|
*/
|
|
560
|
-
readonly meta?: Record<string, unknown
|
|
560
|
+
readonly meta?: Readonly<Record<string, unknown>>;
|
|
561
561
|
readonly visibility?: FunctionVisibility;
|
|
562
562
|
/**
|
|
563
563
|
* Set by the `.x402({ price })` builder modifier. Marks the procedure as paid
|
|
@@ -655,6 +655,8 @@ interface RegisteredStream<A extends ArgsValidator, R> {
|
|
|
655
655
|
readonly durable?: DurableStreamOptions;
|
|
656
656
|
readonly handler: (context: unknown, args: InferArgs<A>, signal: AbortSignal) => AsyncIterable<R>;
|
|
657
657
|
readonly kind: "stream";
|
|
658
|
+
/** Static per-procedure metadata attached via `.meta()`. See {@link RegisteredFunction.meta}. */
|
|
659
|
+
readonly meta?: Readonly<Record<string, unknown>>;
|
|
658
660
|
readonly visibility?: FunctionVisibility;
|
|
659
661
|
}
|
|
660
662
|
/**
|
|
@@ -1955,7 +1957,7 @@ interface QueryCtx {
|
|
|
1955
1957
|
* enforce (`ctx.meta.rateLimit`, …) instead of having it hard-wired at each
|
|
1956
1958
|
* `.use()` site; absent when the procedure never called `.meta()`.
|
|
1957
1959
|
*/
|
|
1958
|
-
readonly meta?: Record<string, unknown
|
|
1960
|
+
readonly meta?: Readonly<Record<string, unknown>>;
|
|
1959
1961
|
readonly metrics: LunoraMetrics;
|
|
1960
1962
|
/**
|
|
1961
1963
|
* Wall-clock time (epoch ms) the function began, captured once so the whole
|
|
@@ -2010,7 +2012,7 @@ interface MutationCtx {
|
|
|
2010
2012
|
* enforce (`ctx.meta.rateLimit`, …) instead of having it hard-wired at each
|
|
2011
2013
|
* `.use()` site; absent when the procedure never called `.meta()`.
|
|
2012
2014
|
*/
|
|
2013
|
-
readonly meta?: Record<string, unknown
|
|
2015
|
+
readonly meta?: Readonly<Record<string, unknown>>;
|
|
2014
2016
|
readonly metrics: LunoraMetrics;
|
|
2015
2017
|
/**
|
|
2016
2018
|
* Wall-clock time (epoch ms) the function began, captured once so the whole
|
|
@@ -2083,7 +2085,7 @@ interface ActionCtx {
|
|
|
2083
2085
|
* enforce (`ctx.meta.rateLimit`, …) instead of having it hard-wired at each
|
|
2084
2086
|
* `.use()` site; absent when the procedure never called `.meta()`.
|
|
2085
2087
|
*/
|
|
2086
|
-
readonly meta?: Record<string, unknown
|
|
2088
|
+
readonly meta?: Readonly<Record<string, unknown>>;
|
|
2087
2089
|
readonly metrics: LunoraMetrics;
|
|
2088
2090
|
/**
|
|
2089
2091
|
* Wall-clock time (epoch ms) the action began, captured once for convenience
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/server",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.78",
|
|
4
4
|
"description": "Server primitives for Lunora: defineSchema, defineTable, query, mutation, and action",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"backend",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@lunora/errors": "1.0.0-alpha.22",
|
|
70
|
-
"@lunora/scheduler": "1.0.0-alpha.
|
|
70
|
+
"@lunora/scheduler": "1.0.0-alpha.34",
|
|
71
71
|
"@lunora/values": "1.0.0-alpha.27",
|
|
72
72
|
"drizzle-orm": "^0.45.2",
|
|
73
73
|
"hono": "^4.13.1"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{LunoraError as d}from"@lunora/errors";import{parseValidatorMap as s,ValidationError as l}from"@lunora/values";const u=new Set(["array","bigint","boolean","bytes","date","null","number","object","optional","record","timestamp"]),p=(o,a={})=>{const r=o,e=r.userId;if(e===void 0||u.has(e.kind))throw new d("INTERNAL","defineIdentity: the claim map must declare a required string `userId` validator (e.g. `v.string()` or `v.id(...)`)");const n=a.onInvalid??"anonymous";return{__lunoraIdentity:!0,claims:r,onInvalid:n,validate:i=>{try{return s(r,i,"identity"),{ok:!0}}catch(t){return{error:t instanceof l?t.message:String(t),ok:!1}}}}};export{p as defineIdentity};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{v as f}from"./functions-B2-H4PQT.mjs";import{readMaskTag as i}from"./buildMaskRegistry-72SL8fJn.mjs";import{r as M}from"./policy-tag-D4RzgQnw.mjs";import{r as h}from"./run-middleware-B-JeGGp9.mjs";const _=(e,r)=>r===void 0||typeof e!="object"||e===null?e:Object.assign(Object.create(Object.getPrototypeOf(e)),e,{meta:r}),x=(e,r)=>h(e,r,o=>o),j=(e,r,o,a,s)=>async(n,u)=>{const c=f(e,u),t=await x(r,_(n,s)),l=await o({args:c,ctx:t});return a?a.parse(l):l},q=(e,r,o)=>(a,s,n)=>{const u=f(e,s);return(async function*(){const t=await x(r,a),m=o({args:u,ctx:t,signal:n})[Symbol.asyncIterator]();try{for(;;){if(n.aborted)return;const w=await m.next();if(w.done||n.aborted)return;yield w.value}}finally{await m.return?.()}})()},g=e=>{const r=e.map(o=>M(o)).filter(o=>o!==void 0);return r.length>0?{tags:r}:void 0},p=e=>{const r=new Map;for(const o of e){const a=i(o);if(a)for(const[s,n]of a.columns){const u=r.get(s)??new Set;for(const c of n)u.add(c);r.set(s,u)}}return r.size>0?r:void 0},d=(e,r,o)=>({__lunoraProcedure:e,...o?{__lunoraVisibility:o}:{},input:a=>d(e,{...r,args:{...r.args,...a}},o),[e]:a=>{const s=g(r.middlewares),n=p(r.middlewares);return{args:r.args,...r.expose?{expose:r.expose}:{},handler:j(r.args,r.middlewares,a,r.output,r.meta),kind:e,...n?{maskedTables:n}:{},...r.meta?{meta:r.meta}:{},...s?{rls:s}:{},...o?{visibility:o}:{},...r.x402?{x402:r.x402}:{}}},meta:a=>d(e,{...r,meta:{...r.meta,...a}},o),output:a=>d(e,{...r,output:a},o),...e==="query"?{stream:(a,s)=>{const n=g(r.middlewares),u=p(r.middlewares),c=s?.durable===!0?{}:s?.durable;return{args:r.args,...c?{durable:c}:{},...r.expose?{expose:r.expose}:{},handler:q(r.args,r.middlewares,a),kind:"stream",...u?{maskedTables:u}:{},...n?{rls:n}:{},...o?{visibility:o}:{},...r.x402?{x402:r.x402}:{}}}}:{},use:a=>d(e,{...r,middlewares:[...r.middlewares,a]},o),...o?{}:{expose:a=>d(e,{...r,expose:a},o)},...o?{}:{x402:a=>d(e,{...r,x402:a},o)}}),b={dataModel:()=>({create:e=>({action:d("action",{args:{},middlewares:[]}),internalAction:d("action",{args:{},middlewares:[]},"internal"),internalMutation:d("mutation",{args:{},middlewares:[]},"internal"),internalQuery:d("query",{args:{},middlewares:[]},"internal"),mutation:d("mutation",{args:{},middlewares:[]}),query:d("query",{args:{},middlewares:[]})})})};export{b as initLunora};
|